Sha256: 024a73b2fc95be0c459a9ec9ad1fb03c71060a46678922dc2f13baad510aa502

Contents?: true

Size: 363 Bytes

Versions: 42

Compression:

Stored size: 363 Bytes

Contents

module Braintree
  class DiscountGateway # :nodoc
    def initialize(gateway)
      @gateway = gateway
      @config = gateway.config
    end

    def all
      response = @config.http.get "/discounts"
      attributes_collection = response[:discounts]
      attributes_collection.map do |attributes|
        Discount._new(attributes)
      end
    end
  end
end

Version data entries

42 entries across 42 versions & 1 rubygems

Version Path
braintree-2.28.0 lib/braintree/discount_gateway.rb
braintree-2.27.1 lib/braintree/discount_gateway.rb
braintree-2.27.0 lib/braintree/discount_gateway.rb
braintree-2.26.0 lib/braintree/discount_gateway.rb
braintree-2.25.0 lib/braintree/discount_gateway.rb
braintree-2.24.0 lib/braintree/discount_gateway.rb
braintree-2.23.0 lib/braintree/discount_gateway.rb
braintree-2.22.0 lib/braintree/discount_gateway.rb
braintree-2.21.0 lib/braintree/discount_gateway.rb
braintree-2.20.0 lib/braintree/discount_gateway.rb
braintree-2.19.0 lib/braintree/discount_gateway.rb
braintree-2.18.0 lib/braintree/discount_gateway.rb
braintree-2.17.0 lib/braintree/discount_gateway.rb
braintree-2.16.0 lib/braintree/discount_gateway.rb
braintree-2.15.0 lib/braintree/discount_gateway.rb
braintree-2.14.0 lib/braintree/discount_gateway.rb
braintree-2.13.4 lib/braintree/discount_gateway.rb
braintree-2.13.3 lib/braintree/discount_gateway.rb
braintree-2.13.2 lib/braintree/discount_gateway.rb
braintree-2.13.1 lib/braintree/discount_gateway.rb