e-invoice-api 0.32.0 → 0.34.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.
Files changed (111) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +16 -0
  3. data/README.md +1 -1
  4. data/lib/e_invoice_api/client.rb +16 -0
  5. data/lib/e_invoice_api/models/conversion/document_create_from_pdf_task.rb +43 -0
  6. data/lib/e_invoice_api/models/conversion/pdf_create_params.rb +22 -0
  7. data/lib/e_invoice_api/models/conversion/pdf_result_params.rb +22 -0
  8. data/lib/e_invoice_api/models/conversion/pdf_retrieve_params.rb +22 -0
  9. data/lib/e_invoice_api/models/document_create.rb +158 -5
  10. data/lib/e_invoice_api/models/document_create_from_pdf_response.rb +108 -5
  11. data/lib/e_invoice_api/models/document_lifecycle_params.rb +20 -0
  12. data/lib/e_invoice_api/models/document_lifecycle_response.rb +134 -0
  13. data/lib/e_invoice_api/models/document_response.rb +112 -7
  14. data/lib/e_invoice_api/models/document_timeline_params.rb +20 -0
  15. data/lib/e_invoice_api/models/document_timeline_response.rb +71 -0
  16. data/lib/e_invoice_api/models/draft_list_params.rb +113 -0
  17. data/lib/e_invoice_api/models/inbound_email_response.rb +129 -0
  18. data/lib/e_invoice_api/models/mailbox_download_attachment_params.rb +26 -0
  19. data/lib/e_invoice_api/models/mailbox_list_params.rb +129 -0
  20. data/lib/e_invoice_api/models/mailbox_reprocess_params.rb +20 -0
  21. data/lib/e_invoice_api/models/mailbox_retrieve_params.rb +20 -0
  22. data/lib/e_invoice_api/models/me_retrieve_response.rb +8 -7
  23. data/lib/e_invoice_api/models/payment_detail_create.rb +4 -2
  24. data/lib/e_invoice_api/models/stats_retrieve_params.rb +55 -0
  25. data/lib/e_invoice_api/models/stats_retrieve_response.rb +141 -0
  26. data/lib/e_invoice_api/models/ubl_document_validation.rb +10 -1
  27. data/lib/e_invoice_api/models/webhook_history_params.rb +20 -0
  28. data/lib/e_invoice_api/models/webhook_history_response.rb +17 -0
  29. data/lib/e_invoice_api/models/webhook_test_params.rb +37 -0
  30. data/lib/e_invoice_api/models/webhook_test_response.rb +35 -0
  31. data/lib/e_invoice_api/models.rb +24 -0
  32. data/lib/e_invoice_api/resources/conversion/pdf.rb +76 -0
  33. data/lib/e_invoice_api/resources/conversion.rb +18 -0
  34. data/lib/e_invoice_api/resources/documents.rb +62 -1
  35. data/lib/e_invoice_api/resources/drafts.rb +55 -0
  36. data/lib/e_invoice_api/resources/mailbox.rb +123 -0
  37. data/lib/e_invoice_api/resources/stats.rb +47 -0
  38. data/lib/e_invoice_api/resources/validate.rb +22 -2
  39. data/lib/e_invoice_api/resources/webhooks.rb +45 -0
  40. data/lib/e_invoice_api/version.rb +1 -1
  41. data/lib/e_invoice_api.rb +25 -0
  42. data/rbi/e_invoice_api/client.rbi +12 -0
  43. data/rbi/e_invoice_api/models/conversion/document_create_from_pdf_task.rbi +108 -0
  44. data/rbi/e_invoice_api/models/conversion/pdf_create_params.rbi +43 -0
  45. data/rbi/e_invoice_api/models/conversion/pdf_result_params.rbi +40 -0
  46. data/rbi/e_invoice_api/models/conversion/pdf_retrieve_params.rbi +40 -0
  47. data/rbi/e_invoice_api/models/document_create.rbi +210 -3
  48. data/rbi/e_invoice_api/models/document_create_from_pdf_response.rbi +124 -3
  49. data/rbi/e_invoice_api/models/document_lifecycle_params.rbi +38 -0
  50. data/rbi/e_invoice_api/models/document_lifecycle_response.rbi +353 -0
  51. data/rbi/e_invoice_api/models/document_response.rbi +130 -5
  52. data/rbi/e_invoice_api/models/document_timeline_params.rbi +38 -0
  53. data/rbi/e_invoice_api/models/document_timeline_response.rbi +168 -0
  54. data/rbi/e_invoice_api/models/draft_list_params.rbi +194 -0
  55. data/rbi/e_invoice_api/models/inbound_email_response.rbi +189 -0
  56. data/rbi/e_invoice_api/models/mailbox_download_attachment_params.rbi +46 -0
  57. data/rbi/e_invoice_api/models/mailbox_list_params.rbi +218 -0
  58. data/rbi/e_invoice_api/models/mailbox_reprocess_params.rbi +41 -0
  59. data/rbi/e_invoice_api/models/mailbox_retrieve_params.rbi +41 -0
  60. data/rbi/e_invoice_api/models/me_retrieve_response.rbi +10 -8
  61. data/rbi/e_invoice_api/models/payment_detail_create.rbi +6 -2
  62. data/rbi/e_invoice_api/models/stats_retrieve_params.rbi +111 -0
  63. data/rbi/e_invoice_api/models/stats_retrieve_response.rbi +251 -0
  64. data/rbi/e_invoice_api/models/ubl_document_validation.rbi +11 -1
  65. data/rbi/e_invoice_api/models/webhook_history_params.rbi +38 -0
  66. data/rbi/e_invoice_api/models/webhook_history_response.rbi +32 -0
  67. data/rbi/e_invoice_api/models/webhook_test_params.rbi +57 -0
  68. data/rbi/e_invoice_api/models/webhook_test_response.rbi +57 -0
  69. data/rbi/e_invoice_api/models.rbi +25 -0
  70. data/rbi/e_invoice_api/resources/conversion/pdf.rbi +44 -0
  71. data/rbi/e_invoice_api/resources/conversion.rbi +15 -0
  72. data/rbi/e_invoice_api/resources/documents.rbi +67 -0
  73. data/rbi/e_invoice_api/resources/drafts.rbi +55 -0
  74. data/rbi/e_invoice_api/resources/mailbox.rbi +93 -0
  75. data/rbi/e_invoice_api/resources/stats.rbi +38 -0
  76. data/rbi/e_invoice_api/resources/validate.rbi +44 -1
  77. data/rbi/e_invoice_api/resources/webhooks.rbi +29 -0
  78. data/sig/e_invoice_api/client.rbs +8 -0
  79. data/sig/e_invoice_api/models/conversion/document_create_from_pdf_task.rbs +45 -0
  80. data/sig/e_invoice_api/models/conversion/pdf_create_params.rbs +26 -0
  81. data/sig/e_invoice_api/models/conversion/pdf_result_params.rbs +25 -0
  82. data/sig/e_invoice_api/models/conversion/pdf_retrieve_params.rbs +25 -0
  83. data/sig/e_invoice_api/models/document_create.rbs +87 -4
  84. data/sig/e_invoice_api/models/document_create_from_pdf_response.rbs +61 -4
  85. data/sig/e_invoice_api/models/document_lifecycle_params.rbs +23 -0
  86. data/sig/e_invoice_api/models/document_lifecycle_response.rbs +151 -0
  87. data/sig/e_invoice_api/models/document_response.rbs +61 -4
  88. data/sig/e_invoice_api/models/document_timeline_params.rbs +23 -0
  89. data/sig/e_invoice_api/models/document_timeline_response.rbs +84 -0
  90. data/sig/e_invoice_api/models/draft_list_params.rbs +112 -0
  91. data/sig/e_invoice_api/models/inbound_email_response.rbs +126 -0
  92. data/sig/e_invoice_api/models/mailbox_download_attachment_params.rbs +28 -0
  93. data/sig/e_invoice_api/models/mailbox_list_params.rbs +112 -0
  94. data/sig/e_invoice_api/models/mailbox_reprocess_params.rbs +24 -0
  95. data/sig/e_invoice_api/models/mailbox_retrieve_params.rbs +24 -0
  96. data/sig/e_invoice_api/models/stats_retrieve_params.rbs +48 -0
  97. data/sig/e_invoice_api/models/stats_retrieve_response.rbs +107 -0
  98. data/sig/e_invoice_api/models/webhook_history_params.rbs +23 -0
  99. data/sig/e_invoice_api/models/webhook_history_response.rbs +13 -0
  100. data/sig/e_invoice_api/models/webhook_test_params.rbs +32 -0
  101. data/sig/e_invoice_api/models/webhook_test_response.rbs +30 -0
  102. data/sig/e_invoice_api/models.rbs +24 -0
  103. data/sig/e_invoice_api/resources/conversion/pdf.rbs +24 -0
  104. data/sig/e_invoice_api/resources/conversion.rbs +9 -0
  105. data/sig/e_invoice_api/resources/documents.rbs +19 -0
  106. data/sig/e_invoice_api/resources/drafts.rbs +20 -0
  107. data/sig/e_invoice_api/resources/mailbox.rbs +36 -0
  108. data/sig/e_invoice_api/resources/stats.rbs +14 -0
  109. data/sig/e_invoice_api/resources/validate.rbs +9 -0
  110. data/sig/e_invoice_api/resources/webhooks.rbs +12 -0
  111. metadata +77 -2
