Class: Dwolla::Transaction
- Inherits:
-
Object
- Object
- Dwolla::Transaction
- Includes:
- Connection
- Defined in:
- lib/dwolla/transaction.rb
Constant Summary collapse
- ENDPOINTS =
{ :send => 'transactions/send', :request => 'transactions/request' }
Instance Attribute Summary collapse
-
#amount ⇒ Object
Returns the value of attribute amount.
-
#description ⇒ Object
Returns the value of attribute description.
-
#destination ⇒ Object
Returns the value of attribute destination.
-
#destination_type ⇒ Object
Returns the value of attribute destination_type.
-
#id ⇒ Object
Returns the value of attribute id.
-
#origin ⇒ Object
Returns the value of attribute origin.
-
#pin ⇒ Object
Returns the value of attribute pin.
-
#source ⇒ Object
Returns the value of attribute source.
-
#source_type ⇒ Object
Returns the value of attribute source_type.
-
#type ⇒ Object
Returns the value of attribute type.
Instance Method Summary collapse
- #execute ⇒ Object
-
#initialize(attrs = {}) ⇒ Transaction
constructor
A new instance of Transaction.
Constructor Details
#initialize(attrs = {}) ⇒ Transaction
Returns a new instance of Transaction.
10 11 12 13 14 |
# File 'lib/dwolla/transaction.rb', line 10 def initialize(attrs = {}) attrs.each do |key, value| send("#{key}=".to_sym, value) end end |
Instance Attribute Details
#amount ⇒ Object
Returns the value of attribute amount.
8 9 10 |
# File 'lib/dwolla/transaction.rb', line 8 def amount @amount end |
#description ⇒ Object
Returns the value of attribute description.
8 9 10 |
# File 'lib/dwolla/transaction.rb', line 8 def description @description end |
#destination ⇒ Object
Returns the value of attribute destination.
8 9 10 |
# File 'lib/dwolla/transaction.rb', line 8 def destination @destination end |
#destination_type ⇒ Object
Returns the value of attribute destination_type.
8 9 10 |
# File 'lib/dwolla/transaction.rb', line 8 def destination_type @destination_type end |
#id ⇒ Object
Returns the value of attribute id.
8 9 10 |
# File 'lib/dwolla/transaction.rb', line 8 def id @id end |
#origin ⇒ Object
Returns the value of attribute origin.
8 9 10 |
# File 'lib/dwolla/transaction.rb', line 8 def origin @origin end |
#pin ⇒ Object
Returns the value of attribute pin.
8 9 10 |
# File 'lib/dwolla/transaction.rb', line 8 def pin @pin end |
#source ⇒ Object
Returns the value of attribute source.
8 9 10 |
# File 'lib/dwolla/transaction.rb', line 8 def source @source end |
#source_type ⇒ Object
Returns the value of attribute source_type.
8 9 10 |
# File 'lib/dwolla/transaction.rb', line 8 def source_type @source_type end |
#type ⇒ Object
Returns the value of attribute type.
8 9 10 |
# File 'lib/dwolla/transaction.rb', line 8 def type @type end |
Instance Method Details
#execute ⇒ Object
16 17 18 |
# File 'lib/dwolla/transaction.rb', line 16 def execute self.id = post(ENDPOINTS[type], to_payload) end |