Sha256: 24e1cc9aa36b6beec0898687d9bb6bc511576ab6e0a3a655d47bfee488051ea8

Contents?: true

Size: 420 Bytes

Versions: 8

Compression:

Stored size: 420 Bytes

Contents

module Braintree
  class AddOnGateway
    def initialize(gateway)
      @gateway = gateway
      @config = gateway.config
      @config.assert_has_access_token_or_keys
    end

    def all
      response = @config.http.get("#{@config.base_merchant_path}/add_ons")
      attributes_collection = response[:add_ons]
      attributes_collection.map do |attributes|
        AddOn._new(attributes)
      end
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
braintree-4.23.0 lib/braintree/add_on_gateway.rb
braintree-4.22.0 lib/braintree/add_on_gateway.rb
braintree-4.21.0 lib/braintree/add_on_gateway.rb
braintree-4.20.0 lib/braintree/add_on_gateway.rb
braintree-4.19.0 lib/braintree/add_on_gateway.rb
braintree-4.18.0 lib/braintree/add_on_gateway.rb
braintree-4.17.0 lib/braintree/add_on_gateway.rb
braintree-4.16.0 lib/braintree/add_on_gateway.rb