Class: Ebisu::Payment
- Inherits:
-
Object
- Object
- Ebisu::Payment
- Defined in:
- lib/ebisu/models/payment.rb
Instance Attribute Summary collapse
-
#method ⇒ Object
Returns the value of attribute method.
Instance Method Summary collapse
-
#initialize(data) ⇒ Payment
constructor
A new instance of Payment.
Constructor Details
#initialize(data) ⇒ Payment
Returns a new instance of Payment.
6 7 8 9 10 11 12 13 14 15 |
# File 'lib/ebisu/models/payment.rb', line 6 def initialize(data) @method = case data['Method'] when Array data['Method'].map { |x| PaymentMethod.new(x) } when NilClass [] else [PaymentMethod.new(data)] end end |
Instance Attribute Details
#method ⇒ Object
Returns the value of attribute method.
5 6 7 |
# File 'lib/ebisu/models/payment.rb', line 5 def method @method end |