Class: Braintree::Transaction
- Inherits:
-
Object
- Object
- Braintree::Transaction
- Includes:
- BaseModule, Util::IdEquality
- Defined in:
- lib/braintree/transaction.rb,
lib/braintree/transaction/installment.rb,
lib/braintree/transaction/paypal_details.rb,
lib/braintree/transaction/status_details.rb,
lib/braintree/transaction/address_details.rb,
lib/braintree/transaction/package_details.rb,
lib/braintree/transaction/payment_receipt.rb,
lib/braintree/transaction/customer_details.rb,
lib/braintree/transaction/apple_pay_details.rb,
lib/braintree/transaction/google_pay_details.rb,
lib/braintree/transaction/credit_card_details.rb,
lib/braintree/transaction/paypal_here_details.rb,
lib/braintree/transaction/disbursement_details.rb,
lib/braintree/transaction/subscription_details.rb,
lib/braintree/transaction/local_payment_details.rb,
lib/braintree/transaction/venmo_account_details.rb,
lib/braintree/transaction/installment/adjustment.rb,
lib/braintree/transaction/us_bank_account_details.rb,
lib/braintree/transaction/samsung_pay_card_details.rb,
lib/braintree/transaction/meta_checkout_card_details.rb,
lib/braintree/transaction/visa_checkout_card_details.rb,
lib/braintree/transaction/meta_checkout_token_details.rb,
lib/braintree/transaction/payment_receipt/merchant_address.rb,
lib/braintree/transaction/payment_receipt/card_present_data.rb,
lib/braintree/transaction/sepa_direct_debit_account_details.rb
Direct Known Subclasses
Defined Under Namespace
Modules: AdditionalCharge, CreatedUsing, EscrowStatus, ExternalVault, GatewayRejectionReason, IndustryType, Source, Status, Type Classes: AddressDetails, ApplePayDetails, CreditCardDetails, CustomerDetails, DisbursementDetails, GooglePayDetails, Installment, LocalPaymentDetails, MetaCheckoutCardDetails, MetaCheckoutTokenDetails, PackageDetails, PayPalDetails, PayPalHereDetails, PaymentReceipt, SamsungPayCardDetails, SepaDirectDebitAccountDetails, StatusDetails, SubscriptionDetails, UsBankAccountDetails, VenmoAccountDetails, VisaCheckoutCardDetails
Instance Attribute Summary collapse
-
#ach_return_code ⇒ Object
readonly
Returns the value of attribute ach_return_code.
-
#ach_return_responses ⇒ Object
readonly
Returns the value of attribute ach_return_responses.
-
#acquirer_reference_number ⇒ Object
readonly
Returns the value of attribute acquirer_reference_number.
-
#add_ons ⇒ Object
readonly
Returns the value of attribute add_ons.
-
#additional_processor_response ⇒ Object
readonly
The raw response from the processor.
-
#amount ⇒ Object
readonly
Returns the value of attribute amount.
-
#apple_pay_details ⇒ Object
readonly
Returns the value of attribute apple_pay_details.
-
#authorization_adjustments ⇒ Object
readonly
Returns the value of attribute authorization_adjustments.
-
#authorization_expires_at ⇒ Object
readonly
Returns the value of attribute authorization_expires_at.
-
#authorized_transaction_id ⇒ Object
readonly
Returns the value of attribute authorized_transaction_id.
-
#avs_error_response_code ⇒ Object
readonly
Returns the value of attribute avs_error_response_code.
-
#avs_postal_code_response_code ⇒ Object
readonly
Returns the value of attribute avs_postal_code_response_code.
-
#avs_street_address_response_code ⇒ Object
readonly
Returns the value of attribute avs_street_address_response_code.
-
#billing_details ⇒ Object
readonly
Returns the value of attribute billing_details.
-
#channel ⇒ Object
readonly
Returns the value of attribute channel.
-
#created_at ⇒ Object
readonly
Returns the value of attribute created_at.
-
#credit_card_details ⇒ Object
readonly
Returns the value of attribute credit_card_details.
-
#currency_iso_code ⇒ Object
readonly
Returns the value of attribute currency_iso_code.
-
#custom_fields ⇒ Object
readonly
Returns the value of attribute custom_fields.
-
#customer_details ⇒ Object
readonly
Returns the value of attribute customer_details.
-
#cvv_response_code ⇒ Object
readonly
Returns the value of attribute cvv_response_code.
-
#debit_network ⇒ Object
readonly
Returns the value of attribute debit_network.
-
#descriptor ⇒ Object
readonly
Returns the value of attribute descriptor.
-
#disbursement_details ⇒ Object
readonly
Returns the value of attribute disbursement_details.
-
#discount_amount ⇒ Object
readonly
Returns the value of attribute discount_amount.
-
#discounts ⇒ Object
readonly
Returns the value of attribute discounts.
-
#disputes ⇒ Object
readonly
Returns the value of attribute disputes.
-
#escrow_status ⇒ Object
readonly
Returns the value of attribute escrow_status.
-
#facilitated_details ⇒ Object
readonly
Returns the value of attribute facilitated_details.
-
#facilitator_details ⇒ Object
readonly
Returns the value of attribute facilitator_details.
-
#foreign_retailer ⇒ Object
readonly
Returns the value of attribute foreign_retailer.
-
#gateway_rejection_reason ⇒ Object
readonly
Returns the value of attribute gateway_rejection_reason.
-
#google_pay_details ⇒ Object
readonly
Returns the value of attribute google_pay_details.
-
#graphql_id ⇒ Object
readonly
Returns the value of attribute graphql_id.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#installment_count ⇒ Object
readonly
Returns the value of attribute installment_count.
-
#installments ⇒ Object
readonly
Returns the value of attribute installments.
-
#local_payment_details ⇒ Object
readonly
Returns the value of attribute local_payment_details.
-
#merchant_account_id ⇒ Object
readonly
Returns the value of attribute merchant_account_id.
-
#merchant_advice_code ⇒ Object
readonly
Returns the value of attribute merchant_advice_code.
-
#merchant_advice_code_text ⇒ Object
readonly
Returns the value of attribute merchant_advice_code_text.
-
#meta_checkout_card_details ⇒ Object
readonly
Returns the value of attribute meta_checkout_card_details.
-
#meta_checkout_token_details ⇒ Object
readonly
Returns the value of attribute meta_checkout_token_details.
-
#network_response_code ⇒ Object
readonly
Response code from the card network.
-
#network_response_text ⇒ Object
readonly
Response text from the card network.
-
#network_token_details ⇒ Object
readonly
Returns the value of attribute network_token_details.
-
#network_transaction_id ⇒ Object
readonly
Returns the value of attribute network_transaction_id.
-
#order_id ⇒ Object
readonly
Returns the value of attribute order_id.
-
#packages ⇒ Object
readonly
Returns the value of attribute packages.
-
#partial_settlement_transaction_ids ⇒ Object
readonly
Returns the value of attribute partial_settlement_transaction_ids.
-
#payment_instrument_type ⇒ Object
readonly
Returns the value of attribute payment_instrument_type.
-
#payment_receipt ⇒ Object
readonly
Returns the value of attribute payment_receipt.
-
#paypal_details ⇒ Object
readonly
Returns the value of attribute paypal_details.
-
#paypal_here_details ⇒ Object
readonly
Returns the value of attribute paypal_here_details.
-
#plan_id ⇒ Object
readonly
Returns the value of attribute plan_id.
-
#processor_authorization_code ⇒ Object
readonly
Returns the value of attribute processor_authorization_code.
-
#processor_response_code ⇒ Object
readonly
Returns the value of attribute processor_response_code.
-
#processor_response_text ⇒ Object
readonly
Returns the value of attribute processor_response_text.
-
#processor_response_type ⇒ Object
readonly
Returns the value of attribute processor_response_type.
-
#processor_settlement_response_code ⇒ Object
readonly
Returns the value of attribute processor_settlement_response_code.
-
#processor_settlement_response_text ⇒ Object
readonly
Returns the value of attribute processor_settlement_response_text.
-
#product_sku ⇒ Object
readonly
Returns the value of attribute product_sku.
-
#purchase_order_number ⇒ Object
readonly
Returns the value of attribute purchase_order_number.
-
#recurring ⇒ Object
readonly
Returns the value of attribute recurring.
-
#refund_ids ⇒ Object
readonly
Returns the value of attribute refund_ids.
-
#refunded_installments ⇒ Object
readonly
Returns the value of attribute refunded_installments.
-
#refunded_transaction_id ⇒ Object
readonly
Returns the value of attribute refunded_transaction_id.
-
#retried ⇒ Object
readonly
Returns the value of attribute retried.
-
#retried_transaction_id ⇒ Object
readonly
the primary/parent transaction id of any retried transaction.
-
#retrieval_reference_number ⇒ Object
readonly
Returns the value of attribute retrieval_reference_number.
-
#retry_ids ⇒ Object
readonly
all retried transactions ids for a primary transaction.
-
#risk_data ⇒ Object
readonly
Returns the value of attribute risk_data.
-
#samsung_pay_card_details ⇒ Object
readonly
Returns the value of attribute samsung_pay_card_details.
-
#sca_exemption_requested ⇒ Object
readonly
Returns the value of attribute sca_exemption_requested.
-
#sepa_direct_debit_account_details ⇒ Object
readonly
Returns the value of attribute sepa_direct_debit_account_details.
-
#sepa_direct_debit_return_code ⇒ Object
readonly
Returns the value of attribute sepa_direct_debit_return_code.
-
#service_fee_amount ⇒ Object
readonly
Returns the value of attribute service_fee_amount.
-
#settlement_batch_id ⇒ Object
readonly
Returns the value of attribute settlement_batch_id.
-
#shipping_amount ⇒ Object
readonly
Returns the value of attribute shipping_amount.
-
#shipping_details ⇒ Object
readonly
Returns the value of attribute shipping_details.
-
#shipping_tax_amount ⇒ Object
readonly
Returns the value of attribute shipping_tax_amount.
-
#ships_from_postal_code ⇒ Object
readonly
Returns the value of attribute ships_from_postal_code.
-
#status ⇒ Object
readonly
See Transaction::Status.
-
#status_history ⇒ Object
readonly
Returns the value of attribute status_history.
-
#subscription_details ⇒ Object
readonly
Returns the value of attribute subscription_details.
-
#subscription_id ⇒ Object
readonly
Returns the value of attribute subscription_id.
-
#tax_amount ⇒ Object
readonly
Returns the value of attribute tax_amount.
-
#tax_exempt ⇒ Object
readonly
Returns the value of attribute tax_exempt.
-
#three_d_secure_info ⇒ Object
readonly
Returns the value of attribute three_d_secure_info.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
-
#updated_at ⇒ Object
readonly
Returns the value of attribute updated_at.
-
#us_bank_account_details ⇒ Object
readonly
Returns the value of attribute us_bank_account_details.
-
#venmo_account_details ⇒ Object
readonly
Returns the value of attribute venmo_account_details.
-
#visa_checkout_card_details ⇒ Object
readonly
Returns the value of attribute visa_checkout_card_details.
-
#voice_referral_number ⇒ Object
readonly
Returns the value of attribute voice_referral_number.
Class Method Summary collapse
- ._attributes ⇒ Object
- ._new(*args) ⇒ Object
- .adjust_authorization(*args) ⇒ Object
- .adjust_authorization!(*args) ⇒ Object
- .cancel_release(*args) ⇒ Object
- .cancel_release!(*args) ⇒ Object
- .clone_transaction(*args) ⇒ Object
- .clone_transaction!(*args) ⇒ Object
- .create(*args) ⇒ Object
- .create!(*args) ⇒ Object
- .credit(*args) ⇒ Object
- .credit!(*args) ⇒ Object
- .find(*args) ⇒ Object
- .hold_in_escrow(*args) ⇒ Object
- .hold_in_escrow!(*args) ⇒ Object
- .line_items(*args) ⇒ Object
- .package_tracking(*args) ⇒ Object
- .package_tracking!(*args) ⇒ Object
- .refund(*args) ⇒ Object
- .refund!(*args) ⇒ Object
- .release_from_escrow(*args) ⇒ Object
- .release_from_escrow!(*args) ⇒ Object
- .sale(*args) ⇒ Object
- .sale!(*args) ⇒ Object
- .search(&block) ⇒ Object
- .submit_for_partial_settlement(*args) ⇒ Object
- .submit_for_partial_settlement!(*args) ⇒ Object
- .submit_for_settlement(*args) ⇒ Object
- .submit_for_settlement!(*args) ⇒ Object
- .update_details(*args) ⇒ Object
- .update_details!(*args) ⇒ Object
- .void(*args) ⇒ Object
- .void!(*args) ⇒ Object
Instance Method Summary collapse
- #disbursed? ⇒ Boolean
-
#initialize(gateway, attributes) ⇒ Transaction
constructor
A new instance of Transaction.
- #inspect ⇒ Object
- #line_items ⇒ Object
- #processed_with_network_token? ⇒ Boolean
- #refunded? ⇒ Boolean
-
#vault_billing_address ⇒ Object
If this transaction was stored in the vault, or created from vault records, vault_billing_address will return the associated Braintree::Address.
-
#vault_credit_card ⇒ Object
If this transaction was stored in the vault, or created from vault records, vault_credit_card will return the associated Braintree::CreditCard.
-
#vault_customer ⇒ Object
If this transaction was stored in the vault, or created from vault records, vault_customer will return the associated Braintree::Customer.
-
#vault_shipping_address ⇒ Object
If this transaction was stored in the vault, or created from vault records, vault_shipping_address will return the associated Braintree::Address.
Methods included from Util::IdEquality
Methods included from BaseModule
Methods included from BaseModule::Methods
#copy_instance_variables_from_object, #return_object_or_raise, #set_instance_variables_from_hash, #singleton_class
Constructor Details
#initialize(gateway, attributes) ⇒ Transaction
Returns a new instance of Transaction.
314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 |
# File 'lib/braintree/transaction.rb', line 314 def initialize(gateway, attributes) @gateway = gateway set_instance_variables_from_hash(attributes) @amount = Util.to_big_decimal(amount) @apple_pay_details = ApplePayDetails.new(@apple_pay) @billing_details = AddressDetails.new(@billing) @credit_card_details = CreditCardDetails.new(@credit_card) @network_token_details = CreditCardDetails.new(@network_token) @custom_fields = attributes[:custom_fields].is_a?(Hash) ? attributes[:custom_fields] : {} @customer_details = CustomerDetails.new(@customer) @descriptor = Descriptor.new(@descriptor) @disbursement_details = DisbursementDetails.new(@disbursement_details) @google_pay_details = GooglePayDetails.new(@google_pay_card) @local_payment_details = LocalPaymentDetails.new(@local_payment) @meta_checkout_card_details = MetaCheckoutCardDetails.new(attributes[:meta_checkout_card]) @meta_checkout_token_details = MetaCheckoutTokenDetails.new(attributes[:meta_checkout_token]) @payment_instrument_type = attributes[:payment_instrument_type] @payment_receipt = PaymentReceipt.new(attributes[:payment_receipt]) if attributes[:payment_receipt] @paypal_details = PayPalDetails.new(@paypal) @paypal_here_details = PayPalHereDetails.new(@paypal_here) @samsung_pay_card_details = SamsungPayCardDetails.new(attributes[:samsung_pay_card]) @sca_exemption_requested = attributes[:sca_exemption_requested] @sepa_direct_debit_account_details = SepaDirectDebitAccountDetails.new(@sepa_debit_account_detail) @service_fee_amount = Util.to_big_decimal(service_fee_amount) @packages = attributes[:shipments] ? attributes[:shipments].map { |pd| PackageDetails.new(pd) } : [] @shipping_details = AddressDetails.new(@shipping) @status_history = attributes[:status_history] ? attributes[:status_history].map { |s| StatusDetails.new(s) } : [] @subscription_details = SubscriptionDetails.new(@subscription) @tax_amount = Util.to_big_decimal(tax_amount) @venmo_account_details = VenmoAccountDetails.new(@venmo_account) @visa_checkout_card_details = VisaCheckoutCardDetails.new(attributes[:visa_checkout_card]) @facilitated_details = FacilitatedDetails.new(attributes[:facilitated_details]) if attributes[:facilitated_details] @facilitator_details = FacilitatorDetails.new(attributes[:facilitator_details]) if attributes[:facilitator_details] @risk_data = RiskData.new(attributes[:risk_data]) if attributes[:risk_data] @three_d_secure_info = ThreeDSecureInfo.new(attributes[:three_d_secure_info]) if attributes[:three_d_secure_info] @us_bank_account_details = UsBankAccountDetails.new(attributes[:us_bank_account]) if attributes[:us_bank_account] add_ons.map! { |attrs| AddOn._new(attrs) } if add_ons .map! { |attrs| AuthorizationAdjustment._new(attrs) } if discounts.map! { |attrs| Discount._new(attrs) } if discounts disputes.map! { |attrs| Dispute._new(attrs) } if disputes installments.map! { |attrs| Installment.new(attrs) } if installments refunded_installments.map! { |attrs| Installment.new(attrs) } if refunded_installments end |
Instance Attribute Details
#ach_return_code ⇒ Object (readonly)
Returns the value of attribute ach_return_code.
94 95 96 |
# File 'lib/braintree/transaction.rb', line 94 def ach_return_code @ach_return_code end |
#ach_return_responses ⇒ Object (readonly)
Returns the value of attribute ach_return_responses.
95 96 97 |
# File 'lib/braintree/transaction.rb', line 95 def ach_return_responses @ach_return_responses end |
#acquirer_reference_number ⇒ Object (readonly)
Returns the value of attribute acquirer_reference_number.
96 97 98 |
# File 'lib/braintree/transaction.rb', line 96 def acquirer_reference_number @acquirer_reference_number end |
#add_ons ⇒ Object (readonly)
Returns the value of attribute add_ons.
97 98 99 |
# File 'lib/braintree/transaction.rb', line 97 def add_ons @add_ons end |
#additional_processor_response ⇒ Object (readonly)
The raw response from the processor.
98 99 100 |
# File 'lib/braintree/transaction.rb', line 98 def additional_processor_response @additional_processor_response end |
#amount ⇒ Object (readonly)
Returns the value of attribute amount.
99 100 101 |
# File 'lib/braintree/transaction.rb', line 99 def amount @amount end |
#apple_pay_details ⇒ Object (readonly)
Returns the value of attribute apple_pay_details.
100 101 102 |
# File 'lib/braintree/transaction.rb', line 100 def apple_pay_details @apple_pay_details end |
#authorization_adjustments ⇒ Object (readonly)
Returns the value of attribute authorization_adjustments.
101 102 103 |
# File 'lib/braintree/transaction.rb', line 101 def @authorization_adjustments end |
#authorization_expires_at ⇒ Object (readonly)
Returns the value of attribute authorization_expires_at.
102 103 104 |
# File 'lib/braintree/transaction.rb', line 102 def @authorization_expires_at end |
#authorized_transaction_id ⇒ Object (readonly)
Returns the value of attribute authorized_transaction_id.
103 104 105 |
# File 'lib/braintree/transaction.rb', line 103 def @authorized_transaction_id end |
#avs_error_response_code ⇒ Object (readonly)
Returns the value of attribute avs_error_response_code.
104 105 106 |
# File 'lib/braintree/transaction.rb', line 104 def avs_error_response_code @avs_error_response_code end |
#avs_postal_code_response_code ⇒ Object (readonly)
Returns the value of attribute avs_postal_code_response_code.
105 106 107 |
# File 'lib/braintree/transaction.rb', line 105 def avs_postal_code_response_code @avs_postal_code_response_code end |
#avs_street_address_response_code ⇒ Object (readonly)
Returns the value of attribute avs_street_address_response_code.
106 107 108 |
# File 'lib/braintree/transaction.rb', line 106 def avs_street_address_response_code @avs_street_address_response_code end |
#billing_details ⇒ Object (readonly)
Returns the value of attribute billing_details.
107 108 109 |
# File 'lib/braintree/transaction.rb', line 107 def billing_details @billing_details end |
#channel ⇒ Object (readonly)
Returns the value of attribute channel.
108 109 110 |
# File 'lib/braintree/transaction.rb', line 108 def channel @channel end |
#created_at ⇒ Object (readonly)
Returns the value of attribute created_at.
109 110 111 |
# File 'lib/braintree/transaction.rb', line 109 def created_at @created_at end |
#credit_card_details ⇒ Object (readonly)
Returns the value of attribute credit_card_details.
110 111 112 |
# File 'lib/braintree/transaction.rb', line 110 def credit_card_details @credit_card_details end |
#currency_iso_code ⇒ Object (readonly)
Returns the value of attribute currency_iso_code.
111 112 113 |
# File 'lib/braintree/transaction.rb', line 111 def currency_iso_code @currency_iso_code end |
#custom_fields ⇒ Object (readonly)
Returns the value of attribute custom_fields.
112 113 114 |
# File 'lib/braintree/transaction.rb', line 112 def custom_fields @custom_fields end |
#customer_details ⇒ Object (readonly)
Returns the value of attribute customer_details.
113 114 115 |
# File 'lib/braintree/transaction.rb', line 113 def customer_details @customer_details end |
#cvv_response_code ⇒ Object (readonly)
Returns the value of attribute cvv_response_code.
114 115 116 |
# File 'lib/braintree/transaction.rb', line 114 def cvv_response_code @cvv_response_code end |
#debit_network ⇒ Object (readonly)
Returns the value of attribute debit_network.
115 116 117 |
# File 'lib/braintree/transaction.rb', line 115 def debit_network @debit_network end |
#descriptor ⇒ Object (readonly)
Returns the value of attribute descriptor.
116 117 118 |
# File 'lib/braintree/transaction.rb', line 116 def descriptor @descriptor end |
#disbursement_details ⇒ Object (readonly)
Returns the value of attribute disbursement_details.
117 118 119 |
# File 'lib/braintree/transaction.rb', line 117 def disbursement_details @disbursement_details end |
#discount_amount ⇒ Object (readonly)
Returns the value of attribute discount_amount.
118 119 120 |
# File 'lib/braintree/transaction.rb', line 118 def discount_amount @discount_amount end |
#discounts ⇒ Object (readonly)
Returns the value of attribute discounts.
119 120 121 |
# File 'lib/braintree/transaction.rb', line 119 def discounts @discounts end |
#disputes ⇒ Object (readonly)
Returns the value of attribute disputes.
120 121 122 |
# File 'lib/braintree/transaction.rb', line 120 def disputes @disputes end |
#escrow_status ⇒ Object (readonly)
Returns the value of attribute escrow_status.
121 122 123 |
# File 'lib/braintree/transaction.rb', line 121 def escrow_status @escrow_status end |
#facilitated_details ⇒ Object (readonly)
Returns the value of attribute facilitated_details.
122 123 124 |
# File 'lib/braintree/transaction.rb', line 122 def facilitated_details @facilitated_details end |
#facilitator_details ⇒ Object (readonly)
Returns the value of attribute facilitator_details.
123 124 125 |
# File 'lib/braintree/transaction.rb', line 123 def facilitator_details @facilitator_details end |
#foreign_retailer ⇒ Object (readonly)
Returns the value of attribute foreign_retailer.
124 125 126 |
# File 'lib/braintree/transaction.rb', line 124 def foreign_retailer @foreign_retailer end |
#gateway_rejection_reason ⇒ Object (readonly)
Returns the value of attribute gateway_rejection_reason.
125 126 127 |
# File 'lib/braintree/transaction.rb', line 125 def gateway_rejection_reason @gateway_rejection_reason end |
#google_pay_details ⇒ Object (readonly)
Returns the value of attribute google_pay_details.
126 127 128 |
# File 'lib/braintree/transaction.rb', line 126 def google_pay_details @google_pay_details end |
#graphql_id ⇒ Object (readonly)
Returns the value of attribute graphql_id.
127 128 129 |
# File 'lib/braintree/transaction.rb', line 127 def graphql_id @graphql_id end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
128 129 130 |
# File 'lib/braintree/transaction.rb', line 128 def id @id end |
#installment_count ⇒ Object (readonly)
Returns the value of attribute installment_count.
129 130 131 |
# File 'lib/braintree/transaction.rb', line 129 def installment_count @installment_count end |
#installments ⇒ Object (readonly)
Returns the value of attribute installments.
130 131 132 |
# File 'lib/braintree/transaction.rb', line 130 def installments @installments end |
#local_payment_details ⇒ Object (readonly)
Returns the value of attribute local_payment_details.
131 132 133 |
# File 'lib/braintree/transaction.rb', line 131 def local_payment_details @local_payment_details end |
#merchant_account_id ⇒ Object (readonly)
Returns the value of attribute merchant_account_id.
132 133 134 |
# File 'lib/braintree/transaction.rb', line 132 def merchant_account_id @merchant_account_id end |
#merchant_advice_code ⇒ Object (readonly)
Returns the value of attribute merchant_advice_code.
133 134 135 |
# File 'lib/braintree/transaction.rb', line 133 def merchant_advice_code @merchant_advice_code end |
#merchant_advice_code_text ⇒ Object (readonly)
Returns the value of attribute merchant_advice_code_text.
134 135 136 |
# File 'lib/braintree/transaction.rb', line 134 def merchant_advice_code_text @merchant_advice_code_text end |
#meta_checkout_card_details ⇒ Object (readonly)
Returns the value of attribute meta_checkout_card_details.
135 136 137 |
# File 'lib/braintree/transaction.rb', line 135 def @meta_checkout_card_details end |
#meta_checkout_token_details ⇒ Object (readonly)
Returns the value of attribute meta_checkout_token_details.
136 137 138 |
# File 'lib/braintree/transaction.rb', line 136 def @meta_checkout_token_details end |
#network_response_code ⇒ Object (readonly)
Response code from the card network
137 138 139 |
# File 'lib/braintree/transaction.rb', line 137 def network_response_code @network_response_code end |
#network_response_text ⇒ Object (readonly)
Response text from the card network
138 139 140 |
# File 'lib/braintree/transaction.rb', line 138 def network_response_text @network_response_text end |
#network_token_details ⇒ Object (readonly)
Returns the value of attribute network_token_details.
139 140 141 |
# File 'lib/braintree/transaction.rb', line 139 def network_token_details @network_token_details end |
#network_transaction_id ⇒ Object (readonly)
Returns the value of attribute network_transaction_id.
140 141 142 |
# File 'lib/braintree/transaction.rb', line 140 def network_transaction_id @network_transaction_id end |
#order_id ⇒ Object (readonly)
Returns the value of attribute order_id.
141 142 143 |
# File 'lib/braintree/transaction.rb', line 141 def order_id @order_id end |
#packages ⇒ Object (readonly)
Returns the value of attribute packages.
142 143 144 |
# File 'lib/braintree/transaction.rb', line 142 def packages @packages end |
#partial_settlement_transaction_ids ⇒ Object (readonly)
Returns the value of attribute partial_settlement_transaction_ids.
143 144 145 |
# File 'lib/braintree/transaction.rb', line 143 def partial_settlement_transaction_ids @partial_settlement_transaction_ids end |
#payment_instrument_type ⇒ Object (readonly)
Returns the value of attribute payment_instrument_type.
144 145 146 |
# File 'lib/braintree/transaction.rb', line 144 def payment_instrument_type @payment_instrument_type end |
#payment_receipt ⇒ Object (readonly)
Returns the value of attribute payment_receipt.
145 146 147 |
# File 'lib/braintree/transaction.rb', line 145 def payment_receipt @payment_receipt end |
#paypal_details ⇒ Object (readonly)
Returns the value of attribute paypal_details.
146 147 148 |
# File 'lib/braintree/transaction.rb', line 146 def paypal_details @paypal_details end |
#paypal_here_details ⇒ Object (readonly)
Returns the value of attribute paypal_here_details.
147 148 149 |
# File 'lib/braintree/transaction.rb', line 147 def paypal_here_details @paypal_here_details end |
#plan_id ⇒ Object (readonly)
Returns the value of attribute plan_id.
148 149 150 |
# File 'lib/braintree/transaction.rb', line 148 def plan_id @plan_id end |
#processor_authorization_code ⇒ Object (readonly)
Returns the value of attribute processor_authorization_code.
149 150 151 |
# File 'lib/braintree/transaction.rb', line 149 def @processor_authorization_code end |
#processor_response_code ⇒ Object (readonly)
Returns the value of attribute processor_response_code.
150 151 152 |
# File 'lib/braintree/transaction.rb', line 150 def processor_response_code @processor_response_code end |
#processor_response_text ⇒ Object (readonly)
Returns the value of attribute processor_response_text.
151 152 153 |
# File 'lib/braintree/transaction.rb', line 151 def processor_response_text @processor_response_text end |
#processor_response_type ⇒ Object (readonly)
Returns the value of attribute processor_response_type.
152 153 154 |
# File 'lib/braintree/transaction.rb', line 152 def processor_response_type @processor_response_type end |
#processor_settlement_response_code ⇒ Object (readonly)
Returns the value of attribute processor_settlement_response_code.
153 154 155 |
# File 'lib/braintree/transaction.rb', line 153 def processor_settlement_response_code @processor_settlement_response_code end |
#processor_settlement_response_text ⇒ Object (readonly)
Returns the value of attribute processor_settlement_response_text.
154 155 156 |
# File 'lib/braintree/transaction.rb', line 154 def processor_settlement_response_text @processor_settlement_response_text end |
#product_sku ⇒ Object (readonly)
Returns the value of attribute product_sku.
155 156 157 |
# File 'lib/braintree/transaction.rb', line 155 def product_sku @product_sku end |
#purchase_order_number ⇒ Object (readonly)
Returns the value of attribute purchase_order_number.
156 157 158 |
# File 'lib/braintree/transaction.rb', line 156 def purchase_order_number @purchase_order_number end |
#recurring ⇒ Object (readonly)
Returns the value of attribute recurring.
157 158 159 |
# File 'lib/braintree/transaction.rb', line 157 def recurring @recurring end |
#refund_ids ⇒ Object (readonly)
Returns the value of attribute refund_ids.
158 159 160 |
# File 'lib/braintree/transaction.rb', line 158 def refund_ids @refund_ids end |
#refunded_installments ⇒ Object (readonly)
Returns the value of attribute refunded_installments.
159 160 161 |
# File 'lib/braintree/transaction.rb', line 159 def refunded_installments @refunded_installments end |
#refunded_transaction_id ⇒ Object (readonly)
Returns the value of attribute refunded_transaction_id.
160 161 162 |
# File 'lib/braintree/transaction.rb', line 160 def refunded_transaction_id @refunded_transaction_id end |
#retried ⇒ Object (readonly)
Returns the value of attribute retried.
161 162 163 |
# File 'lib/braintree/transaction.rb', line 161 def retried @retried end |
#retried_transaction_id ⇒ Object (readonly)
the primary/parent transaction id of any retried transaction
162 163 164 |
# File 'lib/braintree/transaction.rb', line 162 def retried_transaction_id @retried_transaction_id end |
#retrieval_reference_number ⇒ Object (readonly)
Returns the value of attribute retrieval_reference_number.
163 164 165 |
# File 'lib/braintree/transaction.rb', line 163 def retrieval_reference_number @retrieval_reference_number end |
#retry_ids ⇒ Object (readonly)
all retried transactions ids for a primary transaction
164 165 166 |
# File 'lib/braintree/transaction.rb', line 164 def retry_ids @retry_ids end |
#risk_data ⇒ Object (readonly)
Returns the value of attribute risk_data.
165 166 167 |
# File 'lib/braintree/transaction.rb', line 165 def risk_data @risk_data end |
#samsung_pay_card_details ⇒ Object (readonly)
Returns the value of attribute samsung_pay_card_details.
166 167 168 |
# File 'lib/braintree/transaction.rb', line 166 def samsung_pay_card_details @samsung_pay_card_details end |
#sca_exemption_requested ⇒ Object (readonly)
Returns the value of attribute sca_exemption_requested.
167 168 169 |
# File 'lib/braintree/transaction.rb', line 167 def sca_exemption_requested @sca_exemption_requested end |
#sepa_direct_debit_account_details ⇒ Object (readonly)
Returns the value of attribute sepa_direct_debit_account_details.
168 169 170 |
# File 'lib/braintree/transaction.rb', line 168 def sepa_direct_debit_account_details @sepa_direct_debit_account_details end |
#sepa_direct_debit_return_code ⇒ Object (readonly)
Returns the value of attribute sepa_direct_debit_return_code.
169 170 171 |
# File 'lib/braintree/transaction.rb', line 169 def sepa_direct_debit_return_code @sepa_direct_debit_return_code end |
#service_fee_amount ⇒ Object (readonly)
Returns the value of attribute service_fee_amount.
170 171 172 |
# File 'lib/braintree/transaction.rb', line 170 def service_fee_amount @service_fee_amount end |
#settlement_batch_id ⇒ Object (readonly)
Returns the value of attribute settlement_batch_id.
171 172 173 |
# File 'lib/braintree/transaction.rb', line 171 def settlement_batch_id @settlement_batch_id end |
#shipping_amount ⇒ Object (readonly)
Returns the value of attribute shipping_amount.
172 173 174 |
# File 'lib/braintree/transaction.rb', line 172 def shipping_amount @shipping_amount end |
#shipping_details ⇒ Object (readonly)
Returns the value of attribute shipping_details.
173 174 175 |
# File 'lib/braintree/transaction.rb', line 173 def shipping_details @shipping_details end |
#shipping_tax_amount ⇒ Object (readonly)
Returns the value of attribute shipping_tax_amount.
174 175 176 |
# File 'lib/braintree/transaction.rb', line 174 def shipping_tax_amount @shipping_tax_amount end |
#ships_from_postal_code ⇒ Object (readonly)
Returns the value of attribute ships_from_postal_code.
175 176 177 |
# File 'lib/braintree/transaction.rb', line 175 def ships_from_postal_code @ships_from_postal_code end |
#status ⇒ Object (readonly)
See Transaction::Status
176 177 178 |
# File 'lib/braintree/transaction.rb', line 176 def status @status end |
#status_history ⇒ Object (readonly)
Returns the value of attribute status_history.
177 178 179 |
# File 'lib/braintree/transaction.rb', line 177 def status_history @status_history end |
#subscription_details ⇒ Object (readonly)
Returns the value of attribute subscription_details.
178 179 180 |
# File 'lib/braintree/transaction.rb', line 178 def subscription_details @subscription_details end |
#subscription_id ⇒ Object (readonly)
Returns the value of attribute subscription_id.
179 180 181 |
# File 'lib/braintree/transaction.rb', line 179 def subscription_id @subscription_id end |
#tax_amount ⇒ Object (readonly)
Returns the value of attribute tax_amount.
180 181 182 |
# File 'lib/braintree/transaction.rb', line 180 def tax_amount @tax_amount end |
#tax_exempt ⇒ Object (readonly)
Returns the value of attribute tax_exempt.
181 182 183 |
# File 'lib/braintree/transaction.rb', line 181 def tax_exempt @tax_exempt end |
#three_d_secure_info ⇒ Object (readonly)
Returns the value of attribute three_d_secure_info.
182 183 184 |
# File 'lib/braintree/transaction.rb', line 182 def three_d_secure_info @three_d_secure_info end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
183 184 185 |
# File 'lib/braintree/transaction.rb', line 183 def type @type end |
#updated_at ⇒ Object (readonly)
Returns the value of attribute updated_at.
184 185 186 |
# File 'lib/braintree/transaction.rb', line 184 def updated_at @updated_at end |
#us_bank_account_details ⇒ Object (readonly)
Returns the value of attribute us_bank_account_details.
185 186 187 |
# File 'lib/braintree/transaction.rb', line 185 def us_bank_account_details @us_bank_account_details end |
#venmo_account_details ⇒ Object (readonly)
Returns the value of attribute venmo_account_details.
186 187 188 |
# File 'lib/braintree/transaction.rb', line 186 def venmo_account_details @venmo_account_details end |
#visa_checkout_card_details ⇒ Object (readonly)
Returns the value of attribute visa_checkout_card_details.
187 188 189 |
# File 'lib/braintree/transaction.rb', line 187 def visa_checkout_card_details @visa_checkout_card_details end |
#voice_referral_number ⇒ Object (readonly)
Returns the value of attribute voice_referral_number.
188 189 190 |
# File 'lib/braintree/transaction.rb', line 188 def voice_referral_number @voice_referral_number end |
Class Method Details
._attributes ⇒ Object
437 438 439 |
# File 'lib/braintree/transaction.rb', line 437 def self._attributes [:amount, :created_at, :credit_card_details, :customer_details, :id, :status, :subscription_details, :type, :updated_at, :processed_with_network_token?] end |
._new(*args) ⇒ Object
432 433 434 |
# File 'lib/braintree/transaction.rb', line 432 def _new(*args) self.new(*args) end |
.adjust_authorization(*args) ⇒ Object
190 191 192 |
# File 'lib/braintree/transaction.rb', line 190 def self.(*args) Configuration.gateway.transaction.(*args) end |
.adjust_authorization!(*args) ⇒ Object
194 195 196 |
# File 'lib/braintree/transaction.rb', line 194 def self.(*args) Configuration.gateway.transaction.(*args) end |
.cancel_release(*args) ⇒ Object
206 207 208 |
# File 'lib/braintree/transaction.rb', line 206 def self.cancel_release(*args) Configuration.gateway.transaction.cancel_release(*args) end |
.cancel_release!(*args) ⇒ Object
210 211 212 |
# File 'lib/braintree/transaction.rb', line 210 def self.cancel_release!(*args) Configuration.gateway.transaction.cancel_release!(*args) end |
.clone_transaction(*args) ⇒ Object
214 215 216 |
# File 'lib/braintree/transaction.rb', line 214 def self.clone_transaction(*args) Configuration.gateway.transaction.clone_transaction(*args) end |
.clone_transaction!(*args) ⇒ Object
218 219 220 |
# File 'lib/braintree/transaction.rb', line 218 def self.clone_transaction!(*args) Configuration.gateway.transaction.clone_transaction!(*args) end |
.create(*args) ⇒ Object
198 199 200 |
# File 'lib/braintree/transaction.rb', line 198 def self.create(*args) Configuration.gateway.transaction.create(*args) end |
.create!(*args) ⇒ Object
202 203 204 |
# File 'lib/braintree/transaction.rb', line 202 def self.create!(*args) return_object_or_raise(:transaction) { create(*args) } end |
.credit(*args) ⇒ Object
222 223 224 |
# File 'lib/braintree/transaction.rb', line 222 def self.credit(*args) Configuration.gateway.transaction.credit(*args) end |
.credit!(*args) ⇒ Object
226 227 228 |
# File 'lib/braintree/transaction.rb', line 226 def self.credit!(*args) Configuration.gateway.transaction.credit!(*args) end |
.find(*args) ⇒ Object
230 231 232 |
# File 'lib/braintree/transaction.rb', line 230 def self.find(*args) Configuration.gateway.transaction.find(*args) end |
.hold_in_escrow(*args) ⇒ Object
238 239 240 |
# File 'lib/braintree/transaction.rb', line 238 def self.hold_in_escrow(*args) Configuration.gateway.transaction.hold_in_escrow(*args) end |
.hold_in_escrow!(*args) ⇒ Object
242 243 244 |
# File 'lib/braintree/transaction.rb', line 242 def self.hold_in_escrow!(*args) Configuration.gateway.transaction.hold_in_escrow!(*args) end |
.line_items(*args) ⇒ Object
234 235 236 |
# File 'lib/braintree/transaction.rb', line 234 def self.line_items(*args) Configuration.gateway.transaction_line_item.find_all(*args) end |
.package_tracking(*args) ⇒ Object
290 291 292 |
# File 'lib/braintree/transaction.rb', line 290 def self.package_tracking(*args) Configuration.gateway.transaction.package_tracking(*args) end |
.package_tracking!(*args) ⇒ Object
294 295 296 |
# File 'lib/braintree/transaction.rb', line 294 def self.package_tracking!(*args) Configuration.gateway.transaction.package_tracking!(*args) end |
.refund(*args) ⇒ Object
246 247 248 |
# File 'lib/braintree/transaction.rb', line 246 def self.refund(*args) Configuration.gateway.transaction.refund(*args) end |
.refund!(*args) ⇒ Object
250 251 252 |
# File 'lib/braintree/transaction.rb', line 250 def self.refund!(*args) Configuration.gateway.transaction.refund!(*args) end |
.release_from_escrow(*args) ⇒ Object
266 267 268 |
# File 'lib/braintree/transaction.rb', line 266 def self.release_from_escrow(*args) Configuration.gateway.transaction.release_from_escrow(*args) end |
.release_from_escrow!(*args) ⇒ Object
270 271 272 |
# File 'lib/braintree/transaction.rb', line 270 def self.release_from_escrow!(*args) Configuration.gateway.transaction.release_from_escrow!(*args) end |
.sale(*args) ⇒ Object
254 255 256 |
# File 'lib/braintree/transaction.rb', line 254 def self.sale(*args) Configuration.gateway.transaction.sale(*args) end |
.sale!(*args) ⇒ Object
258 259 260 |
# File 'lib/braintree/transaction.rb', line 258 def self.sale!(*args) Configuration.gateway.transaction.sale!(*args) end |
.search(&block) ⇒ Object
262 263 264 |
# File 'lib/braintree/transaction.rb', line 262 def self.search(&block) Configuration.gateway.transaction.search(&block) end |
.submit_for_partial_settlement(*args) ⇒ Object
298 299 300 |
# File 'lib/braintree/transaction.rb', line 298 def self.submit_for_partial_settlement(*args) Configuration.gateway.transaction.submit_for_partial_settlement(*args) end |
.submit_for_partial_settlement!(*args) ⇒ Object
302 303 304 |
# File 'lib/braintree/transaction.rb', line 302 def self.submit_for_partial_settlement!(*args) Configuration.gateway.transaction.submit_for_partial_settlement!(*args) end |
.submit_for_settlement(*args) ⇒ Object
274 275 276 |
# File 'lib/braintree/transaction.rb', line 274 def self.submit_for_settlement(*args) Configuration.gateway.transaction.submit_for_settlement(*args) end |
.submit_for_settlement!(*args) ⇒ Object
278 279 280 |
# File 'lib/braintree/transaction.rb', line 278 def self.submit_for_settlement!(*args) Configuration.gateway.transaction.submit_for_settlement!(*args) end |
.update_details(*args) ⇒ Object
282 283 284 |
# File 'lib/braintree/transaction.rb', line 282 def self.update_details(*args) Configuration.gateway.transaction.update_details(*args) end |
.update_details!(*args) ⇒ Object
286 287 288 |
# File 'lib/braintree/transaction.rb', line 286 def self.update_details!(*args) return_object_or_raise(:transaction) { update_details(*args) } end |
.void(*args) ⇒ Object
306 307 308 |
# File 'lib/braintree/transaction.rb', line 306 def self.void(*args) Configuration.gateway.transaction.void(*args) end |
.void!(*args) ⇒ Object
310 311 312 |
# File 'lib/braintree/transaction.rb', line 310 def self.void!(*args) Configuration.gateway.transaction.void!(*args) end |
Instance Method Details
#disbursed? ⇒ Boolean
382 383 384 |
# File 'lib/braintree/transaction.rb', line 382 def disbursed? @disbursement_details.valid? end |
#inspect ⇒ Object
361 362 363 364 365 366 367 368 369 370 371 372 |
# File 'lib/braintree/transaction.rb', line 361 def inspect first = [:id, :type, :amount, :status] order = first + (self.class._attributes - first) nice_attributes = order.map do |attr| if attr == :amount Util.inspect_amount(self.amount) else "#{attr}: #{send(attr).inspect}" end end "#<#{self.class} #{nice_attributes.join(', ')}>" end |
#line_items ⇒ Object
374 375 376 |
# File 'lib/braintree/transaction.rb', line 374 def line_items @gateway.transaction_line_item.find_all(id) end |
#processed_with_network_token? ⇒ Boolean
426 427 428 |
# File 'lib/braintree/transaction.rb', line 426 def processed_with_network_token? @processed_with_network_token end |
#refunded? ⇒ Boolean
378 379 380 |
# File 'lib/braintree/transaction.rb', line 378 def refunded? !@refund_id.nil? end |
#vault_billing_address ⇒ Object
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. NEXT_MAJOR_VERSION these methods are not documented in the developer docs, remove
391 392 393 394 |
# File 'lib/braintree/transaction.rb', line 391 def vault_billing_address return nil if billing_details.id.nil? @gateway.address.find(customer_details.id, billing_details.id) end |
#vault_credit_card ⇒ Object
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. NEXT_MAJOR_VERSION these methods are not documented in the developer docs, remove
401 402 403 404 |
# File 'lib/braintree/transaction.rb', line 401 def vault_credit_card return nil if credit_card_details.token.nil? @gateway.credit_card.find(credit_card_details.token) end |
#vault_customer ⇒ Object
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. NEXT_MAJOR_VERSION these methods are not documented in the developer docs, remove
411 412 413 414 |
# File 'lib/braintree/transaction.rb', line 411 def vault_customer return nil if customer_details.id.nil? @gateway.customer.find(customer_details.id) end |
#vault_shipping_address ⇒ Object
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. NEXT_MAJOR_VERSION these methods are not documented in the developer docs, remove
421 422 423 424 |
# File 'lib/braintree/transaction.rb', line 421 def vault_shipping_address return nil if shipping_details.id.nil? @gateway.address.find(customer_details.id, shipping_details.id) end |