e-invoice-api 0.5.3 → 0.7.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.
@@ -12,12 +12,16 @@ module EInvoiceAPI
12
12
  # Create a new invoice or credit note
13
13
  sig do
14
14
  params(
15
+ allowances:
16
+ T.nilable(T::Array[EInvoiceAPI::DocumentCreate::Allowance::OrHash]),
15
17
  amount_due:
16
18
  T.nilable(EInvoiceAPI::DocumentCreate::AmountDue::Variants),
17
19
  attachments:
18
20
  T.nilable(T::Array[EInvoiceAPI::DocumentAttachmentCreate::OrHash]),
19
21
  billing_address: T.nilable(String),
20
22
  billing_address_recipient: T.nilable(String),
23
+ charges:
24
+ T.nilable(T::Array[EInvoiceAPI::DocumentCreate::Charge::OrHash]),
21
25
  currency: EInvoiceAPI::CurrencyCode::OrSymbol,
22
26
  customer_address: T.nilable(String),
23
27
  customer_address_recipient: T.nilable(String),
@@ -32,7 +36,7 @@ module EInvoiceAPI
32
36
  invoice_id: T.nilable(String),
33
37
  invoice_total:
34
38
  T.nilable(EInvoiceAPI::DocumentCreate::InvoiceTotal::Variants),
35
- items: T.nilable(T::Array[EInvoiceAPI::DocumentCreate::Item::OrHash]),
39
+ items: T::Array[EInvoiceAPI::DocumentCreate::Item::OrHash],
36
40
  note: T.nilable(String),
37
41
  payment_details:
38
42
  T.nilable(T::Array[EInvoiceAPI::PaymentDetailCreate::OrHash]),
@@ -52,11 +56,14 @@ module EInvoiceAPI
52
56
  shipping_address_recipient: T.nilable(String),
53
57
  state: EInvoiceAPI::DocumentState::OrSymbol,
54
58
  subtotal: T.nilable(EInvoiceAPI::DocumentCreate::Subtotal::Variants),
59
+ tax_code: EInvoiceAPI::DocumentCreate::TaxCode::OrSymbol,
55
60
  tax_details:
56
61
  T.nilable(T::Array[EInvoiceAPI::DocumentCreate::TaxDetail::OrHash]),
57
62
  total_discount:
58
63
  T.nilable(EInvoiceAPI::DocumentCreate::TotalDiscount::Variants),
59
64
  total_tax: T.nilable(EInvoiceAPI::DocumentCreate::TotalTax::Variants),
65
+ vatex: T.nilable(EInvoiceAPI::DocumentCreate::Vatex::OrSymbol),
66
+ vatex_note: T.nilable(String),
60
67
  vendor_address: T.nilable(String),
61
68
  vendor_address_recipient: T.nilable(String),
62
69
  vendor_email: T.nilable(String),
@@ -66,10 +73,14 @@ module EInvoiceAPI
66
73
  ).returns(EInvoiceAPI::DocumentResponse)
67
74
  end
