e-invoice-api 0.11.0 → 0.13.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.
@@ -14,99 +14,103 @@ module EInvoiceAPI
14
14
  #
15
15
  # Create a new invoice or credit note
16
16
  #
17
- # @overload create(allowances: nil, amount_due: nil, attachments: nil, billing_address: nil, billing_address_recipient: nil, charges: nil, currency: nil, customer_address: nil, customer_address_recipient: nil, customer_email: nil, customer_id: nil, customer_name: nil, customer_tax_id: nil, direction: nil, document_type: nil, due_date: nil, invoice_date: nil, invoice_id: nil, invoice_total: nil, items: nil, note: nil, payment_details: nil, payment_term: nil, previous_unpaid_balance: nil, purchase_order: nil, remittance_address: nil, remittance_address_recipient: nil, service_address: nil, service_address_recipient: nil, service_end_date: nil, service_start_date: nil, shipping_address: nil, shipping_address_recipient: nil, state: nil, subtotal: nil, tax_code: nil, tax_details: nil, total_discount: nil, total_tax: nil, vatex: nil, vatex_note: nil, vendor_address: nil, vendor_address_recipient: nil, vendor_email: nil, vendor_name: nil, vendor_tax_id: nil, request_options: {})
17
+ # @overload create(allowances: nil, amount_due: nil, attachments: nil, billing_address: nil, billing_address_recipient: nil, charges: nil, currency: nil, customer_address: nil, customer_address_recipient: nil, customer_company_id: nil, customer_email: nil, customer_id: nil, customer_name: nil, customer_tax_id: nil, direction: nil, document_type: nil, due_date: nil, invoice_date: nil, invoice_id: nil, invoice_total: nil, items: nil, note: nil, payment_details: nil, payment_term: nil, previous_unpaid_balance: nil, purchase_order: nil, remittance_address: nil, remittance_address_recipient: nil, service_address: nil, service_address_recipient: nil, service_end_date: nil, service_start_date: nil, shipping_address: nil, shipping_address_recipient: nil, state: nil, subtotal: nil, tax_code: nil, tax_details: nil, total_discount: nil, total_tax: nil, vatex: nil, vatex_note: nil, vendor_address: nil, vendor_address_recipient: nil, vendor_company_id: nil, vendor_email: nil, vendor_name: nil, vendor_tax_id: nil, request_options: {})
18
18
  #
19
19
  # @param allowances [Array<EInvoiceAPI::Models::DocumentCreate::Allowance>, nil]
20
20
  #
21
- # @param amount_due [Float, String, nil] The amount due of the invoice. Must be positive and rounded to maximum 2 decimal
21
+ # @param amount_due [Float, String, nil] The amount due for payment. Must be positive and rounded to maximum 2 decimals
22
22
  #
23
23
  # @param attachments [Array<EInvoiceAPI::Models::DocumentAttachmentCreate>, nil]
24
24
  #
25
- # @param billing_address [String, nil]
25
+ # @param billing_address [String, nil] The billing address (if different from customer address)
26
26
  #
27
- # @param billing_address_recipient [String, nil]
27
+ # @param billing_address_recipient [String, nil] The recipient name at the billing address
28
28
  #
29
29
  # @param charges [Array<EInvoiceAPI::Models::DocumentCreate::Charge>, nil]
30
30
  #
31
- # @param currency [Symbol, EInvoiceAPI::Models::CurrencyCode] Currency of the invoice
31
+ # @param currency [Symbol, EInvoiceAPI::Models::CurrencyCode] Currency of the invoice (ISO 4217 currency code)
32
32
  #
33
- # @param customer_address [String, nil]
33
+ # @param customer_address [String, nil] The address of the customer/buyer
34
34
  #
35
- # @param customer_address_recipient [String, nil]
35
+ # @param customer_address_recipient [String, nil] The recipient name at the customer address
36
36
  #
37
- # @param customer_email [String, nil]
37
+ # @param customer_company_id [String, nil] Customer company ID. For Belgium this is the CBE number or their EUID (European
38
38
  #
39
- # @param customer_id [String, nil]
39
+ # @param customer_email [String, nil] The email address of the customer
40
40
  #
41
- # @param customer_name [String, nil]
41
+ # @param customer_id [String, nil] The unique identifier for the customer in your system
42
42
  #
