Class: Vantiv::Api::Transaction
- Inherits:
-
Object
- Object
- Vantiv::Api::Transaction
- Defined in:
- lib/vantiv/api/transaction.rb
Instance Method Summary collapse
- #amount ⇒ Object
- #amount=(value) ⇒ Object
-
#initialize(id: nil, amount_in_cents: nil, order_id: nil, customer_id: nil, partial_approved_flag: nil, order_source: nil, cardholder_authentication: nil, original_network_transaction_id: nil, processing_type: nil, original_transaction_amount: nil) ⇒ Transaction
constructor
A new instance of Transaction.
- #order_id ⇒ Object
Constructor Details
#initialize(id: nil, amount_in_cents: nil, order_id: nil, customer_id: nil, partial_approved_flag: nil, order_source: nil, cardholder_authentication: nil, original_network_transaction_id: nil, processing_type: nil, original_transaction_amount: nil) ⇒ Transaction
Returns a new instance of Transaction.
22 23 24 25 26 27 28 29 30 31 32 33 34 35 |
# File 'lib/vantiv/api/transaction.rb', line 22 def initialize(id: nil, amount_in_cents: nil, order_id: nil, customer_id: nil, partial_approved_flag: nil, order_source: nil, cardholder_authentication: nil, original_network_transaction_id: nil, processing_type: nil, original_transaction_amount: nil) @id = id @amount_in_cents = amount_in_cents @order_id = order_id @customer_id = customer_id @partial_approved_flag = partial_approved_flag @order_source = order_source @cardholder_authentication = cardholder_authentication @original_network_transaction_id = original_network_transaction_id @processing_type = processing_type @original_transaction_amount = original_transaction_amount end |
Instance Method Details
#amount ⇒ Object
37 38 39 |
# File 'lib/vantiv/api/transaction.rb', line 37 def amount format_cents_to_decimal(@amount_in_cents) if @amount_in_cents end |
#amount=(value) ⇒ Object
41 42 43 |
# File 'lib/vantiv/api/transaction.rb', line 41 def amount=(value) @amount_in_cents = decimal_string_to_cents(value) end |
#order_id ⇒ Object
45 46 47 |
# File 'lib/vantiv/api/transaction.rb', line 45 def order_id @order_id.to_s if @order_id end |