@@ -0,0 +1,41 @@
1
+ # typed: strong
2
+
3
+ module EInvoiceAPI
4
+ module Models
5
+ class MailboxRetrieveParams < EInvoiceAPI::Internal::Type::BaseModel
6
+ extend EInvoiceAPI::Internal::Type::RequestParameters::Converter
7
+ include EInvoiceAPI::Internal::Type::RequestParameters
8
+
9
+ OrHash =
10
+ T.type_alias do
11
+ T.any(
12
+ EInvoiceAPI::MailboxRetrieveParams,
13
+ EInvoiceAPI::Internal::AnyHash
14
+ )
15
+ end
16
+
17
+ sig { returns(String) }
18
+ attr_accessor :inbound_email_id
19
+
20
+ sig do
21
+ params(
22
+ inbound_email_id: String,
23
+ request_options: EInvoiceAPI::RequestOptions::OrHash
24
+ ).returns(T.attached_class)
25
+ end
26
+ def self.new(inbound_email_id:, request_options: {})
27
+ end
28
+
29
+ sig do
30
+ override.returns(
31
+ {
32
+ inbound_email_id: String,
33
+ request_options: EInvoiceAPI::RequestOptions
34
+ }
35
+ )
36
+ end
37
+ def to_hash
38
+ end
39
+ end
40
+ end
41
+ end
@@ -44,8 +44,8 @@ module EInvoiceAPI
44
44
  sig { returns(T.nilable(String)) }
