Class: Fortnox::Document
- Defined in:
- lib/fortnox/resources/document.rb
Overview
Shared attributes for Offer, Order and Invoice — the three “document” resources in Fortnox. In the Fortnox implementation these are so close together that they are saved in the same database table. This is never used standalone, only inherited by the respective resources.
Constant Summary
Constants included from Types
Types::AccountNumber, Types::AccountingMethods, Types::ArticleTypes, Types::CURRENT_HOUSEWORK_TYPES, Types::Currencies, Types::CustomerTypes, Types::DefaultDeliveryTypeValues, Types::DeliveryStates, Types::DiscountTypes, Types::Email, Types::HouseworkTypes, Types::InvoiceTypes, Types::LEGACY_HOUSEWORK_TYPES, Types::PaymentWays, Types::ProjectStatusTypes, Types::THE_TRUTH, Types::TaxReductionTypes, Types::VATTypes
Instance Attribute Summary collapse
-
#address1 ⇒ Object
readonly
Address1 Document address 1.
-
#address2 ⇒ Object
readonly
Address2 Document address 2.
-
#administration_fee ⇒ Object
readonly
AdministrationFee The document administration fee.
-
#city ⇒ Object
readonly
City City for the document address.
-
#comments ⇒ Object
readonly
Comments Comments of the document.
-
#cost_center ⇒ Object
readonly
CostCenter Code of the cost center.
-
#currency ⇒ Object
readonly
Currency Code of the currency.
-
#currency_rate ⇒ Object
readonly
CurrencyRate Currency rate used for the document.
-
#currency_unit ⇒ Object
readonly
CurrencyUnit Currency unit used for the document.
-
#customer_name ⇒ Object
readonly
CustomerName Name of the customer.
-
#delivery_address1 ⇒ Object
readonly
DeliveryAddress1 Document delivery address 1.
-
#delivery_address2 ⇒ Object
readonly
DeliveryAddress2 Document delivery address 2.
-
#delivery_city ⇒ Object
readonly
DeliveryCity City for the document delivery address.
-
#delivery_name ⇒ Object
readonly
DeliveryName Name of the recipient of the delivery.
-
#delivery_zip_code ⇒ Object
readonly
DeliveryZipCode ZipCode for the document delivery address.
-
#external_invoice_reference1 ⇒ Object
readonly
ExternalInvoiceReference1 External document reference 1.
-
#external_invoice_reference2 ⇒ Object
readonly
ExternalInvoiceReference2 External document reference 2.
-
#freight ⇒ Object
readonly
Freight Freight cost of the document.
-
#language ⇒ Object
readonly
Language Language code.
-
#our_reference ⇒ Object
readonly
OurReference Our reference.
-
#phone1 ⇒ Object
readonly
Phone1 Phone number 1 of the customer for the document.
-
#phone2 ⇒ Object
readonly
Phone2 Phone number 2 of the customer for the document.
-
#price_list ⇒ Object
readonly
PriceList Code of the price list.
-
#print_template ⇒ Object
readonly
PrintTemplate Print template of the document.
-
#project ⇒ Object
readonly
Project Code of the project.
-
#remarks ⇒ Object
readonly
Remarks Remarks of the document.
-
#tax_reduction_type ⇒ Object
readonly
TaxReductionType Type of tax reduction.
-
#terms_of_delivery ⇒ Object
readonly
TermsOfDelivery Code of the terms of delivery.
-
#terms_of_payment ⇒ Object
readonly
TermsOfPayment Code of the terms of payment.
-
#time_basis_reference ⇒ Object
readonly
TimeBasisReference Reference to time basis.
-
#total_to_pay ⇒ Object
readonly
TotalToPay Total amount to pay.
-
#way_of_delivery ⇒ Object
readonly
WayOfDelivery Code of the way of delivery.
-
#your_order_number ⇒ Object
readonly
YourOrderNumber Your order number.
-
#your_reference ⇒ Object
readonly
YourReference Your reference.
-
#zip_code ⇒ Object
readonly
ZipCode Zip code of the document.
Method Summary
Methods inherited from Resource
find, find_all_by, find_one_by, only, parse, save, search, stub
Instance Attribute Details
#address1 ⇒ Object (readonly)
Address1 Document address 1.
23 24 25 |
# File 'lib/fortnox/resources/document.rb', line 23 def address1 @address1 end |
#address2 ⇒ Object (readonly)
Address2 Document address 2
26 27 28 |
# File 'lib/fortnox/resources/document.rb', line 26 def address2 @address2 end |
#administration_fee ⇒ Object (readonly)
AdministrationFee The document administration fee.
17 18 19 |
# File 'lib/fortnox/resources/document.rb', line 17 def administration_fee @administration_fee end |
#city ⇒ Object (readonly)
City City for the document address.
35 36 37 |
# File 'lib/fortnox/resources/document.rb', line 35 def city @city end |
#comments ⇒ Object (readonly)
Comments Comments of the document
38 39 40 |
# File 'lib/fortnox/resources/document.rb', line 38 def comments @comments end |
#cost_center ⇒ Object (readonly)
CostCenter Code of the cost center.
50 51 52 |
# File 'lib/fortnox/resources/document.rb', line 50 def cost_center @cost_center end |
#currency ⇒ Object (readonly)
Currency Code of the currency.
53 54 55 |
# File 'lib/fortnox/resources/document.rb', line 53 def currency @currency end |
#currency_rate ⇒ Object (readonly)
CurrencyRate Currency rate used for the document
56 57 58 |
# File 'lib/fortnox/resources/document.rb', line 56 def currency_rate @currency_rate end |
#currency_unit ⇒ Object (readonly)
CurrencyUnit Currency unit used for the document
59 60 61 |
# File 'lib/fortnox/resources/document.rb', line 59 def currency_unit @currency_unit end |
#customer_name ⇒ Object (readonly)
CustomerName Name of the customer
62 63 64 |
# File 'lib/fortnox/resources/document.rb', line 62 def customer_name @customer_name end |
#delivery_address1 ⇒ Object (readonly)
DeliveryAddress1 Document delivery address 1.
68 69 70 |
# File 'lib/fortnox/resources/document.rb', line 68 def delivery_address1 @delivery_address1 end |
#delivery_address2 ⇒ Object (readonly)
DeliveryAddress2 Document delivery address 2.
71 72 73 |
# File 'lib/fortnox/resources/document.rb', line 71 def delivery_address2 @delivery_address2 end |
#delivery_city ⇒ Object (readonly)
DeliveryCity City for the document delivery address.
74 75 76 |
# File 'lib/fortnox/resources/document.rb', line 74 def delivery_city @delivery_city end |
#delivery_name ⇒ Object (readonly)
DeliveryName Name of the recipient of the delivery
83 84 85 |
# File 'lib/fortnox/resources/document.rb', line 83 def delivery_name @delivery_name end |
#delivery_zip_code ⇒ Object (readonly)
DeliveryZipCode ZipCode for the document delivery address.
86 87 88 |
# File 'lib/fortnox/resources/document.rb', line 86 def delivery_zip_code @delivery_zip_code end |
#external_invoice_reference1 ⇒ Object (readonly)
ExternalInvoiceReference1 External document reference 1
95 96 97 |
# File 'lib/fortnox/resources/document.rb', line 95 def external_invoice_reference1 @external_invoice_reference1 end |
#external_invoice_reference2 ⇒ Object (readonly)
ExternalInvoiceReference2 External document reference 2
98 99 100 |
# File 'lib/fortnox/resources/document.rb', line 98 def external_invoice_reference2 @external_invoice_reference2 end |
#freight ⇒ Object (readonly)
Freight Freight cost of the document. 12 digits (incl. decimals)
101 102 103 |
# File 'lib/fortnox/resources/document.rb', line 101 def freight @freight end |
#language ⇒ Object (readonly)
Language Language code.
188 189 190 |
# File 'lib/fortnox/resources/document.rb', line 188 def language @language end |
#our_reference ⇒ Object (readonly)
OurReference Our reference
128 129 130 |
# File 'lib/fortnox/resources/document.rb', line 128 def our_reference @our_reference end |
#phone1 ⇒ Object (readonly)
Phone1 Phone number 1 of the customer for the document
131 132 133 |
# File 'lib/fortnox/resources/document.rb', line 131 def phone1 @phone1 end |
#phone2 ⇒ Object (readonly)
Phone2 Phone number 2 of the customer for the document
134 135 136 |
# File 'lib/fortnox/resources/document.rb', line 134 def phone2 @phone2 end |
#price_list ⇒ Object (readonly)
PriceList Code of the price list.
137 138 139 |
# File 'lib/fortnox/resources/document.rb', line 137 def price_list @price_list end |
#print_template ⇒ Object (readonly)
PrintTemplate Print template of the document.
140 141 142 |
# File 'lib/fortnox/resources/document.rb', line 140 def print_template @print_template end |
#project ⇒ Object (readonly)
Project Code of the project.
143 144 145 |
# File 'lib/fortnox/resources/document.rb', line 143 def project @project end |
#remarks ⇒ Object (readonly)
Remarks Remarks of the document
146 147 148 |
# File 'lib/fortnox/resources/document.rb', line 146 def remarks @remarks end |
#tax_reduction_type ⇒ Object (readonly)
TaxReductionType Type of tax reduction.
158 159 160 |
# File 'lib/fortnox/resources/document.rb', line 158 def tax_reduction_type @tax_reduction_type end |
#terms_of_delivery ⇒ Object (readonly)
TermsOfDelivery Code of the terms of delivery.
161 162 163 |
# File 'lib/fortnox/resources/document.rb', line 161 def terms_of_delivery @terms_of_delivery end |
#terms_of_payment ⇒ Object (readonly)
TermsOfPayment Code of the terms of payment.
164 165 166 |
# File 'lib/fortnox/resources/document.rb', line 164 def terms_of_payment @terms_of_payment end |
#time_basis_reference ⇒ Object (readonly)
TimeBasisReference Reference to time basis.
194 195 196 |
# File 'lib/fortnox/resources/document.rb', line 194 def time_basis_reference @time_basis_reference end |
#total_to_pay ⇒ Object (readonly)
TotalToPay Total amount to pay.
197 198 199 |
# File 'lib/fortnox/resources/document.rb', line 197 def total_to_pay @total_to_pay end |
#way_of_delivery ⇒ Object (readonly)
WayOfDelivery Code of the way of delivery.
176 177 178 |
# File 'lib/fortnox/resources/document.rb', line 176 def way_of_delivery @way_of_delivery end |
#your_order_number ⇒ Object (readonly)
YourOrderNumber Your order number
179 180 181 |
# File 'lib/fortnox/resources/document.rb', line 179 def your_order_number @your_order_number end |
#your_reference ⇒ Object (readonly)
YourReference Your reference
182 183 184 |
# File 'lib/fortnox/resources/document.rb', line 182 def your_reference @your_reference end |
#zip_code ⇒ Object (readonly)
ZipCode Zip code of the document
185 186 187 |
# File 'lib/fortnox/resources/document.rb', line 185 def zip_code @zip_code end |