43
- # @param customer_tax_id [String, nil]
43
+ # @param customer_name [String, nil] The company name of the customer/buyer
44
44
  #
45
- # @param direction [Symbol, EInvoiceAPI::Models::DocumentDirection]
45
+ # @param customer_tax_id [String, nil] Customer tax ID. For Belgium this is the VAT number. Must include the country pr
46
46
  #
47
- # @param document_type [Symbol, EInvoiceAPI::Models::DocumentType]
47
+ # @param direction [Symbol, EInvoiceAPI::Models::DocumentDirection] The direction of the document: INBOUND (purchases) or OUTBOUND (sales)
48
48
  #
49
- # @param due_date [Date, nil]
49
+ # @param document_type [Symbol, EInvoiceAPI::Models::DocumentType] The type of document: INVOICE, CREDIT_NOTE, or DEBIT_NOTE
50
50
  #
51
- # @param invoice_date [Date, nil]
51
+ # @param due_date [Date, nil] The date when payment is due
52
52
  #
53
- # @param invoice_id [String, nil]
53
+ # @param invoice_date [Date, nil] The date when the invoice was issued
54
54
  #
55
- # @param invoice_total [Float, String, nil] The total amount of the invoice (so invoice_total = subtotal + total_tax + total
55
+ # @param invoice_id [String, nil] The unique invoice identifier/number
56
+ #
57
+ # @param invoice_total [Float, String, nil] The total amount of the invoice including tax (invoice*total = subtotal + total*
56
58
  #
57
59
  # @param items [Array<EInvoiceAPI::Models::DocumentCreate::Item>] At least one line item is required
58
60
  #
59
- # @param note [String, nil]
61
+ # @param note [String, nil] Additional notes or comments for the invoice
60
62
  #
61
63
  # @param payment_details [Array<EInvoiceAPI::Models::PaymentDetailCreate>, nil]
62
64
  #
63
- # @param payment_term [String, nil]
65
+ # @param payment_term [String, nil] The payment terms (e.g., 'Net 30', 'Due on receipt', '2/10 Net 30')
64
66
  #
65
- # @param previous_unpaid_balance [Float, String, nil] The previous unpaid balance of the invoice, if any. Must be positive and rounded
67
+ # @param previous_unpaid_balance [Float, String, nil] The previous unpaid balance from prior invoices, if any. Must be positive and ro
66
68
  #
67
- # @param purchase_order [String, nil]
69
+ # @param purchase_order [String, nil] The purchase order reference number
68
70
  #
69
- # @param remittance_address [String, nil]
71
+ # @param remittance_address [String, nil] The address where payment should be sent or remitted to
70
72
  #
71
- # @param remittance_address_recipient [String, nil]
73
+ # @param remittance_address_recipient [String, nil] The recipient name at the remittance address
72
74
  #
73
- # @param service_address [String, nil]
75
+ # @param service_address [String, nil] The address where services were performed or goods were delivered
74
76
  #
75
- # @param service_address_recipient [String, nil]
77
+ # @param service_address_recipient [String, nil] The recipient name at the service address
76
78
  #
77
- # @param service_end_date [Date, nil]
79
+ # @param service_end_date [Date, nil] The end date of the service period or delivery period
78
80
  #
79
- # @param service_start_date [Date, nil]
81
+ # @param service_start_date [Date, nil] The start date of the service period or delivery period
80
82
  #
81
- # @param shipping_address [String, nil]
83
+ # @param shipping_address [String, nil] The shipping/delivery address
82
84
  #
83
- # @param shipping_address_recipient [String, nil]
85
+ # @param shipping_address_recipient [String, nil] The recipient name at the shipping address
84
86
  #
85
- # @param state [Symbol, EInvoiceAPI::Models::DocumentState]
87
+ # @param state [Symbol, EInvoiceAPI::Models::DocumentState] The current state of the document: DRAFT, TRANSIT, FAILED, SENT, or RECEIVED
86
88
  #
87
89
  # @param subtotal [Float, String, nil] The taxable base of the invoice. Should be the sum of all line items - allowance
88
90
  #
89
- # @param tax_code [Symbol, EInvoiceAPI::Models::DocumentCreate::TaxCode] Tax category code of the invoice
91
+ # @param tax_code [Symbol, EInvoiceAPI::Models::DocumentCreate::TaxCode] Tax category code of the invoice (e.g., S for standard rate, Z for zero rate, E
90
92
  #
