Skip to content

Commit

Permalink
2.10.1
Browse files Browse the repository at this point in the history
  • Loading branch information
braintreeps committed Jun 7, 2011
1 parent 393be08 commit e2f9950
Show file tree
Hide file tree
Showing 25 changed files with 133 additions and 136 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.rdoc
@@ -1,3 +1,8 @@
== 2.10.1

* Support builder >= 2.0
* Changed comments to point to new doc site

== 2.10.0 == 2.10.0


* Added subscription_details to Transaction * Added subscription_details to Transaction
Expand Down
2 changes: 1 addition & 1 deletion README.rdoc
Expand Up @@ -67,7 +67,7 @@ Otherwise, we recommend using the non-bang methods.


== More Information == More Information


* Documentation[http://www.braintreepaymentsolutions.com/docs/ruby] * Documentation[http://www.braintreepayments.com/docs/ruby]


== Tests == Tests


Expand Down
8 changes: 4 additions & 4 deletions Rakefile
Expand Up @@ -24,13 +24,13 @@ gem_spec = Gem::Specification.new do |s|
s.summary = "Braintree Gateway Ruby Client Library" s.summary = "Braintree Gateway Ruby Client Library"
s.description = "Ruby library for integrating with the Braintree Gateway" s.description = "Ruby library for integrating with the Braintree Gateway"
s.version = Braintree::Version::String s.version = Braintree::Version::String
s.author = "Braintree Payment Solutions" s.author = "Braintree"
s.email = "devs@getbraintree.com" s.email = "code@getbraintree.com"
s.homepage = "http://www.braintreepaymentsolutions.com/gateway" s.homepage = "http://www.braintreepayments.com/"
s.rubyforge_project = "braintree" s.rubyforge_project = "braintree"
s.has_rdoc = false s.has_rdoc = false
s.files = FileList["README.rdoc", "LICENSE", "{lib,spec}/**/*.rb", "lib/**/*.crt"] s.files = FileList["README.rdoc", "LICENSE", "{lib,spec}/**/*.rb", "lib/**/*.crt"]
s.add_dependency "builder" s.add_dependency "builder", ">= 2.0.0"
end end


task :gem do task :gem do
Expand Down
2 changes: 1 addition & 1 deletion lib/braintree/address.rb
@@ -1,5 +1,5 @@
module Braintree module Braintree
# See http://www.braintreepaymentsolutions.com/docs/ruby/addresses/details # See http://www.braintreepayments.com/docs/ruby/addresses/details
class Address class Address
include BaseModule # :nodoc: include BaseModule # :nodoc:


Expand Down
2 changes: 1 addition & 1 deletion lib/braintree/configuration.rb
@@ -1,5 +1,5 @@
module Braintree module Braintree
# See http://www.braintreepaymentsolutions.com/docs/ruby # See http://www.braintreepayments.com/docs/ruby
class Configuration class Configuration
API_VERSION = "2" # :nodoc: API_VERSION = "2" # :nodoc:


Expand Down
48 changes: 24 additions & 24 deletions lib/braintree/credit_card.rb
@@ -1,5 +1,5 @@
module Braintree module Braintree
# See http://www.braintreepaymentsolutions.com/docs/ruby # See http://www.braintreepayments.com/docs/ruby
class CreditCard class CreditCard
include BaseModule # :nodoc: include BaseModule # :nodoc:


Expand Down Expand Up @@ -29,91 +29,91 @@ module CustomerLocation
attr_reader :billing_address, :bin, :card_type, :cardholder_name, :created_at, :customer_id, :expiration_month, attr_reader :billing_address, :bin, :card_type, :cardholder_name, :created_at, :customer_id, :expiration_month,
:expiration_year, :last_4, :subscriptions, :token, :updated_at :expiration_year, :last_4, :subscriptions, :token, :updated_at


# See http://www.braintreepaymentsolutions.com/docs/ruby/credit_cards/create # See http://www.braintreepayments.com/docs/ruby/credit_cards/create
def self.create(attributes) def self.create(attributes)
Configuration.gateway.credit_card.create(attributes) Configuration.gateway.credit_card.create(attributes)
end end


# See http://www.braintreepaymentsolutions.com/docs/ruby/credit_cards/create # See http://www.braintreepayments.com/docs/ruby/credit_cards/create
def self.create!(attributes) def self.create!(attributes)
return_object_or_raise(:credit_card) { create(attributes) } return_object_or_raise(:credit_card) { create(attributes) }
end end


# Deprecated. Use Braintree::TransparentRedirect.url # Deprecated. Use Braintree::TransparentRedirect.url
# See http://www.braintreepaymentsolutions.com/docs/ruby/credit_cards/create_tr # See http://www.braintreepayments.com/docs/ruby/credit_cards/create_tr
def self.create_credit_card_url def self.create_credit_card_url
warn "[DEPRECATED] CreditCard.create_credit_card_url is deprecated. Please use TransparentRedirect.url" warn "[DEPRECATED] CreditCard.create_credit_card_url is deprecated. Please use TransparentRedirect.url"
Configuration.gateway.credit_card.create_credit_card_url Configuration.gateway.credit_card.create_credit_card_url
end end


# Deprecated. Use Braintree::TransparentRedirect.confirm # Deprecated. Use Braintree::TransparentRedirect.confirm
# See http://www.braintreepaymentsolutions.com/docs/ruby/credit_cards/create_tr # See http://www.braintreepayments.com/docs/ruby/credit_cards/create_tr
def self.create_from_transparent_redirect(query_string) def self.create_from_transparent_redirect(query_string)
warn "[DEPRECATED] CreditCard.create_from_transparent_redirect is deprecated. Please use TransparentRedirect.confirm" warn "[DEPRECATED] CreditCard.create_from_transparent_redirect is deprecated. Please use TransparentRedirect.confirm"
Configuration.gateway.credit_card.create_from_transparent_redirect(query_string) Configuration.gateway.credit_card.create_from_transparent_redirect(query_string)
end end


# See http://www.braintreepaymentsolutions.com/docs/ruby/transactions/create_from_vault # See http://www.braintreepayments.com/docs/ruby/transactions/create_from_vault
def self.credit(token, transaction_attributes) def self.credit(token, transaction_attributes)
Transaction.credit(transaction_attributes.merge(:payment_method_token => token)) Transaction.credit(transaction_attributes.merge(:payment_method_token => token))
end end


# See http://www.braintreepaymentsolutions.com/docs/ruby/transactions/create_from_vault # See http://www.braintreepayments.com/docs/ruby/transactions/create_from_vault
def self.credit!(token, transaction_attributes) def self.credit!(token, transaction_attributes)
return_object_or_raise(:transaction) { credit(token, transaction_attributes) } return_object_or_raise(:transaction) { credit(token, transaction_attributes) }
end end


# See http://www.braintreepaymentsolutions.com/docs/ruby/credit_cards/delete # See http://www.braintreepayments.com/docs/ruby/credit_cards/delete
def self.delete(token) def self.delete(token)
Configuration.gateway.credit_card.delete(token) Configuration.gateway.credit_card.delete(token)
end end


# See http://www.braintreepaymentsolutions.com/docs/ruby/credit_cards/search # See http://www.braintreepayments.com/docs/ruby/credit_cards/search
def self.expired(options = {}) def self.expired(options = {})
Configuration.gateway.credit_card.expired(options) Configuration.gateway.credit_card.expired(options)
end end


# See http://www.braintreepaymentsolutions.com/docs/ruby/credit_cards/search # See http://www.braintreepayments.com/docs/ruby/credit_cards/search
def self.expiring_between(start_date, end_date, options = {}) def self.expiring_between(start_date, end_date, options = {})
Configuration.gateway.credit_card.expiring_between(start_date, end_date, options) Configuration.gateway.credit_card.expiring_between(start_date, end_date, options)
end end


# See http://www.braintreepaymentsolutions.com/docs/ruby/credit_cards/search # See http://www.braintreepayments.com/docs/ruby/credit_cards/search
def self.find(token) def self.find(token)
Configuration.gateway.credit_card.find(token) Configuration.gateway.credit_card.find(token)
end end


# See http://www.braintreepaymentsolutions.com/docs/ruby/transactions/create_from_vault # See http://www.braintreepayments.com/docs/ruby/transactions/create_from_vault
def self.sale(token, transaction_attributes) def self.sale(token, transaction_attributes)
Configuration.gateway.transaction.sale(transaction_attributes.merge(:payment_method_token => token)) Configuration.gateway.transaction.sale(transaction_attributes.merge(:payment_method_token => token))
end end


# See http://www.braintreepaymentsolutions.com/docs/ruby/transactions/create_from_vault # See http://www.braintreepayments.com/docs/ruby/transactions/create_from_vault
def self.sale!(token, transaction_attributes) def self.sale!(token, transaction_attributes)
return_object_or_raise(:transaction) { sale(token, transaction_attributes) } return_object_or_raise(:transaction) { sale(token, transaction_attributes) }
end end


# See http://www.braintreepaymentsolutions.com/docs/ruby/credit_cards/update # See http://www.braintreepayments.com/docs/ruby/credit_cards/update
def self.update(token, attributes) def self.update(token, attributes)
Configuration.gateway.credit_card.update(token, attributes) Configuration.gateway.credit_card.update(token, attributes)
end end


# See http://www.braintreepaymentsolutions.com/docs/ruby/credit_cards/update # See http://www.braintreepayments.com/docs/ruby/credit_cards/update
def self.update!(token, attributes) def self.update!(token, attributes)
return_object_or_raise(:credit_card) { update(token, attributes) } return_object_or_raise(:credit_card) { update(token, attributes) }
end end


# Deprecated. Use Braintree::TransparentRedirect.confirm # Deprecated. Use Braintree::TransparentRedirect.confirm
# #
# See http://www.braintreepaymentsolutions.com/docs/ruby/credit_cards/update_tr # See http://www.braintreepayments.com/docs/ruby/credit_cards/update_tr
def self.update_from_transparent_redirect(query_string) def self.update_from_transparent_redirect(query_string)
warn "[DEPRECATED] CreditCard.update_via_transparent_redirect_request is deprecated. Please use TransparentRedirect.confirm" warn "[DEPRECATED] CreditCard.update_via_transparent_redirect_request is deprecated. Please use TransparentRedirect.confirm"
Configuration.gateway.credit_card.update_from_transparent_redirect(query_string) Configuration.gateway.credit_card.update_from_transparent_redirect(query_string)
end end


# Deprecated. Use Braintree::TransparentRedirect.url # Deprecated. Use Braintree::TransparentRedirect.url
# #
# See http://www.braintreepaymentsolutions.com/docs/ruby/credit_cards/update_tr # See http://www.braintreepayments.com/docs/ruby/credit_cards/update_tr
def self.update_credit_card_url def self.update_credit_card_url
warn "[DEPRECATED] CreditCard.update_credit_card_url is deprecated. Please use TransparentRedirect.url" warn "[DEPRECATED] CreditCard.update_credit_card_url is deprecated. Please use TransparentRedirect.url"
Configuration.gateway.credit_card.update_credit_card_url Configuration.gateway.credit_card.update_credit_card_url
Expand All @@ -128,23 +128,23 @@ def initialize(gateway, attributes) # :nodoc:


# Deprecated. Use Braintree::CreditCard.credit # Deprecated. Use Braintree::CreditCard.credit
# #
# See http://www.braintreepaymentsolutions.com/docs/ruby/transactions/create_from_vault # See http://www.braintreepayments.com/docs/ruby/transactions/create_from_vault
def credit(transaction_attributes) def credit(transaction_attributes)
warn "[DEPRECATED] credit as an instance method is deprecated. Please use CreditCard.credit" warn "[DEPRECATED] credit as an instance method is deprecated. Please use CreditCard.credit"
@gateway.transaction.credit(transaction_attributes.merge(:payment_method_token => token)) @gateway.transaction.credit(transaction_attributes.merge(:payment_method_token => token))
end end


# Deprecated. Use Braintree::CreditCard.credit! # Deprecated. Use Braintree::CreditCard.credit!
# #
# See http://www.braintreepaymentsolutions.com/docs/ruby/transactions/create_from_vault # See http://www.braintreepayments.com/docs/ruby/transactions/create_from_vault
def credit!(transaction_attributes) def credit!(transaction_attributes)
warn "[DEPRECATED] credit! as an instance method is deprecated. Please use CreditCard.credit!" warn "[DEPRECATED] credit! as an instance method is deprecated. Please use CreditCard.credit!"
return_object_or_raise(:transaction) { credit(transaction_attributes) } return_object_or_raise(:transaction) { credit(transaction_attributes) }
end end


# Deprecated. Use Braintree::CreditCard.delete # Deprecated. Use Braintree::CreditCard.delete
# #
# http://www.braintreepaymentsolutions.com/docs/ruby/credit_cards/delete # http://www.braintreepayments.com/docs/ruby/credit_cards/delete
def delete def delete
warn "[DEPRECATED] delete as an instance method is deprecated. Please use CreditCard.delete" warn "[DEPRECATED] delete as an instance method is deprecated. Please use CreditCard.delete"
@gateway.credit_card.delete(token) @gateway.credit_card.delete(token)
Expand Down Expand Up @@ -180,23 +180,23 @@ def masked_number


# Deprecated. Use Braintree::CreditCard.sale # Deprecated. Use Braintree::CreditCard.sale
# #
# See http://www.braintreepaymentsolutions.com/docs/ruby/transactions/create_from_vault # See http://www.braintreepayments.com/docs/ruby/transactions/create_from_vault
def sale(transaction_attributes) def sale(transaction_attributes)
warn "[DEPRECATED] sale as an instance method is deprecated. Please use CreditCard.sale" warn "[DEPRECATED] sale as an instance method is deprecated. Please use CreditCard.sale"
@gateway.transaction.sale(transaction_attributes.merge(:payment_method_token => token)) @gateway.transaction.sale(transaction_attributes.merge(:payment_method_token => token))
end end


# Deprecated. Use Braintree::CreditCard.sale! # Deprecated. Use Braintree::CreditCard.sale!
# #
# See http://www.braintreepaymentsolutions.com/docs/ruby/transactions/create_from_vault # See http://www.braintreepayments.com/docs/ruby/transactions/create_from_vault
def sale!(transaction_attributes) def sale!(transaction_attributes)
warn "[DEPRECATED] sale! as an instance method is deprecated. Please use CreditCard.sale!" warn "[DEPRECATED] sale! as an instance method is deprecated. Please use CreditCard.sale!"
return_object_or_raise(:transaction) { sale(transaction_attributes) } return_object_or_raise(:transaction) { sale(transaction_attributes) }
end end


# Deprecated. Use Braintree::CreditCard.update # Deprecated. Use Braintree::CreditCard.update
# #
# See http://www.braintreepaymentsolutions.com/docs/ruby/credit_cards/update # See http://www.braintreepayments.com/docs/ruby/credit_cards/update
def update(attributes) def update(attributes)
warn "[DEPRECATED] update as an instance method is deprecated. Please use CreditCard.update" warn "[DEPRECATED] update as an instance method is deprecated. Please use CreditCard.update"
result = @gateway.credit_card.update(token, attributes) result = @gateway.credit_card.update(token, attributes)
Expand All @@ -208,7 +208,7 @@ def update(attributes)


# Deprecated. Use Braintree::CreditCard.update! # Deprecated. Use Braintree::CreditCard.update!
# #
# See http://www.braintreepaymentsolutions.com/docs/ruby/credit_cards/update # See http://www.braintreepayments.com/docs/ruby/credit_cards/update
def update!(attributes) def update!(attributes)
warn "[DEPRECATED] update! as an instance method is deprecated. Please use CreditCard.update!" warn "[DEPRECATED] update! as an instance method is deprecated. Please use CreditCard.update!"
return_object_or_raise(:credit_card) { update(attributes) } return_object_or_raise(:credit_card) { update(attributes) }
Expand Down
2 changes: 1 addition & 1 deletion lib/braintree/credit_card_verification.rb
@@ -1,5 +1,5 @@
module Braintree module Braintree
# See http://www.braintreepaymentsolutions.com/docs/ruby/general/card_verification # See http://www.braintreepayments.com/docs/ruby/general/card_verification
class CreditCardVerification class CreditCardVerification
include BaseModule include BaseModule


Expand Down

0 comments on commit e2f9950

Please sign in to comment.