kintsugi_sdk 5.7.0 → 5.7.1

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 (77) hide show
  1. checksums.yaml +4 -4
  2. data/lib/kintsugi_sdk/addressvalidation.rb +21 -21
  3. data/lib/kintsugi_sdk/customers.rb +55 -55
  4. data/lib/kintsugi_sdk/exemptions.rb +44 -44
  5. data/lib/kintsugi_sdk/models/errors/apierror.rb +1 -1
  6. data/lib/kintsugi_sdk/models/errors/backend_src_address_validation_responses_validationerrorresponse.rb +1 -1
  7. data/lib/kintsugi_sdk/models/errors/backend_src_customers_responses_validationerrorresponse.rb +1 -1
  8. data/lib/kintsugi_sdk/models/errors/backend_src_exemptions_responses_validationerrorresponse.rb +1 -1
  9. data/lib/kintsugi_sdk/models/errors/backend_src_products_schemas_responses_validationerrorresponse.rb +1 -1
  10. data/lib/kintsugi_sdk/models/errors/backend_src_tax_estimation_responses_validationerrorresponse.rb +1 -1
  11. data/lib/kintsugi_sdk/models/errors/backend_src_transactions_responses_validationerrorresponse.rb +1 -1
  12. data/lib/kintsugi_sdk/models/errors/errorresponse.rb +1 -1
  13. data/lib/kintsugi_sdk/models/errors/httpvalidationerror.rb +1 -1
  14. data/lib/kintsugi_sdk/models/ops/get_exemptions_v1_exemptions_get_request.rb +2 -2
  15. data/lib/kintsugi_sdk/models/shared/backend_src_address_validation_responses_validationerroritem.rb +2 -2
  16. data/lib/kintsugi_sdk/models/shared/backend_src_customers_responses_validationerroritem.rb +2 -2
  17. data/lib/kintsugi_sdk/models/shared/backend_src_exemptions_responses_validationerroritem.rb +2 -2
  18. data/lib/kintsugi_sdk/models/shared/backend_src_exemptions_schemas_exemption_exemptionread.rb +6 -2
  19. data/lib/kintsugi_sdk/models/shared/backend_src_exemptions_schemas_exemption_exemptionread.rbi +2 -0
  20. data/lib/kintsugi_sdk/models/shared/backend_src_exemptions_serializers_exemptionread.rb +6 -2
  21. data/lib/kintsugi_sdk/models/shared/backend_src_exemptions_serializers_exemptionread.rbi +2 -0
  22. data/lib/kintsugi_sdk/models/shared/backend_src_products_schemas_responses_validationerroritem.rb +2 -2
  23. data/lib/kintsugi_sdk/models/shared/backend_src_tax_estimation_responses_validationerroritem.rb +2 -2
  24. data/lib/kintsugi_sdk/models/shared/backend_src_transactions_responses_validationerroritem.rb +2 -2
  25. data/lib/kintsugi_sdk/models/shared/currencyenum.rb +1 -1
  26. data/lib/kintsugi_sdk/models/shared/exemptioncreate.rb +6 -2
  27. data/lib/kintsugi_sdk/models/shared/exemptioncreate.rbi +2 -0
  28. data/lib/kintsugi_sdk/models/shared/exemptionsourceenum.rb +4 -0
  29. data/lib/kintsugi_sdk/models/shared/exemptiontype.rb +1 -0
  30. data/lib/kintsugi_sdk/models/shared/nexusresponse.rb +31 -21
  31. data/lib/kintsugi_sdk/models/shared/nexusresponse.rbi +6 -4
  32. data/lib/kintsugi_sdk/models/shared/productread.rb +4 -6
  33. data/lib/kintsugi_sdk/models/shared/relatedentitytype.rb +4 -0
  34. data/lib/kintsugi_sdk/models/shared/sourceenum.rb +8 -0
  35. data/lib/kintsugi_sdk/models/shared/taxexemptionenum.rb +1 -0
  36. data/lib/kintsugi_sdk/models/shared/taxitemreturnreasonenum.rb +2 -0
  37. data/lib/kintsugi_sdk/models/shared/taxtypeenum.rb +7 -3
  38. data/lib/kintsugi_sdk/models/shared/transactioncreate.rb +8 -4
  39. data/lib/kintsugi_sdk/models/shared/transactioncreate.rbi +2 -0
  40. data/lib/kintsugi_sdk/models/shared/{exemption.rb → transactionembeddedexemption.rb} +17 -4
  41. data/lib/kintsugi_sdk/models/shared/{exemption.rbi → transactionembeddedexemption.rbi} +4 -2
  42. data/lib/kintsugi_sdk/models/shared/transactionestimatepublicrequest.rb +1 -1
  43. data/lib/kintsugi_sdk/models/shared/transactionestimateresponse.rb +1 -1
  44. data/lib/kintsugi_sdk/models/shared/transactionitembuilder.rb +6 -2
  45. data/lib/kintsugi_sdk/models/shared/transactionitembuilder.rbi +2 -0
  46. data/lib/kintsugi_sdk/models/shared/transactionitemcreateupdate.rb +6 -2
  47. data/lib/kintsugi_sdk/models/shared/transactionitemcreateupdate.rbi +2 -0
  48. data/lib/kintsugi_sdk/models/shared/transactionitemestimatebase.rb +1 -3
  49. data/lib/kintsugi_sdk/models/shared/transactionitemestimateresponse.rb +1 -3
  50. data/lib/kintsugi_sdk/models/shared/transactionitemread.rb +15 -3
  51. data/lib/kintsugi_sdk/models/shared/transactionitemread.rbi +6 -0
  52. data/lib/kintsugi_sdk/models/shared/transactionpublicrequest.rb +8 -4
  53. data/lib/kintsugi_sdk/models/shared/transactionpublicrequest.rbi +2 -0
  54. data/lib/kintsugi_sdk/models/shared/transactionread.rb +21 -5
  55. data/lib/kintsugi_sdk/models/shared/transactionread.rbi +8 -0
  56. data/lib/kintsugi_sdk/models/shared/transactionupdate.rb +8 -4
  57. data/lib/kintsugi_sdk/models/shared/transactionupdate.rbi +2 -0
  58. data/lib/kintsugi_sdk/models/shared/usetaxregistrationpath.rb +24 -0
  59. data/lib/kintsugi_sdk/models/shared/usetaxregistrationpath.rbi +11 -0
  60. data/lib/kintsugi_sdk/models/shared.rb +2 -1
  61. data/lib/kintsugi_sdk/nexus.rb +7 -7
  62. data/lib/kintsugi_sdk/openapisdk.rb +5 -5
  63. data/lib/kintsugi_sdk/products.rb +19 -19
  64. data/lib/kintsugi_sdk/sdk_hooks/hooks.rb +1 -1
  65. data/lib/kintsugi_sdk/sdk_hooks/types.rb +14 -14
  66. data/lib/kintsugi_sdk/sdkconfiguration.rb +17 -17
  67. data/lib/kintsugi_sdk/taxestimation.rb +11 -11
  68. data/lib/kintsugi_sdk/transactions.rb +51 -51
  69. data/lib/kintsugi_sdk/utils/forms.rb +23 -23
  70. data/lib/kintsugi_sdk/utils/headers.rb +4 -4
  71. data/lib/kintsugi_sdk/utils/query_params.rb +14 -14
  72. data/lib/kintsugi_sdk/utils/request_bodies.rb +7 -7
  73. data/lib/kintsugi_sdk/utils/retries.rb +5 -5
  74. data/lib/kintsugi_sdk/utils/security.rb +16 -16
  75. data/lib/kintsugi_sdk/utils/url.rb +6 -6
  76. data/lib/kintsugi_sdk/utils/utils.rb +31 -31
  77. metadata +6 -4
