lib/braintree/transaction.rb in braintree-2.5.2 vs lib/braintree/transaction.rb in braintree-2.6.0
- old
+ new
@@ -53,11 +53,11 @@
attr_reader :processor_authorization_code
# The response code from the processor.
attr_reader :processor_response_code
# The response text from the processor.
attr_reader :processor_response_text
- attr_reader :refund_id, :refunded_transaction_id
+ attr_reader :refund_ids, :refunded_transaction_id
attr_reader :settlement_batch_id
# See Transaction::Status
attr_reader :status
attr_reader :status_history
attr_reader :subscription_id
@@ -179,11 +179,11 @@
# Deprecated. Use Braintree::Transaction.refund
#
# See http://www.braintreepaymentsolutions.com/docs/ruby/transactions/refund
def refund(amount = nil)
- warn "[DEPRECATED] refund as an instance method is deprecated. Please use CreditCard.refund"
+ warn "[DEPRECATED] refund as an instance method is deprecated. Please use Transaction.refund"
result = @gateway.transaction.refund(id, amount)
if result.success?
SuccessfulResult.new(:new_transaction => result.transaction)
else
@@ -194,15 +194,20 @@
# Returns true if the transaction has been refunded. False otherwise.
def refunded?
!@refund_id.nil?
end
+ def refund_id
+ warn "[DEPRECATED] Transaction.refund_id is deprecated. Please use TransparentRedirect.refund_ids"
+ @refund_id
+ end
+
# Deprecated. Use Braintree::Transaction.submit_for_settlement
#
# See http://www.braintreepaymentsolutions.com/docs/ruby/transactions/submit_for_settlement
def submit_for_settlement(amount = nil)
- warn "[DEPRECATED] submit_for_settlement as an instance method is deprecated. Please use CreditCard.submit_for_settlement"
+ warn "[DEPRECATED] submit_for_settlement as an instance method is deprecated. Please use Transaction.submit_for_settlement"
result = @gateway.transaction.submit_for_settlement(id, amount)
if result.success?
copy_instance_variables_from_object result.transaction
end
result
@@ -210,11 +215,11 @@
# Deprecated. Use Braintree::Transaction.submit_for_settlement!
#
# See http://www.braintreepaymentsolutions.com/docs/ruby/transactions/submit_for_settlement
def submit_for_settlement!(amount = nil)
- warn "[DEPRECATED] submit_for_settlement! as an instance method is deprecated. Please use CreditCard.submit_for_settlement!"
+ warn "[DEPRECATED] submit_for_settlement! as an instance method is deprecated. Please use Transaction.submit_for_settlement!"
return_object_or_raise(:transaction) { submit_for_settlement(amount) }
end
# If this transaction was stored in the vault, or created from vault records,
# vault_billing_address will return the associated Braintree::Address. Because the
@@ -254,11 +259,11 @@
# Deprecated. Use Braintree::Transaction.void
#
# See http://www.braintreepaymentsolutions.com/docs/ruby/transactions/void
def void
- warn "[DEPRECATED] void as an instance method is deprecated. Please use CreditCard.void"
+ warn "[DEPRECATED] void as an instance method is deprecated. Please use Transaction.void"
result = @gateway.transaction.void(id)
if result.success?
copy_instance_variables_from_object result.transaction
end
result
@@ -266,10 +271,10 @@
# Deprecated. Use Braintree::Transaction.void!
#
# See http://www.braintreepaymentsolutions.com/docs/ruby/transactions/void
def void!
- warn "[DEPRECATED] void! as an instance method is deprecated. Please use CreditCard.void!"
+ warn "[DEPRECATED] void! as an instance method is deprecated. Please use Transaction.void!"
return_object_or_raise(:transaction) { void }
end
class << self
protected :new