Class: MoneyMover::Dwolla::AccountFundingSource
- Inherits:
-
ApiResource
- Object
- ApiResource
- MoneyMover::Dwolla::AccountFundingSource
- Defined in:
- lib/money_mover/dwolla/models/account_funding_source.rb
Instance Attribute Summary collapse
-
#created ⇒ Object
Returns the value of attribute created.
-
#name ⇒ Object
Returns the value of attribute name.
-
#status ⇒ Object
Returns the value of attribute status.
-
#type ⇒ Object
Returns the value of attribute type.
Attributes inherited from ApiResource
#_embedded, #_links, #attrs, #id, #resource_location
Class Method Summary collapse
Instance Method Summary collapse
- #bank_account? ⇒ Boolean
-
#initialize(attrs) ⇒ AccountFundingSource
constructor
A new instance of AccountFundingSource.
Methods inherited from ApiResource
Constructor Details
#initialize(attrs) ⇒ AccountFundingSource
6 7 8 |
# File 'lib/money_mover/dwolla/models/account_funding_source.rb', line 6 def initialize(attrs) super id: attrs[:id], name: attrs[:name], status: attrs[:status], type: attrs[:type], created: attrs[:created], _links: attrs[:_links], _embedded: attrs[:_embedded] end |
Instance Attribute Details
#created ⇒ Object
Returns the value of attribute created.
4 5 6 |
# File 'lib/money_mover/dwolla/models/account_funding_source.rb', line 4 def created @created end |
#name ⇒ Object
Returns the value of attribute name.
4 5 6 |
# File 'lib/money_mover/dwolla/models/account_funding_source.rb', line 4 def name @name end |
#status ⇒ Object
Returns the value of attribute status.
4 5 6 |
# File 'lib/money_mover/dwolla/models/account_funding_source.rb', line 4 def status @status end |
#type ⇒ Object
Returns the value of attribute type.
4 5 6 |
# File 'lib/money_mover/dwolla/models/account_funding_source.rb', line 4 def type @type end |
Class Method Details
.all(account_id) ⇒ Object
10 11 12 13 14 15 |
# File 'lib/money_mover/dwolla/models/account_funding_source.rb', line 10 def self.all(account_id) client = ApplicationClient.new response = client.get fetch_endpoint(account_id) response.body[:_embedded][:"funding-sources"].map {|source| new(source) } end |
Instance Method Details
#bank_account? ⇒ Boolean
17 18 19 |
# File 'lib/money_mover/dwolla/models/account_funding_source.rb', line 17 def bank_account? type == 'bank' end |