Sha256: dfd2d050ea3310b1926a6cf8e86dd9dc7c9a025616b6dd1364d40ddaf9de3c5d

Contents?: true

Size: 982 Bytes

Versions: 8

Compression:

Stored size: 982 Bytes

Contents

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

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

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

    def get_all_account_holders_under_balance_platform(id, headers: {}, query_params: {})
      endpoint = '/balancePlatforms/{id}/accountHolders'.gsub(/{.+?}/, '%s')
      endpoint = endpoint.gsub(%r{^/}, '')
      endpoint = format(endpoint, 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

8 entries across 8 versions & 1 rubygems

Version Path
adyen-ruby-api-library-8.0.0 lib/adyen/services/balancePlatform/platform_api.rb
adyen-ruby-api-library-8.0.0.pre.beta.1 lib/adyen/services/balancePlatform/platform_api.rb
adyen-ruby-api-library-7.3.1 lib/adyen/services/balancePlatform/platform_api.rb
adyen-ruby-api-library-7.3.0 lib/adyen/services/balancePlatform/platform_api.rb
adyen-ruby-api-library-7.2.0 lib/adyen/services/balancePlatform/platform_api.rb
adyen-ruby-api-library-7.1.0 lib/adyen/services/balancePlatform/platform_api.rb
adyen-ruby-api-library-7.0.3 lib/adyen/services/balancePlatform/platform_api.rb
adyen-ruby-api-library-7.0.2 lib/adyen/services/balancePlatform/platform_api.rb