Object
# File lib/braintree/transaction.rb, line 86 def self.clone_transaction(transaction_id, attributes) Configuration.gateway.transaction.clone_transaction(transaction_id, attributes) end
# File lib/braintree/transaction.rb, line 90 def self.clone_transaction!(transaction_id, attributes) return_object_or_raise(:transaction) { clone_transaction(transaction_id, attributes) } end
See www.braintreepayments.com/docs/ruby/transactions/create
# File lib/braintree/transaction.rb, line 77 def self.create(attributes) Configuration.gateway.transaction.create(attributes) end
See www.braintreepayments.com/docs/ruby/transactions/create
# File lib/braintree/transaction.rb, line 82 def self.create!(attributes) return_object_or_raise(:transaction) { create(attributes) } end
Deprecated. Use Braintree::TransparentRedirect.confirm
See www.braintreepayments.com/docs/ruby/transactions/create_tr
# File lib/braintree/transaction.rb, line 97 def self.create_from_transparent_redirect(query_string) warn "[DEPRECATED] Transaction.create_from_transparent_redirect is deprecated. Please use TransparentRedirect.confirm" Configuration.gateway.transaction.create_from_transparent_redirect(query_string) end
Deprecated. Use Braintree::TransparentRedirect.url
See www.braintreepayments.com/docs/ruby/transactions/create_tr
# File lib/braintree/transaction.rb, line 105 def self.create_transaction_url warn "[DEPRECATED] Transaction.create_transaction_url is deprecated. Please use TransparentRedirect.url" Configuration.gateway.transaction.create_transaction_url end
# File lib/braintree/transaction.rb, line 110 def self.credit(attributes) Configuration.gateway.transaction.credit(attributes) end
# File lib/braintree/transaction.rb, line 114 def self.credit!(attributes) return_object_or_raise(:transaction) { credit(attributes) } end
See www.braintreepayments.com/docs/ruby/transactions/search
# File lib/braintree/transaction.rb, line 119 def self.find(id) Configuration.gateway.transaction.find(id) end
See www.braintreepayments.com/docs/ruby/transactions/refund
# File lib/braintree/transaction.rb, line 124 def self.refund(id, amount = nil) Configuration.gateway.transaction.refund(id, amount) end
See www.braintreepayments.com/docs/ruby/transactions/create
# File lib/braintree/transaction.rb, line 129 def self.sale(attributes) Configuration.gateway.transaction.sale(attributes) end
See www.braintreepayments.com/docs/ruby/transactions/create
# File lib/braintree/transaction.rb, line 134 def self.sale!(attributes) return_object_or_raise(:transaction) { sale(attributes) } end
See www.braintreepayments.com/docs/ruby/transactions/search
# File lib/braintree/transaction.rb, line 139 def self.search(&block) Configuration.gateway.transaction.search(&block) end
See www.braintreepayments.com/docs/ruby/transactions/submit_for_settlement
# File lib/braintree/transaction.rb, line 144 def self.submit_for_settlement(transaction_id, amount = nil) Configuration.gateway.transaction.submit_for_settlement(transaction_id, amount) end
See www.braintreepayments.com/docs/ruby/transactions/submit_for_settlement
# File lib/braintree/transaction.rb, line 149 def self.submit_for_settlement!(transaction_id, amount = nil) return_object_or_raise(:transaction) { submit_for_settlement(transaction_id, amount) } end
See www.braintreepayments.com/docs/ruby/transactions/void
# File lib/braintree/transaction.rb, line 154 def self.void(transaction_id) Configuration.gateway.transaction.void(transaction_id) end
See www.braintreepayments.com/docs/ruby/transactions/void
# File lib/braintree/transaction.rb, line 159 def self.void!(transaction_id) return_object_or_raise(:transaction) { void(transaction_id) } end
True if other is a Braintree::Transaction with the same id.
# File lib/braintree/transaction.rb, line 181 def ==(other) return false unless other.is_a?(Transaction) id == other.id end
Deprecated. Use Braintree::Transaction.refund
See www.braintreepayments.com/docs/ruby/transactions/refund
# File lib/braintree/transaction.rb, line 202 def refund(amount = nil) 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 result end end
# File lib/braintree/transaction.rb, line 218 def refund_id warn "[DEPRECATED] Transaction.refund_id is deprecated. Please use TransparentRedirect.refund_ids" @refund_id end
Returns true if the transaction has been refunded. False otherwise.
# File lib/braintree/transaction.rb, line 214 def refunded? !@refund_id.nil? end
Deprecated. Use Braintree::Transaction.submit_for_settlement
See www.braintreepayments.com/docs/ruby/transactions/submit_for_settlement
# File lib/braintree/transaction.rb, line 226 def submit_for_settlement(amount = nil) 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 end
Deprecated. Use Braintree::Transaction.submit_for_settlement!
See www.braintreepayments.com/docs/ruby/transactions/submit_for_settlement
# File lib/braintree/transaction.rb, line 238 def submit_for_settlement!(amount = nil) 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 vault billing address can be updated after the transaction was created, the attributes on vault_billing_address may not match the attributes on billing_details.
# File lib/braintree/transaction.rb, line 247 def vault_billing_address return nil if billing_details.id.nil? @gateway.address.find(customer_details.id, billing_details.id) end
If this transaction was stored in the vault, or created from vault records, vault_credit_card will return the associated Braintree::CreditCard. Because the vault credit card can be updated after the transaction was created, the attributes on vault_credit_card may not match the attributes on credit_card_details.
# File lib/braintree/transaction.rb, line 256 def vault_credit_card return nil if credit_card_details.token.nil? @gateway.credit_card.find(credit_card_details.token) end
If this transaction was stored in the vault, or created from vault records, vault_customer will return the associated Braintree::Customer. Because the vault customer can be updated after the transaction was created, the attributes on vault_customer may not match the attributes on customer_details.
# File lib/braintree/transaction.rb, line 265 def vault_customer return nil if customer_details.id.nil? @gateway.customer.find(customer_details.id) end
If this transaction was stored in the vault, or created from vault records, vault_shipping_address will return the associated Braintree::Address. Because the vault shipping address can be updated after the transaction was created, the attributes on vault_shipping_address may not match the attributes on shipping_details.
# File lib/braintree/transaction.rb, line 274 def vault_shipping_address return nil if shipping_details.id.nil? @gateway.address.find(customer_details.id, shipping_details.id) end
Deprecated. Use Braintree::Transaction.void
See www.braintreepayments.com/docs/ruby/transactions/void
# File lib/braintree/transaction.rb, line 282 def 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 end
Deprecated. Use Braintree::Transaction.void!
See www.braintreepayments.com/docs/ruby/transactions/void
# File lib/braintree/transaction.rb, line 294 def void! warn "[DEPRECATED] void! as an instance method is deprecated. Please use Transaction.void!" return_object_or_raise(:transaction) { void } end
Generated with the Darkfish Rdoc Generator 2.