@@ -23,7 +23,7 @@ module KintsugiSDK
23
23
 
24
24
  end
25
25
 
26
- sig { params(base_url: String, url_variables: T.nilable(T::Hash[Symbol, T.any(String, T::Enum)])).returns(String) }
26
+ sig { params(base_url: ::String, url_variables: T.nilable(T::Hash[::Symbol, T.any(::String, T::Enum)])).returns(::String) }
27
27
  def get_url(base_url:, url_variables: nil)
28
28
  sd_base_url, sd_options = @sdk_configuration.get_server_details
29
29
 
@@ -41,7 +41,7 @@ module KintsugiSDK
41
41
 
42
42
 
43
43
 
44
- sig { params(request: Models::Ops::GetExemptionsV1ExemptionsGetRequest, timeout_ms: T.nilable(Integer), http_headers: T.nilable(T::Hash[T.any(String, Symbol), String])).returns(Models::Shared::FastapiPaginationDefaultPageExemptionRead2) }
44
+ sig { params(request: Models::Ops::GetExemptionsV1ExemptionsGetRequest, timeout_ms: T.nilable(::Integer), http_headers: T.nilable(T::Hash[T.any(::String, ::Symbol), ::String])).returns(Models::Shared::FastapiPaginationDefaultPageExemptionRead2) }
45
45
  def list(request:, timeout_ms: nil, http_headers: nil)
46
46
  # list - Get exemptions
47
47
  # Retrieve a list of exemptions based on filters.
@@ -49,7 +49,7 @@ module KintsugiSDK
49
49
  base_url = Utils.template_url(url, params)
50
50
  url = "#{base_url}/v1/exemptions"
51
51
  headers = Utils.get_headers(request)
52
- headers = T.cast(headers, T::Hash[String, String])
52
+ headers = T.cast(headers, T::Hash[::String, ::String])
53
53
  query_params = Utils.get_query_params(Models::Ops::GetExemptionsV1ExemptionsGetRequest, request, nil)
54
54
  headers['Accept'] = 'application/json'
55
55
  headers['user-agent'] = @sdk_configuration.user_agent
@@ -70,7 +70,7 @@ module KintsugiSDK
70
70
  security_source: @sdk_configuration.security_source
71
71
  )
72
72
 
73
- error = T.let(nil, T.nilable(StandardError))
73
+ error = T.let(nil, T.nilable(::StandardError))
74
74
  http_response = T.let(nil, T.nilable(Faraday::Response))
75
75
 
76
76
 
@@ -91,7 +91,7 @@ module KintsugiSDK
91
91
  request: req
92
92
  )
93
93
  end
94
- rescue StandardError => e
94
+ rescue ::StandardError => e
95
95
  error = e
96
96
  ensure
97
97
  if http_response.nil? || Utils.error_status?(http_response.status)
@@ -127,7 +127,7 @@ module KintsugiSDK
127
127
  response: http_response
128
128
  )
129
129
  response_data = http_response.env.response_body
130
- obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Shared::FastapiPaginationDefaultPageExemptionRead2)
130
+ obj = Crystalline.unmarshal_json(::JSON.parse(response_data), Models::Shared::FastapiPaginationDefaultPageExemptionRead2)
131
131
 
132
132
  return obj
133
133
  else
@@ -142,7 +142,7 @@ module KintsugiSDK
142
142
  response: http_response
143
143
  )
144
144
  response_data = http_response.env.response_body
145
- obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Errors::ErrorResponse)
145
+ obj = Crystalline.unmarshal_json(::JSON.parse(response_data), Models::Errors::ErrorResponse)
146
146
  raise obj
