Sha256: fd932a28f656e7103a45a6340e7050e98e0cc8b0aa279d8c0b842832b0b97354

Contents?: true

Size: 440 Bytes

Versions: 73

Compression:

Stored size: 440 Bytes

Contents

module Braintree
  class PlanGateway # :nodoc:
    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}/plans")
      attributes_collection = response[:plans] || []
      attributes_collection.map do |attributes|
        Plan._new(@gateway, attributes)
      end
    end
  end
end

Version data entries

73 entries across 73 versions & 1 rubygems

Version Path
braintree-2.76.0 lib/braintree/plan_gateway.rb
braintree-2.75.0 lib/braintree/plan_gateway.rb
braintree-2.74.0 lib/braintree/plan_gateway.rb
braintree-2.73.0 lib/braintree/plan_gateway.rb
braintree-2.72.0 lib/braintree/plan_gateway.rb
braintree-2.71.0 lib/braintree/plan_gateway.rb
braintree-2.70.0 lib/braintree/plan_gateway.rb
braintree-2.69.1 lib/braintree/plan_gateway.rb
braintree-2.69.0 lib/braintree/plan_gateway.rb
braintree-2.68.2 lib/braintree/plan_gateway.rb
braintree-2.68.1 lib/braintree/plan_gateway.rb
braintree-2.68.0 lib/braintree/plan_gateway.rb
braintree-2.67.0 lib/braintree/plan_gateway.rb
braintree-2.66.0 lib/braintree/plan_gateway.rb
braintree-2.65.0 lib/braintree/plan_gateway.rb
braintree-2.64.0 lib/braintree/plan_gateway.rb
braintree-2.63.0 lib/braintree/plan_gateway.rb
braintree-2.62.0 lib/braintree/plan_gateway.rb
braintree-2.61.1 lib/braintree/plan_gateway.rb
braintree-2.61.0 lib/braintree/plan_gateway.rb