45
45
  attr_accessor :company_number
46
46
 
47
- # Company tax ID. For Belgium this is the VAT number. Must include the country
48
- # prefix
47
+ # Company tax ID (VAT number), including the country prefix. Stored in compact
48
+ # form: uppercased with separators removed, e.g. `BE0123456789`.
49
49
  sig { returns(T.nilable(String)) }
50
50
  attr_accessor :company_tax_id
51
51
 
@@ -86,11 +86,12 @@ module EInvoiceAPI
86
86
  end
87
87
  attr_writer :plan
88
88
 
89
- # Whether the tenant is registered on our SMP
89
+ # Legacy field. Does not show whether a Peppol ID is published: it is usually
90
+ # `false`, also for a tenant whose Peppol IDs are published.
90
91
  sig { returns(T.nilable(T::Boolean)) }
91
92
  attr_accessor :smp_registration
92
93
 
93
- # Date when the tenant was registered on SMP
94
+ # Legacy field. Does not show whether or when a Peppol ID was published.
94
95
  sig { returns(T.nilable(Time)) }
95
96
  attr_accessor :smp_registration_date
96
97
 
@@ -133,8 +134,8 @@ module EInvoiceAPI
133
134
  # Company number. For Belgium this is the CBE number or their EUID (European
134
135
  # Unique Identifier) number
135
136
  company_number: nil,
136
- # Company tax ID. For Belgium this is the VAT number. Must include the country
137
- # prefix
137
+ # Company tax ID (VAT number), including the country prefix. Stored in compact
138
+ # form: uppercased with separators removed, e.g. `BE0123456789`.
138
139
  company_tax_id: nil,
139
140
  # Zip code of the company
140
141
  company_zip: nil,
@@ -147,9 +148,10 @@ module EInvoiceAPI
147
148
  peppol_ids: nil,