147
147
  else
148
148
  raise ::KintsugiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received'
@@ -156,7 +156,7 @@ module KintsugiSDK
156
156
  response: http_response
157
157
  )
158
158
  response_data = http_response.env.response_body
159
- obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Errors::BackendSrcExemptionsResponsesValidationErrorResponse)
159
+ obj = Crystalline.unmarshal_json(::JSON.parse(response_data), Models::Errors::BackendSrcExemptionsResponsesValidationErrorResponse)
160
160
  raise obj
161
161
  else
162
162
  raise ::KintsugiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received'
@@ -170,7 +170,7 @@ module KintsugiSDK
170
170
  response: http_response
171
171
  )
172
172
  response_data = http_response.env.response_body
173
- obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Errors::ErrorResponse)
173
+ obj = Crystalline.unmarshal_json(::JSON.parse(response_data), Models::Errors::ErrorResponse)
174
174
  raise obj
175
175
  else
176
176
  raise ::KintsugiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received'
@@ -186,7 +186,7 @@ module KintsugiSDK
186
186
  end
187
187
 
188
188
 
189
- sig { params(request: Models::Ops::CreateExemptionV1ExemptionsPostRequest, timeout_ms: T.nilable(Integer), http_headers: T.nilable(T::Hash[T.any(String, Symbol), String])).returns(Models::Shared::BackendSrcExemptionsSerializersExemptionRead) }
189
+ sig { params(request: Models::Ops::CreateExemptionV1ExemptionsPostRequest, timeout_ms: T.nilable(::Integer), http_headers: T.nilable(T::Hash[T.any(::String, ::Symbol), ::String])).returns(Models::Shared::BackendSrcExemptionsSerializersExemptionRead) }
190
190
  def create(request:, timeout_ms: nil, http_headers: nil)
191
191
  # create - Create exemption
192
192
  # The Create Exemption API allows you to create a new exemption record.
@@ -196,15 +196,15 @@ module KintsugiSDK
196
196
  base_url = Utils.template_url(url, params)
197
197
  url = "#{base_url}/v1/exemptions"
198
198
  headers = Utils.get_headers(request)
199
- headers = T.cast(headers, T::Hash[String, String])
199
+ headers = T.cast(headers, T::Hash[::String, ::String])
200
200
  req_content_type, data, form = Utils.serialize_request_body(request, false, false, :exemption_create, :json)
201
201
  headers['content-type'] = req_content_type
202
- raise StandardError, 'request body is required' if data.nil? && form.nil?
202
+ raise ::StandardError, 'request body is required' if data.nil? && form.nil?
203
203
 
204
204
  if form && !form.empty?
205
205
  body = Utils.encode_form(form)
206
206
  elsif Utils.match_content_type(req_content_type, 'application/x-www-form-urlencoded')
207
- body = URI.encode_www_form(T.cast(data, T::Hash[Symbol, Object]))
207
+ body = ::URI.encode_www_form(T.cast(data, T::Hash[::Symbol, ::Object]))
208
208
  else
209
209
  body = data
210
210
  end
@@ -227,7 +227,7 @@ module KintsugiSDK
227
227
  security_source: @sdk_configuration.security_source
228
228
  )
229
229
 
230
- error = T.let(nil, T.nilable(StandardError))
230
+ error = T.let(nil, T.nilable(::StandardError))
231
231
  http_response = T.let(nil, T.nilable(Faraday::Response))
232
232
 
233
233
 
@@ -248,7 +248,7 @@ module KintsugiSDK
248
248
  request: req
249
249
  )
250
250
  end
251
- rescue StandardError => e
251
+ rescue ::StandardError => e
252
252
  error = e
253
253
  ensure
254
254
  if http_response.nil? || Utils.error_status?(http_response.status)
@@ -284,7 +284,7 @@ module KintsugiSDK
284
284
  response: http_response
285
285
  )
286
286
  response_data = http_response.env.response_body
287
- obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Shared::BackendSrcExemptionsSerializersExemptionRead)
287
+ obj = Crystalline.unmarshal_json(::JSON.parse(response_data), Models::Shared::BackendSrcExemptionsSerializersExemptionRead)
288
288
 
289
289
  return obj
290
290
  else
@@ -299,7 +299,7 @@ module KintsugiSDK
299
299
  response: http_response
300
300
  )
301
301
  response_data = http_response.env.response_body
302
- obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Errors::ErrorResponse)
302
+ obj = Crystalline.unmarshal_json(::JSON.parse(response_data), Models::Errors::ErrorResponse)
303
303
  raise obj
304
304
  else
305
305
  raise ::KintsugiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received'
@@ -313,7 +313,7 @@ module KintsugiSDK
313
313
  response: http_response
314
314
  )
315
315
  response_data = http_response.env.response_body
316
- obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Errors::BackendSrcExemptionsResponsesValidationErrorResponse)
316
+ obj = Crystalline.unmarshal_json(::JSON.parse(response_data), Models::Errors::BackendSrcExemptionsResponsesValidationErrorResponse)
317
317
  raise obj
318
318
  else
319
319
  raise ::KintsugiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received'
@@ -327,7 +327,7 @@ module KintsugiSDK
327
327
  response: http_response
328
328
  )
329
329
  response_data = http_response.env.response_body
330
- obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Errors::ErrorResponse)
330
+ obj = Crystalline.unmarshal_json(::JSON.parse(response_data), Models::Errors::ErrorResponse)
331
331
  raise obj
332
332
  else
333
333
  raise ::KintsugiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received'
@@ -343,7 +343,7 @@ module KintsugiSDK
343
343
  end
344
344
 
345
345
 
