Sha256: 07f1e0124340e0cce37d9fe7b7f11d161f8912c60b4ec088c96e898a52683f86

Contents?: true

Size: 1.28 KB

Versions: 14

Compression:

Stored size: 1.28 KB

Contents

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

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

    def create_payment_instrument_group(request, headers: {})
      endpoint = '/paymentInstrumentGroups'.gsub(/{.+?}/, '%s')
      endpoint = endpoint.gsub(%r{^/}, '')
      endpoint = format(endpoint)
      
      action = { method: 'post', url: endpoint }
      @client.call_adyen_api(@service, action, request, headers, @version)
    end

    def get_all_transaction_rules_for_payment_instrument_group(id, headers: {})
      endpoint = '/paymentInstrumentGroups/{id}/transactionRules'.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_payment_instrument_group(id, headers: {})
      endpoint = '/paymentInstrumentGroups/{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

  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

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