148
149
  # Plan of the tenant
149
150
  plan: nil,
150
- # Whether the tenant is registered on our SMP
151
+ # Legacy field. Does not show whether a Peppol ID is published: it is usually
152
+ # `false`, also for a tenant whose Peppol IDs are published.
151
153
  smp_registration: nil,
152
- # Date when the tenant was registered on SMP
154
+ # Legacy field. Does not show whether or when a Peppol ID was published.
153
155
  smp_registration_date: nil
154
156
  )
155
157
  end
@@ -24,7 +24,9 @@ module EInvoiceAPI
24
24
  sig { returns(T.nilable(String)) }
25
25
  attr_accessor :payment_reference
26
26
 
27
- # SWIFT/BIC code of the bank
27
+ # The payment service provider identifier (BT-86): the BIC of the payee's bank, or
28
+ # `SE:BANKGIRO` / `SE:PLUSGIRO` when `bank_account_number` is a Swedish bankgiro
29
+ # or plusgiro number.
28
30
  sig { returns(T.nilable(String)) }
29
31
  attr_accessor :swift
30
32
 
@@ -44,7 +46,9 @@ module EInvoiceAPI
44
46
  # Structured payment reference or communication (e.g., structured communication
45
47
  # for Belgian bank transfers)
46
48
  payment_reference: nil,
47
- # SWIFT/BIC code of the bank
49
+ # The payment service provider identifier (BT-86): the BIC of the payee's bank, or
50
+ # `SE:BANKGIRO` / `SE:PLUSGIRO` when `bank_account_number` is a Swedish bankgiro
51
+ # or plusgiro number.
48
52
  swift: nil
49
53
  )
50
54
  end
