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.60.0 lib/braintree/plan_gateway.rb
braintree-2.59.0 lib/braintree/plan_gateway.rb
braintree-2.58.0 lib/braintree/plan_gateway.rb
braintree-2.57.0 lib/braintree/plan_gateway.rb
braintree-2.56.0 lib/braintree/plan_gateway.rb
braintree-2.55.0 lib/braintree/plan_gateway.rb
braintree-2.54.0 lib/braintree/plan_gateway.rb
braintree-2.50.0 lib/braintree/plan_gateway.rb
braintree-2.49.0 lib/braintree/plan_gateway.rb
braintree-2.48.1 lib/braintree/plan_gateway.rb
braintree-2.48.0 lib/braintree/plan_gateway.rb
braintree-2.47.0 lib/braintree/plan_gateway.rb
braintree-2.46.0 lib/braintree/plan_gateway.rb