68
75
  def create(
76
+ allowances: nil,
77
+ # The amount due of the invoice. Must be positive and rounded to maximum 2
78
+ # decimals
69
79
  amount_due: nil,
70
80
  attachments: nil,
71
81
  billing_address: nil,
72
82
  billing_address_recipient: nil,
83
+ charges: nil,
73
84
  # Currency of the invoice
74
85
  currency: nil,
75
86
  customer_address: nil,
@@ -83,11 +94,16 @@ module EInvoiceAPI
83
94
  due_date: nil,
84
95
  invoice_date: nil,
85
96
  invoice_id: nil,
97
+ # The total amount of the invoice (so invoice_total = subtotal + total_tax +
98
+ # total_discount). Must be positive and rounded to maximum 2 decimals
86
99
  invoice_total: nil,
100
+ # At least one line item is required
87
101
  items: nil,
88
102
  note: nil,
89
103
  payment_details: nil,
90
104
  payment_term: nil,
105
+ # The previous unpaid balance of the invoice, if any. Must be positive and rounded
106
+ # to maximum 2 decimals
91
107
  previous_unpaid_balance: nil,
92
108
  purchase_order: nil,
93
109
  remittance_address: nil,
@@ -99,10 +115,24 @@ module EInvoiceAPI
99
115
  shipping_address: nil,
100
116
  shipping_address_recipient: nil,
101
117
  state: nil,
118
+ # The taxable base of the invoice. Should be the sum of all line items -
119
+ # allowances (for example commercial discounts) + charges with impact on VAT. Must
120
+ # be positive and rounded to maximum 2 decimals
102
121
  subtotal: nil,
122
+ # Tax category code of the invoice
123
+ tax_code: nil,
103
124
  tax_details: nil,
125
+ # The total financial discount of the invoice (so discounts not subject to VAT).
126
+ # Must be positive and rounded to maximum 2 decimals
104
127
  total_discount: nil,
128
+ # The total tax of the invoice. Must be positive and rounded to maximum 2 decimals
105
129
  total_tax: nil,
130
+ # VATEX code list for VAT exemption reasons
131
+ #
132
+ # Agency: CEF Identifier: vatex
133
+ vatex: nil,
134
+ # VAT exemption note of the invoice
135
+ vatex_note: nil,
106
136
  vendor_address: nil,
107
137
  vendor_address_recipient: nil,
108
138
  vendor_email: nil,
@@ -6,12 +6,16 @@ module EInvoiceAPI
6
6
  # Validate if the JSON document can be converted to a valid UBL document
7
7
  sig do
8
8
  params(
9
+ allowances:
10
+ T.nilable(T::Array[EInvoiceAPI::DocumentCreate::Allowance::OrHash]),
9
11
  amount_due:
10
12
  T.nilable(EInvoiceAPI::DocumentCreate::AmountDue::Variants),
11
13
  attachments:
12
14
  T.nilable(T::Array[EInvoiceAPI::DocumentAttachmentCreate::OrHash]),
13
15
  billing_address: T.nilable(String),
14
16
  billing_address_recipient: T.nilable(String),
17
+ charges:
18
+ T.nilable(T::Array[EInvoiceAPI::DocumentCreate::Charge::OrHash]),
15
19
  currency: EInvoiceAPI::CurrencyCode::OrSymbol,
16
20
  customer_address: T.nilable(String),
17
21
  customer_address_recipient: T.nilable(String),
@@ -26,7 +30,7 @@ module EInvoiceAPI
26
30
  invoice_id: T.nilable(String),
27
31
  invoice_total:
28
32
  T.nilable(EInvoiceAPI::DocumentCreate::InvoiceTotal::Variants),
29
- items: T.nilable(T::Array[EInvoiceAPI::DocumentCreate::Item::OrHash]),
33
+ items: T::Array[EInvoiceAPI::DocumentCreate::Item::OrHash],
30
34
  note: T.nilable(String),
31
35
  payment_details:
32
36
  T.nilable(T::Array[EInvoiceAPI::PaymentDetailCreate::OrHash]),
@@ -46,11 +50,14 @@ module EInvoiceAPI
46
50
  shipping_address_recipient: T.nilable(String),
47
51
  state: EInvoiceAPI::DocumentState::OrSymbol,
48
52
  subtotal: T.nilable(EInvoiceAPI::DocumentCreate::Subtotal::Variants),
53
+ tax_code: EInvoiceAPI::DocumentCreate::TaxCode::OrSymbol,
49
54
  tax_details:
50
55
  T.nilable(T::Array[EInvoiceAPI::DocumentCreate::TaxDetail::OrHash]),
51
56
  total_discount:
52
57
  T.nilable(EInvoiceAPI::DocumentCreate::TotalDiscount::Variants),
53
58
  total_tax: T.nilable(EInvoiceAPI::DocumentCreate::TotalTax::Variants),
59
+ vatex: T.nilable(EInvoiceAPI::DocumentCreate::Vatex::OrSymbol),
60
+ vatex_note: T.nilable(String),
54
61
  vendor_address: T.nilable(String),
55
62
  vendor_address_recipient: T.nilable(String),
56
63
  vendor_email: T.nilable(String),
@@ -60,10 +67,14 @@ module EInvoiceAPI
60
67
  ).returns(EInvoiceAPI::UblDocumentValidation)
61
68
  end
62
69
  def validate_json(
70
+ allowances: nil,
71
+ # The amount due of the invoice. Must be positive and rounded to maximum 2
72
+ # decimals
63
73
  amount_due: nil,
64
74
  attachments: nil,
65
75
  billing_address: nil,
66
76
  billing_address_recipient: nil,
77
+ charges: nil,
67
78
  # Currency of the invoice
68
79
  currency: nil,
69
80
  customer_address: nil,
@@ -77,11 +88,16 @@ module EInvoiceAPI
77
88
  due_date: nil,
78
89
  invoice_date: nil,
79
90
  invoice_id: nil,
91
+ # The total amount of the invoice (so invoice_total = subtotal + total_tax +
92
+ # total_discount). Must be positive and rounded to maximum 2 decimals
80
93
  invoice_total: nil,
94
+ # At least one line item is required
81
95
  items: nil,
82
96
  note: nil,
83
97
  payment_details: nil,
84
98
  payment_term: nil,
99
+ # The previous unpaid balance of the invoice, if any. Must be positive and rounded
100
+ # to maximum 2 decimals
85
101
  previous_unpaid_balance: nil,
86
102
  purchase_order: nil,
87
103
  remittance_address: nil,
@@ -93,10 +109,24 @@ module EInvoiceAPI
93
109
  shipping_address: nil,
94
110
  shipping_address_recipient: nil,
95
111
  state: nil,
112
+ # The taxable base of the invoice. Should be the sum of all line items -
113
+ # allowances (for example commercial discounts) + charges with impact on VAT. Must
114
+ # be positive and rounded to maximum 2 decimals
96
115
  subtotal: nil,
116
+ # Tax category code of the invoice
117
+ tax_code: nil,
97
118
  tax_details: nil,
119
+ # The total financial discount of the invoice (so discounts not subject to VAT).
120
+ # Must be positive and rounded to maximum 2 decimals
98
121
  total_discount: nil,
122
+ # The total tax of the invoice. Must be positive and rounded to maximum 2 decimals
99
123
  total_tax: nil,
124
+ # VATEX code list for VAT exemption reasons
125
+ #
126
+ # Agency: CEF Identifier: vatex
127
+ vatex: nil,
128
+ # VAT exemption note of the invoice
129
+ vatex_note: nil,
100
130
  vendor_address: nil,
101
131
  vendor_address_recipient: nil,
102
132
  vendor_email: nil,