Class: Lightrail::Transaction
- Inherits:
-
LightrailObject
- Object
- LightrailObject
- Lightrail::Transaction
- Defined in:
- lib/lightrail_client/transaction.rb
Instance Attribute Summary collapse
-
#cardId ⇒ Object
Returns the value of attribute cardId.
-
#codeLastFour ⇒ Object
Returns the value of attribute codeLastFour.
-
#currency ⇒ Object
Returns the value of attribute currency.
-
#dateCreated ⇒ Object
Returns the value of attribute dateCreated.
-
#giftbitUserId ⇒ Object
Returns the value of attribute giftbitUserId.
-
#metadata ⇒ Object
Returns the value of attribute metadata.
-
#parentTransactionId ⇒ Object
Returns the value of attribute parentTransactionId.
-
#transactionAccessMethod ⇒ Object
Returns the value of attribute transactionAccessMethod.
-
#transactionId ⇒ Object
Returns the value of attribute transactionId.
-
#transactionType ⇒ Object
Returns the value of attribute transactionType.
-
#userSuppliedId ⇒ Object
Returns the value of attribute userSuppliedId.
-
#value ⇒ Object
Returns the value of attribute value.
Class Method Summary collapse
- .capture(original_transaction_info, new_request_body = {}) ⇒ Object
- .charge_card(transaction_params, simulate) ⇒ Object
- .charge_code(transaction_params, simulate) ⇒ Object
- .fund_card(transaction_params) ⇒ Object
- .refund(original_transaction_info, new_request_body = {}) ⇒ Object
- .void(original_transaction_info, new_request_body = {}) ⇒ Object
Methods inherited from LightrailObject
Constructor Details
This class inherits a constructor from Lightrail::LightrailObject
Instance Attribute Details
#cardId ⇒ Object
Returns the value of attribute cardId.
3 4 5 |
# File 'lib/lightrail_client/transaction.rb', line 3 def cardId @cardId end |
#codeLastFour ⇒ Object
Returns the value of attribute codeLastFour.
3 4 5 |
# File 'lib/lightrail_client/transaction.rb', line 3 def codeLastFour @codeLastFour end |
#currency ⇒ Object
Returns the value of attribute currency.
3 4 5 |
# File 'lib/lightrail_client/transaction.rb', line 3 def currency @currency end |
#dateCreated ⇒ Object
Returns the value of attribute dateCreated.
3 4 5 |
# File 'lib/lightrail_client/transaction.rb', line 3 def dateCreated @dateCreated end |
#giftbitUserId ⇒ Object
Returns the value of attribute giftbitUserId.
3 4 5 |
# File 'lib/lightrail_client/transaction.rb', line 3 def giftbitUserId @giftbitUserId end |
#metadata ⇒ Object
Returns the value of attribute metadata.
3 4 5 |
# File 'lib/lightrail_client/transaction.rb', line 3 def @metadata end |
#parentTransactionId ⇒ Object
Returns the value of attribute parentTransactionId.
3 4 5 |
# File 'lib/lightrail_client/transaction.rb', line 3 def parentTransactionId @parentTransactionId end |
#transactionAccessMethod ⇒ Object
Returns the value of attribute transactionAccessMethod.
3 4 5 |
# File 'lib/lightrail_client/transaction.rb', line 3 def transactionAccessMethod @transactionAccessMethod end |
#transactionId ⇒ Object
Returns the value of attribute transactionId.
3 4 5 |
# File 'lib/lightrail_client/transaction.rb', line 3 def transactionId @transactionId end |
#transactionType ⇒ Object
Returns the value of attribute transactionType.
3 4 5 |
# File 'lib/lightrail_client/transaction.rb', line 3 def transactionType @transactionType end |
#userSuppliedId ⇒ Object
Returns the value of attribute userSuppliedId.
3 4 5 |
# File 'lib/lightrail_client/transaction.rb', line 3 def userSuppliedId @userSuppliedId end |
#value ⇒ Object
Returns the value of attribute value.
3 4 5 |
# File 'lib/lightrail_client/transaction.rb', line 3 def value @value end |
Class Method Details
.capture(original_transaction_info, new_request_body = {}) ⇒ Object
28 29 30 |
# File 'lib/lightrail_client/transaction.rb', line 28 def self.capture (original_transaction_info, new_request_body={}) handle_transaction(original_transaction_info, 'capture', new_request_body) end |
.charge_card(transaction_params, simulate) ⇒ Object
10 11 12 13 |
# File 'lib/lightrail_client/transaction.rb', line 10 def self.charge_card(transaction_params, simulate) transaction_type = transaction_params[:pending] ? :card_id_pending : :card_id_drawdown self.create(transaction_params, transaction_type, simulate) end |
.charge_code(transaction_params, simulate) ⇒ Object
5 6 7 8 |
# File 'lib/lightrail_client/transaction.rb', line 5 def self.charge_code(transaction_params, simulate) transaction_type = transaction_params[:pending] ? :code_pending : :code_drawdown self.create(transaction_params, transaction_type, simulate) end |
.fund_card(transaction_params) ⇒ Object
15 16 17 |
# File 'lib/lightrail_client/transaction.rb', line 15 def self.fund_card(transaction_params) self.create(transaction_params, :card_id_fund, false) end |
.refund(original_transaction_info, new_request_body = {}) ⇒ Object
20 21 22 |
# File 'lib/lightrail_client/transaction.rb', line 20 def self.refund (original_transaction_info, new_request_body={}) handle_transaction(original_transaction_info, 'refund', new_request_body) end |
.void(original_transaction_info, new_request_body = {}) ⇒ Object
24 25 26 |
# File 'lib/lightrail_client/transaction.rb', line 24 def self.void (original_transaction_info, new_request_body={}) handle_transaction(original_transaction_info, 'void', new_request_body) end |