@@ -0,0 +1,111 @@
1
+ # typed: strong
2
+
3
+ module EInvoiceAPI
4
+ module Models
5
+ class StatsRetrieveParams < EInvoiceAPI::Internal::Type::BaseModel
6
+ extend EInvoiceAPI::Internal::Type::RequestParameters::Converter
7
+ include EInvoiceAPI::Internal::Type::RequestParameters
8
+
9
+ OrHash =
10
+ T.type_alias do
11
+ T.any(
12
+ EInvoiceAPI::StatsRetrieveParams,
13
+ EInvoiceAPI::Internal::AnyHash
14
+ )
15
+ end
16
+
17
+ # Aggregation type: DAY, WEEK, or MONTH. Defaults to DAY.
18
+ sig do
19
+ returns(
20
+ T.nilable(EInvoiceAPI::StatsRetrieveParams::Aggregation::OrSymbol)
21
+ )
22
+ end
23
+ attr_accessor :aggregation
24
+
25
+ # End date in yyyy-mm-dd format. If not provided, queries to latest available
26
+ # data.
27
+ sig { returns(T.nilable(Date)) }
28
+ attr_accessor :end_date
29
+
30
+ # Start date in yyyy-mm-dd format. If not provided, queries from earliest
31
+ # available data.
32
+ sig { returns(T.nilable(Date)) }
33
+ attr_accessor :start_date
34
+
35
+ sig do
36
+ params(
37
+ aggregation:
38
+ T.nilable(EInvoiceAPI::StatsRetrieveParams::Aggregation::OrSymbol),
39
+ end_date: T.nilable(Date),
40
+ start_date: T.nilable(Date),
41
+ request_options: EInvoiceAPI::RequestOptions::OrHash
42
+ ).returns(T.attached_class)
43
+ end
44
+ def self.new(
45
+ # Aggregation type: DAY, WEEK, or MONTH. Defaults to DAY.
46
+ aggregation: nil,
47
+ # End date in yyyy-mm-dd format. If not provided, queries to latest available
48
+ # data.
49
+ end_date: nil,
50
+ # Start date in yyyy-mm-dd format. If not provided, queries from earliest
51
+ # available data.
52
+ start_date: nil,
53
+ request_options: {}
54
+ )
55
+ end
56
+
57
+ sig do
58
+ override.returns(
59
+ {
60
+ aggregation:
61
+ T.nilable(
62
+ EInvoiceAPI::StatsRetrieveParams::Aggregation::OrSymbol
63
+ ),
64
+ end_date: T.nilable(Date),
65
+ start_date: T.nilable(Date),
66
+ request_options: EInvoiceAPI::RequestOptions
67
+ }
68
+ )
69
+ end
70
+ def to_hash
71
+ end
72
+
73
+ # Aggregation type: DAY, WEEK, or MONTH. Defaults to DAY.
74
+ module Aggregation
75
+ extend EInvoiceAPI::Internal::Type::Enum
76
+
77
+ TaggedSymbol =
78
+ T.type_alias do
79
+ T.all(Symbol, EInvoiceAPI::StatsRetrieveParams::Aggregation)
80
+ end
81
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
82
+
83
+ DAY =
84
+ T.let(
85
+ :DAY,
86
+ EInvoiceAPI::StatsRetrieveParams::Aggregation::TaggedSymbol
87
+ )
88
+ WEEK =
89
+ T.let(
90
+ :WEEK,
91
+ EInvoiceAPI::StatsRetrieveParams::Aggregation::TaggedSymbol
92
+ )
93
+ MONTH =
94
+ T.let(
95
+ :MONTH,
96
+ EInvoiceAPI::StatsRetrieveParams::Aggregation::TaggedSymbol
97
+ )
98
+
99
+ sig do
100
+ override.returns(
101
+ T::Array[
102
+ EInvoiceAPI::StatsRetrieveParams::Aggregation::TaggedSymbol
103
+ ]
104
+ )
105
+ end
106
+ def self.values
107
+ end
108
+ end
109
+ end
110
+ end
111
+ end
@@ -0,0 +1,251 @@
1
+ # typed: strong
2
+
3
+ module EInvoiceAPI
4
+ module Models
5
+ class StatsRetrieveResponse < EInvoiceAPI::Internal::Type::BaseModel
6
+ OrHash =
7
+ T.type_alias do
8
+ T.any(
9
+ EInvoiceAPI::Models::StatsRetrieveResponse,
10
+ EInvoiceAPI::Internal::AnyHash
11
+ )
12
+ end
13
+
14
+ # List of action statistics, one entry per aggregation period per action
15
+ sig do
16
+ returns(T::Array[EInvoiceAPI::Models::StatsRetrieveResponse::Action])
17
+ end
18
+ attr_accessor :actions
19
+
20
+ # Aggregation type used
21
+ sig do
22
+ returns(
23
+ EInvoiceAPI::Models::StatsRetrieveResponse::Aggregation::TaggedSymbol
24
+ )
25
+ end
26
+ attr_accessor :aggregation
27
+
28
+ # Average daily usage (total actions / total days)
29
+ sig { returns(Float) }
30
+ attr_accessor :average_daily_usage
31
+
32
+ # End date of the period
33
+ sig { returns(Date) }
34
+ attr_accessor :period_end
35
+
36
+ # Start date of the period
37
+ sig { returns(Date) }
38
+ attr_accessor :period_start
39
+
40
+ # Tenant ID
41
+ sig { returns(String) }
42
+ attr_accessor :tenant_id
43
+
44
+ # Number of days in the period
45
+ sig { returns(Integer) }
46
+ attr_accessor :total_days
47
+
48
+ # Estimated days until credits run out (credit_balance / average_daily_usage). 0.0
49
+ # if average_daily_usage is 0 or credit_balance is None
50
+ sig { returns(T.nilable(Float)) }
51
+ attr_reader :budget_estimation_days
52
+
53
+ sig { params(budget_estimation_days: Float).void }
54
+ attr_writer :budget_estimation_days
55
+
56
+ # Statistics response for a tenant.
57
+ sig do
58
+ params(
59
+ actions:
60
+ T::Array[
61
+ EInvoiceAPI::Models::StatsRetrieveResponse::Action::OrHash
62
+ ],
63
+ aggregation:
64
+ EInvoiceAPI::Models::StatsRetrieveResponse::Aggregation::OrSymbol,
65
+ average_daily_usage: Float,
66
+ period_end: Date,
67
+ period_start: Date,
68
+ tenant_id: String,
69
+ total_days: Integer,
70
+ budget_estimation_days: Float
71
+ ).returns(T.attached_class)
72
+ end
73
+ def self.new(
74
+ # List of action statistics, one entry per aggregation period per action
75
+ actions:,
76
+ # Aggregation type used
77
+ aggregation:,
78
+ # Average daily usage (total actions / total days)
79
+ average_daily_usage:,
80
+ # End date of the period
81
+ period_end:,
82
+ # Start date of the period
83
+ period_start:,
84
+ # Tenant ID
85
+ tenant_id:,
86
+ # Number of days in the period
87
+ total_days:,
88
+ # Estimated days until credits run out (credit_balance / average_daily_usage). 0.0
89
+ # if average_daily_usage is 0 or credit_balance is None
90
+ budget_estimation_days: nil
91
+ )
92
+ end
93
+
94
+ sig do
95
+ override.returns(
96
+ {
97
+ actions:
98
+ T::Array[EInvoiceAPI::Models::StatsRetrieveResponse::Action],
99
+ aggregation:
100
+ EInvoiceAPI::Models::StatsRetrieveResponse::Aggregation::TaggedSymbol,
101
+ average_daily_usage: Float,
102
+ period_end: Date,
103
+ period_start: Date,
104
+ tenant_id: String,
105
+ total_days: Integer,
106
+ budget_estimation_days: Float
107
+ }
108
+ )
109
+ end
110
+ def to_hash
111
+ end
112
+
113
+ class Action < EInvoiceAPI::Internal::Type::BaseModel
114
+ OrHash =
115
+ T.type_alias do
116
+ T.any(
117
+ EInvoiceAPI::Models::StatsRetrieveResponse::Action,
118
+ EInvoiceAPI::Internal::AnyHash
119
+ )
120
+ end
121
+
122
+ # Type of action
123
+ sig do
124
+ returns(
125
+ EInvoiceAPI::Models::StatsRetrieveResponse::Action::Action::TaggedSymbol
126
+ )
127
+ end
128
+ attr_accessor :action
129
+
130
+ # Number of occurrences of this action in this period
131
+ sig { returns(Integer) }
132
+ attr_accessor :count
133
+
134
+ # The date/period this stat represents. For DAY aggregation this is the specific
135
+ # day, for WEEK it's the start of the week, for MONTH it's the first day of the
136
+ # month
137
+ sig { returns(Date) }
138
+ attr_accessor :stat_date
139
+
140
+ # Statistics for a specific action in a specific time period.
141
+ sig do
142
+ params(
143
+ action:
144
+ EInvoiceAPI::Models::StatsRetrieveResponse::Action::Action::OrSymbol,
145
+ count: Integer,
146
+ stat_date: Date
147
+ ).returns(T.attached_class)
148
+ end
149
+ def self.new(
150
+ # Type of action
151
+ action:,
152
+ # Number of occurrences of this action in this period
153
+ count:,
154
+ # The date/period this stat represents. For DAY aggregation this is the specific
155
+ # day, for WEEK it's the start of the week, for MONTH it's the first day of the
156
+ # month
157
+ stat_date:
158
+ )
159
+ end
160
+
161
+ sig do
162
+ override.returns(
163
+ {
164
+ action:
165
+ EInvoiceAPI::Models::StatsRetrieveResponse::Action::Action::TaggedSymbol,
166
+ count: Integer,
167
+ stat_date: Date
168
+ }
169
+ )
170
+ end
171
+ def to_hash
172
+ end
173
+
174
+ # Type of action
175
+ module Action
176
+ extend EInvoiceAPI::Internal::Type::Enum
177
+
178
+ TaggedSymbol =
179
+ T.type_alias do
180
+ T.all(
181
+ Symbol,
182
+ EInvoiceAPI::Models::StatsRetrieveResponse::Action::Action
183
+ )
184
+ end
185
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
186
+
187
+ DOCUMENT_SENT =
188
+ T.let(
189
+ :DOCUMENT_SENT,
190
+ EInvoiceAPI::Models::StatsRetrieveResponse::Action::Action::TaggedSymbol
191
+ )
192
+ DOCUMENT_RECEIVED =
193
+ T.let(
194
+ :DOCUMENT_RECEIVED,
195
+ EInvoiceAPI::Models::StatsRetrieveResponse::Action::Action::TaggedSymbol
196
+ )
197
+
198
+ sig do
199
+ override.returns(
200
+ T::Array[
201
+ EInvoiceAPI::Models::StatsRetrieveResponse::Action::Action::TaggedSymbol
202
+ ]
203
+ )
204
+ end
205
+ def self.values
206
+ end
207
+ end
208
+ end
209
+
210
+ # Aggregation type used
211
+ module Aggregation
212
+ extend EInvoiceAPI::Internal::Type::Enum
213
+
214
+ TaggedSymbol =
215
+ T.type_alias do
216
+ T.all(
217
+ Symbol,
218
+ EInvoiceAPI::Models::StatsRetrieveResponse::Aggregation
219
+ )
220
+ end
221
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
222
+
223
+ DAY =
224
+ T.let(
225
+ :DAY,
226
+ EInvoiceAPI::Models::StatsRetrieveResponse::Aggregation::TaggedSymbol
227
+ )
228
+ WEEK =
229
+ T.let(
230
+ :WEEK,
231
+ EInvoiceAPI::Models::StatsRetrieveResponse::Aggregation::TaggedSymbol
232
+ )
233
+ MONTH =
234
+ T.let(
235
+ :MONTH,
236
+ EInvoiceAPI::Models::StatsRetrieveResponse::Aggregation::TaggedSymbol
237
+ )
238
+
239
+ sig do
240
+ override.returns(
241
+ T::Array[
242
+ EInvoiceAPI::Models::StatsRetrieveResponse::Aggregation::TaggedSymbol
243
+ ]
244
+ )
245
+ end
246
+ def self.values
247
+ end
248
+ end
249
+ end
250
+ end
251
+ end
@@ -23,6 +23,8 @@ module EInvoiceAPI
23
23
  sig { returns(T::Array[EInvoiceAPI::UblDocumentValidation::Issue]) }
