Class: Recurly::Resources::Transaction

Inherits:
Recurly::Resource show all
Defined in:
lib/recurly/resources/transaction.rb

Instance Attribute Summary collapse

Attributes inherited from Recurly::Resource

#attributes

Method Summary

Methods inherited from Recurly::Resource

#==, #get_response, #inspect, #requires_client?, #to_json, #to_s

Methods included from Schema::SchemaFactory

#schema

Methods included from Schema::ResourceCaster

#cast

Methods included from Schema::SchemaValidator

#get_did_you_mean, #validate!, #validate_attribute!

Instance Attribute Details

#account ⇒ AccountMini

Returns Account mini details.

Returns:



11
# File 'lib/recurly/resources/transaction.rb', line 11

define_attribute :account, :AccountMini

#action_result ⇒ Hash

Returns Action result params to be used in Recurly-JS to complete a payment when using asynchronous payment methods, e.g., Boleto, iDEAL and Sofort.

Returns:

  • (Hash) —

    Action result params to be used in Recurly-JS to complete a payment when using asynchronous payment methods, e.g., Boleto, iDEAL and Sofort.



15
# File 'lib/recurly/resources/transaction.rb', line 15

define_attribute :action_result, Hash

#amount ⇒ Float

Returns Total transaction amount sent to the payment gateway.

Returns:

  • (Float) —

    Total transaction amount sent to the payment gateway.



19
# File 'lib/recurly/resources/transaction.rb', line 19

define_attribute :amount, Float

#avs_check ⇒ String

Returns When processed, result from checking the overall AVS on the transaction.

Returns:

  • (String) —

    When processed, result from checking the overall AVS on the transaction.



23
# File 'lib/recurly/resources/transaction.rb', line 23

define_attribute :avs_check, String

#backup_payment_method_used ⇒ Boolean

Returns Indicates if the transaction was completed using a backup payment.

Returns:

  • (Boolean) —

    Indicates if the transaction was completed using a backup payment



27
# File 'lib/recurly/resources/transaction.rb', line 27

define_attribute :backup_payment_method_used, :Boolean

#billing_address ⇒ AddressWithName

Returns:



31
# File 'lib/recurly/resources/transaction.rb', line 31

define_attribute :billing_address, :AddressWithName

#collected_at ⇒ DateTime

Returns Collected at, or if not collected yet, the time the transaction was created.

Returns:

  • (DateTime) —

    Collected at, or if not collected yet, the time the transaction was created.



35
# File 'lib/recurly/resources/transaction.rb', line 35

define_attribute :collected_at, DateTime

#collection_method ⇒ String

Returns The method by which the payment was collected.

Returns:

  • (String) —

    The method by which the payment was collected.



39
# File 'lib/recurly/resources/transaction.rb', line 39

define_attribute :collection_method, String

#created_at ⇒ DateTime

Returns Created at.

Returns:

  • (DateTime) —

    Created at



43
# File 'lib/recurly/resources/transaction.rb', line 43

define_attribute :created_at, DateTime

#currency ⇒ String

Returns 3-letter ISO 4217 currency code.

Returns:

  • (String) —

    3-letter ISO 4217 currency code.



47
# File 'lib/recurly/resources/transaction.rb', line 47

define_attribute :currency, String

#customer_message ⇒ String

Returns For declined (success=false) transactions, the message displayed to the customer.

Returns:

  • (String) —

    For declined (success=false) transactions, the message displayed to the customer.



51
# File 'lib/recurly/resources/transaction.rb', line 51

define_attribute :customer_message, String

#customer_message_locale ⇒ String

Returns Language code for the message.

Returns:

  • (String) —

    Language code for the message



55
# File 'lib/recurly/resources/transaction.rb', line 55

define_attribute :customer_message_locale, String

#cvv_check ⇒ String

Returns When processed, result from checking the CVV/CVC value on the transaction.

Returns:

  • (String) —

    When processed, result from checking the CVV/CVC value on the transaction.



59
# File 'lib/recurly/resources/transaction.rb', line 59

define_attribute :cvv_check, String

#description ⇒ String

Returns The description that gets sent to the gateway.

Returns:

  • (String) —

    The description that gets sent to the gateway.



63
# File 'lib/recurly/resources/transaction.rb', line 63

