Class: Fortnox::Document

Inherits:
Resource
  • Object
show all
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.

Direct Known Subclasses

Invoice, Order

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

Method Summary

Methods inherited from Resource

find, find_all_by, find_one_by, only, parse, save, search, stub

Instance Attribute Details

#address1Object (readonly)

Address1 Document address 1.



23
24
25
# File 'lib/fortnox/resources/document.rb', line 23

def address1
  @address1
end

#address2Object (readonly)

Address2 Document address 2



26
27
28
# File 'lib/fortnox/resources/document.rb', line 26

def address2
  @address2
end

#administration_feeObject (readonly)

AdministrationFee The document administration fee.



17
18
19
# File 'lib/fortnox/resources/document.rb', line 17

def administration_fee
  @administration_fee
end

#cityObject (readonly)

City City for the document address.



35
36
37
# File 'lib/fortnox/resources/document.rb', line 35

def city
  @city
end

#commentsObject (readonly)

Comments Comments of the document



38
39
40
# File 'lib/fortnox/resources/document.rb', line 38

def comments
  @comments
end

#cost_centerObject (readonly)

CostCenter Code of the cost center.



50
51
52
# File 'lib/fortnox/resources/document.rb', line 50

def cost_center
  @cost_center
end

#currencyObject (readonly)

Currency Code of the currency.



53
54
55
# File 'lib/fortnox/resources/document.rb', line 53

def currency
  @currency
end

#currency_rateObject (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_unitObject (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_nameObject (readonly)

CustomerName Name of the customer



62
63
64
# File 'lib/fortnox/resources/document.rb', line 62

def customer_name
  @customer_name
end

#delivery_address1Object (readonly)

DeliveryAddress1 Document delivery address 1.



68
69
70
# File 'lib/fortnox/resources/document.rb', line 68

def delivery_address1
  @delivery_address1
end

#delivery_address2Object (readonly)

DeliveryAddress2 Document delivery address 2.



71
72
73
# File 'lib/fortnox/resources/document.rb', line 71

def delivery_address2
  @delivery_address2
end

#delivery_cityObject (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_nameObject (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_codeObject (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_reference1Object (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_reference2Object (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

#freightObject (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

#languageObject (readonly)

Language Language code.



188
189
190
# File 'lib/fortnox/resources/document.rb', line 188

def language
  @language
end

#our_referenceObject (readonly)

OurReference Our reference



128
129
130
# File 'lib/fortnox/resources/document.rb', line 128

def our_reference
  @our_reference
end

#phone1Object (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

#phone2Object (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_listObject (readonly)

PriceList Code of the price list.



137
138
139
# File 'lib/fortnox/resources/document.rb', line 137

def price_list
  @price_list
end

PrintTemplate Print template of the document.



140
141
142
# File 'lib/fortnox/resources/document.rb', line 140

def print_template
  @print_template
end

#projectObject (readonly)

Project Code of the project.



143
144
145
# File 'lib/fortnox/resources/document.rb', line 143

def project
  @project
end

#remarksObject (readonly)

Remarks Remarks of the document



146
147
148
# File 'lib/fortnox/resources/document.rb', line 146

def remarks
  @remarks
end

#tax_reduction_typeObject (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_deliveryObject (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_paymentObject (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_referenceObject (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_payObject (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_deliveryObject (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_numberObject (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_referenceObject (readonly)

YourReference Your reference



182
183
184
# File 'lib/fortnox/resources/document.rb', line 182

def your_reference
  @your_reference
end

#zip_codeObject (readonly)

ZipCode Zip code of the document



185
186
187
# File 'lib/fortnox/resources/document.rb', line 185

def zip_code
  @zip_code
end