24
24
  attr_accessor :issues
25
25
 
26
+ # The UBL document as an XML string, returned whenever it could be generated, also
27
+ # when the document is not valid. Only is_valid tells whether it is valid.
26
28
  sig { returns(T.nilable(String)) }
27
29
  attr_accessor :ubl_document
28
30
 
@@ -35,7 +37,15 @@ module EInvoiceAPI
35
37
  ubl_document: T.nilable(String)
36
38
  ).returns(T.attached_class)
37
39
  end
38
- def self.new(id:, file_name:, is_valid:, issues:, ubl_document: nil)
40
+ def self.new(
41
+ id:,
42
+ file_name:,
43
+ is_valid:,
44
+ issues:,
45
+ # The UBL document as an XML string, returned whenever it could be generated, also
46
+ # when the document is not valid. Only is_valid tells whether it is valid.
47
+ ubl_document: nil
48
+ )
39
49
  end
40
50
 
41
51
  sig do
@@ -0,0 +1,38 @@
1
+ # typed: strong
2
+
3
+ module EInvoiceAPI
4
+ module Models
5
+ class WebhookHistoryParams < EInvoiceAPI::Internal::Type::BaseModel
6
+ extend EInvoiceAPI::Internal::Type::RequestParameters::Converter
7
+ include EInvoiceAPI::Internal::Type::RequestParameters
8
+
9
+ OrHash =
10
+ T.type_alias do
11
+ T.any(
12
+ EInvoiceAPI::WebhookHistoryParams,
13
+ EInvoiceAPI::Internal::AnyHash
14
+ )
15
+ end
16
+
17
+ sig { returns(String) }
18
+ attr_accessor :webhook_id
19
+
20
+ sig do
21
+ params(
22
+ webhook_id: String,
23
+ request_options: EInvoiceAPI::RequestOptions::OrHash
24
+ ).returns(T.attached_class)
25
+ end
26
+ def self.new(webhook_id:, request_options: {})
27
+ end
28
+
29
+ sig do
30
+ override.returns(
31
+ { webhook_id: String, request_options: EInvoiceAPI::RequestOptions }
32
+ )
33
+ end
34
+ def to_hash
35
+ end
36
+ end
37
+ end
38
+ end
@@ -0,0 +1,32 @@
1
+ # typed: strong
2
+
3
+ module EInvoiceAPI
4
+ module Models
5
+ class WebhookHistoryResponse < EInvoiceAPI::Internal::Type::BaseModel
6
+ OrHash =
7
+ T.type_alias do
8
+ T.any(
9
+ EInvoiceAPI::Models::WebhookHistoryResponse,
10
+ EInvoiceAPI::Internal::AnyHash
11
+ )
12
+ end
13
+
14
+ sig { returns(T::Array[T::Hash[Symbol, T.anything]]) }
15
+ attr_accessor :history
16
+
17
+ sig do
18
+ params(history: T::Array[T::Hash[Symbol, T.anything]]).returns(
19
+ T.attached_class
20
+ )
21
+ end
22
+ def self.new(history:)
23
+ end
24
+
25
+ sig do
26
+ override.returns({ history: T::Array[T::Hash[Symbol, T.anything]] })
27
+ end
28
+ def to_hash
29
+ end
30
+ end
31
+ end
32
+ end
@@ -0,0 +1,57 @@
1
+ # typed: strong
2
+
3
+ module EInvoiceAPI
4
+ module Models
5
+ class WebhookTestParams < EInvoiceAPI::Internal::Type::BaseModel
6
+ extend EInvoiceAPI::Internal::Type::RequestParameters::Converter
7
+ include EInvoiceAPI::Internal::Type::RequestParameters
8
+
9
+ OrHash =
10
+ T.type_alias do
11
+ T.any(EInvoiceAPI::WebhookTestParams, EInvoiceAPI::Internal::AnyHash)
12
+ end
13
+
14
+ sig { returns(String) }
15
+ attr_accessor :webhook_id
16
+
17
+ # Custom event data payload
18
+ sig { returns(T::Hash[Symbol, T.anything]) }
19
+ attr_accessor :data
20
+
21
+ # Must be valid WebhookEventType
22
+ sig { returns(String) }
23
+ attr_accessor :event_type
24
+
25
+ sig do
26
+ params(
27
+ webhook_id: String,
28
+ data: T::Hash[Symbol, T.anything],
29
+ event_type: String,
30
+ request_options: EInvoiceAPI::RequestOptions::OrHash
31
+ ).returns(T.attached_class)
32
+ end
33
+ def self.new(
34
+ webhook_id:,
35
+ # Custom event data payload
36
+ data:,
37
+ # Must be valid WebhookEventType
38
+ event_type:,
39
+ request_options: {}
40
+ )
41
+ end
42
+
43
+ sig do
44
+ override.returns(
45
+ {
46
+ webhook_id: String,
47
+ data: T::Hash[Symbol, T.anything],
48
+ event_type: String,
49
+ request_options: EInvoiceAPI::RequestOptions
50
+ }
51
+ )
52
+ end
53
+ def to_hash
54
+ end
55
+ end
56
+ end
57
+ end
@@ -0,0 +1,57 @@
1
+ # typed: strong
2
+
3
+ module EInvoiceAPI
4
+ module Models
5
+ class WebhookTestResponse < EInvoiceAPI::Internal::Type::BaseModel
6
+ OrHash =
7
+ T.type_alias do
8
+ T.any(
9
+ EInvoiceAPI::Models::WebhookTestResponse,
10
+ EInvoiceAPI::Internal::AnyHash
11
+ )
12
+ end
13
+
14
+ # Descriptive message about the test result
15
+ sig { returns(String) }
16
+ attr_accessor :message
17
+
18
+ # Whether the test completed successfully
19
+ sig { returns(T::Boolean) }
20
+ attr_accessor :success
21
+
22
+ # Result from process_webhook_task
23
+ sig { returns(T::Hash[Symbol, T.anything]) }
24
+ attr_accessor :webhook_delivery_result
25
+
26
+ # Schema for webhook test response.
27
+ sig do
28
+ params(
29
+ message: String,
30
+ success: T::Boolean,
31
+ webhook_delivery_result: T::Hash[Symbol, T.anything]
32
+ ).returns(T.attached_class)
33
+ end
34
+ def self.new(
35
+ # Descriptive message about the test result
36
+ message:,
37
+ # Whether the test completed successfully
38
+ success:,
39
+ # Result from process_webhook_task
40
+ webhook_delivery_result:
41
+ )
42
+ end
43
+
44
+ sig do
45
+ override.returns(
46
+ {
47
+ message: String,
48
+ success: T::Boolean,
49
+ webhook_delivery_result: T::Hash[Symbol, T.anything]
50
+ }
51
+ )
52
+ end
53
+ def to_hash
54
+ end
55
+ end
56
+ end
57
+ end