346
- sig { params(request: Models::Ops::GetExemptionByIdV1ExemptionsExemptionIdGetRequest, timeout_ms: T.nilable(Integer), http_headers: T.nilable(T::Hash[T.any(String, Symbol), String])).returns(Models::Shared::BackendSrcExemptionsSchemasExemptionExemptionRead) }
346
+ sig { params(request: Models::Ops::GetExemptionByIdV1ExemptionsExemptionIdGetRequest, timeout_ms: T.nilable(::Integer), http_headers: T.nilable(T::Hash[T.any(::String, ::Symbol), ::String])).returns(Models::Shared::BackendSrcExemptionsSchemasExemptionExemptionRead) }
347
347
  def get(request:, timeout_ms: nil, http_headers: nil)
348
348
  # get - Get exemption by id
349
349
  # The Get Exemption By ID API retrieves a specific exemption record by
@@ -359,7 +359,7 @@ module KintsugiSDK
359
359
  request
360
360
  )
361
361
  headers = Utils.get_headers(request)
362
- headers = T.cast(headers, T::Hash[String, String])
362
+ headers = T.cast(headers, T::Hash[::String, ::String])
363
363
  headers['Accept'] = 'application/json'
364
364
  headers['user-agent'] = @sdk_configuration.user_agent
365
365
 
@@ -379,7 +379,7 @@ module KintsugiSDK
379
379
  security_source: @sdk_configuration.security_source
380
380
  )
381
381
 
382
- error = T.let(nil, T.nilable(StandardError))
382
+ error = T.let(nil, T.nilable(::StandardError))
383
383
  http_response = T.let(nil, T.nilable(Faraday::Response))
384
384
 
385
385
 
@@ -399,7 +399,7 @@ module KintsugiSDK
399
399
  request: req
400
400
  )
401
401
  end
402
- rescue StandardError => e
402
+ rescue ::StandardError => e
403
403
  error = e
404
404
  ensure
405
405
  if http_response.nil? || Utils.error_status?(http_response.status)
@@ -435,7 +435,7 @@ module KintsugiSDK
435
435
  response: http_response
436
436
  )
437
437
  response_data = http_response.env.response_body
438
- obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Shared::BackendSrcExemptionsSchemasExemptionExemptionRead)
438
+ obj = Crystalline.unmarshal_json(::JSON.parse(response_data), Models::Shared::BackendSrcExemptionsSchemasExemptionExemptionRead)
439
439
 
440
440
  return obj
441
441
  else
@@ -450,7 +450,7 @@ module KintsugiSDK
450
450
  response: http_response
451
451
  )
452
452
  response_data = http_response.env.response_body
453
- obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Errors::ErrorResponse)
453
+ obj = Crystalline.unmarshal_json(::JSON.parse(response_data), Models::Errors::ErrorResponse)
454
454
  raise obj
455
455
  else
456
456
  raise ::KintsugiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received'
@@ -464,7 +464,7 @@ module KintsugiSDK
464
464
  response: http_response
465
465
  )
466
466
  response_data = http_response.env.response_body
467
- obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Errors::BackendSrcExemptionsResponsesValidationErrorResponse)
467
+ obj = Crystalline.unmarshal_json(::JSON.parse(response_data), Models::Errors::BackendSrcExemptionsResponsesValidationErrorResponse)
468
468
  raise obj
469
469
  else
470
470
  raise ::KintsugiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received'
@@ -478,7 +478,7 @@ module KintsugiSDK
478
478
  response: http_response
479
479
  )
480
480
  response_data = http_response.env.response_body
481
- obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Errors::ErrorResponse)
481
+ obj = Crystalline.unmarshal_json(::JSON.parse(response_data), Models::Errors::ErrorResponse)
482
482
  raise obj
483
483
  else
484
484
  raise ::KintsugiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received'
@@ -494,7 +494,7 @@ module KintsugiSDK
494
494
  end
495
495
 
496
496
 
497
- sig { params(request: Models::Ops::GetExemptionAttachmentsRequest, timeout_ms: T.nilable(Integer), http_headers: T.nilable(T::Hash[T.any(String, Symbol), String])).returns(T::Array[Models::Shared::AttachmentRead]) }
497
+ sig { params(request: Models::Ops::GetExemptionAttachmentsRequest, timeout_ms: T.nilable(::Integer), http_headers: T.nilable(T::Hash[T.any(::String, ::Symbol), ::String])).returns(T::Array[Models::Shared::AttachmentRead]) }
498
498
  def get_attachments(request:, timeout_ms: nil, http_headers: nil)
499
499
  # get_attachments - Get attachments for exemption
500
500
  # The Get Attachments for Exemption API retrieves all
@@ -510,7 +510,7 @@ module KintsugiSDK
510
510
  request
511
511
  )
512
512
  headers = Utils.get_headers(request)
513
- headers = T.cast(headers, T::Hash[String, String])
513
+ headers = T.cast(headers, T::Hash[::String, ::String])
514
514
  headers['Accept'] = 'application/json'
515
515
  headers['user-agent'] = @sdk_configuration.user_agent
516
516
 
@@ -530,7 +530,7 @@ module KintsugiSDK
530
530
  security_source: @sdk_configuration.security_source
531
531
  )
532
532
 
533
- error = T.let(nil, T.nilable(StandardError))
533
+ error = T.let(nil, T.nilable(::StandardError))
534
534
  http_response = T.let(nil, T.nilable(Faraday::Response))
535
535
 
536
536
 
@@ -550,7 +550,7 @@ module KintsugiSDK
550
550
  request: req
551
551
  )
552
552
  end
553
- rescue StandardError => e
553
+ rescue ::StandardError => e
554
554
  error = e
555
555
  ensure
