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.95.0 lib/braintree/plan_gateway.rb
braintree-2.94.0 lib/braintree/plan_gateway.rb
braintree-2.93.0 lib/braintree/plan_gateway.rb
braintree-2.92.0 lib/braintree/plan_gateway.rb
braintree-2.91.0 lib/braintree/plan_gateway.rb
braintree-2.90.0 lib/braintree/plan_gateway.rb
braintree-2.89.0 lib/braintree/plan_gateway.rb
braintree-2.88.0 lib/braintree/plan_gateway.rb
braintree-2.87.0 lib/braintree/plan_gateway.rb
braintree-2.86.0 lib/braintree/plan_gateway.rb
braintree-2.85.0 lib/braintree/plan_gateway.rb
braintree-2.84.0 lib/braintree/plan_gateway.rb
braintree-2.83.0 lib/braintree/plan_gateway.rb
braintree-2.82.0 lib/braintree/plan_gateway.rb
braintree-2.81.0 lib/braintree/plan_gateway.rb
braintree-2.80.1 lib/braintree/plan_gateway.rb
braintree-2.80.0 lib/braintree/plan_gateway.rb
braintree-2.79.0 lib/braintree/plan_gateway.rb
braintree-2.78.0 lib/braintree/plan_gateway.rb
braintree-2.77.0 lib/braintree/plan_gateway.rb