define_attribute :description, String

#fraud_info ⇒ TransactionFraudInfo

Returns Fraud information.

Returns:



67
# File 'lib/recurly/resources/transaction.rb', line 67

define_attribute :fraud_info, :TransactionFraudInfo

#gateway_approval_code ⇒ String

Returns Transaction approval code from the payment gateway.

Returns:

  • (String) —

    Transaction approval code from the payment gateway.



71
# File 'lib/recurly/resources/transaction.rb', line 71

define_attribute :gateway_approval_code, String

#gateway_message ⇒ String

Returns Transaction message from the payment gateway.

Returns:

  • (String) —

    Transaction message from the payment gateway.



75
# File 'lib/recurly/resources/transaction.rb', line 75

define_attribute :gateway_message, String

#gateway_reference ⇒ String

Returns Transaction reference number from the payment gateway.

Returns:

  • (String) —

    Transaction reference number from the payment gateway.



79
# File 'lib/recurly/resources/transaction.rb', line 79

define_attribute :gateway_reference, String

#gateway_response_code ⇒ String

Returns For declined transactions (success=false), this field lists the gateway error code.

Returns:

  • (String) —

    For declined transactions (success=false), this field lists the gateway error code.



83
# File 'lib/recurly/resources/transaction.rb', line 83

define_attribute :gateway_response_code, String

#gateway_response_time ⇒ Float

Returns Time, in seconds, for gateway to process the transaction.

Returns:

  • (Float) —

    Time, in seconds, for gateway to process the transaction.



87
# File 'lib/recurly/resources/transaction.rb', line 87

define_attribute :gateway_response_time, Float

#gateway_response_values ⇒ Hash

Returns The values in this field will vary from gateway to gateway.

Returns:

  • (Hash) —

    The values in this field will vary from gateway to gateway.



91
# File 'lib/recurly/resources/transaction.rb', line 91

define_attribute :gateway_response_values, Hash

#id ⇒ String

Returns Transaction ID.

Returns:

  • (String) —

    Transaction ID



95
# File 'lib/recurly/resources/transaction.rb', line 95

define_attribute :id, String

#initiator ⇒ String

Returns Must be sent for one-time transactions in order to provide context on which entity is submitting the transaction to ensure proper fraud checks are observed, such as 3DS. If the customer is in session, send customer. If this is a merchant initiated one-time transaction, send merchant.

Returns:

  • (String) —

    Must be sent for one-time transactions in order to provide context on which entity is submitting the transaction to ensure proper fraud checks are observed, such as 3DS. If the customer is in session, send customer. If this is a merchant initiated one-time transaction, send merchant.



99
# File 'lib/recurly/resources/transaction.rb', line 99

define_attribute :initiator, String

#invoice ⇒ InvoiceMini

Returns Invoice mini details.

Returns:



103
# File 'lib/recurly/resources/transaction.rb', line 103

define_attribute :invoice, :InvoiceMini

#ip_address_country ⇒ String

Returns Origin IP address country, 2-letter ISO 3166-1 alpha-2 code, if known by Recurly.

Returns:

  • (String) —

    Origin IP address country, 2-letter ISO 3166-1 alpha-2 code, if known by Recurly.



107
# File 'lib/recurly/resources/transaction.rb', line 107

define_attribute :ip_address_country, String

#ip_address_v4 ⇒ String

Returns IP address provided when the billing information was collected: - When the customer enters billing information into the Recurly.js or Hosted Payment Pages, Recurly records the IP address. - When the merchant enters billing information using the API, the merchant may provide an IP address. - When the merchant enters billing information using the UI, no IP address is recorded.

Returns:

  • (String) —

    IP address provided when the billing information was collected: - When the customer enters billing information into the Recurly.js or Hosted Payment Pages, Recurly records the IP address. - When the merchant enters billing information using the API, the merchant may provide an IP address. - When the merchant enters billing information using the UI, no IP address is recorded.



111
# File 'lib/recurly/resources/transaction.rb', line 111

define_attribute :ip_address_v4, String

#merchant_reason_code ⇒ String

