Class: Beanie::SalesInvoice
Constant Summary collapse
- STATE_NEW =
0- STATE_POSTED =
1- STATE_SENT =
2- STATE_PAID =
3- STATE_CANCELLED =
4- STATE_OVERDUE1 =
5- STATE_OVERDUE2 =
6- STATE_OVERDUE3 =
7- STATE_OVERDUE4 =
8- STATE_OVERDUE5 =
9- STATE_NAMES =
[ ["New (Unposted)", STATE_NEW], ["Posted to Journal", STATE_POSTED], ["Sent to Customer", STATE_SENT], ["Paid", STATE_PAID], ["Cancelled", STATE_CANCELLED], ["Overdue (Past 30 days)", STATE_OVERDUE1], ["Overdue (Past 45 days)", STATE_OVERDUE2], ["Overdue (Over 60 days)", STATE_OVERDUE3], ["Overdue (Over 90 days)", STATE_OVERDUE4], ["Overdue (Over 120 days)", STATE_OVERDUE5] ].freeze
Instance Attribute Summary collapse
-
#date ⇒ Object
Returns the value of attribute date.
-
#due_date ⇒ Object
Returns the value of attribute due_date.
-
#id ⇒ Object
Returns the value of attribute id.
-
#is_credit_note ⇒ Object
Returns the value of attribute is_credit_note.
-
#local_gross ⇒ Object
Returns the value of attribute local_gross.
-
#number ⇒ Object
Returns the value of attribute number.
-
#original_invoice ⇒ Object
Returns the value of attribute original_invoice.
-
#sales_order_id ⇒ Object
Returns the value of attribute sales_order_id.
-
#shipping ⇒ Object
Returns the value of attribute shipping.
-
#state ⇒ Object
Returns the value of attribute state.
-
#sub_total ⇒ Object
Returns the value of attribute sub_total.
-
#tax ⇒ Object
Returns the value of attribute tax.
-
#tax_point ⇒ Object
Returns the value of attribute tax_point.
Instance Method Summary collapse
-
#initialize ⇒ SalesInvoice
constructor
Initialize instance variables.
-
#state_name ⇒ Object
Show the state in a useful format.
Methods inherited from Api
all, build_url, #construct_path, delete, #extract, #field_name, find, get, #object_name, #populate, post, put, #save!, set_headers
Constructor Details
#initialize ⇒ SalesInvoice
Initialize instance variables
61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 |
# File 'lib/beanie/sales_invoice.rb', line 61 def initialize @id = nil @date = nil @due_date = nil @number = nil @is_credit_note = nil @local_gross = nil @shipping = nil @sub_total = nil @tax = nil @tax_point = nil @sales_order_id = nil @original_invoice = nil @state = nil end |
Instance Attribute Details
#date ⇒ Object
Returns the value of attribute date.
32 33 34 |
# File 'lib/beanie/sales_invoice.rb', line 32 def date @date end |
#due_date ⇒ Object
Returns the value of attribute due_date.
32 33 34 |
# File 'lib/beanie/sales_invoice.rb', line 32 def due_date @due_date end |
#id ⇒ Object
Returns the value of attribute id.
32 33 34 |
# File 'lib/beanie/sales_invoice.rb', line 32 def id @id end |
#is_credit_note ⇒ Object
Returns the value of attribute is_credit_note.
32 33 34 |
# File 'lib/beanie/sales_invoice.rb', line 32 def is_credit_note @is_credit_note end |
#local_gross ⇒ Object
Returns the value of attribute local_gross.
32 33 34 |
# File 'lib/beanie/sales_invoice.rb', line 32 def local_gross @local_gross end |
#number ⇒ Object
Returns the value of attribute number.
32 33 34 |
# File 'lib/beanie/sales_invoice.rb', line 32 def number @number end |
#original_invoice ⇒ Object
Returns the value of attribute original_invoice.
33 34 35 |
# File 'lib/beanie/sales_invoice.rb', line 33 def original_invoice @original_invoice end |
#sales_order_id ⇒ Object
Returns the value of attribute sales_order_id.
33 34 35 |
# File 'lib/beanie/sales_invoice.rb', line 33 def sales_order_id @sales_order_id end |
#shipping ⇒ Object
Returns the value of attribute shipping.
32 33 34 |
# File 'lib/beanie/sales_invoice.rb', line 32 def shipping @shipping end |
#state ⇒ Object
Returns the value of attribute state.
33 34 35 |
# File 'lib/beanie/sales_invoice.rb', line 33 def state @state end |
#sub_total ⇒ Object
Returns the value of attribute sub_total.
32 33 34 |
# File 'lib/beanie/sales_invoice.rb', line 32 def sub_total @sub_total end |
#tax ⇒ Object
Returns the value of attribute tax.
32 33 34 |
# File 'lib/beanie/sales_invoice.rb', line 32 def tax @tax end |
#tax_point ⇒ Object
Returns the value of attribute tax_point.
33 34 35 |
# File 'lib/beanie/sales_invoice.rb', line 33 def tax_point @tax_point end |
Instance Method Details
#state_name ⇒ Object
Show the state in a useful format
79 80 81 |
# File 'lib/beanie/sales_invoice.rb', line 79 def state_name STATE_NAMES[self.state][0] end |