Class: Giftrocket::FundingSource
- Inherits:
-
Object
- Object
- Giftrocket::FundingSource
- Defined in:
- lib/giftrocket/funding_source.rb
Instance Attribute Summary collapse
-
#id ⇒ Object
Returns the value of attribute id.
-
#meta ⇒ Object
Returns the value of attribute meta.
-
#method ⇒ Object
Returns the value of attribute method.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(attributes) ⇒ FundingSource
constructor
A new instance of FundingSource.
Constructor Details
#initialize(attributes) ⇒ FundingSource
Returns a new instance of FundingSource.
6 7 8 9 10 11 |
# File 'lib/giftrocket/funding_source.rb', line 6 def initialize(attributes) attributes = attributes.with_indifferent_access self.id = attributes[:id] self.method = attributes[:method] self. = attributes[:meta] end |
Instance Attribute Details
#id ⇒ Object
Returns the value of attribute id.
4 5 6 |
# File 'lib/giftrocket/funding_source.rb', line 4 def id @id end |
#meta ⇒ Object
Returns the value of attribute meta.
4 5 6 |
# File 'lib/giftrocket/funding_source.rb', line 4 def @meta end |
#method ⇒ Object
Returns the value of attribute method.
4 5 6 |
# File 'lib/giftrocket/funding_source.rb', line 4 def method @method end |
Class Method Details
.list(filters = {}) ⇒ Object
13 14 15 16 17 18 19 20 21 |
# File 'lib/giftrocket/funding_source.rb', line 13 def self.list(filters={}) Giftrocket::Request.get( 'funding_sources', query: filters.merge(Giftrocket.), format: 'json' )[:funding_sources].map do |funding_souce_attributes| Giftrocket::FundingSource.new(funding_souce_attributes) end end |