Returns This conditional parameter is useful for merchants in specific industries who need to submit one-time Merchant Initiated transactions in specific cases. Not all gateways support these methods, but will support a generic one-time Merchant Initiated transaction. Only use this if the initiator value is "merchant". Otherwise, it will be ignored. - Incremental: Send incremental with an additional purchase if the original authorization amount is not sufficient to cover the costs of your service or product. For example, if the customer adds goods or services or there are additional expenses. - No Show: Send no_show if you charge customers a fee due to an agreed-upon cancellation policy in your industry. - Resubmission: Send resubmission if you need to attempt collection on a declined transaction. You may also use the force collection behavior which has the same effect. - Service Extension: Send service_extension if you are in a service industry and the customer has increased/extended their service in some way. For example: adding a day onto a car rental agreement. - Split Shipment: Send split_shipment if you sell physical product and need to split up a shipment into multiple transactions when the customer is no longer in session. - Top Up: Send top_up if you process one-time transactions based on a pre-arranged agreement with your customer where there is a pre-arranged account balance that needs maintaining. For example, if the customer has agreed to maintain an account balance of 30.00 and their current balance is 20.00, the MIT amount would be at least 10.00 to meet that 30.00 threshold.

Returns:

  • (String) —

    This conditional parameter is useful for merchants in specific industries who need to submit one-time Merchant Initiated transactions in specific cases. Not all gateways support these methods, but will support a generic one-time Merchant Initiated transaction. Only use this if the initiator value is "merchant". Otherwise, it will be ignored. - Incremental: Send incremental with an additional purchase if the original authorization amount is not sufficient to cover the costs of your service or product. For example, if the customer adds goods or services or there are additional expenses. - No Show: Send no_show if you charge customers a fee due to an agreed-upon cancellation policy in your industry. - Resubmission: Send resubmission if you need to attempt collection on a declined transaction. You may also use the force collection behavior which has the same effect. - Service Extension: Send service_extension if you are in a service industry and the customer has increased/extended their service in some way. For example: adding a day onto a car rental agreement. - Split Shipment: Send split_shipment if you sell physical product and need to split up a shipment into multiple transactions when the customer is no longer in session. - Top Up: Send top_up if you process one-time transactions based on a pre-arranged agreement with your customer where there is a pre-arranged account balance that needs maintaining. For example, if the customer has agreed to maintain an account balance of 30.00 and their current balance is 20.00, the MIT amount would be at least 10.00 to meet that 30.00 threshold.



115
# File 'lib/recurly/resources/transaction.rb', line 115

define_attribute :merchant_reason_code, String

#next_action ⇒ TransactionNextAction

Returns Next action values are used for any required customer follow-up action. Currently, this is supported for Ebanx when using Pix Automatico.

Returns:

  • (TransactionNextAction) —

    Next action values are used for any required customer follow-up action. Currently, this is supported for Ebanx when using Pix Automatico.



119
# File 'lib/recurly/resources/transaction.rb', line 119

define_attribute :next_action, :TransactionNextAction

#object ⇒ String

Returns Object type.

Returns:

  • (String) —

    Object type



123
# File 'lib/recurly/resources/transaction.rb', line 123

define_attribute :object, String

#origin ⇒ String

Returns Describes how the transaction was triggered.

Returns:

  • (String) —

    Describes how the transaction was triggered.



127
# File 'lib/recurly/resources/transaction.rb', line 127

define_attribute :origin, String

#original_transaction_id ⇒ String

Returns If this transaction is a refund (type=refund), this will be the ID of the original transaction on the invoice being refunded.

Returns:

  • (String) —

    If this transaction is a refund (type=refund), this will be the ID of the original transaction on the invoice being refunded.



131
# File 'lib/recurly/resources/transaction.rb', line 131

define_attribute :original_transaction_id, String

#payment_gateway ⇒ TransactionPaymentGateway



135
# File 'lib/recurly/resources/transaction.rb', line 135

define_attribute :payment_gateway, :TransactionPaymentGateway

#payment_gateway_references ⇒ Array[PaymentGatewayReferences]

Returns Array of Payment Gateway References captured at transaction time, each a reference to a third-party gateway object of varying types.

Returns:

  • (Array[PaymentGatewayReferences]) —

    Array of Payment Gateway References captured at transaction time, each a reference to a third-party gateway object of varying types.



139
# File 'lib/recurly/resources/transaction.rb', line 139

define_attribute :payment_gateway_references, Array, { :item_type => :PaymentGatewayReferences }