556
556
  if http_response.nil? || Utils.error_status?(http_response.status)
@@ -586,7 +586,7 @@ module KintsugiSDK
586
586
  response: http_response
587
587
  )
588
588
  response_data = http_response.env.response_body
589
- obj = Crystalline.unmarshal_json(JSON.parse(response_data), Crystalline::Array.new(Models::Shared::AttachmentRead))
589
+ obj = Crystalline.unmarshal_json(::JSON.parse(response_data), Crystalline::Array.new(Models::Shared::AttachmentRead))
590
590
 
591
591
  return obj
592
592
  else
@@ -601,7 +601,7 @@ module KintsugiSDK
601
601
  response: http_response
602
602
  )
603
603
  response_data = http_response.env.response_body
604
- obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Errors::ErrorResponse)
604
+ obj = Crystalline.unmarshal_json(::JSON.parse(response_data), Models::Errors::ErrorResponse)
605
605
  raise obj
606
606
  else
607
607
  raise ::KintsugiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received'
@@ -615,7 +615,7 @@ module KintsugiSDK
615
615
  response: http_response
616
616
  )
617
617
  response_data = http_response.env.response_body
618
- obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Errors::BackendSrcExemptionsResponsesValidationErrorResponse)
618
+ obj = Crystalline.unmarshal_json(::JSON.parse(response_data), Models::Errors::BackendSrcExemptionsResponsesValidationErrorResponse)
619
619
  raise obj
620
620
  else
621
621
  raise ::KintsugiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received'
@@ -631,7 +631,7 @@ module KintsugiSDK
631
631
  end
632
632
 
633
633
 
634
- sig { params(request: Models::Ops::UploadExemptionCertRequest, timeout_ms: T.nilable(Integer), http_headers: T.nilable(T::Hash[T.any(String, Symbol), String])).returns(Models::Shared::AttachmentRead) }
634
+ sig { params(request: Models::Ops::UploadExemptionCertRequest, timeout_ms: T.nilable(::Integer), http_headers: T.nilable(T::Hash[T.any(::String, ::Symbol), ::String])).returns(Models::Shared::AttachmentRead) }
635
635
  def upload_certificate(request:, timeout_ms: nil, http_headers: nil)
636
636
  # upload_certificate - Upload exemption certificate
637
637
  # The Upload Exemption Certificate API allows you
@@ -647,15 +647,15 @@ module KintsugiSDK
647
647
  request
648
648
  )
649
649
  headers = Utils.get_headers(request)
650
- headers = T.cast(headers, T::Hash[String, String])
650
+ headers = T.cast(headers, T::Hash[::String, ::String])
651
651
  req_content_type, data, form = Utils.serialize_request_body(request, false, false, :body_upload_exemption_certificate_v1_exemptions_exemption_id_attachments_post, :multipart)
652
652
  headers['content-type'] = req_content_type
653
- raise StandardError, 'request body is required' if data.nil? && form.nil?
653
+ raise ::StandardError, 'request body is required' if data.nil? && form.nil?
654
654
 
655
655
  if form && !form.empty?
656
656
  body = Utils.encode_form(form)
657
657
  elsif Utils.match_content_type(req_content_type, 'application/x-www-form-urlencoded')
658
- body = URI.encode_www_form(T.cast(data, T::Hash[Symbol, Object]))
658
+ body = ::URI.encode_www_form(T.cast(data, T::Hash[::Symbol, ::Object]))
659
659
  else
660
660
  body = data
661
661
  end
@@ -678,7 +678,7 @@ module KintsugiSDK
678
678
  security_source: @sdk_configuration.security_source
679
679
  )
680
680
 
681
- error = T.let(nil, T.nilable(StandardError))
681
+ error = T.let(nil, T.nilable(::StandardError))
682
682
  http_response = T.let(nil, T.nilable(Faraday::Response))
683
683
 
684
684
 
@@ -699,7 +699,7 @@ module KintsugiSDK
699
699
  request: req
700
700
  )
701
701
  end
702
- rescue StandardError => e
702
+ rescue ::StandardError => e
703
703
  error = e
704
704
  ensure
705
705
  if http_response.nil? || Utils.error_status?(http_response.status)
@@ -735,7 +735,7 @@ module KintsugiSDK
735
735
  response: http_response
736
736
  )
737
737
  response_data = http_response.env.response_body
738
- obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Shared::AttachmentRead)
738
+ obj = Crystalline.unmarshal_json(::JSON.parse(response_data), Models::Shared::AttachmentRead)
739
739
 
740
740
  return obj
741
741
  else
@@ -750,7 +750,7 @@ module KintsugiSDK
750
750
  response: http_response
751
751
  )
752
752
  response_data = http_response.env.response_body
753
- obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Errors::ErrorResponse)
753
+ obj = Crystalline.unmarshal_json(::JSON.parse(response_data), Models::Errors::ErrorResponse)
754
754
  raise obj
755
755
  else
756
756
  raise ::KintsugiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received'
@@ -764,7 +764,7 @@ module KintsugiSDK
764
764
  response: http_response
765
765
  )
766
766
  response_data = http_response.env.response_body
767
- obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Errors::BackendSrcExemptionsResponsesValidationErrorResponse)
767
+ obj = Crystalline.unmarshal_json(::JSON.parse(response_data), Models::Errors::BackendSrcExemptionsResponsesValidationErrorResponse)
768
768
  raise obj
769
769
  else
770
770
  raise ::KintsugiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received'
@@ -778,7 +778,7 @@ module KintsugiSDK
778
778
  response: http_response
779
779
  )
780
780
  response_data = http_response.env.response_body
