Class: Paymill::Invoice
- Inherits:
-
Object
- Object
- Paymill::Invoice
- Defined in:
- lib/paymill/models/invoice.rb
Instance Attribute Summary collapse
-
#billing_date ⇒ Object
Returns the value of attribute billing_date.
-
#brutto ⇒ Object
Returns the value of attribute brutto.
-
#currency ⇒ Object
Returns the value of attribute currency.
-
#invoice_nr ⇒ Object
Returns the value of attribute invoice_nr.
-
#invoice_type ⇒ Object
Returns the value of attribute invoice_type.
-
#last_reminder_date ⇒ Object
Returns the value of attribute last_reminder_date.
-
#netto ⇒ Object
Returns the value of attribute netto.
-
#period_from ⇒ Object
Returns the value of attribute period_from.
-
#period_until ⇒ Object
Returns the value of attribute period_until.
-
#status ⇒ Object
Returns the value of attribute status.
-
#vat_rate ⇒ Object
Returns the value of attribute vat_rate.
Instance Method Summary collapse
-
#initialize(json) ⇒ Invoice
constructor
A new instance of Invoice.
Constructor Details
#initialize(json) ⇒ Invoice
Returns a new instance of Invoice.
7 8 9 10 11 12 13 14 15 |
# File 'lib/paymill/models/invoice.rb', line 7 def initialize( json ) json.each_pair do |key, value| instance_variable_set( "@#{key}", ( Integer( value ) rescue value ) ) end @period_from &&= Time.at( @period_from ) @period_until &&= Time.at( @period_until ) @billing_date &&= Time.at( @billing_date ) @last_reminder_date &&= Time.at( @last_reminder_date ) end |
Instance Attribute Details
#billing_date ⇒ Object
Returns the value of attribute billing_date.
4 5 6 |
# File 'lib/paymill/models/invoice.rb', line 4 def billing_date @billing_date end |
#brutto ⇒ Object
Returns the value of attribute brutto.
4 5 6 |
# File 'lib/paymill/models/invoice.rb', line 4 def brutto @brutto end |
#currency ⇒ Object
Returns the value of attribute currency.
4 5 6 |
# File 'lib/paymill/models/invoice.rb', line 4 def currency @currency end |
#invoice_nr ⇒ Object
Returns the value of attribute invoice_nr.
4 5 6 |
# File 'lib/paymill/models/invoice.rb', line 4 def invoice_nr @invoice_nr end |
#invoice_type ⇒ Object
Returns the value of attribute invoice_type.
4 5 6 |
# File 'lib/paymill/models/invoice.rb', line 4 def invoice_type @invoice_type end |
#last_reminder_date ⇒ Object
Returns the value of attribute last_reminder_date.
4 5 6 |
# File 'lib/paymill/models/invoice.rb', line 4 def last_reminder_date @last_reminder_date end |
#netto ⇒ Object
Returns the value of attribute netto.
4 5 6 |
# File 'lib/paymill/models/invoice.rb', line 4 def netto @netto end |
#period_from ⇒ Object
Returns the value of attribute period_from.
4 5 6 |
# File 'lib/paymill/models/invoice.rb', line 4 def period_from @period_from end |
#period_until ⇒ Object
Returns the value of attribute period_until.
4 5 6 |
# File 'lib/paymill/models/invoice.rb', line 4 def period_until @period_until end |
#status ⇒ Object
Returns the value of attribute status.
4 5 6 |
# File 'lib/paymill/models/invoice.rb', line 4 def status @status end |
#vat_rate ⇒ Object
Returns the value of attribute vat_rate.
4 5 6 |
# File 'lib/paymill/models/invoice.rb', line 4 def vat_rate @vat_rate end |