Sha256: 4120aae40e4a6bea8e78e49a8b3e4f2bfbf7adb8174d4436ac8832c3a21ff63c

Contents?: true

Size: 1.33 KB

Versions: 14

Compression:

Stored size: 1.33 KB

Contents

require_relative '../service'
module Adyen
  class AccountCompanyLevelApi < Service
    attr_accessor :service, :version

    def initialize(client, version = DEFAULT_VERSION)
      super(client, version, 'Management')
    end

    def get_company_account(company_id, headers: {})
      endpoint = '/companies/{companyId}'.gsub(/{.+?}/, '%s')
      endpoint = endpoint.gsub(%r{^/}, '')
      endpoint = format(endpoint, company_id)
      
      action = { method: 'get', url: endpoint }
      @client.call_adyen_api(@service, action, {}, headers, @version)
    end

    def list_company_accounts(headers: {}, query_params: {})
      endpoint = '/companies'.gsub(/{.+?}/, '%s')
      endpoint = endpoint.gsub(%r{^/}, '')
      endpoint = format(endpoint)
      endpoint += create_query_string(query_params)
      action = { method: 'get', url: endpoint }
      @client.call_adyen_api(@service, action, {}, headers, @version)
    end

    def list_merchant_accounts(company_id, headers: {}, query_params: {})
      endpoint = '/companies/{companyId}/merchants'.gsub(/{.+?}/, '%s')
      endpoint = endpoint.gsub(%r{^/}, '')
      endpoint = format(endpoint, company_id)
      endpoint += create_query_string(query_params)
      action = { method: 'get', url: endpoint }
      @client.call_adyen_api(@service, action, {}, headers, @version)
    end

  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
adyen-ruby-api-library-10.0.0 lib/adyen/services/management/account_company_level_api.rb
adyen-ruby-api-library-9.9.0 lib/adyen/services/management/account_company_level_api.rb
adyen-ruby-api-library-9.8.0 lib/adyen/services/management/account_company_level_api.rb
adyen-ruby-api-library-9.7.1 lib/adyen/services/management/account_company_level_api.rb
adyen-ruby-api-library-9.7.0 lib/adyen/services/management/account_company_level_api.rb
adyen-ruby-api-library-9.6.0 lib/adyen/services/management/account_company_level_api.rb
adyen-ruby-api-library-9.5.2 lib/adyen/services/management/account_company_level_api.rb
adyen-ruby-api-library-9.5.1 lib/adyen/services/management/account_company_level_api.rb
adyen-ruby-api-library-9.5.0 lib/adyen/services/management/account_company_level_api.rb
adyen-ruby-api-library-9.3.0 lib/adyen/services/management/account_company_level_api.rb
adyen-ruby-api-library-9.2.0 lib/adyen/services/management/account_company_level_api.rb
adyen-ruby-api-library-9.1.0 lib/adyen/services/management/account_company_level_api.rb
adyen-ruby-api-library-9.0.0 lib/adyen/services/management/account_company_level_api.rb
adyen-ruby-api-library-8.0.1 lib/adyen/services/management/account_company_level_api.rb