91
93
  # @param tax_details [Array<EInvoiceAPI::Models::DocumentCreate::TaxDetail>, nil]
92
94
  #
93
95
  # @param total_discount [Float, String, nil] The net financial discount/charge of the invoice (non-VAT charges minus non-VAT
94
96
  #
95
- # @param total_tax [Float, String, nil] The total tax of the invoice. Must be positive and rounded to maximum 2 decimals
97
+ # @param total_tax [Float, String, nil] The total tax amount of the invoice. Must be positive and rounded to maximum 2 d
96
98
  #
97
99
  # @param vatex [Symbol, EInvoiceAPI::Models::DocumentCreate::Vatex, nil] VATEX code list for VAT exemption reasons
98
100
  #
99
- # @param vatex_note [String, nil] VAT exemption note of the invoice
101
+ # @param vatex_note [String, nil] Textual explanation for VAT exemption
102
+ #
103
+ # @param vendor_address [String, nil] The address of the vendor/seller
100
104
  #
101
- # @param vendor_address [String, nil]
105
+ # @param vendor_address_recipient [String, nil] The recipient name at the vendor address
102
106
  #
103
- # @param vendor_address_recipient [String, nil]
107
+ # @param vendor_company_id [String, nil] Vendor company ID. For Belgium this is the CBE number or their EUID (European Un
104
108
  #
105
- # @param vendor_email [String, nil]
109
+ # @param vendor_email [String, nil] The email address of the vendor
106
110
  #
107
- # @param vendor_name [String, nil]
111
+ # @param vendor_name [String, nil] The name of the vendor/seller/supplier
108
112
  #
109
- # @param vendor_tax_id [String, nil]
113
+ # @param vendor_tax_id [String, nil] Vendor tax ID. For Belgium this is the VAT number. Must include the country pref
110
114
  #
111
115
  # @param request_options [EInvoiceAPI::RequestOptions, Hash{Symbol=>Object}, nil]
112
116
  #
@@ -8,99 +8,103 @@ module EInvoiceAPI
8
8
  #
9
9
  # Validate if the JSON document can be converted to a valid UBL document
10
10
  #
11
- # @overload validate_json(allowances: nil, amount_due: nil, attachments: nil, billing_address: nil, billing_address_recipient: nil, charges: nil, currency: nil, customer_address: nil, customer_address_recipient: nil, customer_email: nil, customer_id: nil, customer_name: nil, customer_tax_id: nil, direction: nil, document_type: nil, due_date: nil, invoice_date: nil, invoice_id: nil, invoice_total: nil, items: nil, note: nil, payment_details: nil, payment_term: nil, previous_unpaid_balance: nil, purchase_order: nil, remittance_address: nil, remittance_address_recipient: nil, service_address: nil, service_address_recipient: nil, service_end_date: nil, service_start_date: nil, shipping_address: nil, shipping_address_recipient: nil, state: nil, subtotal: nil, tax_code: nil, tax_details: nil, total_discount: nil, total_tax: nil, vatex: nil, vatex_note: nil, vendor_address: nil, vendor_address_recipient: nil, vendor_email: nil, vendor_name: nil, vendor_tax_id: nil, request_options: {})
11
+ # @overload validate_json(allowances: nil, amount_due: nil, attachments: nil, billing_address: nil, billing_address_recipient: nil, charges: nil, currency: nil, customer_address: nil, customer_address_recipient: nil, customer_company_id: nil, customer_email: nil, customer_id: nil, customer_name: nil, customer_tax_id: nil, direction: nil, document_type: nil, due_date: nil, invoice_date: nil, invoice_id: nil, invoice_total: nil, items: nil, note: nil, payment_details: nil, payment_term: nil, previous_unpaid_balance: nil, purchase_order: nil, remittance_address: nil, remittance_address_recipient: nil, service_address: nil, service_address_recipient: nil, service_end_date: nil, service_start_date: nil, shipping_address: nil, shipping_address_recipient: nil, state: nil, subtotal: nil, tax_code: nil, tax_details: nil, total_discount: nil, total_tax: nil, vatex: nil, vatex_note: nil, vendor_address: nil, vendor_address_recipient: nil, vendor_company_id: nil, vendor_email: nil, vendor_name: nil, vendor_tax_id: nil, request_options: {})
12
12
  #
