Parent

Methods

Class/Module Index [+]

Quicksearch

Braintree::DiscountGateway

Public Class Methods

new(gateway) click to toggle source
# File lib/braintree/discount_gateway.rb, line 3
def initialize(gateway)
  @gateway = gateway
  @config = gateway.config
end

Public Instance Methods

all() click to toggle source
# File lib/braintree/discount_gateway.rb, line 8
def all
  response = @config.http.get "/discounts"
  attributes_collection = response[:discounts]
  attributes_collection.map do |attributes|
    Discount._new(attributes)
  end
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.