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-4.4.0 lib/braintree/plan_gateway.rb
braintree-4.3.0 lib/braintree/plan_gateway.rb
braintree-4.2.0 lib/braintree/plan_gateway.rb
braintree-4.1.0 lib/braintree/plan_gateway.rb
braintree-4.0.0 lib/braintree/plan_gateway.rb
braintree-3.4.0 lib/braintree/plan_gateway.rb
braintree-3.3.0 lib/braintree/plan_gateway.rb
braintree-3.2.0 lib/braintree/plan_gateway.rb
braintree-3.1.0 lib/braintree/plan_gateway.rb
braintree-3.0.1 lib/braintree/plan_gateway.rb
braintree-2.104.1 lib/braintree/plan_gateway.rb
braintree-2.104.0 lib/braintree/plan_gateway.rb
braintree-2.103.0 lib/braintree/plan_gateway.rb
braintree-2.102.0 lib/braintree/plan_gateway.rb
braintree-2.101.0 lib/braintree/plan_gateway.rb
braintree-2.100.0 lib/braintree/plan_gateway.rb
braintree-2.99.0 lib/braintree/plan_gateway.rb
braintree-2.98.0 lib/braintree/plan_gateway.rb
braintree-2.97.0 lib/braintree/plan_gateway.rb
braintree-2.96.0 lib/braintree/plan_gateway.rb