13
13
  # @param allowances [Array<EInvoiceAPI::Models::DocumentCreate::Allowance>, nil]
14
14
  #
15
- # @param amount_due [Float, String, nil] The amount due of the invoice. Must be positive and rounded to maximum 2 decimal
15
+ # @param amount_due [Float, String, nil] The amount due for payment. Must be positive and rounded to maximum 2 decimals
16
16
  #
17
17
  # @param attachments [Array<EInvoiceAPI::Models::DocumentAttachmentCreate>, nil]
18
18
  #
19
- # @param billing_address [String, nil]
19
+ # @param billing_address [String, nil] The billing address (if different from customer address)
20
20
  #
21
- # @param billing_address_recipient [String, nil]
21
+ # @param billing_address_recipient [String, nil] The recipient name at the billing address
22
22
  #
23
23
  # @param charges [Array<EInvoiceAPI::Models::DocumentCreate::Charge>, nil]
24
24
  #
25
- # @param currency [Symbol, EInvoiceAPI::Models::CurrencyCode] Currency of the invoice
25
+ # @param currency [Symbol, EInvoiceAPI::Models::CurrencyCode] Currency of the invoice (ISO 4217 currency code)
26
26
  #
27
- # @param customer_address [String, nil]
27
+ # @param customer_address [String, nil] The address of the customer/buyer
28
28
  #
29
- # @param customer_address_recipient [String, nil]
29
+ # @param customer_address_recipient [String, nil] The recipient name at the customer address
30
30
  #
31
- # @param customer_email [String, nil]
31
+ # @param customer_company_id [String, nil] Customer company ID. For Belgium this is the CBE number or their EUID (European
32
32
  #
33
- # @param customer_id [String, nil]
33
+ # @param customer_email [String, nil] The email address of the customer
34
34
  #
35
- # @param customer_name [String, nil]
35
+ # @param customer_id [String, nil] The unique identifier for the customer in your system
36
36
  #
37
- # @param customer_tax_id [String, nil]
37
+ # @param customer_name [String, nil] The company name of the customer/buyer
38
38
  #
39
- # @param direction [Symbol, EInvoiceAPI::Models::DocumentDirection]
39
+ # @param customer_tax_id [String, nil] Customer tax ID. For Belgium this is the VAT number. Must include the country pr
40
40
  #
41
- # @param document_type [Symbol, EInvoiceAPI::Models::DocumentType]
41
+ # @param direction [Symbol, EInvoiceAPI::Models::DocumentDirection] The direction of the document: INBOUND (purchases) or OUTBOUND (sales)
42
42
  #
43
- # @param due_date [Date, nil]
43
+ # @param document_type [Symbol, EInvoiceAPI::Models::DocumentType] The type of document: INVOICE, CREDIT_NOTE, or DEBIT_NOTE
44
44
  #
45
- # @param invoice_date [Date, nil]
45
+ # @param due_date [Date, nil] The date when payment is due
46
46
  #
47
- # @param invoice_id [String, nil]
47
+ # @param invoice_date [Date, nil] The date when the invoice was issued
48
48
  #
49
- # @param invoice_total [Float, String, nil] The total amount of the invoice (so invoice_total = subtotal + total_tax + total
49
+ # @param invoice_id [String, nil] The unique invoice identifier/number
50
+ #
51
+ # @param invoice_total [Float, String, nil] The total amount of the invoice including tax (invoice*total = subtotal + total*
50
52
  #
51
53
  # @param items [Array<EInvoiceAPI::Models::DocumentCreate::Item>] At least one line item is required
52
54
  #
53
- # @param note [String, nil]
55
+ # @param note [String, nil] Additional notes or comments for the invoice
54
56
  #
55
57
  # @param payment_details [Array<EInvoiceAPI::Models::PaymentDetailCreate>, nil]
56
58
  #
57
- # @param payment_term [String, nil]
59
+ # @param payment_term [String, nil] The payment terms (e.g., 'Net 30', 'Due on receipt', '2/10 Net 30')
58
60
  #
