facturx 0.2.0 → 1.0.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 +4 -4
- data/CHANGELOG.md +21 -3
- data/README.md +40 -8
- data/lib/facturx/builders/association.rb +8 -0
- data/lib/facturx/builders/base.rb +129 -0
- data/lib/facturx/builders/schema.rb +112 -0
- data/lib/facturx/builders.rb +25 -0
- data/lib/facturx/conformance.rb +163 -0
- data/lib/facturx/error.rb +3 -0
- data/lib/facturx/format.rb +85 -0
- data/lib/facturx/generate.rb +21 -0
- data/lib/facturx/profile_resolver.rb +40 -0
- data/lib/facturx/reader/semantic_mapper/line_mapping.rb +1 -1
- data/lib/facturx/reader/semantic_mapper/line_references.rb +19 -0
- data/lib/facturx/reader/semantic_mapper/payment_mapping.rb +48 -11
- data/lib/facturx/reader/semantic_mapper.rb +9 -0
- data/lib/facturx/reader/term_reader.rb +12 -4
- data/lib/facturx/reader.rb +3 -7
- data/lib/facturx/version.rb +1 -1
- data/lib/facturx/writer/context.rb +53 -0
- data/lib/facturx/writer/stage.rb +47 -0
- data/lib/facturx/writer/stage_support/contact_details.rb +57 -0
- data/lib/facturx/writer/stage_support/emission.rb +78 -0
- data/lib/facturx/writer/stage_support/identifiers.rb +129 -0
- data/lib/facturx/writer/stage_support/structure.rb +88 -0
- data/lib/facturx/writer/stages/document_context.rb +31 -0
- data/lib/facturx/writer/stages/exchanged_document.rb +32 -0
- data/lib/facturx/writer/stages/trade_agreement/parties.rb +105 -0
- data/lib/facturx/writer/stages/trade_agreement/references.rb +92 -0
- data/lib/facturx/writer/stages/trade_agreement.rb +45 -0
- data/lib/facturx/writer/stages/trade_delivery.rb +77 -0
- data/lib/facturx/writer/stages/trade_lines/agreement.rb +92 -0
- data/lib/facturx/writer/stages/trade_lines/product.rb +78 -0
- data/lib/facturx/writer/stages/trade_lines/quantity.rb +17 -0
- data/lib/facturx/writer/stages/trade_lines/settlement.rb +89 -0
- data/lib/facturx/writer/stages/trade_lines.rb +67 -0
- data/lib/facturx/writer/stages/trade_settlement/parties.rb +33 -0
- data/lib/facturx/writer/stages/trade_settlement/payment.rb +97 -0
- data/lib/facturx/writer/stages/trade_settlement/summary.rb +88 -0
- data/lib/facturx/writer/stages/trade_settlement/taxes.rb +121 -0
- data/lib/facturx/writer/stages/trade_settlement.rb +70 -0
- data/lib/facturx/writer.rb +68 -0
- data/lib/facturx/xml/namespaces.rb +19 -0
- data/lib/facturx/xml/profile_detector.rb +2 -4
- data/lib/facturx.rb +28 -0
- data/rbi/facturx.rbi +1090 -0
- metadata +38 -4
data/rbi/facturx.rbi
ADDED
|
@@ -0,0 +1,1090 @@
|
|
|
1
|
+
# typed: strict
|
|
2
|
+
|
|
3
|
+
module Facturx
|
|
4
|
+
class Error < StandardError
|
|
5
|
+
sig { returns(T::Hash[Symbol, T.untyped]) }
|
|
6
|
+
attr_reader :details
|
|
7
|
+
end
|
|
8
|
+
|
|
9
|
+
class InvalidXmlError < Error; end
|
|
10
|
+
class UnknownProfileError < InvalidXmlError; end
|
|
11
|
+
class XsdValidationError < InvalidXmlError; end
|
|
12
|
+
class UnsupportedProfileError < Error; end
|
|
13
|
+
class FormattingError < Error; end
|
|
14
|
+
class ConformanceError < Error; end
|
|
15
|
+
class InvalidPdfError < Error; end
|
|
16
|
+
class ProtectedPdfError < InvalidPdfError; end
|
|
17
|
+
class ComposerUnavailableError < Error; end
|
|
18
|
+
class CompositionError < Error; end
|
|
19
|
+
class ExtractionError < Error; end
|
|
20
|
+
class VerificationError < Error; end
|
|
21
|
+
|
|
22
|
+
class << self
|
|
23
|
+
sig { params(xml: String).returns(TrueClass) }
|
|
24
|
+
def verify_xml(xml:); end
|
|
25
|
+
|
|
26
|
+
sig { params(pdf: String, xml: String).returns(String) }
|
|
27
|
+
def attach(pdf:, xml:); end
|
|
28
|
+
|
|
29
|
+
sig { params(pdf: String).returns(String) }
|
|
30
|
+
def extract_xml(pdf:); end
|
|
31
|
+
|
|
32
|
+
sig do
|
|
33
|
+
params(source: String, on_unknown_profile: Symbol)
|
|
34
|
+
.returns(Facturx::Reading)
|
|
35
|
+
end
|
|
36
|
+
def read(source, on_unknown_profile: :fallback); end
|
|
37
|
+
|
|
38
|
+
sig do
|
|
39
|
+
params(document: Facturx::Document, profile: T.any(Symbol, Facturx::Profile))
|
|
40
|
+
.returns(Facturx::Conformance::Report)
|
|
41
|
+
end
|
|
42
|
+
def validate_document(document:, profile:); end
|
|
43
|
+
|
|
44
|
+
sig { params(document: Facturx::Document, profile: T.any(Symbol, Facturx::Profile)).returns(String) }
|
|
45
|
+
def build_xml(document:, profile:); end
|
|
46
|
+
|
|
47
|
+
sig do
|
|
48
|
+
params(pdf: String, document: Facturx::Document, profile: T.any(Symbol, Facturx::Profile))
|
|
49
|
+
.returns(String)
|
|
50
|
+
end
|
|
51
|
+
def generate(pdf:, document:, profile:); end
|
|
52
|
+
end
|
|
53
|
+
|
|
54
|
+
module Conformance
|
|
55
|
+
class Issue
|
|
56
|
+
sig { returns(Symbol) }
|
|
57
|
+
attr_reader :code
|
|
58
|
+
|
|
59
|
+
sig { returns(String) }
|
|
60
|
+
attr_reader :message
|
|
61
|
+
|
|
62
|
+
sig { returns(T.nilable(String)) }
|
|
63
|
+
attr_reader :term_id, :group_id, :path
|
|
64
|
+
|
|
65
|
+
sig { returns(T::Hash[Symbol, T.untyped]) }
|
|
66
|
+
attr_reader :details
|
|
67
|
+
end
|
|
68
|
+
|
|
69
|
+
class Report
|
|
70
|
+
sig { returns(Facturx::Profile) }
|
|
71
|
+
attr_reader :profile
|
|
72
|
+
|
|
73
|
+
sig { returns(T::Array[Facturx::Conformance::Issue]) }
|
|
74
|
+
attr_reader :issues
|
|
75
|
+
|
|
76
|
+
sig { returns(T::Boolean) }
|
|
77
|
+
def valid?; end
|
|
78
|
+
|
|
79
|
+
sig { returns(T::Boolean) }
|
|
80
|
+
def invalid?; end
|
|
81
|
+
end
|
|
82
|
+
end
|
|
83
|
+
|
|
84
|
+
class ProfileResolver
|
|
85
|
+
sig { params(profile: T.any(Symbol, Facturx::Profile)).returns(Facturx::Profile) }
|
|
86
|
+
def call(profile); end
|
|
87
|
+
end
|
|
88
|
+
|
|
89
|
+
class Writer
|
|
90
|
+
sig { params(document: Facturx::Document, profile: Facturx::Profile).returns(String) }
|
|
91
|
+
def call(document:, profile:); end
|
|
92
|
+
|
|
93
|
+
sig do
|
|
94
|
+
params(document: Facturx::Document, profile: Facturx::Profile)
|
|
95
|
+
.returns(Facturx::Conformance::Report)
|
|
96
|
+
end
|
|
97
|
+
def validate(document:, profile:); end
|
|
98
|
+
end
|
|
99
|
+
|
|
100
|
+
class Generate
|
|
101
|
+
sig do
|
|
102
|
+
params(pdf: String, document: Facturx::Document, profile: T.any(Symbol, Facturx::Profile))
|
|
103
|
+
.returns(String)
|
|
104
|
+
end
|
|
105
|
+
def call(pdf:, document:, profile:); end
|
|
106
|
+
end
|
|
107
|
+
|
|
108
|
+
class Profile
|
|
109
|
+
sig { returns(Symbol) }
|
|
110
|
+
def id; end
|
|
111
|
+
|
|
112
|
+
sig { returns(String) }
|
|
113
|
+
def guideline_urn; end
|
|
114
|
+
|
|
115
|
+
sig { returns(String) }
|
|
116
|
+
def xsd_path; end
|
|
117
|
+
|
|
118
|
+
sig { returns(String) }
|
|
119
|
+
def conformance_level; end
|
|
120
|
+
end
|
|
121
|
+
|
|
122
|
+
class Diagnostic
|
|
123
|
+
sig { returns(Symbol) }
|
|
124
|
+
def code; end
|
|
125
|
+
|
|
126
|
+
sig { returns(T.nilable(String)) }
|
|
127
|
+
def term_id; end
|
|
128
|
+
|
|
129
|
+
sig { returns(T.nilable(String)) }
|
|
130
|
+
def path; end
|
|
131
|
+
|
|
132
|
+
sig { returns(String) }
|
|
133
|
+
def message; end
|
|
134
|
+
|
|
135
|
+
sig { returns(T::Hash[T.untyped, T.untyped]) }
|
|
136
|
+
def details; end
|
|
137
|
+
end
|
|
138
|
+
|
|
139
|
+
class Reading
|
|
140
|
+
sig { returns(Facturx::Document) }
|
|
141
|
+
def document; end
|
|
142
|
+
|
|
143
|
+
sig { returns(Facturx::Profile) }
|
|
144
|
+
def profile; end
|
|
145
|
+
|
|
146
|
+
sig { returns(T::Array[Facturx::Diagnostic]) }
|
|
147
|
+
def diagnostics; end
|
|
148
|
+
|
|
149
|
+
sig { returns(String) }
|
|
150
|
+
def source; end
|
|
151
|
+
|
|
152
|
+
sig { returns(Symbol) }
|
|
153
|
+
def source_type; end
|
|
154
|
+
end
|
|
155
|
+
|
|
156
|
+
class Note
|
|
157
|
+
sig { returns(T.nilable(String)) }
|
|
158
|
+
attr_reader :content, :subject_code
|
|
159
|
+
end
|
|
160
|
+
|
|
161
|
+
class Identifier
|
|
162
|
+
sig { returns(T.nilable(String)) }
|
|
163
|
+
attr_reader :value, :scheme_id
|
|
164
|
+
end
|
|
165
|
+
|
|
166
|
+
class Period
|
|
167
|
+
sig { returns(T.nilable(::Date)) }
|
|
168
|
+
attr_reader :start_date, :end_date
|
|
169
|
+
end
|
|
170
|
+
|
|
171
|
+
class Quantity
|
|
172
|
+
sig { returns(T.nilable(T.any(::BigDecimal, Integer))) }
|
|
173
|
+
attr_reader :value
|
|
174
|
+
|
|
175
|
+
sig { returns(T.nilable(String)) }
|
|
176
|
+
attr_reader :unit_code
|
|
177
|
+
end
|
|
178
|
+
|
|
179
|
+
class Contact
|
|
180
|
+
sig { returns(T.nilable(String)) }
|
|
181
|
+
attr_reader :name, :telephone, :email
|
|
182
|
+
end
|
|
183
|
+
|
|
184
|
+
class Address
|
|
185
|
+
sig { returns(T.nilable(String)) }
|
|
186
|
+
attr_reader :postcode, :line_one, :line_two, :line_three, :city, :country_code, :country_subdivision
|
|
187
|
+
end
|
|
188
|
+
|
|
189
|
+
class Party
|
|
190
|
+
sig { returns(T.nilable(String)) }
|
|
191
|
+
attr_reader :name, :description, :trading_name
|
|
192
|
+
|
|
193
|
+
sig { returns(T::Array[Facturx::Identifier]) }
|
|
194
|
+
def identifiers; end
|
|
195
|
+
|
|
196
|
+
sig { returns(T.nilable(Facturx::Identifier)) }
|
|
197
|
+
def legal_registration; end
|
|
198
|
+
|
|
199
|
+
sig { returns(T.nilable(Facturx::Address)) }
|
|
200
|
+
def address; end
|
|
201
|
+
|
|
202
|
+
sig { returns(T.nilable(Facturx::Identifier)) }
|
|
203
|
+
def vat_identifier; end
|
|
204
|
+
|
|
205
|
+
sig { returns(T.nilable(Facturx::Identifier)) }
|
|
206
|
+
def tax_identifier; end
|
|
207
|
+
|
|
208
|
+
sig { returns(T.nilable(Facturx::Identifier)) }
|
|
209
|
+
def electronic_address; end
|
|
210
|
+
|
|
211
|
+
sig { returns(T.nilable(Facturx::Contact)) }
|
|
212
|
+
def contact; end
|
|
213
|
+
end
|
|
214
|
+
|
|
215
|
+
class CreditTransfer
|
|
216
|
+
sig { returns(T.nilable(String)) }
|
|
217
|
+
attr_reader :account_name
|
|
218
|
+
|
|
219
|
+
sig { returns(T.nilable(Facturx::Identifier)) }
|
|
220
|
+
def account_identifier; end
|
|
221
|
+
|
|
222
|
+
sig { returns(T.nilable(Facturx::Identifier)) }
|
|
223
|
+
def provider_identifier; end
|
|
224
|
+
end
|
|
225
|
+
|
|
226
|
+
class PaymentCard
|
|
227
|
+
sig { returns(T.nilable(String)) }
|
|
228
|
+
attr_reader :primary_account_number, :holder_name
|
|
229
|
+
end
|
|
230
|
+
|
|
231
|
+
class DirectDebit
|
|
232
|
+
sig { returns(T.nilable(Facturx::Identifier)) }
|
|
233
|
+
def mandate_identifier; end
|
|
234
|
+
|
|
235
|
+
sig { returns(T.nilable(Facturx::Identifier)) }
|
|
236
|
+
def creditor_identifier; end
|
|
237
|
+
|
|
238
|
+
sig { returns(T.nilable(Facturx::Identifier)) }
|
|
239
|
+
def debtor_account_identifier; end
|
|
240
|
+
end
|
|
241
|
+
|
|
242
|
+
class PaymentInstructions
|
|
243
|
+
sig { returns(T.nilable(String)) }
|
|
244
|
+
attr_reader :means_code, :means_text, :remittance_information
|
|
245
|
+
|
|
246
|
+
sig { returns(T::Array[Facturx::CreditTransfer]) }
|
|
247
|
+
def credit_transfers; end
|
|
248
|
+
|
|
249
|
+
sig { returns(T.nilable(Facturx::PaymentCard)) }
|
|
250
|
+
def payment_card; end
|
|
251
|
+
|
|
252
|
+
sig { returns(T.nilable(Facturx::DirectDebit)) }
|
|
253
|
+
def direct_debit; end
|
|
254
|
+
end
|
|
255
|
+
|
|
256
|
+
class DocumentReference
|
|
257
|
+
sig { returns(T.nilable(String)) }
|
|
258
|
+
attr_reader :id, :line_id, :name
|
|
259
|
+
|
|
260
|
+
sig { returns(T.nilable(::Date)) }
|
|
261
|
+
attr_reader :issue_date
|
|
262
|
+
end
|
|
263
|
+
|
|
264
|
+
class Delivery
|
|
265
|
+
sig { returns(T.nilable(::Date)) }
|
|
266
|
+
attr_reader :date
|
|
267
|
+
|
|
268
|
+
sig { returns(T.nilable(Facturx::Identifier)) }
|
|
269
|
+
def location_identifier; end
|
|
270
|
+
|
|
271
|
+
sig { returns(T.nilable(Facturx::Party)) }
|
|
272
|
+
def party; end
|
|
273
|
+
end
|
|
274
|
+
|
|
275
|
+
class SupportingDocument
|
|
276
|
+
sig { returns(T.nilable(String)) }
|
|
277
|
+
attr_reader :reference, :description, :external_location, :content, :mime_code, :filename
|
|
278
|
+
end
|
|
279
|
+
|
|
280
|
+
class ProductAttribute
|
|
281
|
+
sig { returns(T.nilable(String)) }
|
|
282
|
+
attr_reader :name, :value
|
|
283
|
+
end
|
|
284
|
+
|
|
285
|
+
class ProductClassification
|
|
286
|
+
sig { returns(T.nilable(String)) }
|
|
287
|
+
attr_reader :code, :list_id, :list_version_id
|
|
288
|
+
end
|
|
289
|
+
|
|
290
|
+
class Product
|
|
291
|
+
sig { returns(T.nilable(String)) }
|
|
292
|
+
attr_reader :name, :description, :origin_country_code
|
|
293
|
+
|
|
294
|
+
sig { returns(T.nilable(Facturx::Identifier)) }
|
|
295
|
+
def seller_identifier; end
|
|
296
|
+
|
|
297
|
+
sig { returns(T.nilable(Facturx::Identifier)) }
|
|
298
|
+
def buyer_identifier; end
|
|
299
|
+
|
|
300
|
+
sig { returns(T.nilable(Facturx::Identifier)) }
|
|
301
|
+
def global_identifier; end
|
|
302
|
+
|
|
303
|
+
sig { returns(T::Array[Facturx::ProductAttribute]) }
|
|
304
|
+
def attributes; end
|
|
305
|
+
|
|
306
|
+
sig { returns(T::Array[Facturx::ProductClassification]) }
|
|
307
|
+
def classifications; end
|
|
308
|
+
end
|
|
309
|
+
|
|
310
|
+
class Price
|
|
311
|
+
sig { returns(T.nilable(T.any(::BigDecimal, Integer))) }
|
|
312
|
+
attr_reader :amount, :discount
|
|
313
|
+
|
|
314
|
+
sig { returns(T.nilable(Facturx::Quantity)) }
|
|
315
|
+
def basis_quantity; end
|
|
316
|
+
end
|
|
317
|
+
|
|
318
|
+
class TaxBreakdown
|
|
319
|
+
sig { returns(T.nilable(String)) }
|
|
320
|
+
attr_reader :type_code, :category_code, :exemption_reason, :exemption_reason_code, :due_date_type_code
|
|
321
|
+
|
|
322
|
+
sig { returns(T.nilable(T.any(::BigDecimal, Integer))) }
|
|
323
|
+
attr_reader :rate, :basis_amount, :tax_amount
|
|
324
|
+
end
|
|
325
|
+
|
|
326
|
+
class AllowanceCharge
|
|
327
|
+
sig { returns(T.nilable(T::Boolean)) }
|
|
328
|
+
attr_reader :indicator
|
|
329
|
+
|
|
330
|
+
sig { returns(T.nilable(T.any(::BigDecimal, Integer))) }
|
|
331
|
+
attr_reader :amount, :base_amount, :percentage
|
|
332
|
+
|
|
333
|
+
sig { returns(T.nilable(String)) }
|
|
334
|
+
attr_reader :reason, :reason_code
|
|
335
|
+
|
|
336
|
+
sig { returns(T.nilable(Facturx::TaxBreakdown)) }
|
|
337
|
+
def tax; end
|
|
338
|
+
end
|
|
339
|
+
|
|
340
|
+
class Totals
|
|
341
|
+
sig { returns(T.nilable(T.any(::BigDecimal, Integer))) }
|
|
342
|
+
attr_reader :line_total, :charge_total, :allowance_total, :tax_basis_total, :tax_total,
|
|
343
|
+
:tax_total_in_tax_currency, :grand_total, :prepaid, :rounding, :due_payable
|
|
344
|
+
end
|
|
345
|
+
|
|
346
|
+
class Line
|
|
347
|
+
sig { returns(T.nilable(String)) }
|
|
348
|
+
attr_reader :id, :note, :buyer_accounting_reference
|
|
349
|
+
|
|
350
|
+
sig { returns(T.nilable(T.any(::BigDecimal, Integer))) }
|
|
351
|
+
attr_reader :net_amount
|
|
352
|
+
|
|
353
|
+
sig { returns(T.nilable(Facturx::Product)) }
|
|
354
|
+
def product; end
|
|
355
|
+
|
|
356
|
+
sig { returns(T.nilable(Facturx::Quantity)) }
|
|
357
|
+
def quantity; end
|
|
358
|
+
|
|
359
|
+
sig { returns(T.nilable(Facturx::Price)) }
|
|
360
|
+
def gross_price; end
|
|
361
|
+
|
|
362
|
+
sig { returns(T.nilable(Facturx::Price)) }
|
|
363
|
+
def net_price; end
|
|
364
|
+
|
|
365
|
+
sig { returns(T.nilable(Facturx::TaxBreakdown)) }
|
|
366
|
+
def tax; end
|
|
367
|
+
|
|
368
|
+
sig { returns(T.nilable(Facturx::Period)) }
|
|
369
|
+
def period; end
|
|
370
|
+
|
|
371
|
+
sig { returns(T::Array[Facturx::AllowanceCharge]) }
|
|
372
|
+
def allowances; end
|
|
373
|
+
|
|
374
|
+
sig { returns(T::Array[Facturx::AllowanceCharge]) }
|
|
375
|
+
def charges; end
|
|
376
|
+
|
|
377
|
+
sig { returns(T.nilable(Facturx::DocumentReference)) }
|
|
378
|
+
def buyer_order_reference; end
|
|
379
|
+
|
|
380
|
+
sig { returns(T.nilable(Facturx::Identifier)) }
|
|
381
|
+
def invoiced_object_identifier; end
|
|
382
|
+
end
|
|
383
|
+
|
|
384
|
+
class Document
|
|
385
|
+
sig { returns(T.nilable(String)) }
|
|
386
|
+
attr_reader :guideline_urn, :business_process, :invoice_number, :type_code, :currency, :tax_currency,
|
|
387
|
+
:vat_point_date_code, :buyer_reference, :buyer_accounting_reference, :payment_terms
|
|
388
|
+
|
|
389
|
+
sig { returns(T.nilable(::Date)) }
|
|
390
|
+
attr_reader :issue_date, :vat_point_date, :payment_due_date
|
|
391
|
+
|
|
392
|
+
sig do
|
|
393
|
+
params(
|
|
394
|
+
attributes: T.untyped,
|
|
395
|
+
block: T.nilable(T.proc.params(builder: Facturx::Builders::DocumentBuilder).void)
|
|
396
|
+
).returns(Facturx::Document)
|
|
397
|
+
end
|
|
398
|
+
def self.build(**attributes, &block); end
|
|
399
|
+
|
|
400
|
+
sig { returns(T.nilable(Facturx::DocumentReference)) }
|
|
401
|
+
def project_reference; end
|
|
402
|
+
|
|
403
|
+
sig { returns(T.nilable(Facturx::DocumentReference)) }
|
|
404
|
+
def contract_reference; end
|
|
405
|
+
|
|
406
|
+
sig { returns(T.nilable(Facturx::DocumentReference)) }
|
|
407
|
+
def purchase_order_reference; end
|
|
408
|
+
|
|
409
|
+
sig { returns(T.nilable(Facturx::DocumentReference)) }
|
|
410
|
+
def sales_order_reference; end
|
|
411
|
+
|
|
412
|
+
sig { returns(T.nilable(Facturx::DocumentReference)) }
|
|
413
|
+
def receiving_advice_reference; end
|
|
414
|
+
|
|
415
|
+
sig { returns(T.nilable(Facturx::DocumentReference)) }
|
|
416
|
+
def despatch_advice_reference; end
|
|
417
|
+
|
|
418
|
+
sig { returns(T.nilable(Facturx::DocumentReference)) }
|
|
419
|
+
def tender_or_lot_reference; end
|
|
420
|
+
|
|
421
|
+
sig { returns(T.nilable(Facturx::Identifier)) }
|
|
422
|
+
def invoiced_object_identifier; end
|
|
423
|
+
|
|
424
|
+
sig { returns(T.nilable(Facturx::Party)) }
|
|
425
|
+
def seller; end
|
|
426
|
+
|
|
427
|
+
sig { returns(T.nilable(Facturx::Party)) }
|
|
428
|
+
def buyer; end
|
|
429
|
+
|
|
430
|
+
sig { returns(T.nilable(Facturx::Party)) }
|
|
431
|
+
def payee; end
|
|
432
|
+
|
|
433
|
+
sig { returns(T.nilable(Facturx::Party)) }
|
|
434
|
+
def tax_representative; end
|
|
435
|
+
|
|
436
|
+
sig { returns(T.nilable(Facturx::Delivery)) }
|
|
437
|
+
def delivery; end
|
|
438
|
+
|
|
439
|
+
sig { returns(T.nilable(Facturx::Period)) }
|
|
440
|
+
def billing_period; end
|
|
441
|
+
|
|
442
|
+
sig { returns(T.nilable(Facturx::PaymentInstructions)) }
|
|
443
|
+
def payment; end
|
|
444
|
+
|
|
445
|
+
sig { returns(T::Array[Facturx::Note]) }
|
|
446
|
+
def notes; end
|
|
447
|
+
|
|
448
|
+
sig { returns(T::Array[Facturx::Line]) }
|
|
449
|
+
def lines; end
|
|
450
|
+
|
|
451
|
+
sig { returns(T::Array[Facturx::TaxBreakdown]) }
|
|
452
|
+
def tax_breakdowns; end
|
|
453
|
+
|
|
454
|
+
sig { returns(T::Array[Facturx::AllowanceCharge]) }
|
|
455
|
+
def allowances; end
|
|
456
|
+
|
|
457
|
+
sig { returns(T::Array[Facturx::AllowanceCharge]) }
|
|
458
|
+
def charges; end
|
|
459
|
+
|
|
460
|
+
sig { returns(T.nilable(Facturx::Totals)) }
|
|
461
|
+
def totals; end
|
|
462
|
+
|
|
463
|
+
sig { returns(T::Array[Facturx::DocumentReference]) }
|
|
464
|
+
def preceding_invoices; end
|
|
465
|
+
|
|
466
|
+
sig { returns(T::Array[Facturx::SupportingDocument]) }
|
|
467
|
+
def supporting_documents; end
|
|
468
|
+
end
|
|
469
|
+
|
|
470
|
+
module Builders
|
|
471
|
+
class Base
|
|
472
|
+
sig { params(attributes: T.untyped).void }
|
|
473
|
+
def initialize(**attributes); end
|
|
474
|
+
|
|
475
|
+
sig { returns(T.untyped) }
|
|
476
|
+
def build; end
|
|
477
|
+
end
|
|
478
|
+
|
|
479
|
+
class NoteBuilder < Base
|
|
480
|
+
sig { returns(T.nilable(String)) }
|
|
481
|
+
attr_accessor :content, :subject_code
|
|
482
|
+
sig { params(attributes: T.untyped, block: T.nilable(T.proc.params(builder: NoteBuilder).void)).returns(Note) }
|
|
483
|
+
def self.build(**attributes, &block); end
|
|
484
|
+
sig { returns(Note) }
|
|
485
|
+
def build; end
|
|
486
|
+
end
|
|
487
|
+
|
|
488
|
+
class IdentifierBuilder < Base
|
|
489
|
+
sig { returns(T.nilable(String)) }
|
|
490
|
+
attr_accessor :value, :scheme_id
|
|
491
|
+
sig do
|
|
492
|
+
params(attributes: T.untyped, block: T.nilable(T.proc.params(builder: IdentifierBuilder).void))
|
|
493
|
+
.returns(Identifier)
|
|
494
|
+
end
|
|
495
|
+
def self.build(**attributes, &block); end
|
|
496
|
+
sig { returns(Identifier) }
|
|
497
|
+
def build; end
|
|
498
|
+
end
|
|
499
|
+
|
|
500
|
+
class PeriodBuilder < Base
|
|
501
|
+
sig { returns(T.nilable(::Date)) }
|
|
502
|
+
attr_accessor :start_date, :end_date
|
|
503
|
+
sig { params(attributes: T.untyped, block: T.nilable(T.proc.params(builder: PeriodBuilder).void)).returns(Period) }
|
|
504
|
+
def self.build(**attributes, &block); end
|
|
505
|
+
sig { returns(Period) }
|
|
506
|
+
def build; end
|
|
507
|
+
end
|
|
508
|
+
|
|
509
|
+
class QuantityBuilder < Base
|
|
510
|
+
sig { returns(T.nilable(T.any(::BigDecimal, Integer))) }
|
|
511
|
+
attr_accessor :value
|
|
512
|
+
|
|
513
|
+
sig { returns(T.nilable(String)) }
|
|
514
|
+
attr_accessor :unit_code
|
|
515
|
+
sig do
|
|
516
|
+
params(attributes: T.untyped, block: T.nilable(T.proc.params(builder: QuantityBuilder).void))
|
|
517
|
+
.returns(Quantity)
|
|
518
|
+
end
|
|
519
|
+
def self.build(**attributes, &block); end
|
|
520
|
+
sig { returns(Quantity) }
|
|
521
|
+
def build; end
|
|
522
|
+
end
|
|
523
|
+
|
|
524
|
+
class ContactBuilder < Base
|
|
525
|
+
sig { returns(T.nilable(String)) }
|
|
526
|
+
attr_accessor :name, :telephone, :email
|
|
527
|
+
sig do
|
|
528
|
+
params(attributes: T.untyped, block: T.nilable(T.proc.params(builder: ContactBuilder).void))
|
|
529
|
+
.returns(Contact)
|
|
530
|
+
end
|
|
531
|
+
def self.build(**attributes, &block); end
|
|
532
|
+
sig { returns(Contact) }
|
|
533
|
+
def build; end
|
|
534
|
+
end
|
|
535
|
+
|
|
536
|
+
class AddressBuilder < Base
|
|
537
|
+
sig { returns(T.nilable(String)) }
|
|
538
|
+
attr_accessor :postcode, :line_one, :line_two, :line_three, :city, :country_code, :country_subdivision
|
|
539
|
+
sig do
|
|
540
|
+
params(attributes: T.untyped, block: T.nilable(T.proc.params(builder: AddressBuilder).void))
|
|
541
|
+
.returns(Address)
|
|
542
|
+
end
|
|
543
|
+
def self.build(**attributes, &block); end
|
|
544
|
+
sig { returns(Address) }
|
|
545
|
+
def build; end
|
|
546
|
+
end
|
|
547
|
+
|
|
548
|
+
class PartyBuilder < Base
|
|
549
|
+
sig { returns(T.nilable(String)) }
|
|
550
|
+
attr_accessor :name, :description, :trading_name
|
|
551
|
+
|
|
552
|
+
sig { params(identifiers: T::Array[Identifier]).returns(T::Array[Identifier]) }
|
|
553
|
+
attr_writer :identifiers
|
|
554
|
+
|
|
555
|
+
sig { returns(T::Array[Identifier]) }
|
|
556
|
+
attr_reader :identifiers
|
|
557
|
+
|
|
558
|
+
sig { params(value: Identifier, attributes: T.untyped, block: T.nilable(T.proc.params(builder: IdentifierBuilder).void)).returns(Identifier) }
|
|
559
|
+
def identifier(value = T.unsafe(nil), **attributes, &block); end
|
|
560
|
+
|
|
561
|
+
sig { params(legal_registration: T.nilable(Identifier)).returns(T.nilable(Identifier)) }
|
|
562
|
+
attr_writer :legal_registration
|
|
563
|
+
|
|
564
|
+
sig { params(vat_identifier: T.nilable(Identifier)).returns(T.nilable(Identifier)) }
|
|
565
|
+
attr_writer :vat_identifier
|
|
566
|
+
|
|
567
|
+
sig { params(tax_identifier: T.nilable(Identifier)).returns(T.nilable(Identifier)) }
|
|
568
|
+
attr_writer :tax_identifier
|
|
569
|
+
|
|
570
|
+
sig { params(electronic_address: T.nilable(Identifier)).returns(T.nilable(Identifier)) }
|
|
571
|
+
attr_writer :electronic_address
|
|
572
|
+
|
|
573
|
+
sig { params(address: T.nilable(Address)).returns(T.nilable(Address)) }
|
|
574
|
+
attr_writer :address
|
|
575
|
+
|
|
576
|
+
sig { params(contact: T.nilable(Contact)).returns(T.nilable(Contact)) }
|
|
577
|
+
attr_writer :contact
|
|
578
|
+
|
|
579
|
+
sig { params(value: Identifier, attributes: T.untyped, block: T.nilable(T.proc.params(builder: IdentifierBuilder).void)).returns(Identifier) }
|
|
580
|
+
def legal_registration(value = T.unsafe(nil), **attributes, &block); end
|
|
581
|
+
sig { params(value: Address, attributes: T.untyped, block: T.nilable(T.proc.params(builder: AddressBuilder).void)).returns(Address) }
|
|
582
|
+
def address(value = T.unsafe(nil), **attributes, &block); end
|
|
583
|
+
sig { params(value: Identifier, attributes: T.untyped, block: T.nilable(T.proc.params(builder: IdentifierBuilder).void)).returns(Identifier) }
|
|
584
|
+
def vat_identifier(value = T.unsafe(nil), **attributes, &block); end
|
|
585
|
+
sig { params(value: Identifier, attributes: T.untyped, block: T.nilable(T.proc.params(builder: IdentifierBuilder).void)).returns(Identifier) }
|
|
586
|
+
def tax_identifier(value = T.unsafe(nil), **attributes, &block); end
|
|
587
|
+
sig { params(value: Identifier, attributes: T.untyped, block: T.nilable(T.proc.params(builder: IdentifierBuilder).void)).returns(Identifier) }
|
|
588
|
+
def electronic_address(value = T.unsafe(nil), **attributes, &block); end
|
|
589
|
+
sig { params(value: Contact, attributes: T.untyped, block: T.nilable(T.proc.params(builder: ContactBuilder).void)).returns(Contact) }
|
|
590
|
+
def contact(value = T.unsafe(nil), **attributes, &block); end
|
|
591
|
+
sig { params(attributes: T.untyped, block: T.nilable(T.proc.params(builder: PartyBuilder).void)).returns(Party) }
|
|
592
|
+
def self.build(**attributes, &block); end
|
|
593
|
+
sig { returns(Party) }
|
|
594
|
+
def build; end
|
|
595
|
+
end
|
|
596
|
+
|
|
597
|
+
class CreditTransferBuilder < Base
|
|
598
|
+
sig { returns(T.nilable(String)) }
|
|
599
|
+
attr_accessor :account_name
|
|
600
|
+
|
|
601
|
+
sig { params(account_identifier: T.nilable(Identifier)).returns(T.nilable(Identifier)) }
|
|
602
|
+
attr_writer :account_identifier
|
|
603
|
+
|
|
604
|
+
sig { params(provider_identifier: T.nilable(Identifier)).returns(T.nilable(Identifier)) }
|
|
605
|
+
attr_writer :provider_identifier
|
|
606
|
+
|
|
607
|
+
sig { params(value: Identifier, attributes: T.untyped, block: T.nilable(T.proc.params(builder: IdentifierBuilder).void)).returns(Identifier) }
|
|
608
|
+
def account_identifier(value = T.unsafe(nil), **attributes, &block); end
|
|
609
|
+
sig { params(value: Identifier, attributes: T.untyped, block: T.nilable(T.proc.params(builder: IdentifierBuilder).void)).returns(Identifier) }
|
|
610
|
+
def provider_identifier(value = T.unsafe(nil), **attributes, &block); end
|
|
611
|
+
sig do
|
|
612
|
+
params(attributes: T.untyped, block: T.nilable(T.proc.params(builder: CreditTransferBuilder).void))
|
|
613
|
+
.returns(CreditTransfer)
|
|
614
|
+
end
|
|
615
|
+
def self.build(**attributes, &block); end
|
|
616
|
+
sig { returns(CreditTransfer) }
|
|
617
|
+
def build; end
|
|
618
|
+
end
|
|
619
|
+
|
|
620
|
+
class PaymentCardBuilder < Base
|
|
621
|
+
sig { returns(T.nilable(String)) }
|
|
622
|
+
attr_accessor :primary_account_number, :holder_name
|
|
623
|
+
sig do
|
|
624
|
+
params(attributes: T.untyped, block: T.nilable(T.proc.params(builder: PaymentCardBuilder).void))
|
|
625
|
+
.returns(PaymentCard)
|
|
626
|
+
end
|
|
627
|
+
def self.build(**attributes, &block); end
|
|
628
|
+
sig { returns(PaymentCard) }
|
|
629
|
+
def build; end
|
|
630
|
+
end
|
|
631
|
+
|
|
632
|
+
class DirectDebitBuilder < Base
|
|
633
|
+
sig { params(mandate_identifier: T.nilable(Identifier)).returns(T.nilable(Identifier)) }
|
|
634
|
+
attr_writer :mandate_identifier
|
|
635
|
+
|
|
636
|
+
sig { params(creditor_identifier: T.nilable(Identifier)).returns(T.nilable(Identifier)) }
|
|
637
|
+
attr_writer :creditor_identifier
|
|
638
|
+
|
|
639
|
+
sig { params(debtor_account_identifier: T.nilable(Identifier)).returns(T.nilable(Identifier)) }
|
|
640
|
+
attr_writer :debtor_account_identifier
|
|
641
|
+
|
|
642
|
+
sig { params(value: Identifier, attributes: T.untyped, block: T.nilable(T.proc.params(builder: IdentifierBuilder).void)).returns(Identifier) }
|
|
643
|
+
def mandate_identifier(value = T.unsafe(nil), **attributes, &block); end
|
|
644
|
+
sig { params(value: Identifier, attributes: T.untyped, block: T.nilable(T.proc.params(builder: IdentifierBuilder).void)).returns(Identifier) }
|
|
645
|
+
def creditor_identifier(value = T.unsafe(nil), **attributes, &block); end
|
|
646
|
+
sig { params(value: Identifier, attributes: T.untyped, block: T.nilable(T.proc.params(builder: IdentifierBuilder).void)).returns(Identifier) }
|
|
647
|
+
def debtor_account_identifier(value = T.unsafe(nil), **attributes, &block); end
|
|
648
|
+
sig do
|
|
649
|
+
params(attributes: T.untyped, block: T.nilable(T.proc.params(builder: DirectDebitBuilder).void))
|
|
650
|
+
.returns(DirectDebit)
|
|
651
|
+
end
|
|
652
|
+
def self.build(**attributes, &block); end
|
|
653
|
+
sig { returns(DirectDebit) }
|
|
654
|
+
def build; end
|
|
655
|
+
end
|
|
656
|
+
|
|
657
|
+
class PaymentInstructionsBuilder < Base
|
|
658
|
+
sig { returns(T.nilable(String)) }
|
|
659
|
+
attr_accessor :means_code, :means_text, :remittance_information
|
|
660
|
+
|
|
661
|
+
sig { params(credit_transfers: T::Array[CreditTransfer]).returns(T::Array[CreditTransfer]) }
|
|
662
|
+
attr_writer :credit_transfers
|
|
663
|
+
|
|
664
|
+
sig { returns(T::Array[CreditTransfer]) }
|
|
665
|
+
attr_reader :credit_transfers
|
|
666
|
+
|
|
667
|
+
sig { params(value: CreditTransfer, attributes: T.untyped, block: T.nilable(T.proc.params(builder: CreditTransferBuilder).void)).returns(CreditTransfer) }
|
|
668
|
+
def credit_transfer(value = T.unsafe(nil), **attributes, &block); end
|
|
669
|
+
|
|
670
|
+
sig { params(payment_card: T.nilable(PaymentCard)).returns(T.nilable(PaymentCard)) }
|
|
671
|
+
attr_writer :payment_card
|
|
672
|
+
|
|
673
|
+
sig { params(direct_debit: T.nilable(DirectDebit)).returns(T.nilable(DirectDebit)) }
|
|
674
|
+
attr_writer :direct_debit
|
|
675
|
+
|
|
676
|
+
sig { params(value: PaymentCard, attributes: T.untyped, block: T.nilable(T.proc.params(builder: PaymentCardBuilder).void)).returns(PaymentCard) }
|
|
677
|
+
def payment_card(value = T.unsafe(nil), **attributes, &block); end
|
|
678
|
+
sig { params(value: DirectDebit, attributes: T.untyped, block: T.nilable(T.proc.params(builder: DirectDebitBuilder).void)).returns(DirectDebit) }
|
|
679
|
+
def direct_debit(value = T.unsafe(nil), **attributes, &block); end
|
|
680
|
+
sig do
|
|
681
|
+
params(attributes: T.untyped, block: T.nilable(T.proc.params(builder: PaymentInstructionsBuilder).void))
|
|
682
|
+
.returns(PaymentInstructions)
|
|
683
|
+
end
|
|
684
|
+
def self.build(**attributes, &block); end
|
|
685
|
+
sig { returns(PaymentInstructions) }
|
|
686
|
+
def build; end
|
|
687
|
+
end
|
|
688
|
+
|
|
689
|
+
class DocumentReferenceBuilder < Base
|
|
690
|
+
sig { returns(T.nilable(String)) }
|
|
691
|
+
attr_accessor :id, :line_id, :name
|
|
692
|
+
|
|
693
|
+
sig { returns(T.nilable(::Date)) }
|
|
694
|
+
attr_accessor :issue_date
|
|
695
|
+
sig do
|
|
696
|
+
params(attributes: T.untyped, block: T.nilable(T.proc.params(builder: DocumentReferenceBuilder).void))
|
|
697
|
+
.returns(DocumentReference)
|
|
698
|
+
end
|
|
699
|
+
def self.build(**attributes, &block); end
|
|
700
|
+
sig { returns(DocumentReference) }
|
|
701
|
+
def build; end
|
|
702
|
+
end
|
|
703
|
+
|
|
704
|
+
class DeliveryBuilder < Base
|
|
705
|
+
sig { returns(T.nilable(::Date)) }
|
|
706
|
+
attr_accessor :date
|
|
707
|
+
|
|
708
|
+
sig { params(location_identifier: T.nilable(Identifier)).returns(T.nilable(Identifier)) }
|
|
709
|
+
attr_writer :location_identifier
|
|
710
|
+
|
|
711
|
+
sig { params(party: T.nilable(Party)).returns(T.nilable(Party)) }
|
|
712
|
+
attr_writer :party
|
|
713
|
+
|
|
714
|
+
sig { params(value: Identifier, attributes: T.untyped, block: T.nilable(T.proc.params(builder: IdentifierBuilder).void)).returns(Identifier) }
|
|
715
|
+
def location_identifier(value = T.unsafe(nil), **attributes, &block); end
|
|
716
|
+
sig { params(value: Party, attributes: T.untyped, block: T.nilable(T.proc.params(builder: PartyBuilder).void)).returns(Party) }
|
|
717
|
+
def party(value = T.unsafe(nil), **attributes, &block); end
|
|
718
|
+
sig { params(attributes: T.untyped, block: T.nilable(T.proc.params(builder: DeliveryBuilder).void)).returns(Delivery) }
|
|
719
|
+
def self.build(**attributes, &block); end
|
|
720
|
+
sig { returns(Delivery) }
|
|
721
|
+
def build; end
|
|
722
|
+
end
|
|
723
|
+
|
|
724
|
+
class SupportingDocumentBuilder < Base
|
|
725
|
+
sig { returns(T.nilable(String)) }
|
|
726
|
+
attr_accessor :reference, :description, :external_location, :content, :mime_code, :filename
|
|
727
|
+
sig do
|
|
728
|
+
params(attributes: T.untyped, block: T.nilable(T.proc.params(builder: SupportingDocumentBuilder).void))
|
|
729
|
+
.returns(SupportingDocument)
|
|
730
|
+
end
|
|
731
|
+
def self.build(**attributes, &block); end
|
|
732
|
+
sig { returns(SupportingDocument) }
|
|
733
|
+
def build; end
|
|
734
|
+
end
|
|
735
|
+
|
|
736
|
+
class ProductAttributeBuilder < Base
|
|
737
|
+
sig { returns(T.nilable(String)) }
|
|
738
|
+
attr_accessor :name, :value
|
|
739
|
+
sig do
|
|
740
|
+
params(attributes: T.untyped, block: T.nilable(T.proc.params(builder: ProductAttributeBuilder).void))
|
|
741
|
+
.returns(ProductAttribute)
|
|
742
|
+
end
|
|
743
|
+
def self.build(**attributes, &block); end
|
|
744
|
+
sig { returns(ProductAttribute) }
|
|
745
|
+
def build; end
|
|
746
|
+
end
|
|
747
|
+
|
|
748
|
+
class ProductClassificationBuilder < Base
|
|
749
|
+
sig { returns(T.nilable(String)) }
|
|
750
|
+
attr_accessor :code, :list_id, :list_version_id
|
|
751
|
+
sig do
|
|
752
|
+
params(attributes: T.untyped, block: T.nilable(T.proc.params(builder: ProductClassificationBuilder).void))
|
|
753
|
+
.returns(ProductClassification)
|
|
754
|
+
end
|
|
755
|
+
def self.build(**attributes, &block); end
|
|
756
|
+
sig { returns(ProductClassification) }
|
|
757
|
+
def build; end
|
|
758
|
+
end
|
|
759
|
+
|
|
760
|
+
class ProductBuilder < Base
|
|
761
|
+
sig { returns(T.nilable(String)) }
|
|
762
|
+
attr_accessor :name, :description, :origin_country_code
|
|
763
|
+
|
|
764
|
+
sig { params(seller_identifier: T.nilable(Identifier)).returns(T.nilable(Identifier)) }
|
|
765
|
+
attr_writer :seller_identifier
|
|
766
|
+
|
|
767
|
+
sig { params(buyer_identifier: T.nilable(Identifier)).returns(T.nilable(Identifier)) }
|
|
768
|
+
attr_writer :buyer_identifier
|
|
769
|
+
|
|
770
|
+
sig { params(global_identifier: T.nilable(Identifier)).returns(T.nilable(Identifier)) }
|
|
771
|
+
attr_writer :global_identifier
|
|
772
|
+
|
|
773
|
+
sig { params(attributes: T::Array[ProductAttribute]).returns(T::Array[ProductAttribute]) }
|
|
774
|
+
attr_writer :attributes
|
|
775
|
+
|
|
776
|
+
sig { returns(T::Array[ProductAttribute]) }
|
|
777
|
+
attr_reader :attributes
|
|
778
|
+
|
|
779
|
+
sig { params(classifications: T::Array[ProductClassification]).returns(T::Array[ProductClassification]) }
|
|
780
|
+
attr_writer :classifications
|
|
781
|
+
|
|
782
|
+
sig { returns(T::Array[ProductClassification]) }
|
|
783
|
+
attr_reader :classifications
|
|
784
|
+
|
|
785
|
+
sig { params(value: Identifier, attributes: T.untyped, block: T.nilable(T.proc.params(builder: IdentifierBuilder).void)).returns(Identifier) }
|
|
786
|
+
def seller_identifier(value = T.unsafe(nil), **attributes, &block); end
|
|
787
|
+
sig { params(value: Identifier, attributes: T.untyped, block: T.nilable(T.proc.params(builder: IdentifierBuilder).void)).returns(Identifier) }
|
|
788
|
+
def buyer_identifier(value = T.unsafe(nil), **attributes, &block); end
|
|
789
|
+
sig { params(value: Identifier, attributes: T.untyped, block: T.nilable(T.proc.params(builder: IdentifierBuilder).void)).returns(Identifier) }
|
|
790
|
+
def global_identifier(value = T.unsafe(nil), **attributes, &block); end
|
|
791
|
+
sig { params(value: ProductAttribute, attributes: T.untyped, block: T.nilable(T.proc.params(builder: ProductAttributeBuilder).void)).returns(ProductAttribute) }
|
|
792
|
+
def attribute(value = T.unsafe(nil), **attributes, &block); end
|
|
793
|
+
sig { params(value: ProductClassification, attributes: T.untyped, block: T.nilable(T.proc.params(builder: ProductClassificationBuilder).void)).returns(ProductClassification) }
|
|
794
|
+
def classification(value = T.unsafe(nil), **attributes, &block); end
|
|
795
|
+
sig { params(attributes: T.untyped, block: T.nilable(T.proc.params(builder: ProductBuilder).void)).returns(Product) }
|
|
796
|
+
def self.build(**attributes, &block); end
|
|
797
|
+
sig { returns(Product) }
|
|
798
|
+
def build; end
|
|
799
|
+
end
|
|
800
|
+
|
|
801
|
+
class PriceBuilder < Base
|
|
802
|
+
sig { returns(T.nilable(T.any(::BigDecimal, Integer))) }
|
|
803
|
+
attr_accessor :amount, :discount
|
|
804
|
+
|
|
805
|
+
sig { params(basis_quantity: T.nilable(Quantity)).returns(T.nilable(Quantity)) }
|
|
806
|
+
attr_writer :basis_quantity
|
|
807
|
+
|
|
808
|
+
sig { params(value: Quantity, attributes: T.untyped, block: T.nilable(T.proc.params(builder: QuantityBuilder).void)).returns(Quantity) }
|
|
809
|
+
def basis_quantity(value = T.unsafe(nil), **attributes, &block); end
|
|
810
|
+
sig { params(attributes: T.untyped, block: T.nilable(T.proc.params(builder: PriceBuilder).void)).returns(Price) }
|
|
811
|
+
def self.build(**attributes, &block); end
|
|
812
|
+
sig { returns(Price) }
|
|
813
|
+
def build; end
|
|
814
|
+
end
|
|
815
|
+
|
|
816
|
+
class TaxBreakdownBuilder < Base
|
|
817
|
+
sig { returns(T.nilable(String)) }
|
|
818
|
+
attr_accessor :type_code, :category_code, :exemption_reason, :exemption_reason_code, :due_date_type_code
|
|
819
|
+
|
|
820
|
+
sig { returns(T.nilable(T.any(::BigDecimal, Integer))) }
|
|
821
|
+
attr_accessor :rate, :basis_amount, :tax_amount
|
|
822
|
+
sig do
|
|
823
|
+
params(attributes: T.untyped, block: T.nilable(T.proc.params(builder: TaxBreakdownBuilder).void))
|
|
824
|
+
.returns(TaxBreakdown)
|
|
825
|
+
end
|
|
826
|
+
def self.build(**attributes, &block); end
|
|
827
|
+
sig { returns(TaxBreakdown) }
|
|
828
|
+
def build; end
|
|
829
|
+
end
|
|
830
|
+
|
|
831
|
+
class AllowanceChargeBuilder < Base
|
|
832
|
+
sig { returns(T.nilable(T::Boolean)) }
|
|
833
|
+
attr_accessor :indicator
|
|
834
|
+
|
|
835
|
+
sig { returns(T.nilable(T.any(::BigDecimal, Integer))) }
|
|
836
|
+
attr_accessor :amount, :base_amount, :percentage
|
|
837
|
+
|
|
838
|
+
sig { returns(T.nilable(String)) }
|
|
839
|
+
attr_accessor :reason, :reason_code
|
|
840
|
+
|
|
841
|
+
sig { params(tax: T.nilable(TaxBreakdown)).returns(T.nilable(TaxBreakdown)) }
|
|
842
|
+
attr_writer :tax
|
|
843
|
+
|
|
844
|
+
sig { params(value: TaxBreakdown, attributes: T.untyped, block: T.nilable(T.proc.params(builder: TaxBreakdownBuilder).void)).returns(TaxBreakdown) }
|
|
845
|
+
def tax(value = T.unsafe(nil), **attributes, &block); end
|
|
846
|
+
sig do
|
|
847
|
+
params(attributes: T.untyped, block: T.nilable(T.proc.params(builder: AllowanceChargeBuilder).void))
|
|
848
|
+
.returns(AllowanceCharge)
|
|
849
|
+
end
|
|
850
|
+
def self.build(**attributes, &block); end
|
|
851
|
+
sig { returns(AllowanceCharge) }
|
|
852
|
+
def build; end
|
|
853
|
+
end
|
|
854
|
+
|
|
855
|
+
class TotalsBuilder < Base
|
|
856
|
+
sig { returns(T.nilable(T.any(::BigDecimal, Integer))) }
|
|
857
|
+
attr_accessor :line_total, :charge_total, :allowance_total, :tax_basis_total, :tax_total,
|
|
858
|
+
:tax_total_in_tax_currency, :grand_total, :prepaid, :rounding, :due_payable
|
|
859
|
+
sig { params(attributes: T.untyped, block: T.nilable(T.proc.params(builder: TotalsBuilder).void)).returns(Totals) }
|
|
860
|
+
def self.build(**attributes, &block); end
|
|
861
|
+
sig { returns(Totals) }
|
|
862
|
+
def build; end
|
|
863
|
+
end
|
|
864
|
+
|
|
865
|
+
class LineBuilder < Base
|
|
866
|
+
sig { returns(T.nilable(String)) }
|
|
867
|
+
attr_accessor :id, :note, :buyer_accounting_reference
|
|
868
|
+
|
|
869
|
+
sig { returns(T.nilable(T.any(::BigDecimal, Integer))) }
|
|
870
|
+
attr_accessor :net_amount
|
|
871
|
+
|
|
872
|
+
sig { params(product: T.nilable(Product)).returns(T.nilable(Product)) }
|
|
873
|
+
attr_writer :product
|
|
874
|
+
|
|
875
|
+
sig { params(quantity: T.nilable(Quantity)).returns(T.nilable(Quantity)) }
|
|
876
|
+
attr_writer :quantity
|
|
877
|
+
|
|
878
|
+
sig { params(gross_price: T.nilable(Price)).returns(T.nilable(Price)) }
|
|
879
|
+
attr_writer :gross_price
|
|
880
|
+
|
|
881
|
+
sig { params(net_price: T.nilable(Price)).returns(T.nilable(Price)) }
|
|
882
|
+
attr_writer :net_price
|
|
883
|
+
|
|
884
|
+
sig { params(tax: T.nilable(TaxBreakdown)).returns(T.nilable(TaxBreakdown)) }
|
|
885
|
+
attr_writer :tax
|
|
886
|
+
|
|
887
|
+
sig { params(period: T.nilable(Period)).returns(T.nilable(Period)) }
|
|
888
|
+
attr_writer :period
|
|
889
|
+
|
|
890
|
+
sig { params(allowances: T::Array[AllowanceCharge]).returns(T::Array[AllowanceCharge]) }
|
|
891
|
+
attr_writer :allowances
|
|
892
|
+
|
|
893
|
+
sig { params(charges: T::Array[AllowanceCharge]).returns(T::Array[AllowanceCharge]) }
|
|
894
|
+
attr_writer :charges
|
|
895
|
+
|
|
896
|
+
sig { returns(T::Array[AllowanceCharge]) }
|
|
897
|
+
attr_reader :allowances, :charges
|
|
898
|
+
|
|
899
|
+
sig { params(buyer_order_reference: T.nilable(DocumentReference)).returns(T.nilable(DocumentReference)) }
|
|
900
|
+
attr_writer :buyer_order_reference
|
|
901
|
+
|
|
902
|
+
sig { params(invoiced_object_identifier: T.nilable(Identifier)).returns(T.nilable(Identifier)) }
|
|
903
|
+
attr_writer :invoiced_object_identifier
|
|
904
|
+
|
|
905
|
+
sig { params(value: Product, attributes: T.untyped, block: T.nilable(T.proc.params(builder: ProductBuilder).void)).returns(Product) }
|
|
906
|
+
def product(value = T.unsafe(nil), **attributes, &block); end
|
|
907
|
+
sig { params(value: Quantity, attributes: T.untyped, block: T.nilable(T.proc.params(builder: QuantityBuilder).void)).returns(Quantity) }
|
|
908
|
+
def quantity(value = T.unsafe(nil), **attributes, &block); end
|
|
909
|
+
sig { params(value: Price, attributes: T.untyped, block: T.nilable(T.proc.params(builder: PriceBuilder).void)).returns(Price) }
|
|
910
|
+
def gross_price(value = T.unsafe(nil), **attributes, &block); end
|
|
911
|
+
sig { params(value: Price, attributes: T.untyped, block: T.nilable(T.proc.params(builder: PriceBuilder).void)).returns(Price) }
|
|
912
|
+
def net_price(value = T.unsafe(nil), **attributes, &block); end
|
|
913
|
+
sig { params(value: TaxBreakdown, attributes: T.untyped, block: T.nilable(T.proc.params(builder: TaxBreakdownBuilder).void)).returns(TaxBreakdown) }
|
|
914
|
+
def tax(value = T.unsafe(nil), **attributes, &block); end
|
|
915
|
+
sig { params(value: Period, attributes: T.untyped, block: T.nilable(T.proc.params(builder: PeriodBuilder).void)).returns(Period) }
|
|
916
|
+
def period(value = T.unsafe(nil), **attributes, &block); end
|
|
917
|
+
sig { params(value: AllowanceCharge, attributes: T.untyped, block: T.nilable(T.proc.params(builder: AllowanceChargeBuilder).void)).returns(AllowanceCharge) }
|
|
918
|
+
def allowance(value = T.unsafe(nil), **attributes, &block); end
|
|
919
|
+
sig { params(value: AllowanceCharge, attributes: T.untyped, block: T.nilable(T.proc.params(builder: AllowanceChargeBuilder).void)).returns(AllowanceCharge) }
|
|
920
|
+
def charge(value = T.unsafe(nil), **attributes, &block); end
|
|
921
|
+
sig { params(value: DocumentReference, attributes: T.untyped, block: T.nilable(T.proc.params(builder: DocumentReferenceBuilder).void)).returns(DocumentReference) }
|
|
922
|
+
def buyer_order_reference(value = T.unsafe(nil), **attributes, &block); end
|
|
923
|
+
sig { params(value: Identifier, attributes: T.untyped, block: T.nilable(T.proc.params(builder: IdentifierBuilder).void)).returns(Identifier) }
|
|
924
|
+
def invoiced_object_identifier(value = T.unsafe(nil), **attributes, &block); end
|
|
925
|
+
sig { params(attributes: T.untyped, block: T.nilable(T.proc.params(builder: LineBuilder).void)).returns(Line) }
|
|
926
|
+
def self.build(**attributes, &block); end
|
|
927
|
+
sig { returns(Line) }
|
|
928
|
+
def build; end
|
|
929
|
+
end
|
|
930
|
+
|
|
931
|
+
class DocumentBuilder < Base
|
|
932
|
+
sig { returns(T.nilable(String)) }
|
|
933
|
+
attr_accessor :guideline_urn, :business_process, :invoice_number, :type_code, :currency, :tax_currency,
|
|
934
|
+
:vat_point_date_code, :buyer_reference, :buyer_accounting_reference, :payment_terms
|
|
935
|
+
|
|
936
|
+
sig { returns(T.nilable(::Date)) }
|
|
937
|
+
attr_accessor :issue_date, :vat_point_date, :payment_due_date
|
|
938
|
+
|
|
939
|
+
sig { params(project_reference: T.nilable(DocumentReference)).returns(T.nilable(DocumentReference)) }
|
|
940
|
+
attr_writer :project_reference
|
|
941
|
+
|
|
942
|
+
sig { params(contract_reference: T.nilable(DocumentReference)).returns(T.nilable(DocumentReference)) }
|
|
943
|
+
attr_writer :contract_reference
|
|
944
|
+
|
|
945
|
+
sig do
|
|
946
|
+
params(purchase_order_reference: T.nilable(DocumentReference)).returns(T.nilable(DocumentReference))
|
|
947
|
+
end
|
|
948
|
+
attr_writer :purchase_order_reference
|
|
949
|
+
|
|
950
|
+
sig { params(sales_order_reference: T.nilable(DocumentReference)).returns(T.nilable(DocumentReference)) }
|
|
951
|
+
attr_writer :sales_order_reference
|
|
952
|
+
|
|
953
|
+
sig do
|
|
954
|
+
params(receiving_advice_reference: T.nilable(DocumentReference)).returns(T.nilable(DocumentReference))
|
|
955
|
+
end
|
|
956
|
+
attr_writer :receiving_advice_reference
|
|
957
|
+
|
|
958
|
+
sig do
|
|
959
|
+
params(despatch_advice_reference: T.nilable(DocumentReference)).returns(T.nilable(DocumentReference))
|
|
960
|
+
end
|
|
961
|
+
attr_writer :despatch_advice_reference
|
|
962
|
+
|
|
963
|
+
sig do
|
|
964
|
+
params(tender_or_lot_reference: T.nilable(DocumentReference)).returns(T.nilable(DocumentReference))
|
|
965
|
+
end
|
|
966
|
+
attr_writer :tender_or_lot_reference
|
|
967
|
+
|
|
968
|
+
sig { params(invoiced_object_identifier: T.nilable(Identifier)).returns(T.nilable(Identifier)) }
|
|
969
|
+
attr_writer :invoiced_object_identifier
|
|
970
|
+
|
|
971
|
+
sig { params(seller: T.nilable(Party)).returns(T.nilable(Party)) }
|
|
972
|
+
attr_writer :seller
|
|
973
|
+
|
|
974
|
+
sig { params(buyer: T.nilable(Party)).returns(T.nilable(Party)) }
|
|
975
|
+
attr_writer :buyer
|
|
976
|
+
|
|
977
|
+
sig { params(payee: T.nilable(Party)).returns(T.nilable(Party)) }
|
|
978
|
+
attr_writer :payee
|
|
979
|
+
|
|
980
|
+
sig { params(tax_representative: T.nilable(Party)).returns(T.nilable(Party)) }
|
|
981
|
+
attr_writer :tax_representative
|
|
982
|
+
|
|
983
|
+
sig { params(delivery: T.nilable(Delivery)).returns(T.nilable(Delivery)) }
|
|
984
|
+
attr_writer :delivery
|
|
985
|
+
|
|
986
|
+
sig { params(billing_period: T.nilable(Period)).returns(T.nilable(Period)) }
|
|
987
|
+
attr_writer :billing_period
|
|
988
|
+
|
|
989
|
+
sig { params(payment: T.nilable(PaymentInstructions)).returns(T.nilable(PaymentInstructions)) }
|
|
990
|
+
attr_writer :payment
|
|
991
|
+
|
|
992
|
+
sig { params(totals: T.nilable(Totals)).returns(T.nilable(Totals)) }
|
|
993
|
+
attr_writer :totals
|
|
994
|
+
|
|
995
|
+
sig { params(notes: T::Array[Note]).returns(T::Array[Note]) }
|
|
996
|
+
attr_writer :notes
|
|
997
|
+
|
|
998
|
+
sig { returns(T::Array[Note]) }
|
|
999
|
+
attr_reader :notes
|
|
1000
|
+
|
|
1001
|
+
sig { params(lines: T::Array[Line]).returns(T::Array[Line]) }
|
|
1002
|
+
attr_writer :lines
|
|
1003
|
+
|
|
1004
|
+
sig { returns(T::Array[Line]) }
|
|
1005
|
+
attr_reader :lines
|
|
1006
|
+
|
|
1007
|
+
sig { params(tax_breakdowns: T::Array[TaxBreakdown]).returns(T::Array[TaxBreakdown]) }
|
|
1008
|
+
attr_writer :tax_breakdowns
|
|
1009
|
+
|
|
1010
|
+
sig { returns(T::Array[TaxBreakdown]) }
|
|
1011
|
+
attr_reader :tax_breakdowns
|
|
1012
|
+
|
|
1013
|
+
sig { params(allowances: T::Array[AllowanceCharge]).returns(T::Array[AllowanceCharge]) }
|
|
1014
|
+
attr_writer :allowances
|
|
1015
|
+
|
|
1016
|
+
sig { params(charges: T::Array[AllowanceCharge]).returns(T::Array[AllowanceCharge]) }
|
|
1017
|
+
attr_writer :charges
|
|
1018
|
+
|
|
1019
|
+
sig { returns(T::Array[AllowanceCharge]) }
|
|
1020
|
+
attr_reader :allowances, :charges
|
|
1021
|
+
|
|
1022
|
+
sig do
|
|
1023
|
+
params(preceding_invoices: T::Array[DocumentReference]).returns(T::Array[DocumentReference])
|
|
1024
|
+
end
|
|
1025
|
+
attr_writer :preceding_invoices
|
|
1026
|
+
|
|
1027
|
+
sig { returns(T::Array[DocumentReference]) }
|
|
1028
|
+
attr_reader :preceding_invoices
|
|
1029
|
+
|
|
1030
|
+
sig do
|
|
1031
|
+
params(supporting_documents: T::Array[SupportingDocument]).returns(T::Array[SupportingDocument])
|
|
1032
|
+
end
|
|
1033
|
+
attr_writer :supporting_documents
|
|
1034
|
+
|
|
1035
|
+
sig { returns(T::Array[SupportingDocument]) }
|
|
1036
|
+
attr_reader :supporting_documents
|
|
1037
|
+
|
|
1038
|
+
sig { params(value: DocumentReference, attributes: T.untyped, block: T.nilable(T.proc.params(builder: DocumentReferenceBuilder).void)).returns(DocumentReference) }
|
|
1039
|
+
def project_reference(value = T.unsafe(nil), **attributes, &block); end
|
|
1040
|
+
sig { params(value: DocumentReference, attributes: T.untyped, block: T.nilable(T.proc.params(builder: DocumentReferenceBuilder).void)).returns(DocumentReference) }
|
|
1041
|
+
def contract_reference(value = T.unsafe(nil), **attributes, &block); end
|
|
1042
|
+
sig { params(value: DocumentReference, attributes: T.untyped, block: T.nilable(T.proc.params(builder: DocumentReferenceBuilder).void)).returns(DocumentReference) }
|
|
1043
|
+
def purchase_order_reference(value = T.unsafe(nil), **attributes, &block); end
|
|
1044
|
+
sig { params(value: DocumentReference, attributes: T.untyped, block: T.nilable(T.proc.params(builder: DocumentReferenceBuilder).void)).returns(DocumentReference) }
|
|
1045
|
+
def sales_order_reference(value = T.unsafe(nil), **attributes, &block); end
|
|
1046
|
+
sig { params(value: DocumentReference, attributes: T.untyped, block: T.nilable(T.proc.params(builder: DocumentReferenceBuilder).void)).returns(DocumentReference) }
|
|
1047
|
+
def receiving_advice_reference(value = T.unsafe(nil), **attributes, &block); end
|
|
1048
|
+
sig { params(value: DocumentReference, attributes: T.untyped, block: T.nilable(T.proc.params(builder: DocumentReferenceBuilder).void)).returns(DocumentReference) }
|
|
1049
|
+
def despatch_advice_reference(value = T.unsafe(nil), **attributes, &block); end
|
|
1050
|
+
sig { params(value: DocumentReference, attributes: T.untyped, block: T.nilable(T.proc.params(builder: DocumentReferenceBuilder).void)).returns(DocumentReference) }
|
|
1051
|
+
def tender_or_lot_reference(value = T.unsafe(nil), **attributes, &block); end
|
|
1052
|
+
sig { params(value: Identifier, attributes: T.untyped, block: T.nilable(T.proc.params(builder: IdentifierBuilder).void)).returns(Identifier) }
|
|
1053
|
+
def invoiced_object_identifier(value = T.unsafe(nil), **attributes, &block); end
|
|
1054
|
+
sig { params(value: Party, attributes: T.untyped, block: T.nilable(T.proc.params(builder: PartyBuilder).void)).returns(Party) }
|
|
1055
|
+
def seller(value = T.unsafe(nil), **attributes, &block); end
|
|
1056
|
+
sig { params(value: Party, attributes: T.untyped, block: T.nilable(T.proc.params(builder: PartyBuilder).void)).returns(Party) }
|
|
1057
|
+
def buyer(value = T.unsafe(nil), **attributes, &block); end
|
|
1058
|
+
sig { params(value: Party, attributes: T.untyped, block: T.nilable(T.proc.params(builder: PartyBuilder).void)).returns(Party) }
|
|
1059
|
+
def payee(value = T.unsafe(nil), **attributes, &block); end
|
|
1060
|
+
sig { params(value: Party, attributes: T.untyped, block: T.nilable(T.proc.params(builder: PartyBuilder).void)).returns(Party) }
|
|
1061
|
+
def tax_representative(value = T.unsafe(nil), **attributes, &block); end
|
|
1062
|
+
sig { params(value: Delivery, attributes: T.untyped, block: T.nilable(T.proc.params(builder: DeliveryBuilder).void)).returns(Delivery) }
|
|
1063
|
+
def delivery(value = T.unsafe(nil), **attributes, &block); end
|
|
1064
|
+
sig { params(value: Period, attributes: T.untyped, block: T.nilable(T.proc.params(builder: PeriodBuilder).void)).returns(Period) }
|
|
1065
|
+
def billing_period(value = T.unsafe(nil), **attributes, &block); end
|
|
1066
|
+
sig { params(value: PaymentInstructions, attributes: T.untyped, block: T.nilable(T.proc.params(builder: PaymentInstructionsBuilder).void)).returns(PaymentInstructions) }
|
|
1067
|
+
def payment(value = T.unsafe(nil), **attributes, &block); end
|
|
1068
|
+
sig { params(value: Totals, attributes: T.untyped, block: T.nilable(T.proc.params(builder: TotalsBuilder).void)).returns(Totals) }
|
|
1069
|
+
def totals(value = T.unsafe(nil), **attributes, &block); end
|
|
1070
|
+
sig { params(value: Note, attributes: T.untyped, block: T.nilable(T.proc.params(builder: NoteBuilder).void)).returns(Note) }
|
|
1071
|
+
def note(value = T.unsafe(nil), **attributes, &block); end
|
|
1072
|
+
sig { params(value: Line, attributes: T.untyped, block: T.nilable(T.proc.params(builder: LineBuilder).void)).returns(Line) }
|
|
1073
|
+
def line(value = T.unsafe(nil), **attributes, &block); end
|
|
1074
|
+
sig { params(value: TaxBreakdown, attributes: T.untyped, block: T.nilable(T.proc.params(builder: TaxBreakdownBuilder).void)).returns(TaxBreakdown) }
|
|
1075
|
+
def tax_breakdown(value = T.unsafe(nil), **attributes, &block); end
|
|
1076
|
+
sig { params(value: AllowanceCharge, attributes: T.untyped, block: T.nilable(T.proc.params(builder: AllowanceChargeBuilder).void)).returns(AllowanceCharge) }
|
|
1077
|
+
def allowance(value = T.unsafe(nil), **attributes, &block); end
|
|
1078
|
+
sig { params(value: AllowanceCharge, attributes: T.untyped, block: T.nilable(T.proc.params(builder: AllowanceChargeBuilder).void)).returns(AllowanceCharge) }
|
|
1079
|
+
def charge(value = T.unsafe(nil), **attributes, &block); end
|
|
1080
|
+
sig { params(value: DocumentReference, attributes: T.untyped, block: T.nilable(T.proc.params(builder: DocumentReferenceBuilder).void)).returns(DocumentReference) }
|
|
1081
|
+
def preceding_invoice(value = T.unsafe(nil), **attributes, &block); end
|
|
1082
|
+
sig { params(value: SupportingDocument, attributes: T.untyped, block: T.nilable(T.proc.params(builder: SupportingDocumentBuilder).void)).returns(SupportingDocument) }
|
|
1083
|
+
def supporting_document(value = T.unsafe(nil), **attributes, &block); end
|
|
1084
|
+
sig { params(attributes: T.untyped, block: T.nilable(T.proc.params(builder: DocumentBuilder).void)).returns(Document) }
|
|
1085
|
+
def self.build(**attributes, &block); end
|
|
1086
|
+
sig { returns(Document) }
|
|
1087
|
+
def build; end
|
|
1088
|
+
end
|
|
1089
|
+
end
|
|
1090
|
+
end
|