781
- obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Errors::ErrorResponse)
781
+ obj = Crystalline.unmarshal_json(::JSON.parse(response_data), Models::Errors::ErrorResponse)
782
782
  raise obj
783
783
  else
784
784
  raise ::KintsugiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received'
@@ -7,7 +7,7 @@ module KintsugiSDK
7
7
  module Models
8
8
  module Errors
9
9
 
10
- class APIError < StandardError
10
+ class APIError < ::StandardError
11
11
  include Crystalline::MetadataFields
12
12
  extend T::Sig
13
13
 
@@ -8,7 +8,7 @@ module KintsugiSDK
8
8
  module Models
9
9
  module Errors
10
10
 
11
- class BackendSrcAddressValidationResponsesValidationErrorResponse < StandardError
11
+ class BackendSrcAddressValidationResponsesValidationErrorResponse < ::StandardError
12
12
  extend T::Sig
13
13
  include Crystalline::MetadataFields
14
14
 
@@ -8,7 +8,7 @@ module KintsugiSDK
8
8
  module Models
9
9
  module Errors
10
10
 
11
- class BackendSrcCustomersResponsesValidationErrorResponse < StandardError
11
+ class BackendSrcCustomersResponsesValidationErrorResponse < ::StandardError
12
12
  extend T::Sig
13
13
  include Crystalline::MetadataFields
14
14
 
@@ -8,7 +8,7 @@ module KintsugiSDK
8
8
  module Models
9
9
  module Errors
10
10
 
11
- class BackendSrcExemptionsResponsesValidationErrorResponse < StandardError
11
+ class BackendSrcExemptionsResponsesValidationErrorResponse < ::StandardError
12
12
  extend T::Sig
13
13
  include Crystalline::MetadataFields
14
14
 
@@ -8,7 +8,7 @@ module KintsugiSDK
8
8
  module Models
9
9
  module Errors
10
10
 
11
- class BackendSrcProductsSchemasResponsesValidationErrorResponse < StandardError
11
+ class BackendSrcProductsSchemasResponsesValidationErrorResponse < ::StandardError
12
12
  extend T::Sig
13
13
  include Crystalline::MetadataFields
14
14
 
@@ -8,7 +8,7 @@ module KintsugiSDK
8
8
  module Models
9
9
  module Errors
10
10
 
11
- class BackendSrcTaxEstimationResponsesValidationErrorResponse < StandardError
11
+ class BackendSrcTaxEstimationResponsesValidationErrorResponse < ::StandardError
12
12
  extend T::Sig
13
13
  include Crystalline::MetadataFields
14
14
 
@@ -8,7 +8,7 @@ module KintsugiSDK
8
8
  module Models
9
9
  module Errors
10
10
 
11
- class BackendSrcTransactionsResponsesValidationErrorResponse < StandardError
11
+ class BackendSrcTransactionsResponsesValidationErrorResponse < ::StandardError
12
12
  extend T::Sig
13
13
  include Crystalline::MetadataFields
14
14
 
@@ -8,7 +8,7 @@ module KintsugiSDK
8
8
  module Models
9
9
  module Errors
10
10
 
11
- class ErrorResponse < StandardError
11
+ class ErrorResponse < ::StandardError
12
12
  extend T::Sig
13
13
  include Crystalline::MetadataFields
14
14
 
@@ -8,7 +8,7 @@ module KintsugiSDK
8
8
  module Models
9
9
  module Errors
10
10
 
11
- class HTTPValidationError < StandardError
11
+ class HTTPValidationError < ::StandardError
12
12
  extend T::Sig
13
13
  include Crystalline::MetadataFields
14
14
 
@@ -22,9 +22,9 @@ module KintsugiSDK
22
22
  field :country_code, Crystalline::Nilable.new(Crystalline::Array.new(Crystalline::Union.new(Models::Shared::CountryCodeEnum, ::String))), { 'query_param': { 'field_name': 'country_code', 'style': 'form', 'explode': true } }
23
23
  # Jurisdiction identifier
24
24
  field :jurisdiction, Crystalline::Nilable.new(::String), { 'query_param': { 'field_name': 'jurisdiction', 'style': 'form', 'explode': true } }
25
- # Start date for filtering exemptions
25
+ # Include exemptions whose validity start date is on or after this date (YYYY-MM-DD)
26
26
  field :start_date, Crystalline::Nilable.new(::Date), { 'query_param': { 'field_name': 'start_date', 'style': 'form', 'explode': true } }
27
- # End date for filtering exemptions
27
+ # Include exemptions whose validity end date is on or before this date (YYYY-MM-DD). Open-ended exemptions (null end date) are excluded when this filter is set.
28
28
  field :end_date, Crystalline::Nilable.new(::Date), { 'query_param': { 'field_name': 'end_date', 'style': 'form', 'explode': true } }
29
29
  # Customer ID to filter exemptions
30
30
  field :customer_id, Crystalline::Nilable.new(::String), { 'query_param': { 'field_name': 'customer_id', 'style': 'form', 'explode': true } }
@@ -21,9 +21,9 @@ module KintsugiSDK
21
21
  # Invalid input value
22
22
  field :input, ::Object, { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('input'), required: true } }
23
23
  # Additional context
24
- field :ctx, Crystalline::Hash.new(Symbol, ::Object), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('ctx'), required: true } }
24
+ field :ctx, Crystalline::Hash.new(::Symbol, ::Object), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('ctx'), required: true } }
25
25
 
26
- sig { params(type: ::String, loc: T::Array[::String], msg: ::String, input: ::Object, ctx: T::Hash[Symbol, ::Object]).void }
26
+ sig { params(type: ::String, loc: T::Array[::String], msg: ::String, input: ::Object, ctx: T::Hash[::Symbol, ::Object]).void }
27
27
  def initialize(type:, loc:, msg:, input:, ctx:)
