finvoice3 1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/CHANGELOG.md +0 -0
- data/README.md +46 -0
- data/Rakefile +8 -0
- data/lib/finvoice3/any_party_communication_details.rb +19 -0
- data/lib/finvoice3/any_party_details/any_party_communication_details.rb +19 -0
- data/lib/finvoice3/any_party_details/any_party_postal_address_details.rb +34 -0
- data/lib/finvoice3/any_party_details.rb +46 -0
- data/lib/finvoice3/attachment_message_details/attachment_message_identifier.rb +5 -0
- data/lib/finvoice3/attachment_message_details.rb +14 -0
- data/lib/finvoice3/buyer_communication_details.rb +19 -0
- data/lib/finvoice3/buyer_party_details/buyer_postal_address_details.rb +32 -0
- data/lib/finvoice3/buyer_party_details.rb +46 -0
- data/lib/finvoice3/country_code.rb +7 -0
- data/lib/finvoice3/delivery_communication_details.rb +19 -0
- data/lib/finvoice3/delivery_details/delivery_period_details.rb +19 -0
- data/lib/finvoice3/delivery_details/destination_name.rb +13 -0
- data/lib/finvoice3/delivery_details/package_details.rb +31 -0
- data/lib/finvoice3/delivery_details/shipment_party_details/shipment_postal_address_details.rb +34 -0
- data/lib/finvoice3/delivery_details/shipment_party_details.rb +34 -0
- data/lib/finvoice3/delivery_details.rb +112 -0
- data/lib/finvoice3/delivery_party_details/delivery_postal_address_details.rb +34 -0
- data/lib/finvoice3/delivery_party_details.rb +31 -0
- data/lib/finvoice3/direct_debit_info.rb +22 -0
- data/lib/finvoice3/electronic_addr_id.rb +14 -0
- data/lib/finvoice3/epi_account_id.rb +13 -0
- data/lib/finvoice3/epi_details/epi_identification_details/epi_reference.rb +7 -0
- data/lib/finvoice3/epi_details/epi_identification_details.rb +28 -0
- data/lib/finvoice3/epi_details/epi_party_details/epi_beneficiary_party_details.rb +22 -0
- data/lib/finvoice3/epi_details/epi_party_details/epi_bfi_party_details/epi_bfi_identifier.rb +14 -0
- data/lib/finvoice3/epi_details/epi_party_details/epi_bfi_party_details.rb +19 -0
- data/lib/finvoice3/epi_details/epi_party_details.rb +19 -0
- data/lib/finvoice3/epi_details/epi_payment_instruction_details/epi_amount.rb +7 -0
- data/lib/finvoice3/epi_details/epi_payment_instruction_details/epi_charge.rb +14 -0
- data/lib/finvoice3/epi_details/epi_payment_instruction_details/epi_remittance_info_identifier.rb +14 -0
- data/lib/finvoice3/epi_details/epi_payment_instruction_details.rb +40 -0
- data/lib/finvoice3/epi_details.rb +22 -0
- data/lib/finvoice3/factoring_agreement_details/factoring_party_postal_address_details.rb +34 -0
- data/lib/finvoice3/factoring_agreement_details.rb +37 -0
- data/lib/finvoice3/finvoice.rb +187 -0
- data/lib/finvoice3/invoice.rb +33 -0
- data/lib/finvoice3/invoice_details/definition_details/definition_header_text.rb +14 -0
- data/lib/finvoice3/invoice_details/definition_details.rb +19 -0
- data/lib/finvoice3/invoice_details/discount_details.rb +34 -0
- data/lib/finvoice3/invoice_details/invoice_charge_details.rb +32 -0
- data/lib/finvoice3/invoice_details/invoice_classification.rb +19 -0
- data/lib/finvoice3/invoice_details/invoice_type_code_fi.rb +13 -0
- data/lib/finvoice3/invoice_details/origin_code.rb +4 -0
- data/lib/finvoice3/invoice_details/payment_terms_details/cash_discount_vat_details.rb +19 -0
- data/lib/finvoice3/invoice_details/payment_terms_details/header_value.rb +16 -0
- data/lib/finvoice3/invoice_details/payment_terms_details/payment_over_due_fine_details.rb +22 -0
- data/lib/finvoice3/invoice_details/payment_terms_details.rb +46 -0
- data/lib/finvoice3/invoice_details/vat_point.rb +19 -0
- data/lib/finvoice3/invoice_details/vat_specification_details.rb +31 -0
- data/lib/finvoice3/invoice_details.rb +211 -0
- data/lib/finvoice3/invoice_recipient_communication_details.rb +19 -0
- data/lib/finvoice3/invoice_recipient_party_details/invoice_recipient_postal_address_details.rb +34 -0
- data/lib/finvoice3/invoice_recipient_party_details.rb +31 -0
- data/lib/finvoice3/invoice_row/article_group_identifier.rb +13 -0
- data/lib/finvoice3/invoice_row/customs_info.rb +28 -0
- data/lib/finvoice3/invoice_row/ean_code.rb +9 -0
- data/lib/finvoice3/invoice_row/row_any_party_details/row_any_party_postal_address_details.rb +34 -0
- data/lib/finvoice3/invoice_row/row_any_party_details.rb +40 -0
- data/lib/finvoice3/invoice_row/row_charge_details.rb +28 -0
- data/lib/finvoice3/invoice_row/row_definition_details/row_definition_header_text.rb +9 -0
- data/lib/finvoice3/invoice_row/row_definition_details.rb +14 -0
- data/lib/finvoice3/invoice_row/row_delivery_details/row_package_details.rb +34 -0
- data/lib/finvoice3/invoice_row/row_delivery_details.rb +97 -0
- data/lib/finvoice3/invoice_row/row_over_due_payment_details.rb +73 -0
- data/lib/finvoice3/invoice_row/row_progressive_discount_details.rb +28 -0
- data/lib/finvoice3/invoice_row/sub_invoice_row/sub_row_any_party_details/sub_row_any_party_postal_address_details.rb +34 -0
- data/lib/finvoice3/invoice_row/sub_invoice_row/sub_row_any_party_details.rb +40 -0
- data/lib/finvoice3/invoice_row/sub_invoice_row/sub_row_definition_details/sub_row_definition_header_text.rb +9 -0
- data/lib/finvoice3/invoice_row/sub_invoice_row/sub_row_definition_details.rb +19 -0
- data/lib/finvoice3/invoice_row/sub_invoice_row/sub_row_delivery_details/sub_row_package_details.rb +34 -0
- data/lib/finvoice3/invoice_row/sub_invoice_row/sub_row_delivery_details.rb +73 -0
- data/lib/finvoice3/invoice_row/sub_invoice_row/sub_row_over_due_payment_details.rb +73 -0
- data/lib/finvoice3/invoice_row/sub_invoice_row/sub_row_progressive_discount_details.rb +28 -0
- data/lib/finvoice3/invoice_row/sub_invoice_row.rb +250 -0
- data/lib/finvoice3/invoice_row/transaction_details.rb +22 -0
- data/lib/finvoice3/invoice_row.rb +255 -0
- data/lib/finvoice3/invoice_sender_party_details.rb +25 -0
- data/lib/finvoice3/invoiced_object_id.rb +13 -0
- data/lib/finvoice3/message_transmission_details/message_details.rb +29 -0
- data/lib/finvoice3/message_transmission_details/message_receiver_details.rb +19 -0
- data/lib/finvoice3/message_transmission_details/message_sender_details.rb +19 -0
- data/lib/finvoice3/message_transmission_details.rb +22 -0
- data/lib/finvoice3/original_invoice_reference.rb +19 -0
- data/lib/finvoice3/partial_payment_details.rb +43 -0
- data/lib/finvoice3/party_identifier.rb +17 -0
- data/lib/finvoice3/party_legal_reg_id.rb +13 -0
- data/lib/finvoice3/payment_card_info.rb +19 -0
- data/lib/finvoice3/payment_status_details/payment_status_code.rb +5 -0
- data/lib/finvoice3/payment_status_details.rb +19 -0
- data/lib/finvoice3/seller_communication_details.rb +19 -0
- data/lib/finvoice3/seller_information_details/invoice_recipient_details.rb +19 -0
- data/lib/finvoice3/seller_information_details/seller_account_details/seller_account_id.rb +15 -0
- data/lib/finvoice3/seller_information_details/seller_account_details/seller_bic.rb +14 -0
- data/lib/finvoice3/seller_information_details/seller_account_details.rb +22 -0
- data/lib/finvoice3/seller_information_details/seller_official_postal_address_details.rb +31 -0
- data/lib/finvoice3/seller_information_details.rb +61 -0
- data/lib/finvoice3/seller_party_details/seller_postal_address_details.rb +32 -0
- data/lib/finvoice3/seller_party_details.rb +46 -0
- data/lib/finvoice3/soap_envelope.rb +82 -0
- data/lib/finvoice3/specification_details/external_specification_details.rb +5 -0
- data/lib/finvoice3/specification_details.rb +19 -0
- data/lib/finvoice3/tag/complex.rb +22 -0
- data/lib/finvoice3/tag/simple.rb +13 -0
- data/lib/finvoice3/tag.rb +27 -0
- data/lib/finvoice3/templates/fi_b2b.rb +232 -0
- data/lib/finvoice3/vat_category_code.rb +4 -0
- data/lib/finvoice3/version.rb +5 -0
- data/lib/finvoice3.rb +135 -0
- metadata +225 -0
checksums.yaml
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
---
|
|
2
|
+
SHA256:
|
|
3
|
+
metadata.gz: 8dea6e7ab38ba62a6c7131fdade9111f73c7845805fd4e83cce78af9c1a5ca5e
|
|
4
|
+
data.tar.gz: ba23ef8a327e6b1d0d627eea8293c35a12a8b0f7249687b5ccae30c1f7597515
|
|
5
|
+
SHA512:
|
|
6
|
+
metadata.gz: 80ce07f2477be539ff461bde22892cb8a357b9cdf69ba2df13e8c6867a3c1790e317751ea9cc6e7d74677905d2ec197f05911c1be337a8cb34866fe8c1485d7f
|
|
7
|
+
data.tar.gz: cef9a2678990227833f8c9aff51b4d3854d59adf812e94fce2c9c747749c3ee41d95fbcd3567cb0431c9242da9a6cf9c51620818f853572dcb3d2afb9a015dd1
|
data/CHANGELOG.md
ADDED
|
File without changes
|
data/README.md
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
# Finvoice 3.0 xml generator
|
|
2
|
+
|
|
3
|
+
This is placeholder readme file for finvoice3 gem.
|
|
4
|
+
|
|
5
|
+
## How to run tests
|
|
6
|
+
|
|
7
|
+
```
|
|
8
|
+
rake test
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## How to use the gem
|
|
12
|
+
|
|
13
|
+
```
|
|
14
|
+
require_relative "lib/finvoice3"
|
|
15
|
+
|
|
16
|
+
invoice = Finvoice3::Invoice.new
|
|
17
|
+
invoice.to_xml
|
|
18
|
+
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
## How to validate an invoice
|
|
22
|
+
|
|
23
|
+
```
|
|
24
|
+
invoice = Finvoice3::Invoice.new
|
|
25
|
+
invoice.validate
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
An empty invoice should be invalid.
|
|
29
|
+
|
|
30
|
+
## Raw API
|
|
31
|
+
|
|
32
|
+
Currently the finvoice3 gem provides a raw API to the document structure. This gives you complete freedom to manipulate the document, but does not do any calculations of validation of the input.
|
|
33
|
+
|
|
34
|
+
Entity names are snake_case versions of the Finvoice XML tag names. For example, to access message MessageTransmissionDetails -> FromIdentifier:
|
|
35
|
+
|
|
36
|
+
```
|
|
37
|
+
invoice = Finvoice3::Invoice.new
|
|
38
|
+
invoice.message_transmission_details.from_identifier
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
This gives you the FromIdentifier tag. To change its value, set the `value` attribute:
|
|
42
|
+
|
|
43
|
+
```
|
|
44
|
+
invoice.message_transmission_details.from_identifier.value = "OKOYFIHH"
|
|
45
|
+
```
|
|
46
|
+
|
data/Rakefile
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
module Finvoice3
|
|
2
|
+
class AnyPartyCommunicationDetails < Tag::Complex
|
|
3
|
+
attr_accessor :any_party_phone_number_identifier
|
|
4
|
+
attr_accessor :any_party_emailaddress_identifier
|
|
5
|
+
|
|
6
|
+
def initialize
|
|
7
|
+
super
|
|
8
|
+
@any_party_phone_number_identifier = Tag::Simple.new(name: "AnyPartyPhoneNumberIdentifier")
|
|
9
|
+
@any_party_emailaddress_identifier = Tag::Simple.new(name: "AnyPartyEmailaddressIdentifier")
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
def sub_tags
|
|
13
|
+
[
|
|
14
|
+
@any_party_phone_number_identifier,
|
|
15
|
+
@any_party_emailaddress_identifier
|
|
16
|
+
]
|
|
17
|
+
end
|
|
18
|
+
end
|
|
19
|
+
end
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
module Finvoice3
|
|
2
|
+
class AnyPartyDetails::AnyPartyCommunicationDetail < Tag::Complex
|
|
3
|
+
attr_accessor :any_party_phone_number_identifier
|
|
4
|
+
attr_accessor :any_party_email_address_identifier
|
|
5
|
+
|
|
6
|
+
def index
|
|
7
|
+
super
|
|
8
|
+
@any_party_phone_number_identifier = Tag::Simple.new(name: "AnyPartyPhoneNumberIdentifier")
|
|
9
|
+
@any_party_email_address_identifier = Tag::Simple.new(name: "AnyPartyEmailAddressIdentifier")
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
def sub_tags
|
|
13
|
+
[
|
|
14
|
+
@any_party_phone_number_identifier,
|
|
15
|
+
@any_party_email_address_identifier
|
|
16
|
+
]
|
|
17
|
+
end
|
|
18
|
+
end
|
|
19
|
+
end
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
module Finvoice3
|
|
2
|
+
class AnyPartyDetails::AnyPartyPostalAddressDetails < Tag::Complex
|
|
3
|
+
attr_accessor :any_party_street_name
|
|
4
|
+
attr_accessor :any_party_town_name
|
|
5
|
+
attr_accessor :any_party_post_code_identifier
|
|
6
|
+
attr_accessor :any_party_country_subdivision
|
|
7
|
+
attr_accessor :country_code
|
|
8
|
+
attr_accessor :country_name
|
|
9
|
+
attr_accessor :any_party_post_office_box_identifer
|
|
10
|
+
|
|
11
|
+
def initialize
|
|
12
|
+
super
|
|
13
|
+
@any_party_street_name = Tag::Simple.new(name: "AnyPartyStreetName")
|
|
14
|
+
@any_party_town_name = Tag::Simple.new(name: "AnyPartyTownName")
|
|
15
|
+
@any_party_post_code_identifier = Tag::Simple.new(name: "AnyPartyPostCodeIdentifier")
|
|
16
|
+
@any_party_country_subdivision = Tag::Simple.new(name: "AnyPartyCountrySubdivision")
|
|
17
|
+
@country_code = CountryCode.new
|
|
18
|
+
@country_name = Tag::Simple.new(name: "CountryName")
|
|
19
|
+
@any_party_post_office_box_identifer = Tag::Simple.new(name: "AnyPartyPostOfficeBoxIdentifier")
|
|
20
|
+
end
|
|
21
|
+
|
|
22
|
+
def sub_tags
|
|
23
|
+
[
|
|
24
|
+
@any_party_street_name,
|
|
25
|
+
@any_party_town_name,
|
|
26
|
+
@any_party_post_code_identifier,
|
|
27
|
+
@any_party_country_subdivision,
|
|
28
|
+
@country_code,
|
|
29
|
+
@country_name,
|
|
30
|
+
@any_party_post_office_box_identifer
|
|
31
|
+
]
|
|
32
|
+
end
|
|
33
|
+
end
|
|
34
|
+
end
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
module Finvoice3
|
|
2
|
+
class AnyPartyDetails < Tag::Complex
|
|
3
|
+
attr_accessor :any_party_text
|
|
4
|
+
attr_accessor :any_party_identifier
|
|
5
|
+
attr_accessor :any_party_organisation_names
|
|
6
|
+
attr_accessor :any_party_organisation_department
|
|
7
|
+
attr_accessor :any_party_organisation_tax_code
|
|
8
|
+
attr_accessor :any_party_code
|
|
9
|
+
attr_accessor :any_party_contact_person_name
|
|
10
|
+
attr_accessor :any_party_contact_person_function
|
|
11
|
+
attr_accessor :any_party_contact_person_department
|
|
12
|
+
attr_accessor :any_party_communication_details
|
|
13
|
+
attr_accessor :any_party_postal_address_details
|
|
14
|
+
|
|
15
|
+
def initialize
|
|
16
|
+
super
|
|
17
|
+
@any_party_text = Tag::Simple.new(name: "AnyPartyText")
|
|
18
|
+
@any_party_identifier = PartyLegalRegId.new
|
|
19
|
+
@any_party_organisation_names = []
|
|
20
|
+
@any_party_organisation_department = Tag::Simple.new(name: "AnyPartyOrganisationDepartment")
|
|
21
|
+
@any_party_organisation_tax_code = Tag::Simple.new(name: "AnyPartyOrganisationTaxCode")
|
|
22
|
+
@any_party_code = PartyIdentifier.new
|
|
23
|
+
@any_party_contact_person_name = Tag::Simple.new(name: "AnyPartyContactPersonName")
|
|
24
|
+
@any_party_contact_person_function = Tag::Simple.new(name: "AnyPartyContactPersonFunction")
|
|
25
|
+
@any_party_contact_person_department = Tag::Simple.new(name: "AnyPartyContactPersonDepartment")
|
|
26
|
+
@any_party_communication_details = AnyPartyCommunicationDetails.new
|
|
27
|
+
@any_party_postal_address_details = AnyPartyPostalAddressDetails.new
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
def sub_tags
|
|
31
|
+
[
|
|
32
|
+
@any_party_text,
|
|
33
|
+
@any_party_identifier,
|
|
34
|
+
*@any_party_organisation_names,
|
|
35
|
+
@any_party_organisation_department,
|
|
36
|
+
@any_party_organisation_tax_code,
|
|
37
|
+
@any_party_code,
|
|
38
|
+
@any_party_contact_person_name,
|
|
39
|
+
@any_party_contact_person_function,
|
|
40
|
+
@any_party_contact_person_department,
|
|
41
|
+
@any_party_communication_details,
|
|
42
|
+
@any_party_postal_address_details
|
|
43
|
+
]
|
|
44
|
+
end
|
|
45
|
+
end
|
|
46
|
+
end
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
module Finvoice3
|
|
2
|
+
class AttachmentMessageDetails < Tag::Complex
|
|
3
|
+
attr_accessor :attachment_message_identifier
|
|
4
|
+
|
|
5
|
+
def initialize
|
|
6
|
+
super
|
|
7
|
+
@attachment_message_identifier = AttachmentMessageIdentifier.new
|
|
8
|
+
end
|
|
9
|
+
|
|
10
|
+
def sub_tags
|
|
11
|
+
[@attachment_message_identifier]
|
|
12
|
+
end
|
|
13
|
+
end
|
|
14
|
+
end
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
module Finvoice3
|
|
2
|
+
class BuyerCommunicationDetails < Tag::Complex
|
|
3
|
+
attr_accessor :buyer_phone_number_identifier
|
|
4
|
+
attr_accessor :buyer_emailaddress_identifier
|
|
5
|
+
|
|
6
|
+
def initialize
|
|
7
|
+
super
|
|
8
|
+
@buyer_phone_number_identifier = Tag::Simple.new(name: "BuyerPhoneNumberIdentifier")
|
|
9
|
+
@buyer_emailaddress_identifier = Tag::Simple.new(name: "BuyerEmailaddressIdentifier")
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
def sub_tags
|
|
13
|
+
[
|
|
14
|
+
@buyer_phone_number_identifier,
|
|
15
|
+
@buyer_emailaddress_identifier
|
|
16
|
+
]
|
|
17
|
+
end
|
|
18
|
+
end
|
|
19
|
+
end
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
module Finvoice3
|
|
2
|
+
class BuyerPartyDetails::BuyerPostalAddressDetails < Tag::Complex
|
|
3
|
+
attr_accessor :buyer_street_name
|
|
4
|
+
attr_accessor :buyer_town_name
|
|
5
|
+
attr_accessor :buyer_post_code_identifier
|
|
6
|
+
attr_accessor :buyer_country_subdivision
|
|
7
|
+
attr_accessor :country_code
|
|
8
|
+
attr_accessor :country_name
|
|
9
|
+
attr_accessor :buyer_post_office_box_identifier
|
|
10
|
+
|
|
11
|
+
def initialize
|
|
12
|
+
super
|
|
13
|
+
@buyer_street_name = Tag::Simple.new(name: "BuyerStreetName")
|
|
14
|
+
@buyer_town_name = Tag::Simple.new(name: "BuyerTownName")
|
|
15
|
+
@buyer_post_code_identifier = Tag::Simple.new(name: "BuyerPostCodeIdentifier")
|
|
16
|
+
@buyer_country_subdivision = Tag::Simple.new(name: "BuyerCountrySubdivision")
|
|
17
|
+
@country_code = CountryCode.new
|
|
18
|
+
@country_name = Tag::Simple.new(name: "CountryName")
|
|
19
|
+
@buyer_post_office_box_identifier = Tag::Simple.new(name: "BuyerPostOfficeBoxIdentifier")
|
|
20
|
+
end
|
|
21
|
+
|
|
22
|
+
def sub_tags
|
|
23
|
+
[
|
|
24
|
+
@buyer_street_name,
|
|
25
|
+
@buyer_town_name,
|
|
26
|
+
@buyer_post_code_identifier,
|
|
27
|
+
@buyer_country_code,
|
|
28
|
+
@buyer_country_name
|
|
29
|
+
]
|
|
30
|
+
end
|
|
31
|
+
end
|
|
32
|
+
end
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
module Finvoice3
|
|
2
|
+
class BuyerPartyDetails < Tag::Complex
|
|
3
|
+
attr_accessor :buyer_party_identifier
|
|
4
|
+
attr_accessor :buyer_party_identifier_url_text
|
|
5
|
+
attr_accessor :buyer_organisation_names
|
|
6
|
+
attr_accessor :buyer_organisation_trading_name
|
|
7
|
+
attr_accessor :buyer_organisation_department
|
|
8
|
+
attr_accessor :buyer_organisation_tax_code
|
|
9
|
+
attr_accessor :buyer_organisation_tax_code_url_text
|
|
10
|
+
attr_accessor :buyer_code
|
|
11
|
+
attr_accessor :buyer_postal_address_details
|
|
12
|
+
|
|
13
|
+
def initialize
|
|
14
|
+
super
|
|
15
|
+
@buyer_party_identifier = Tag::Simple.new(name: "BuyerPartyIdentifier")
|
|
16
|
+
@buyer_party_identifier_url_text = Tag::Simple.new(name: "BuyerPartyIdentifierUrlText")
|
|
17
|
+
@buyer_organisation_names = []
|
|
18
|
+
@buyer_organisation_trading_name = Tag::Simple.new(name: "BuyerOrganisationTradingName")
|
|
19
|
+
@buyer_organisation_department = Tag::Simple.new(name: "BuyerOrganisationDepartment")
|
|
20
|
+
@buyer_organisation_tax_code = Tag::Simple.new(name: "BuyerOrganisationTaxCode")
|
|
21
|
+
@buyer_organisation_tax_code_url_text = Tag::Simple.new(name: "BuyerOrganisationTaxCodeUrlText")
|
|
22
|
+
@buyer_code = Tag::Simple.new(name: "BuyerCode")
|
|
23
|
+
@buyer_postal_address_details = BuyerPostalAddressDetails.new
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
def add_buyer_organisation_name(name)
|
|
27
|
+
tag = Tag::Simple.new(name: "BuyerOrganisationName")
|
|
28
|
+
tag.value = name
|
|
29
|
+
@buyer_organisation_names << tag
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
def sub_tags
|
|
33
|
+
[
|
|
34
|
+
@buyer_party_identifier,
|
|
35
|
+
@buyer_party_identifier_url_text,
|
|
36
|
+
*@buyer_organisation_names,
|
|
37
|
+
@buyer_organisation_trading_name,
|
|
38
|
+
@buyer_organisation_department,
|
|
39
|
+
@buyer_organisation_tax_code,
|
|
40
|
+
@buyer_organisation_tax_code_url_text,
|
|
41
|
+
@buyer_code,
|
|
42
|
+
@buyer_postal_address_details
|
|
43
|
+
]
|
|
44
|
+
end
|
|
45
|
+
end
|
|
46
|
+
end
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
module Finvoice3
|
|
2
|
+
class DeliveryCommunicationDetails < Tag::Complex
|
|
3
|
+
attr_accessor :delivery_phone_number_identifier
|
|
4
|
+
attr_accessor :delivery_emailaddress_identifier
|
|
5
|
+
|
|
6
|
+
def initialize
|
|
7
|
+
super
|
|
8
|
+
@delivery_phone_number_identifier = Tag::Simple.new(name: "DeliveryPhoneNumberIdentifier")
|
|
9
|
+
@delivery_emailaddress_identifier = Tag::Simple.new(name: "DeliveryEmailaddressIdentifier")
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
def sub_tags
|
|
13
|
+
[
|
|
14
|
+
@delivery_phone_number_identifier,
|
|
15
|
+
@delivery_emailaddress_identifier
|
|
16
|
+
]
|
|
17
|
+
end
|
|
18
|
+
end
|
|
19
|
+
end
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
module Finvoice3
|
|
2
|
+
class DeliveryDetails::DeliveryPeriodDetails < Tag::Complex
|
|
3
|
+
attr_accessor :start_date
|
|
4
|
+
attr_accessor :end_date
|
|
5
|
+
|
|
6
|
+
def initialize
|
|
7
|
+
super
|
|
8
|
+
@start_date = Tag::Simple.new(name: "StartDate")
|
|
9
|
+
@end_date = Tag::Simple.new(name: "EndDate")
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
def sub_tags
|
|
13
|
+
[
|
|
14
|
+
@start_date,
|
|
15
|
+
@end_date
|
|
16
|
+
]
|
|
17
|
+
end
|
|
18
|
+
end
|
|
19
|
+
end
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
module Finvoice3
|
|
2
|
+
class DeliveryDetails::PackageDetails < Tag::Complex
|
|
3
|
+
attr_accessor :package_length
|
|
4
|
+
attr_accessor :package_width
|
|
5
|
+
attr_accessor :package_height
|
|
6
|
+
attr_accessor :package_weight
|
|
7
|
+
attr_accessor :package_volume
|
|
8
|
+
attr_accessor :transport_carriage_quantity
|
|
9
|
+
|
|
10
|
+
def initialize
|
|
11
|
+
super
|
|
12
|
+
@package_length = Tag::Simple.new(name: "PackageLength")
|
|
13
|
+
@package_width = Tag::Simple.new(name: "PackageWidth")
|
|
14
|
+
@package_height = Tag::Simple.new(name: "PackageHeight")
|
|
15
|
+
@package_weight = Tag::Simple.new(name: "PackageWeight")
|
|
16
|
+
@package_volume = Tag::Simple.new(name: "PackageVolume")
|
|
17
|
+
@transport_carriage_quantity = Tag::Simple.new(name: "TransportCarriageQuantity")
|
|
18
|
+
end
|
|
19
|
+
|
|
20
|
+
def sub_tags
|
|
21
|
+
[
|
|
22
|
+
@package_length,
|
|
23
|
+
@package_width,
|
|
24
|
+
@package_height,
|
|
25
|
+
@package_weight,
|
|
26
|
+
@package_volume,
|
|
27
|
+
@transport_carriage_quantity
|
|
28
|
+
]
|
|
29
|
+
end
|
|
30
|
+
end
|
|
31
|
+
end
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
module Finvoice3
|
|
2
|
+
class DeliveryDetails::ShipmentPartyDetails::ShipmentPostalAddressDetails < Tag::Complex
|
|
3
|
+
attr_accessor :shipment_street_name
|
|
4
|
+
attr_accessor :shipment_town_name
|
|
5
|
+
attr_accessor :shipment_post_code_identifier
|
|
6
|
+
attr_accessor :shipment_country_subdivision
|
|
7
|
+
attr_accessor :county_code
|
|
8
|
+
attr_accessor :country_name
|
|
9
|
+
attr_accessor :shipment_post_office_box_identifier
|
|
10
|
+
|
|
11
|
+
def initialize
|
|
12
|
+
super
|
|
13
|
+
@shipment_street_name = Tag::Simple.new(name: "ShipmentStreetName")
|
|
14
|
+
@shipment_town_name = Tag::Simple.new(name: "ShipmentTownName")
|
|
15
|
+
@shipment_post_code_identifier = Tag::Simple.new(name: "ShipmentPostCodeIdentifier")
|
|
16
|
+
@shipment_country_subdivision = Tag::Simple.new(name: "ShipmentCountrySubdivision")
|
|
17
|
+
@county_code = CountryCode.new
|
|
18
|
+
@country_name = Tag::Simple.new(name: "CountryName")
|
|
19
|
+
@shipment_post_office_box_identifier = Tag::Simple.new(name: "ShipmentPostOfficeBoxIdentifier")
|
|
20
|
+
end
|
|
21
|
+
|
|
22
|
+
def sub_tags
|
|
23
|
+
[
|
|
24
|
+
@shipment_street_name,
|
|
25
|
+
@shipment_town_name,
|
|
26
|
+
@shipment_post_code_identifier,
|
|
27
|
+
@shipment_country_subdivision,
|
|
28
|
+
@county_code,
|
|
29
|
+
@country_name,
|
|
30
|
+
@shipment_post_office_box_identifier
|
|
31
|
+
]
|
|
32
|
+
end
|
|
33
|
+
end
|
|
34
|
+
end
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
module Finvoice3
|
|
2
|
+
class DeliveryDetails::ShipmentPartyDetails < Tag::Complex
|
|
3
|
+
attr_accessor :shipment_party_identifier
|
|
4
|
+
attr_accessor :shipment_organisation_name
|
|
5
|
+
attr_accessor :shipment_organisation_department
|
|
6
|
+
attr_accessor :shipment_organisation_tax_code
|
|
7
|
+
attr_accessor :shipment_code
|
|
8
|
+
attr_accessor :shipment_postal_address_details
|
|
9
|
+
attr_accessor :shipment_site_code
|
|
10
|
+
|
|
11
|
+
def initialize
|
|
12
|
+
super
|
|
13
|
+
@shipment_party_identifier = Finvoice3::PartyLegalRegId.new(name: "ShipmentPartyIdentifier")
|
|
14
|
+
@shipment_organisation_name = Tag::Simple.new(name: "ShipmentOrganisationName")
|
|
15
|
+
@shipment_organisation_department = Tag::Simple.new(name: "ShipmentOrganisationDepartment")
|
|
16
|
+
@shipment_organisation_tax_code = Tag::Simple.new(name: "ShipmentOrganisationTaxCode")
|
|
17
|
+
@shipment_code = PartyIdentifier.new(name: "ShipmentCode")
|
|
18
|
+
@shipment_postal_address_details = ShipmentPostalAddressDetails.new
|
|
19
|
+
@shipment_site_code = Tag::Simple.new(name: "ShipmentSideCode")
|
|
20
|
+
end
|
|
21
|
+
|
|
22
|
+
def sub_tags
|
|
23
|
+
[
|
|
24
|
+
@shipment_party_identifier,
|
|
25
|
+
@shipment_organisation_name,
|
|
26
|
+
@shipment_organisation_department,
|
|
27
|
+
@shipment_organisation_tax_code,
|
|
28
|
+
@shipment_code,
|
|
29
|
+
@shipment_postal_address_details,
|
|
30
|
+
@shipment_site_code
|
|
31
|
+
]
|
|
32
|
+
end
|
|
33
|
+
end
|
|
34
|
+
end
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
module Finvoice3
|
|
2
|
+
class DeliveryDetails < Tag::Complex
|
|
3
|
+
attr_accessor :delivery_date
|
|
4
|
+
attr_accessor :delivery_period_details
|
|
5
|
+
attr_accessor :shipment_party_details
|
|
6
|
+
attr_accessor :delivery_method_text
|
|
7
|
+
attr_accessor :delivery_terms_text
|
|
8
|
+
attr_accessor :delivery_terms_code
|
|
9
|
+
attr_accessor :terminal_address_text
|
|
10
|
+
attr_accessor :waybill_identifier
|
|
11
|
+
attr_accessor :waybill_type_code
|
|
12
|
+
attr_accessor :clearance_identifer
|
|
13
|
+
attr_accessor :delivery_note_identifier
|
|
14
|
+
attr_accessor :deliverer_identifier
|
|
15
|
+
attr_accessor :deliverer_name
|
|
16
|
+
attr_accessor :deliverer_country_subdivision
|
|
17
|
+
attr_accessor :deliverer_country_code
|
|
18
|
+
attr_accessor :deliverer_country_name
|
|
19
|
+
attr_accessor :mode_of_transport_identifier
|
|
20
|
+
attr_accessor :carrier_name
|
|
21
|
+
attr_accessor :vessel_name
|
|
22
|
+
attr_accessor :location_identifier
|
|
23
|
+
attr_accessor :transport_information_date
|
|
24
|
+
attr_accessor :country_of_origin
|
|
25
|
+
attr_accessor :country_of_destination_name
|
|
26
|
+
attr_accessor :destination_country_code
|
|
27
|
+
attr_accessor :place_of_discharge
|
|
28
|
+
attr_accessor :final_destination_name
|
|
29
|
+
attr_accessor :manufacturer_identifier
|
|
30
|
+
attr_accessor :manufacturer_name
|
|
31
|
+
attr_accessor :manufacturer_country_subdivision
|
|
32
|
+
attr_accessor :manufacturer_country_code
|
|
33
|
+
attr_accessor :manufacturer_country_name
|
|
34
|
+
attr_accessor :manufacturer_order_identifier
|
|
35
|
+
attr_accessor :package_details
|
|
36
|
+
|
|
37
|
+
def initialize
|
|
38
|
+
super
|
|
39
|
+
@delivery_date = Tag::Simple.new(name: "DeliveryDate") # korvaa omalla tagilla
|
|
40
|
+
@delivery_period_details = DeliveryPeriodDetails.new
|
|
41
|
+
@shipment_party_details = ShipmentPartyDetails.new
|
|
42
|
+
@delivery_method_text = Tag::Simple.new(name: "DeliveryMethodText")
|
|
43
|
+
@delivery_terms_text = Tag::Simple.new(name: "DeliveryTermsText")
|
|
44
|
+
@delivery_terms_code = Tag::Simple.new(name: "DeliveryTermsCode")
|
|
45
|
+
@terminal_address_text = Tag::Simple.new(name: "TerminalAddressText")
|
|
46
|
+
@waybill_identifier = Tag::Simple.new(name: "WaybillIdentifier")
|
|
47
|
+
@waybill_type_code = Tag::Simple.new(name: "WaybillTypeCode")
|
|
48
|
+
@clearance_identifer = Tag::Simple.new(name: "ClearanceIdentifier")
|
|
49
|
+
@delivery_note_identifier = Tag::Simple.new(name: "DeliveryNoteIdentifier")
|
|
50
|
+
@deliverer_identifier = Tag::Simple.new(name: "DelivererIdentifier")
|
|
51
|
+
@deliverer_name = Tag::Simple.new(name: "DelivererName")
|
|
52
|
+
@deliverer_country_subdivision = Tag::Simple.new(name: "DelivererCountrySubdivision")
|
|
53
|
+
@deliverer_country_code = CountryCode.new(name: "DelivererCountryCode")
|
|
54
|
+
@deliverer_country_name = Tag::Simple.new(name: "DelivererCountryName")
|
|
55
|
+
@mode_of_transport_identifier = Tag::Simple.new(name: "ModeOfTransportIdentifier")
|
|
56
|
+
@carrier_name = Tag::Simple.new(name: "CarrierName")
|
|
57
|
+
@vessel_name = Tag::Simple.new(name: "VesselName")
|
|
58
|
+
@location_identifier = Tag::Simple.new(name: "LocationIdentifier")
|
|
59
|
+
@transport_information_date = Tag::Simple.new(name: "TransportInformationDate")
|
|
60
|
+
@country_of_origin = Tag::Simple.new(name: "CountryOfOrigin")
|
|
61
|
+
@country_of_destination_name = Tag::Simple.new(name: "CountryOfDestinationName")
|
|
62
|
+
@destination_country_code = CountryCode.new(name: "DestinationCountryCode")
|
|
63
|
+
@place_of_discharge = Tag::Simple.new(name: "PlaceOfDischarge")
|
|
64
|
+
@final_destination_name = DestinationName.new(name: "FinalDestinationName")
|
|
65
|
+
@manufacturer_identifier = Tag::Simple.new(name: "ManufacturerIdentifier")
|
|
66
|
+
@manufacturer_name = Tag::Simple.new(name: "ManufacturerName")
|
|
67
|
+
@manufacturer_country_subdivision = Tag::Simple.new(name: "ManufacturerCountrySubdivision")
|
|
68
|
+
@manufacturer_country_code = CountryCode.new(name: "ManufacturerCountryCode")
|
|
69
|
+
@manufacturer_country_name = Tag::Simple.new(name: "ManufacturerCountryName")
|
|
70
|
+
@manufacturer_order_identifier = Tag::Simple.new(name: "ManufacturerOrderIdentifier")
|
|
71
|
+
@package_details = PackageDetails.new
|
|
72
|
+
end
|
|
73
|
+
|
|
74
|
+
def sub_tags
|
|
75
|
+
[
|
|
76
|
+
@delivery_date,
|
|
77
|
+
@delivery_period_details,
|
|
78
|
+
@shipment_party_details,
|
|
79
|
+
@delivery_method_text,
|
|
80
|
+
@delivery_terms_text,
|
|
81
|
+
@delivery_terms_code,
|
|
82
|
+
@terminal_address_text,
|
|
83
|
+
@waybill_identifier,
|
|
84
|
+
@waybill_type_code,
|
|
85
|
+
@clearance_identifer,
|
|
86
|
+
@delivery_note_identifier,
|
|
87
|
+
@deliverer_identifier,
|
|
88
|
+
@deliverer_name,
|
|
89
|
+
@deliverer_country_subdivision,
|
|
90
|
+
@deliverer_country_code,
|
|
91
|
+
@deliverer_country_name,
|
|
92
|
+
@mode_of_transport_identifier,
|
|
93
|
+
@carrier_name,
|
|
94
|
+
@vessel_name,
|
|
95
|
+
@location_identifier,
|
|
96
|
+
@transport_information_date,
|
|
97
|
+
@country_of_origin,
|
|
98
|
+
@country_of_destination_name,
|
|
99
|
+
@destination_country_code,
|
|
100
|
+
@place_of_discharge,
|
|
101
|
+
@final_destination_name,
|
|
102
|
+
@manufacturer_identifier,
|
|
103
|
+
@manufacturer_name,
|
|
104
|
+
@manufacturer_country_subdivision,
|
|
105
|
+
@manufacturer_country_code,
|
|
106
|
+
@manufacturer_country_name,
|
|
107
|
+
@manufacturer_order_identifier,
|
|
108
|
+
@package_details
|
|
109
|
+
]
|
|
110
|
+
end
|
|
111
|
+
end
|
|
112
|
+
end
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
module Finvoice3
|
|
2
|
+
class DeliveryPartyDetails::DeliveryPostalAddressDetails < Tag::Complex
|
|
3
|
+
attr_accessor :delivery_street_name
|
|
4
|
+
attr_accessor :delivery_town_name
|
|
5
|
+
attr_accessor :delivery_post_cost_identifier
|
|
6
|
+
attr_accessor :delivery_country_subdivision
|
|
7
|
+
attr_accessor :country_code
|
|
8
|
+
attr_accessor :country_name
|
|
9
|
+
attr_accessor :delivery_post_office_box_identifier
|
|
10
|
+
|
|
11
|
+
def initialize
|
|
12
|
+
super
|
|
13
|
+
@delivery_street_name = Tag::Simple.new(name: "DeliveryStreetName")
|
|
14
|
+
@delivery_town_name = Tag::Simple.new(name: "DeliveryTownName")
|
|
15
|
+
@delivery_post_cost_identifier = Tag::Simple.new(name: "DeliveryPostCostIdentifier")
|
|
16
|
+
@delivery_country_subdivision = Tag::Simple.new(name: "DeliveryCountrySubdivision")
|
|
17
|
+
@country_code = CountryCode.new
|
|
18
|
+
@country_name = Tag::Simple.new(name: "CountryName")
|
|
19
|
+
@delivery_post_office_box_identifier = Tag::Simple.new(name: "DeliveryPostOfficeBoxIdentifier")
|
|
20
|
+
end
|
|
21
|
+
|
|
22
|
+
def sub_tags
|
|
23
|
+
[
|
|
24
|
+
@delivery_street_name,
|
|
25
|
+
@delivery_town_name,
|
|
26
|
+
@delivery_post_cost_identifier,
|
|
27
|
+
@delivery_country_subdivision,
|
|
28
|
+
@country_code,
|
|
29
|
+
@country_name,
|
|
30
|
+
@delivery_post_office_box_identifier
|
|
31
|
+
]
|
|
32
|
+
end
|
|
33
|
+
end
|
|
34
|
+
end
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
module Finvoice3
|
|
2
|
+
class DeliveryPartyDetails < Tag::Complex
|
|
3
|
+
attr_accessor :delivery_party_identifier
|
|
4
|
+
attr_accessor :delivery_organisation_name
|
|
5
|
+
attr_accessor :delivery_department
|
|
6
|
+
attr_accessor :delivery_organisation_tax_code
|
|
7
|
+
attr_accessor :delivery_code
|
|
8
|
+
attr_accessor :delivery_postal_address_details
|
|
9
|
+
|
|
10
|
+
def initialize
|
|
11
|
+
super
|
|
12
|
+
@delivery_party_identifier = PartyLegalRegId.new
|
|
13
|
+
@delivery_organisation_name = Tag::Simple.new(name: "DeliveryOrganisationName")
|
|
14
|
+
@delivery_department = Tag::Simple.new(name: "DeliveryDepartment")
|
|
15
|
+
@delivery_organisation_tax_code = Tag::Simple.new(name: "DeliveryOrganisationTaxCode")
|
|
16
|
+
@delivery_code = PartyIdentifier.new
|
|
17
|
+
@delivery_postal_address_details = DeliveryPostalAddressDetails.new
|
|
18
|
+
end
|
|
19
|
+
|
|
20
|
+
def sub_tags
|
|
21
|
+
[
|
|
22
|
+
@delivery_party_identifier,
|
|
23
|
+
@delivery_organisation_name,
|
|
24
|
+
@delivery_department,
|
|
25
|
+
@delivery_organisation_tax_code,
|
|
26
|
+
@delivery_code,
|
|
27
|
+
@delivery_postal_address_details
|
|
28
|
+
]
|
|
29
|
+
end
|
|
30
|
+
end
|
|
31
|
+
end
|