Class: PayTrace::Transaction
- Inherits:
-
Object
- Object
- PayTrace::Transaction
- Extended by:
- TransactionOperations
- Defined in:
- lib/paytrace/transaction.rb
Instance Attribute Summary collapse
-
#amount ⇒ Object
readonly
Returns the value of attribute amount.
-
#credit_card ⇒ Object
readonly
Returns the value of attribute credit_card.
-
#response ⇒ Object
Returns the value of attribute response.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Instance Method Summary collapse
-
#initialize(amount: nil, credit_card: nil, type: nil) ⇒ Transaction
constructor
A new instance of Transaction.
Methods included from TransactionOperations
Constructor Details
#initialize(amount: nil, credit_card: nil, type: nil) ⇒ Transaction
Returns a new instance of Transaction.
25 26 27 28 29 |
# File 'lib/paytrace/transaction.rb', line 25 def initialize(amount: nil, credit_card: nil, type: nil) @amount = amount @credit_card = CreditCard.new(credit_card) @type = type end |
Instance Attribute Details
#amount ⇒ Object (readonly)
Returns the value of attribute amount.
22 23 24 |
# File 'lib/paytrace/transaction.rb', line 22 def amount @amount end |
#credit_card ⇒ Object (readonly)
Returns the value of attribute credit_card.
22 23 24 |
# File 'lib/paytrace/transaction.rb', line 22 def credit_card @credit_card end |
#response ⇒ Object
Returns the value of attribute response.
23 24 25 |
# File 'lib/paytrace/transaction.rb', line 23 def response @response end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
22 23 24 |
# File 'lib/paytrace/transaction.rb', line 22 def type @type end |