28
28
  @type = type
29
29
  @loc = loc
@@ -21,9 +21,9 @@ module KintsugiSDK
21
21
  # Invalid input value
22
22
  field :input, ::Object, { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('input'), required: true } }
23
23
  # Additional context
24
- field :ctx, Crystalline::Hash.new(Symbol, ::Object), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('ctx'), required: true } }
24
+ field :ctx, Crystalline::Hash.new(::Symbol, ::Object), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('ctx'), required: true } }
25
25
 
26
- sig { params(type: ::String, loc: T::Array[::String], msg: ::String, input: ::Object, ctx: T::Hash[Symbol, ::Object]).void }
26
+ sig { params(type: ::String, loc: T::Array[::String], msg: ::String, input: ::Object, ctx: T::Hash[::Symbol, ::Object]).void }
27
27
  def initialize(type:, loc:, msg:, input:, ctx:)
28
28
  @type = type
29
29
  @loc = loc
@@ -22,9 +22,9 @@ module KintsugiSDK
22
22
  # Invalid input value
23
23
  field :input, ::Object, { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('input'), required: true } }
24
24
  # Additional context
25
- field :ctx, Crystalline::Hash.new(Symbol, ::Object), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('ctx'), required: true } }
25
+ field :ctx, Crystalline::Hash.new(::Symbol, ::Object), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('ctx'), required: true } }
26
26
 
27
- sig { params(type: ::String, loc: T::Array[::String], msg: ::String, input: ::Object, ctx: T::Hash[Symbol, ::Object]).void }
27
+ sig { params(type: ::String, loc: T::Array[::String], msg: ::String, input: ::Object, ctx: T::Hash[::Symbol, ::Object]).void }
28
28
  def initialize(type:, loc:, msg:, input:, ctx:)
29
29
  @type = type
30
30
  @loc = loc
@@ -44,8 +44,10 @@ module KintsugiSDK
44
44
 
45
45
  field :attachment_id, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('attachment_id') } }
46
46
 
47
- sig { params(exemption_type: Models::Shared::ExemptionType, start_date: ::Date, id: ::String, jurisdiction: T.nilable(::String), country_code: T.nilable(Models::Shared::CountryCodeEnum), end_date: T.nilable(::Date), customer_id: T.nilable(::String), transaction_id: T.nilable(::String), reseller: T.nilable(T::Boolean), fein: T.nilable(::String), sales_tax_id: T.nilable(::String), status: T.nilable(Models::Shared::ExemptionStatus), customer_name: T.nilable(::String), attachment_id: T.nilable(::String)).void }
48
- def initialize(exemption_type:, start_date:, id:, jurisdiction: nil, country_code: nil, end_date: nil, customer_id: nil, transaction_id: nil, reseller: false, fein: nil, sales_tax_id: nil, status: nil, customer_name: nil, attachment_id: nil)
47
+ field :certificate_type, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('certificate_type') } }
48
+
49
+ sig { params(exemption_type: Models::Shared::ExemptionType, start_date: ::Date, id: ::String, jurisdiction: T.nilable(::String), country_code: T.nilable(Models::Shared::CountryCodeEnum), end_date: T.nilable(::Date), customer_id: T.nilable(::String), transaction_id: T.nilable(::String), reseller: T.nilable(T::Boolean), fein: T.nilable(::String), sales_tax_id: T.nilable(::String), status: T.nilable(Models::Shared::ExemptionStatus), customer_name: T.nilable(::String), attachment_id: T.nilable(::String), certificate_type: T.nilable(::String)).void }
50
+ def initialize(exemption_type:, start_date:, id:, jurisdiction: nil, country_code: nil, end_date: nil, customer_id: nil, transaction_id: nil, reseller: false, fein: nil, sales_tax_id: nil, status: nil, customer_name: nil, attachment_id: nil, certificate_type: nil)
49
51
  @exemption_type = exemption_type
50
52
  @start_date = start_date
51
53
  @id = id
@@ -60,6 +62,7 @@ module KintsugiSDK
60
62
  @status = status
61
63
  @customer_name = customer_name
62
64
  @attachment_id = attachment_id
65
+ @certificate_type = certificate_type
63
66
  end
64
67
 
65
68
  sig { params(other: T.untyped).returns(T::Boolean) }
@@ -79,6 +82,7 @@ module KintsugiSDK
79
82
  return false unless @status == other.status
80
83
  return false unless @customer_name == other.customer_name
81
84
  return false unless @attachment_id == other.attachment_id
85
+ return false unless @certificate_type == other.certificate_type
82
86
  true
83
87
  end
84
88
  end
@@ -36,4 +36,6 @@ class KintsugiSDK::Models::Shared::BackendSrcExemptionsSchemasExemptionExemption
36
36
  def customer_name=(str_); end
37
37
  def attachment_id(); end
38
38
  def attachment_id=(str_); end
39
+ def certificate_type(); end
40
+ def certificate_type=(str_); end
39
41
  end
@@ -38,9 +38,11 @@ module KintsugiSDK
38
38
  field :customer, Crystalline::Nilable.new(Models::Shared::CustomerRead), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('customer') } }
39
39
  # List of attachments related to the exemption
40
40
  field :attachment, Crystalline::Nilable.new(Crystalline::Array.new(Models::Shared::AttachmentRead)), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('attachment') } }
41
+ # Partial-exemption certificate form code. Null when the exemption is not a partial exemption.
42
+ field :certificate_type, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('certificate_type') } }
41
43
 
