Class: Paymongo::Transaction

Inherits:
Object
  • Object
show all
Includes:
BaseModule
Defined in:
lib/paymongo/transaction.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods included from BaseModule

included

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

#amountObject (readonly)

Returns the value of attribute amount.



7
8
9
# File 'lib/paymongo/transaction.rb', line 7

def amount
  @amount
end

#billingObject (readonly)

Returns the value of attribute billing.



8
9
10
# File 'lib/paymongo/transaction.rb', line 8

def billing
  @billing
end

#createdObject (readonly)

Returns the value of attribute created.



9
10
11
# File 'lib/paymongo/transaction.rb', line 9

def created
  @created
end

#currencyObject (readonly)

Returns the value of attribute currency.



10
11
12
# File 'lib/paymongo/transaction.rb', line 10

def currency
  @currency
end

#descriptionObject (readonly)

Returns the value of attribute description.



11
12
13
# File 'lib/paymongo/transaction.rb', line 11

def description
  @description
end

#external_reference_numberObject (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

#feeObject (readonly)

Returns the value of attribute fee.



13
14
15
# File 'lib/paymongo/transaction.rb', line 13

def fee
  @fee
end

#idObject (readonly)

Returns the value of attribute id.



5
6
7
# File 'lib/paymongo/transaction.rb', line 5

def id
  @id
end

#livemodeObject (readonly)

Returns the value of attribute livemode.



14
15
16
# File 'lib/paymongo/transaction.rb', line 14

def livemode
  @livemode
end

#net_amountObject (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_descriptorObject (readonly)

Returns the value of attribute statement_descriptor.



16
17
18
# File 'lib/paymongo/transaction.rb', line 16

def statement_descriptor
  @statement_descriptor
end

#statusObject (readonly)

Returns the value of attribute status.



17
18
19
# File 'lib/paymongo/transaction.rb', line 17

def status
  @status
end

#typeObject (readonly)

Returns the value of attribute type.



6
7
8
# File 'lib/paymongo/transaction.rb', line 6

def type
  @type
end

#updatedObject (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