59
- # @param previous_unpaid_balance [Float, String, nil] The previous unpaid balance of the invoice, if any. Must be positive and rounded
61
+ # @param previous_unpaid_balance [Float, String, nil] The previous unpaid balance from prior invoices, if any. Must be positive and ro
60
62
  #
61
- # @param purchase_order [String, nil]
63
+ # @param purchase_order [String, nil] The purchase order reference number
62
64
  #
63
- # @param remittance_address [String, nil]
65
+ # @param remittance_address [String, nil] The address where payment should be sent or remitted to
64
66
  #
65
- # @param remittance_address_recipient [String, nil]
67
+ # @param remittance_address_recipient [String, nil] The recipient name at the remittance address
66
68
  #
67
- # @param service_address [String, nil]
69
+ # @param service_address [String, nil] The address where services were performed or goods were delivered
68
70
  #
69
- # @param service_address_recipient [String, nil]
71
+ # @param service_address_recipient [String, nil] The recipient name at the service address
70
72
  #
71
- # @param service_end_date [Date, nil]
73
+ # @param service_end_date [Date, nil] The end date of the service period or delivery period
72
74
  #
73
- # @param service_start_date [Date, nil]
75
+ # @param service_start_date [Date, nil] The start date of the service period or delivery period
74
76
  #
75
- # @param shipping_address [String, nil]
77
+ # @param shipping_address [String, nil] The shipping/delivery address
76
78
  #
77
- # @param shipping_address_recipient [String, nil]
79
+ # @param shipping_address_recipient [String, nil] The recipient name at the shipping address
78
80
  #
79
- # @param state [Symbol, EInvoiceAPI::Models::DocumentState]
81
+ # @param state [Symbol, EInvoiceAPI::Models::DocumentState] The current state of the document: DRAFT, TRANSIT, FAILED, SENT, or RECEIVED
80
82
  #
81
83
  # @param subtotal [Float, String, nil] The taxable base of the invoice. Should be the sum of all line items - allowance
82
84
  #
83
- # @param tax_code [Symbol, EInvoiceAPI::Models::DocumentCreate::TaxCode] Tax category code of the invoice
85
+ # @param tax_code [Symbol, EInvoiceAPI::Models::DocumentCreate::TaxCode] Tax category code of the invoice (e.g., S for standard rate, Z for zero rate, E
84
86
  #
85
87
  # @param tax_details [Array<EInvoiceAPI::Models::DocumentCreate::TaxDetail>, nil]
86
88
  #
87
89
  # @param total_discount [Float, String, nil] The net financial discount/charge of the invoice (non-VAT charges minus non-VAT
88
90
  #
89
- # @param total_tax [Float, String, nil] The total tax of the invoice. Must be positive and rounded to maximum 2 decimals
91
+ # @param total_tax [Float, String, nil] The total tax amount of the invoice. Must be positive and rounded to maximum 2 d
90
92
  #
91
93
  # @param vatex [Symbol, EInvoiceAPI::Models::DocumentCreate::Vatex, nil] VATEX code list for VAT exemption reasons
92
94
  #
93
- # @param vatex_note [String, nil] VAT exemption note of the invoice
95
+ # @param vatex_note [String, nil] Textual explanation for VAT exemption
96
+ #
97
+ # @param vendor_address [String, nil] The address of the vendor/seller
94
98
  #
95
- # @param vendor_address [String, nil]
99
+ # @param vendor_address_recipient [String, nil] The recipient name at the vendor address
96
100
  #
97
- # @param vendor_address_recipient [String, nil]
101
+ # @param vendor_company_id [String, nil] Vendor company ID. For Belgium this is the CBE number or their EUID (European Un
98
102
  #
99
- # @param vendor_email [String, nil]
103
+ # @param vendor_email [String, nil] The email address of the vendor
100
104
  #
101
- # @param vendor_name [String, nil]
105
+ # @param vendor_name [String, nil] The name of the vendor/seller/supplier
102
106
  #
103
- # @param vendor_tax_id [String, nil]
107
+ # @param vendor_tax_id [String, nil] Vendor tax ID. For Belgium this is the VAT number. Must include the country pref
104
108
  #
105
109
  # @param request_options [EInvoiceAPI::RequestOptions, Hash{Symbol=>Object}, nil]
106
110
  #
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module EInvoiceAPI
4
- VERSION = "0.11.0"
4
+ VERSION = "0.13.0"
5
5
  end