Class: Paymongo::Transaction
- Inherits:
-
Object
- Object
- Paymongo::Transaction
- Includes:
- BaseModule
- Defined in:
- lib/paymongo/transaction.rb
Instance Attribute Summary collapse
-
#amount ⇒ Object
readonly
Returns the value of attribute amount.
-
#billing ⇒ Object
readonly
Returns the value of attribute billing.
-
#created ⇒ Object
readonly
Returns the value of attribute created.
-
#currency ⇒ Object
readonly
Returns the value of attribute currency.
-
#description ⇒ Object
readonly
Returns the value of attribute description.
-
#external_reference_number ⇒ Object
readonly
Returns the value of attribute external_reference_number.
-
#fee ⇒ Object
readonly
Returns the value of attribute fee.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#livemode ⇒ Object
readonly
Returns the value of attribute livemode.
-
#net_amount ⇒ Object
readonly
Returns the value of attribute net_amount.
-
#statement_descriptor ⇒ Object
readonly
Returns the value of attribute statement_descriptor.
-
#status ⇒ Object
readonly
Returns the value of attribute status.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
-
#updated ⇒ Object
readonly
Returns the value of attribute updated.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(gateway, attributes) ⇒ Transaction
constructor
A new instance of Transaction.
Methods included from BaseModule
Methods included from BaseModule::Methods
#set_instance_variables_from_hash
Constructor Details
#initialize(gateway, attributes) ⇒ Transaction
Returns a new instance of Transaction.
20 21 22 23 24 25 26 |
# File 'lib/paymongo/transaction.rb', line 20 def initialize(gateway, attributes) @gateway = gateway set_instance_variables_from_hash(attributes[:attributes]) @id = attributes[:id] @type = attributes[:type] # TODO: Add relationships hash end |
Instance Attribute Details
#amount ⇒ Object (readonly)
Returns the value of attribute amount.
7 8 9 |
# File 'lib/paymongo/transaction.rb', line 7 def amount @amount end |
#billing ⇒ Object (readonly)
Returns the value of attribute billing.
8 9 10 |
# File 'lib/paymongo/transaction.rb', line 8 def billing @billing end |
#created ⇒ Object (readonly)
Returns the value of attribute created.
9 10 11 |
# File 'lib/paymongo/transaction.rb', line 9 def created @created end |
#currency ⇒ Object (readonly)
Returns the value of attribute currency.
10 11 12 |
# File 'lib/paymongo/transaction.rb', line 10 def currency @currency end |
#description ⇒ Object (readonly)
Returns the value of attribute description.
11 12 13 |
# File 'lib/paymongo/transaction.rb', line 11 def description @description end |
#external_reference_number ⇒ Object (readonly)
Returns the value of attribute external_reference_number.
12 13 14 |
# File 'lib/paymongo/transaction.rb', line 12 def external_reference_number @external_reference_number end |
#fee ⇒ Object (readonly)
Returns the value of attribute fee.
13 14 15 |
# File 'lib/paymongo/transaction.rb', line 13 def fee @fee end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
5 6 7 |
# File 'lib/paymongo/transaction.rb', line 5 def id @id end |
#livemode ⇒ Object (readonly)
Returns the value of attribute livemode.
14 15 16 |
# File 'lib/paymongo/transaction.rb', line 14 def livemode @livemode end |
#net_amount ⇒ Object (readonly)
Returns the value of attribute net_amount.
15 16 17 |
# File 'lib/paymongo/transaction.rb', line 15 def net_amount @net_amount end |
#statement_descriptor ⇒ Object (readonly)
Returns the value of attribute statement_descriptor.
16 17 18 |
# File 'lib/paymongo/transaction.rb', line 16 def statement_descriptor @statement_descriptor end |
#status ⇒ Object (readonly)
Returns the value of attribute status.
17 18 19 |
# File 'lib/paymongo/transaction.rb', line 17 def status @status end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
6 7 8 |
# File 'lib/paymongo/transaction.rb', line 6 def type @type end |
#updated ⇒ Object (readonly)
Returns the value of attribute updated.
18 19 20 |
# File 'lib/paymongo/transaction.rb', line 18 def updated @updated end |
Class Method Details
._new(*args) ⇒ Object
29 30 31 |
# File 'lib/paymongo/transaction.rb', line 29 def _new(*args) self.new(*args) end |