#payment_method ⇒ PaymentMethod

Returns:



143
# File 'lib/recurly/resources/transaction.rb', line 143

define_attribute :payment_method, :PaymentMethod

#refunded ⇒ Boolean

Returns Indicates if part or all of this transaction was refunded.

Returns:

  • (Boolean) —

    Indicates if part or all of this transaction was refunded.



147
# File 'lib/recurly/resources/transaction.rb', line 147

define_attribute :refunded, :Boolean

#status ⇒ String

Returns The current transaction status. Note that the status may change, e.g. a pending transaction may become declined or success may later become void.

Returns:

  • (String) —

    The current transaction status. Note that the status may change, e.g. a pending transaction may become declined or success may later become void.



151
# File 'lib/recurly/resources/transaction.rb', line 151

define_attribute :status, String

#status_code ⇒ String

Returns Status code.

Returns:

  • (String) —

    Status code



155
# File 'lib/recurly/resources/transaction.rb', line 155

define_attribute :status_code, String

#status_message ⇒ String

Returns For declined (success=false) transactions, the message displayed to the merchant.

Returns:

  • (String) —

    For declined (success=false) transactions, the message displayed to the merchant.



159
# File 'lib/recurly/resources/transaction.rb', line 159

define_attribute :status_message, String

#subscription_ids ⇒ Array[String]

Returns If the transaction is charging or refunding for one or more subscriptions, these are their IDs.

Returns:

  • (Array[String]) —

    If the transaction is charging or refunding for one or more subscriptions, these are their IDs.



163
# File 'lib/recurly/resources/transaction.rb', line 163

define_attribute :subscription_ids, Array, { :item_type => String }

#success ⇒ Boolean

Returns Did this transaction complete successfully?.

Returns:

  • (Boolean) —

    Did this transaction complete successfully?



167
# File 'lib/recurly/resources/transaction.rb', line 167

define_attribute :success, :Boolean

#type ⇒ String

Returns - authorization – verifies billing information and places a hold on money in the customer's account. - capture – captures funds held by an authorization and completes a purchase. - purchase – combines the authorization and capture in one transaction. - refund – returns all or a portion of the money collected in a previous transaction to the customer. - verify – a $0 or $1 transaction used to verify billing information which is immediately voided.

Returns:

  • (String) —
    • authorization – verifies billing information and places a hold on money in the customer's account. - capture – captures funds held by an authorization and completes a purchase. - purchase – combines the authorization and capture in one transaction. - refund – returns all or a portion of the money collected in a previous transaction to the customer. - verify – a $0 or $1 transaction used to verify billing information which is immediately voided.


171
# File 'lib/recurly/resources/transaction.rb', line 171

define_attribute :type, String

#updated_at ⇒ DateTime

Returns Updated at.

Returns:

  • (DateTime) —

    Updated at



175
# File 'lib/recurly/resources/transaction.rb', line 175

define_attribute :updated_at, DateTime

#uuid ⇒ String

Returns The UUID is useful for matching data with the CSV exports and building URLs into Recurly's UI.

Returns:

  • (String) —

    The UUID is useful for matching data with the CSV exports and building URLs into Recurly's UI.



179
# File 'lib/recurly/resources/transaction.rb', line 179

define_attribute :uuid, String

#vat_number ⇒ String

Returns VAT number for the customer on this transaction. If the customer's Billing Info country is BR or AR, then this will be their Tax Identifier. For all other countries this will come from the VAT Number field in the Billing Info.

Returns:

  • (String) —

    VAT number for the customer on this transaction. If the customer's Billing Info country is BR or AR, then this will be their Tax Identifier. For all other countries this will come from the VAT Number field in the Billing Info.



183
# File 'lib/recurly/resources/transaction.rb', line 183

define_attribute :vat_number, String

#voided_at ⇒ DateTime

Returns Voided at.

Returns:

  • (DateTime) —

    Voided at



187
# File 'lib/recurly/resources/transaction.rb', line 187

define_attribute :voided_at, DateTime

#voided_by_invoice ⇒ InvoiceMini

Returns Invoice mini details.

Returns:



191
# File 'lib/recurly/resources/transaction.rb', line 191

define_attribute :voided_by_invoice, :InvoiceMini