42
- sig { params(start_date: ::Date, id: ::String, exemption_type: Models::Shared::ExemptionType, status: Models::Shared::ExemptionStatus, country_code: T.nilable(Models::Shared::CountryCodeEnum), jurisdiction: T.nilable(::String), end_date: T.nilable(::Date), transaction_id: T.nilable(::String), reseller: T.nilable(T::Boolean), fein: T.nilable(::String), sales_tax_id: T.nilable(::String), customer: T.nilable(Models::Shared::CustomerRead), attachment: T.nilable(T::Array[Models::Shared::AttachmentRead])).void }
43
- def initialize(start_date:, id:, exemption_type:, status:, country_code: nil, jurisdiction: nil, end_date: nil, transaction_id: nil, reseller: false, fein: nil, sales_tax_id: nil, customer: nil, attachment: nil)
44
+ sig { params(start_date: ::Date, id: ::String, exemption_type: Models::Shared::ExemptionType, status: Models::Shared::ExemptionStatus, country_code: T.nilable(Models::Shared::CountryCodeEnum), jurisdiction: T.nilable(::String), end_date: T.nilable(::Date), transaction_id: T.nilable(::String), reseller: T.nilable(T::Boolean), fein: T.nilable(::String), sales_tax_id: T.nilable(::String), customer: T.nilable(Models::Shared::CustomerRead), attachment: T.nilable(T::Array[Models::Shared::AttachmentRead]), certificate_type: T.nilable(::String)).void }
45
+ def initialize(start_date:, id:, exemption_type:, status:, country_code: nil, jurisdiction: nil, end_date: nil, transaction_id: nil, reseller: false, fein: nil, sales_tax_id: nil, customer: nil, attachment: nil, certificate_type: nil)
44
46
  @start_date = start_date
45
47
  @id = id
46
48
  @exemption_type = exemption_type
@@ -54,6 +56,7 @@ module KintsugiSDK
54
56
  @sales_tax_id = sales_tax_id
55
57
  @customer = customer
56
58
  @attachment = attachment
59
+ @certificate_type = certificate_type
57
60
  end
58
61
 
59
62
  sig { params(other: T.untyped).returns(T::Boolean) }
@@ -72,6 +75,7 @@ module KintsugiSDK
72
75
  return false unless @sales_tax_id == other.sales_tax_id
73
76
  return false unless @customer == other.customer
74
77
  return false unless @attachment == other.attachment
78
+ return false unless @certificate_type == other.certificate_type
75
79
  true
76
80
  end
77
81
  end
@@ -34,4 +34,6 @@ class KintsugiSDK::Models::Shared::BackendSrcExemptionsSerializersExemptionRead
34
34
  def customer=(str_); end
35
35
  def attachment(); end
36
36
  def attachment=(str_); end
37
+ def certificate_type(); end
38
+ def certificate_type=(str_); end
37
39
  end
@@ -22,9 +22,9 @@ module KintsugiSDK
22
22
  # Invalid input value
23
23
  field :input, ::Object, { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('input'), required: true } }
24
24
  # Additional context
25
- field :ctx, Crystalline::Hash.new(Symbol, ::Object), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('ctx'), required: true } }
25
+ field :ctx, Crystalline::Hash.new(::Symbol, ::Object), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('ctx'), required: true } }
26
26
 
27
- sig { params(type: ::String, loc: T::Array[::String], msg: ::String, input: ::Object, ctx: T::Hash[Symbol, ::Object]).void }
27
+ sig { params(type: ::String, loc: T::Array[::String], msg: ::String, input: ::Object, ctx: T::Hash[::Symbol, ::Object]).void }
28
28
  def initialize(type:, loc:, msg:, input:, ctx:)
29
29
  @type = type
30
30
  @loc = loc
@@ -21,9 +21,9 @@ module KintsugiSDK
21
21
  # Invalid input value
22
22
  field :input, ::Object, { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('input'), required: true } }
23
23
  # Additional context
24
- field :ctx, Crystalline::Hash.new(Symbol, ::Object), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('ctx'), required: true } }
24
+ field :ctx, Crystalline::Hash.new(::Symbol, ::Object), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('ctx'), required: true } }
25
25
 
26
- sig { params(type: ::String, loc: T::Array[::String], msg: ::String, input: ::Object, ctx: T::Hash[Symbol, ::Object]).void }
26
+ sig { params(type: ::String, loc: T::Array[::String], msg: ::String, input: ::Object, ctx: T::Hash[::Symbol, ::Object]).void }
27
27
  def initialize(type:, loc:, msg:, input:, ctx:)
28
28
  @type = type
29
29
  @loc = loc
@@ -22,9 +22,9 @@ module KintsugiSDK
22
22
  # Invalid input value
23
23
  field :input, ::Object, { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('input'), required: true } }
24
24
  # Additional context
25
- field :ctx, Crystalline::Hash.new(Symbol, ::Object), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('ctx'), required: true } }
25
+ field :ctx, Crystalline::Hash.new(::Symbol, ::Object), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('ctx'), required: true } }
26
26
 
27
- sig { params(type: ::String, loc: T::Array[::String], msg: ::String, input: ::Object, ctx: T::Hash[Symbol, ::Object]).void }
27
+ sig { params(type: ::String, loc: T::Array[::String], msg: ::String, input: ::Object, ctx: T::Hash[::Symbol, ::Object]).void }
28
28
  def initialize(type:, loc:, msg:, input:, ctx:)
29
29
  @type = type
30
30
  @loc = loc
@@ -7,7 +7,7 @@
7
7
  module KintsugiSDK
8
8
  module Models
9
9
  module Shared
10
-
10
+ # CurrencyEnum - ISO-4217 currency code. Pair with a monetary amount on the same object.
11
11
  class CurrencyEnum < T::Enum
12
12
  enums do
13
13
  AED = new('AED')