Class: ActivePayment::Models::Payable
- Inherits:
-
Object
- Object
- ActivePayment::Models::Payable
- Includes:
- PaypalPayable
- Defined in:
- lib/active_payment/models/payable.rb
Instance Attribute Summary collapse
-
#amount ⇒ Object
Returns the value of attribute amount.
-
#class ⇒ Object
Returns the value of attribute class.
-
#currency ⇒ Object
Returns the value of attribute currency.
-
#description ⇒ Object
Returns the value of attribute description.
-
#external_id ⇒ Object
Returns the value of attribute external_id.
-
#id ⇒ Object
Returns the value of attribute id.
-
#number ⇒ Object
Returns the value of attribute number.
-
#quantity ⇒ Object
Returns the value of attribute quantity.
-
#reference_number ⇒ Object
Returns the value of attribute reference_number.
-
#shipping ⇒ Object
Returns the value of attribute shipping.
-
#tax ⇒ Object
Returns the value of attribute tax.
Instance Method Summary collapse
-
#initialize(params = {}) ⇒ Payable
constructor
A new instance of Payable.
Methods included from PaypalPayable
Constructor Details
#initialize(params = {}) ⇒ Payable
11 12 13 14 15 16 17 18 19 |
# File 'lib/active_payment/models/payable.rb', line 11 def initialize(params = {}) @tax = 0 @shipping = 0 @number = 1 @quantity = 1 @currency = 'USD' params.each { |key, value| send "#{key}=", value } end |
Instance Attribute Details
#amount ⇒ Object
Returns the value of attribute amount.
6 7 8 |
# File 'lib/active_payment/models/payable.rb', line 6 def amount @amount end |
#class ⇒ Object
Returns the value of attribute class.
6 7 8 |
# File 'lib/active_payment/models/payable.rb', line 6 def class @class end |
#currency ⇒ Object
Returns the value of attribute currency.
6 7 8 |
# File 'lib/active_payment/models/payable.rb', line 6 def currency @currency end |
#description ⇒ Object
Returns the value of attribute description.
6 7 8 |
# File 'lib/active_payment/models/payable.rb', line 6 def description @description end |
#external_id ⇒ Object
Returns the value of attribute external_id.
6 7 8 |
# File 'lib/active_payment/models/payable.rb', line 6 def external_id @external_id end |
#id ⇒ Object
Returns the value of attribute id.
6 7 8 |
# File 'lib/active_payment/models/payable.rb', line 6 def id @id end |
#number ⇒ Object
Returns the value of attribute number.
6 7 8 |
# File 'lib/active_payment/models/payable.rb', line 6 def number @number end |
#quantity ⇒ Object
Returns the value of attribute quantity.
6 7 8 |
# File 'lib/active_payment/models/payable.rb', line 6 def quantity @quantity end |
#reference_number ⇒ Object
Returns the value of attribute reference_number.
6 7 8 |
# File 'lib/active_payment/models/payable.rb', line 6 def reference_number @reference_number end |
#shipping ⇒ Object
Returns the value of attribute shipping.
6 7 8 |
# File 'lib/active_payment/models/payable.rb', line 6 def shipping @shipping end |
#tax ⇒ Object
Returns the value of attribute tax.
6 7 8 |
# File 'lib/active_payment/models/payable.rb', line 6 def tax @tax end |