|
| 1 | +require_relative '../service' |
| 2 | +module Adyen |
| 3 | + class AndroidFilesCompanyLevelApi < Service |
| 4 | + attr_accessor :service, :version |
| 5 | + |
| 6 | + def initialize(client, version = DEFAULT_VERSION) |
| 7 | + super(client, version, 'Management') |
| 8 | + end |
| 9 | + |
| 10 | + def list_android_apps(company_id, headers: {}, query_params: {}) |
| 11 | + endpoint = '/companies/{companyId}/androidApps'.gsub(/{.+?}/, '%s') |
| 12 | + endpoint = endpoint.gsub(%r{^/}, '') |
| 13 | + endpoint = format(endpoint, company_id) |
| 14 | + endpoint += create_query_string(query_params) |
| 15 | + action = { method: 'get', url: endpoint } |
| 16 | + @client.call_adyen_api(@service, action, {}, headers, @version) |
| 17 | + end |
| 18 | + |
| 19 | + def get_android_app(company_id, id, headers: {}) |
| 20 | + endpoint = '/companies/{companyId}/androidApps/{id}'.gsub(/{.+?}/, '%s') |
| 21 | + endpoint = endpoint.gsub(%r{^/}, '') |
| 22 | + endpoint = format(endpoint, company_id, id) |
| 23 | + |
| 24 | + action = { method: 'get', url: endpoint } |
| 25 | + @client.call_adyen_api(@service, action, {}, headers, @version) |
| 26 | + end |
| 27 | + |
| 28 | + def list_android_certificates(company_id, headers: {}, query_params: {}) |
| 29 | + endpoint = '/companies/{companyId}/androidCertificates'.gsub(/{.+?}/, '%s') |
| 30 | + endpoint = endpoint.gsub(%r{^/}, '') |
| 31 | + endpoint = format(endpoint, company_id) |
| 32 | + endpoint += create_query_string(query_params) |
| 33 | + action = { method: 'get', url: endpoint } |
| 34 | + @client.call_adyen_api(@service, action, {}, headers, @version) |
| 35 | + end |
| 36 | + |
| 37 | + end |
| 38 | +end |
0 commit comments