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
@@ -68,11 +68,13 @@ module KintsugiSDK
68
68
  field :tax_exemption, Crystalline::Nilable.new(Models::Shared::TaxExemptionEnum), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('tax_exemption'), 'decoder': ::KintsugiSDK::Utils.enum_from_string(Models::Shared::TaxExemptionEnum, true) } }
69
69
  # Indicates if the item is exempt.
70
70
  field :exempt, Crystalline::Nilable.new(Crystalline::Boolean.new), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('exempt') } }
71
+ # Whether this line's source amount includes tax. NULL means the source did not say.
72
+ field :is_tax_inclusive, Crystalline::Nilable.new(Crystalline::Boolean.new), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('is_tax_inclusive') } }
71
73
 
72
74
  field :discount_builder, Crystalline::Nilable.new(Models::Shared::DiscountBuilder), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('discount_builder') } }
73
75
 
74
- sig { params(date: ::DateTime, external_product_id: ::String, organization_id: T.nilable(::String), quantity: T.nilable(T.any(::Float, ::String)), amount: T.nilable(T.any(::Float, ::String)), tax_amount_imported: T.nilable(T.any(::Float, ::String)), tax_rate_imported: T.nilable(T.any(::Float, ::String)), tax_amount_calculated: T.nilable(T.any(::Float, ::String)), tax_rate_calculated: T.nilable(T.any(::Float, ::String)), taxable_amount: T.nilable(T.any(::Float, ::String)), tax_items: T.nilable(T::Array[Models::Shared::TaxItemBuilder]), external_id: T.nilable(::String), description: T.nilable(::String), product: T.nilable(::String), product_id: T.nilable(::String), product_name: T.nilable(::String), product_description: T.nilable(::String), original_currency: T.nilable(Models::Shared::CurrencyEnum), destination_currency: T.nilable(Models::Shared::CurrencyEnum), converted_amount: T.nilable(T.any(::Float, ::String)), converted_taxable_amount: T.nilable(T.any(::Float, ::String)), converted_tax_amount_imported: T.nilable(T.any(::Float, ::String)), converted_tax_amount_calculated: T.nilable(T.any(::Float, ::String)), converted_total_discount: T.nilable(T.any(::Float, ::String)), converted_subtotal: T.nilable(T.any(::Float, ::String)), tax_exemption: T.nilable(Models::Shared::TaxExemptionEnum), exempt: T.nilable(T::Boolean), discount_builder: T.nilable(Models::Shared::DiscountBuilder)).void }
75
- def initialize(date:, external_product_id:, organization_id: nil, quantity: nil, amount: nil, tax_amount_imported: nil, tax_rate_imported: nil, tax_amount_calculated: nil, tax_rate_calculated: nil, taxable_amount: nil, tax_items: nil, external_id: nil, description: nil, product: nil, product_id: nil, product_name: nil, product_description: nil, original_currency: nil, destination_currency: nil, converted_amount: nil, converted_taxable_amount: nil, converted_tax_amount_imported: nil, converted_tax_amount_calculated: nil, converted_total_discount: nil, converted_subtotal: nil, tax_exemption: nil, exempt: false, discount_builder: nil)
76
+ sig { params(date: ::DateTime, external_product_id: ::String, organization_id: T.nilable(::String), quantity: T.nilable(T.any(::Float, ::String)), amount: T.nilable(T.any(::Float, ::String)), tax_amount_imported: T.nilable(T.any(::Float, ::String)), tax_rate_imported: T.nilable(T.any(::Float, ::String)), tax_amount_calculated: T.nilable(T.any(::Float, ::String)), tax_rate_calculated: T.nilable(T.any(::Float, ::String)), taxable_amount: T.nilable(T.any(::Float, ::String)), tax_items: T.nilable(T::Array[Models::Shared::TaxItemBuilder]), external_id: T.nilable(::String), description: T.nilable(::String), product: T.nilable(::String), product_id: T.nilable(::String), product_name: T.nilable(::String), product_description: T.nilable(::String), original_currency: T.nilable(Models::Shared::CurrencyEnum), destination_currency: T.nilable(Models::Shared::CurrencyEnum), converted_amount: T.nilable(T.any(::Float, ::String)), converted_taxable_amount: T.nilable(T.any(::Float, ::String)), converted_tax_amount_imported: T.nilable(T.any(::Float, ::String)), converted_tax_amount_calculated: T.nilable(T.any(::Float, ::String)), converted_total_discount: T.nilable(T.any(::Float, ::String)), converted_subtotal: T.nilable(T.any(::Float, ::String)), tax_exemption: T.nilable(Models::Shared::TaxExemptionEnum), exempt: T.nilable(T::Boolean), is_tax_inclusive: T.nilable(T::Boolean), discount_builder: T.nilable(Models::Shared::DiscountBuilder)).void }
77
+ def initialize(date:, external_product_id:, organization_id: nil, quantity: nil, amount: nil, tax_amount_imported: nil, tax_rate_imported: nil, tax_amount_calculated: nil, tax_rate_calculated: nil, taxable_amount: nil, tax_items: nil, external_id: nil, description: nil, product: nil, product_id: nil, product_name: nil, product_description: nil, original_currency: nil, destination_currency: nil, converted_amount: nil, converted_taxable_amount: nil, converted_tax_amount_imported: nil, converted_tax_amount_calculated: nil, converted_total_discount: nil, converted_subtotal: nil, tax_exemption: nil, exempt: false, is_tax_inclusive: nil, discount_builder: nil)
76
78
  @date = date
77
79
  @external_product_id = external_product_id
78
80
  @organization_id = organization_id
@@ -100,6 +102,7 @@ module KintsugiSDK
100
102
  @converted_subtotal = converted_subtotal
101
103
  @tax_exemption = tax_exemption
102
104
  @exempt = exempt
105
+ @is_tax_inclusive = is_tax_inclusive
103
106
  @discount_builder = discount_builder
104
107
  end
105
108
 
@@ -133,6 +136,7 @@ module KintsugiSDK
133
136
  return false unless @converted_subtotal == other.converted_subtotal
134
137
  return false unless @tax_exemption == other.tax_exemption
135
138
  return false unless @exempt == other.exempt
139
+ return false unless @is_tax_inclusive == other.is_tax_inclusive
136
140
  return false unless @discount_builder == other.discount_builder
137
141
  true
138
142
  end
@@ -62,6 +62,8 @@ class KintsugiSDK::Models::Shared::TransactionItemCreateUpdate
62
62
  def tax_exemption=(str_); end
63
63
  def exempt(); end
64
64
  def exempt=(str_); end
65
+ def is_tax_inclusive(); end
66
+ def is_tax_inclusive=(str_); end
65
67
  def discount_builder(); end
66
68
  def discount_builder=(str_); end
67
69
  end
@@ -39,13 +39,11 @@ module KintsugiSDK
39
39
  field :product_category, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('product_category') } }
40
40
  # Defaults to false. Indicates whether the item is exempt from tax.
41
41
  field :exempt, Crystalline::Nilable.new(Crystalline::Boolean.new), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('exempt') } }
42
- # **Beta — not yet available in production.** When it is not enabled for your environment the field is accepted but ignored, and the response echoes `false`.
43
- #
44
42
  # Defaults to false. When true, `amount` is the gross (tax-included) price and the tax is backed out of it rather than added on top; for a taxable line, `taxable_amount` in the response is then the net base.
45
43
  #
46
44
  # When the line is not taxed - exempt, or no tax rule applies in the destination - `taxable_amount` is `0.00` rather than the net base, matching how exempt tax-exclusive lines already behave. Read the net amount as `taxable_amount` when `tax_amount` is non-zero, and as `amount` otherwise.
47
45
  #
48
- # This applies to the estimate in this request only. Transactions imported through a connection carry no such flag, so an order quoted here as gross is treated as net when it later syncs, and its recorded tax will be higher than this estimate. Send net amounts on the connection side, or reconcile the difference, until tax-inclusive import support ships.
46
+ # This applies to the estimate in this request only. Connection imports that report an inclusive price store the gross amount and the inclusive flag, and recalc backs the tax out the same way as this estimate.
49
47
  field :is_tax_inclusive, Crystalline::Nilable.new(Crystalline::Boolean.new), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('is_tax_inclusive') } }
50
48
 
51
49
  sig { params(date: ::DateTime, amount: T.any(::Float, ::String), quantity: T.nilable(T.any(::Float, ::String)), external_id: T.nilable(::String), description: T.nilable(::String), external_product_id: T.nilable(::String), product_name: T.nilable(::String), product_description: T.nilable(::String), product_source: T.nilable(Models::Shared::SourceEnum), product_subcategory: T.nilable(::String), product_category: T.nilable(::String), exempt: T.nilable(T::Boolean), is_tax_inclusive: T.nilable(T::Boolean)).void }
@@ -41,13 +41,11 @@ module KintsugiSDK
41
41
  field :quantity, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('quantity') } }
42
42
  # Indicates whether the transaction item is exempt from tax.
43
43
  field :exempt, Crystalline::Nilable.new(Crystalline::Boolean.new), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('exempt') } }
44
- # **Beta — not yet available in production.** When it is not enabled for your environment the field is accepted but ignored, and the response echoes `false`.
45
- #
46
44
  # Defaults to false. When true, `amount` is the gross (tax-included) price and the tax is backed out of it rather than added on top; for a taxable line, `taxable_amount` in the response is then the net base.
47
45
  #
48
46
  # When the line is not taxed - exempt, or no tax rule applies in the destination - `taxable_amount` is `0.00` rather than the net base, matching how exempt tax-exclusive lines already behave. Read the net amount as `taxable_amount` when `tax_amount` is non-zero, and as `amount` otherwise.
49
47
  #
50
- # This applies to the estimate in this request only. Transactions imported through a connection carry no such flag, so an order quoted here as gross is treated as net when it later syncs, and its recorded tax will be higher than this estimate. Send net amounts on the connection side, or reconcile the difference, until tax-inclusive import support ships.
48
+ # This applies to the estimate in this request only. Connection imports that report an inclusive price store the gross amount and the inclusive flag, and recalc backs the tax out the same way as this estimate.
51
49
  field :is_tax_inclusive, Crystalline::Nilable.new(Crystalline::Boolean.new), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('is_tax_inclusive') } }
52
50
  # The total tax amount for the transaction item.
53
51
  field :tax_amount, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('tax_amount') } }
@@ -13,7 +13,7 @@ module KintsugiSDK
13
13
  include Crystalline::MetadataFields
14
14
 
15
15
  # Date/time of item.
16
- field :date, ::DateTime, { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('date'), required: true, 'decoder': ::KintsugiSDK::Utils.datetime_from_iso_format(false) } }
16
+ field :date, ::String, { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('date'), required: true } }
17
17
  # External product identifier.
18
18
  field :external_product_id, ::String, { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('external_product_id'), required: true } }
19
19
  # The unique transaction item identifier.
@@ -70,6 +70,8 @@ module KintsugiSDK
70
70
  field :tax_exemption, Crystalline::Nilable.new(Models::Shared::TaxExemptionEnum), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('tax_exemption'), 'decoder': ::KintsugiSDK::Utils.enum_from_string(Models::Shared::TaxExemptionEnum, true) } }
71
71
  # Indicates if the item is exempt.
72
72
  field :exempt, Crystalline::Nilable.new(Crystalline::Boolean.new), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('exempt') } }
73
+ # Whether this line's source amount includes tax. NULL means the source did not say.
74
+ field :is_tax_inclusive, Crystalline::Nilable.new(Crystalline::Boolean.new), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('is_tax_inclusive') } }
73
75
  # Total discount amount applied to this transaction item.
74
76
  field :total_discount, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('total_discount') } }
75
77
  # Subtotal amount before any discount is applied.
@@ -78,9 +80,13 @@ module KintsugiSDK
78
80
  field :is_reverse_charge_self_accounted, Crystalline::Nilable.new(Crystalline::Boolean.new), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('is_reverse_charge_self_accounted') } }
79
81
  # Input VAT recoverability 0-100. Blank means 100%.
80
82
  field :recoverability_percent, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('recoverability_percent') } }
83
+ # VAT recoverable on this line in the transaction's currency, after the line's recoverability percentage and the organization's pro-rata recovery rate. 0.00 for sales and outside the EU and UK.
84
+ field :recoverable_input_vat, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('recoverable_input_vat') } }
85
+ # Recoverable VAT on this line in the destination currency. Null when the line has no converted amount.
86
+ field :converted_recoverable_input_vat, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('converted_recoverable_input_vat') } }
81
87
 
82
- sig { params(date: ::DateTime, external_product_id: ::String, id: ::String, tax_items: T::Array[Models::Shared::TaxItemRead], organization_id: T.nilable(::String), external_id: T.nilable(::String), description: T.nilable(::String), product: T.nilable(::String), product_id: T.nilable(::String), product_name: T.nilable(::String), product_description: T.nilable(::String), quantity: T.nilable(::String), amount: T.nilable(::String), tax_amount_imported: T.nilable(::String), tax_rate_imported: T.nilable(::String), tax_amount_calculated: T.nilable(::String), tax_rate_calculated: T.nilable(::String), original_currency: T.nilable(Models::Shared::CurrencyEnum), destination_currency: T.nilable(Models::Shared::CurrencyEnum), converted_amount: T.nilable(::String), converted_taxable_amount: T.nilable(::String), converted_tax_amount_imported: T.nilable(::String), converted_tax_amount_calculated: T.nilable(::String), converted_total_discount: T.nilable(::String), converted_subtotal: T.nilable(::String), taxable_amount: T.nilable(::String), tax_exemption: T.nilable(Models::Shared::TaxExemptionEnum), exempt: T.nilable(T::Boolean), total_discount: T.nilable(::String), subtotal: T.nilable(::String), is_reverse_charge_self_accounted: T.nilable(T::Boolean), recoverability_percent: T.nilable(::String)).void }
83
- def initialize(date:, external_product_id:, id:, tax_items:, organization_id: nil, external_id: nil, description: nil, product: nil, product_id: nil, product_name: nil, product_description: nil, quantity: '1.0', amount: '0.00', tax_amount_imported: '0.00', tax_rate_imported: '0.00', tax_amount_calculated: '0.00', tax_rate_calculated: '0.00', original_currency: nil, destination_currency: nil, converted_amount: nil, converted_taxable_amount: nil, converted_tax_amount_imported: nil, converted_tax_amount_calculated: nil, converted_total_discount: nil, converted_subtotal: nil, taxable_amount: '0.00', tax_exemption: nil, exempt: false, total_discount: nil, subtotal: nil, is_reverse_charge_self_accounted: false, recoverability_percent: nil)
88
+ sig { params(date: ::String, external_product_id: ::String, id: ::String, tax_items: T::Array[Models::Shared::TaxItemRead], organization_id: T.nilable(::String), external_id: T.nilable(::String), description: T.nilable(::String), product: T.nilable(::String), product_id: T.nilable(::String), product_name: T.nilable(::String), product_description: T.nilable(::String), quantity: T.nilable(::String), amount: T.nilable(::String), tax_amount_imported: T.nilable(::String), tax_rate_imported: T.nilable(::String), tax_amount_calculated: T.nilable(::String), tax_rate_calculated: T.nilable(::String), original_currency: T.nilable(Models::Shared::CurrencyEnum), destination_currency: T.nilable(Models::Shared::CurrencyEnum), converted_amount: T.nilable(::String), converted_taxable_amount: T.nilable(::String), converted_tax_amount_imported: T.nilable(::String), converted_tax_amount_calculated: T.nilable(::String), converted_total_discount: T.nilable(::String), converted_subtotal: T.nilable(::String), taxable_amount: T.nilable(::String), tax_exemption: T.nilable(Models::Shared::TaxExemptionEnum), exempt: T.nilable(T::Boolean), is_tax_inclusive: T.nilable(T::Boolean), total_discount: T.nilable(::String), subtotal: T.nilable(::String), is_reverse_charge_self_accounted: T.nilable(T::Boolean), recoverability_percent: T.nilable(::String), recoverable_input_vat: T.nilable(::String), converted_recoverable_input_vat: T.nilable(::String)).void }
89
+ def initialize(date:, external_product_id:, id:, tax_items:, organization_id: nil, external_id: nil, description: nil, product: nil, product_id: nil, product_name: nil, product_description: nil, quantity: '1.0', amount: '0.00', tax_amount_imported: '0.00', tax_rate_imported: '0.00', tax_amount_calculated: '0.00', tax_rate_calculated: '0.00', original_currency: nil, destination_currency: nil, converted_amount: nil, converted_taxable_amount: nil, converted_tax_amount_imported: nil, converted_tax_amount_calculated: nil, converted_total_discount: nil, converted_subtotal: nil, taxable_amount: '0.00', tax_exemption: nil, exempt: false, is_tax_inclusive: nil, total_discount: nil, subtotal: nil, is_reverse_charge_self_accounted: false, recoverability_percent: nil, recoverable_input_vat: '0.00', converted_recoverable_input_vat: nil)
84
90
  @date = date
85
91
  @external_product_id = external_product_id
86
92
  @id = id
@@ -109,10 +115,13 @@ module KintsugiSDK
109
115
  @taxable_amount = taxable_amount
110
116
  @tax_exemption = tax_exemption
111
117
  @exempt = exempt
118
+ @is_tax_inclusive = is_tax_inclusive
112
119
  @total_discount = total_discount
113
120
  @subtotal = subtotal
114
121
  @is_reverse_charge_self_accounted = is_reverse_charge_self_accounted
115
122
  @recoverability_percent = recoverability_percent
123
+ @recoverable_input_vat = recoverable_input_vat
124
+ @converted_recoverable_input_vat = converted_recoverable_input_vat
116
125
  end
117
126
 
118
127
  sig { params(other: T.untyped).returns(T::Boolean) }
@@ -146,10 +155,13 @@ module KintsugiSDK
146
155
  return false unless @taxable_amount == other.taxable_amount
147
156
  return false unless @tax_exemption == other.tax_exemption
148
157
  return false unless @exempt == other.exempt
158
+ return false unless @is_tax_inclusive == other.is_tax_inclusive
149
159
  return false unless @total_discount == other.total_discount
150
160
  return false unless @subtotal == other.subtotal
151
161
  return false unless @is_reverse_charge_self_accounted == other.is_reverse_charge_self_accounted
152
162
  return false unless @recoverability_percent == other.recoverability_percent
163
+ return false unless @recoverable_input_vat == other.recoverable_input_vat
164
+ return false unless @converted_recoverable_input_vat == other.converted_recoverable_input_vat
153
165
  true
154
166
  end
155
167
  end
@@ -64,6 +64,8 @@ class KintsugiSDK::Models::Shared::TransactionItemRead
64
64
  def tax_exemption=(str_); end
65
65
  def exempt(); end
66
66
  def exempt=(str_); end
67
+ def is_tax_inclusive(); end
68
+ def is_tax_inclusive=(str_); end
67
69
  def total_discount(); end
68
70
  def total_discount=(str_); end
69
71
  def subtotal(); end
@@ -72,4 +74,8 @@ class KintsugiSDK::Models::Shared::TransactionItemRead
72
74
  def is_reverse_charge_self_accounted=(str_); end
73
75
  def recoverability_percent(); end
74
76
  def recoverability_percent=(str_); end
77
+ def recoverable_input_vat(); end
78
+ def recoverable_input_vat=(str_); end
79
+ def converted_recoverable_input_vat(); end
80
+ def converted_recoverable_input_vat=(str_); end
75
81
  end
@@ -42,7 +42,7 @@ module KintsugiSDK
42
42
  field :total_tax_liability_amount, Crystalline::Nilable.new(Crystalline::Union.new(::Float, ::String)), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('total_tax_liability_amount') } }
43
43
  # Taxable amount.
44
44
  field :taxable_amount, Crystalline::Nilable.new(Crystalline::Union.new(::Float, ::String)), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('taxable_amount') } }
45
-
45
+ # ISO-4217 currency code. Pair with a monetary amount on the same object.
46
46
  field :currency, Crystalline::Nilable.new(Models::Shared::CurrencyEnum), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('currency'), 'decoder': ::KintsugiSDK::Utils.enum_from_string(Models::Shared::CurrencyEnum, true) } }
47
47
 
48
48
  field :source, Crystalline::Nilable.new(Models::Shared::SourceEnum), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('source'), 'decoder': ::KintsugiSDK::Utils.enum_from_string(Models::Shared::SourceEnum, true) } }
@@ -65,7 +65,7 @@ module KintsugiSDK
65
65
  # Exemption status (e.g., NOT_EXEMPT)
66
66
  field :exempt, Crystalline::Nilable.new(Models::Shared::TransactionExemptStatusEnum), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('exempt'), 'decoder': ::KintsugiSDK::Utils.enum_from_string(Models::Shared::TransactionExemptStatusEnum, true) } }
67
67
  # List of exemptions applied (if any).
68
- field :exemptions, Crystalline::Nilable.new(Crystalline::Array.new(Models::Shared::Exemption)), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('exemptions') } }
68
+ field :exemptions, Crystalline::Nilable.new(Crystalline::Array.new(Models::Shared::TransactionEmbeddedExemption)), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('exemptions') } }
69
69
  # Related transaction identifier.
70
70
  field :related_to, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('related_to') } }
71
71
  # Secondary External Identifier.
@@ -76,6 +76,8 @@ module KintsugiSDK
76
76
  field :external_friendly_id, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('external_friendly_id') } }
77
77
  # Source of tax liability.
78
78
  field :tax_liability_source, Crystalline::Nilable.new(Models::Shared::TaxLiabilitySourceEnum), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('tax_liability_source'), 'decoder': ::KintsugiSDK::Utils.enum_from_string(Models::Shared::TaxLiabilitySourceEnum, true) } }
79
+ # Whether source amounts include tax. NULL means the source did not say.
80
+ field :is_tax_inclusive, Crystalline::Nilable.new(Crystalline::Boolean.new), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('is_tax_inclusive') } }
79
81
  # Transaction lock status.
80
82
  field :locked, Crystalline::Nilable.new(Crystalline::Boolean.new), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('locked') } }
81
83
  # Connection Identifier
@@ -101,8 +103,8 @@ module KintsugiSDK
101
103
  # Identifier of the invoice that created from a sales order.
102
104
  field :created_from, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('created_from') } }
103
105
 
104
- sig { params(organization_id: ::String, external_id: ::String, date: ::DateTime, addresses: T::Array[Models::Shared::TransactionAddressPublic], transaction_items: T::Array[Models::Shared::TransactionItemBuilder], customer: T.any(Models::Shared::CustomerBaseBase, Models::Shared::TransactionImportCustomer), type: Models::Shared::TransactionTypeEnum, total_amount: T.nilable(T.any(::Float, ::String)), total_tax_amount_imported: T.nilable(T.any(::Float, ::String)), tax_rate_imported: T.nilable(T.any(::Float, ::String)), total_tax_amount_calculated: T.nilable(T.any(::Float, ::String)), tax_rate_calculated: T.nilable(T.any(::Float, ::String)), total_tax_liability_amount: T.nilable(T.any(::Float, ::String)), taxable_amount: T.nilable(T.any(::Float, ::String)), currency: T.nilable(Models::Shared::CurrencyEnum), source: T.nilable(Models::Shared::SourceEnum), status: T.nilable(Models::Shared::TransactionStatusEnum), requires_exemption: T.nilable(Models::Shared::ExemptionRequired), shop_date: T.nilable(::Date), shop_date_tz: T.nilable(::String), description: T.nilable(::String), refund_status: T.nilable(Models::Shared::TransactionRefundStatus), customer_id: T.nilable(::String), marketplace: T.nilable(T::Boolean), exempt: T.nilable(Models::Shared::TransactionExemptStatusEnum), exemptions: T.nilable(T::Array[Models::Shared::Exemption]), related_to: T.nilable(::String), secondary_external_id: T.nilable(::String), secondary_source: T.nilable(::String), external_friendly_id: T.nilable(::String), tax_liability_source: T.nilable(Models::Shared::TaxLiabilitySourceEnum), locked: T.nilable(T::Boolean), connection_id: T.nilable(::String), filing_id: T.nilable(::String), city: T.nilable(::String), county: T.nilable(::String), state: T.nilable(::String), country: T.nilable(Models::Shared::CountryCodeEnum), postal_code: T.nilable(::String), tax_id: T.nilable(::String), document_type: T.nilable(Models::Shared::DocumentTypeEnum), created_from: T.nilable(::String)).void }
105
- def initialize(organization_id:, external_id:, date:, addresses:, transaction_items:, customer:, type:, total_amount: nil, total_tax_amount_imported: nil, tax_rate_imported: nil, total_tax_amount_calculated: nil, tax_rate_calculated: nil, total_tax_liability_amount: nil, taxable_amount: nil, currency: nil, source: nil, status: nil, requires_exemption: nil, shop_date: nil, shop_date_tz: nil, description: nil, refund_status: nil, customer_id: nil, marketplace: nil, exempt: nil, exemptions: nil, related_to: nil, secondary_external_id: nil, secondary_source: nil, external_friendly_id: nil, tax_liability_source: nil, locked: false, connection_id: nil, filing_id: nil, city: nil, county: nil, state: nil, country: nil, postal_code: nil, tax_id: nil, document_type: nil, created_from: nil)
106
+ sig { params(organization_id: ::String, external_id: ::String, date: ::DateTime, addresses: T::Array[Models::Shared::TransactionAddressPublic], transaction_items: T::Array[Models::Shared::TransactionItemBuilder], customer: T.any(Models::Shared::CustomerBaseBase, Models::Shared::TransactionImportCustomer), type: Models::Shared::TransactionTypeEnum, total_amount: T.nilable(T.any(::Float, ::String)), total_tax_amount_imported: T.nilable(T.any(::Float, ::String)), tax_rate_imported: T.nilable(T.any(::Float, ::String)), total_tax_amount_calculated: T.nilable(T.any(::Float, ::String)), tax_rate_calculated: T.nilable(T.any(::Float, ::String)), total_tax_liability_amount: T.nilable(T.any(::Float, ::String)), taxable_amount: T.nilable(T.any(::Float, ::String)), currency: T.nilable(Models::Shared::CurrencyEnum), source: T.nilable(Models::Shared::SourceEnum), status: T.nilable(Models::Shared::TransactionStatusEnum), requires_exemption: T.nilable(Models::Shared::ExemptionRequired), shop_date: T.nilable(::Date), shop_date_tz: T.nilable(::String), description: T.nilable(::String), refund_status: T.nilable(Models::Shared::TransactionRefundStatus), customer_id: T.nilable(::String), marketplace: T.nilable(T::Boolean), exempt: T.nilable(Models::Shared::TransactionExemptStatusEnum), exemptions: T.nilable(T::Array[Models::Shared::TransactionEmbeddedExemption]), related_to: T.nilable(::String), secondary_external_id: T.nilable(::String), secondary_source: T.nilable(::String), external_friendly_id: T.nilable(::String), tax_liability_source: T.nilable(Models::Shared::TaxLiabilitySourceEnum), is_tax_inclusive: T.nilable(T::Boolean), locked: T.nilable(T::Boolean), connection_id: T.nilable(::String), filing_id: T.nilable(::String), city: T.nilable(::String), county: T.nilable(::String), state: T.nilable(::String), country: T.nilable(Models::Shared::CountryCodeEnum), postal_code: T.nilable(::String), tax_id: T.nilable(::String), document_type: T.nilable(Models::Shared::DocumentTypeEnum), created_from: T.nilable(::String)).void }
107
+ def initialize(organization_id:, external_id:, date:, addresses:, transaction_items:, customer:, type:, total_amount: nil, total_tax_amount_imported: nil, tax_rate_imported: nil, total_tax_amount_calculated: nil, tax_rate_calculated: nil, total_tax_liability_amount: nil, taxable_amount: nil, currency: nil, source: nil, status: nil, requires_exemption: nil, shop_date: nil, shop_date_tz: nil, description: nil, refund_status: nil, customer_id: nil, marketplace: nil, exempt: nil, exemptions: nil, related_to: nil, secondary_external_id: nil, secondary_source: nil, external_friendly_id: nil, tax_liability_source: nil, is_tax_inclusive: nil, locked: false, connection_id: nil, filing_id: nil, city: nil, county: nil, state: nil, country: nil, postal_code: nil, tax_id: nil, document_type: nil, created_from: nil)
106
108
  @organization_id = organization_id
107
109
  @external_id = external_id
108
110
  @date = date
@@ -134,6 +136,7 @@ module KintsugiSDK
134
136
  @secondary_source = secondary_source
135
137
  @external_friendly_id = external_friendly_id
136
138
  @tax_liability_source = tax_liability_source
139
+ @is_tax_inclusive = is_tax_inclusive
137
140
  @locked = locked
138
141
  @connection_id = connection_id
139
142
  @filing_id = filing_id
@@ -181,6 +184,7 @@ module KintsugiSDK
181
184
  return false unless @secondary_source == other.secondary_source
182
185
  return false unless @external_friendly_id == other.external_friendly_id
183
186
  return false unless @tax_liability_source == other.tax_liability_source
187
+ return false unless @is_tax_inclusive == other.is_tax_inclusive
184
188
  return false unless @locked == other.locked
185
189
  return false unless @connection_id == other.connection_id
186
190
  return false unless @filing_id == other.filing_id
@@ -70,6 +70,8 @@ class KintsugiSDK::Models::Shared::TransactionPublicRequest
70
70
  def external_friendly_id=(str_); end
71
71
  def tax_liability_source(); end
72
72
  def tax_liability_source=(str_); end
73
+ def is_tax_inclusive(); end
74
+ def is_tax_inclusive=(str_); end
73
75
  def locked(); end
74
76
  def locked=(str_); end
75
77
  def connection_id(); end
@@ -19,7 +19,7 @@ module KintsugiSDK
19
19
  # External identifier of the transaction.
20
20
  field :external_id, ::String, { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('external_id'), required: true } }
21
21
  # Transaction date and time
22
- field :date, ::DateTime, { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('date'), required: true, 'decoder': ::KintsugiSDK::Utils.datetime_from_iso_format(false) } }
22
+ field :date, ::String, { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('date'), required: true } }
23
23
  # The unique transaction identifier.
24
24
  field :id, ::String, { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('id'), required: true } }
25
25
  # List of addresses associated.
@@ -28,7 +28,7 @@ module KintsugiSDK
28
28
  field :transaction_items, Crystalline::Array.new(Models::Shared::TransactionItemRead), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('transaction_items'), required: true } }
29
29
 
30
30
  field :type, Models::Shared::TransactionTypeEnum, { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('type'), required: true, 'decoder': ::KintsugiSDK::Utils.enum_from_string(Models::Shared::TransactionTypeEnum, false) } }
31
-
31
+ # ISO-4217 currency code. Pair with a monetary amount on the same object.
32
32
  field :currency, Crystalline::Nilable.new(Models::Shared::CurrencyEnum), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('currency'), 'decoder': ::KintsugiSDK::Utils.enum_from_string(Models::Shared::CurrencyEnum, true) } }
33
33
 
34
34
  field :source, Crystalline::Nilable.new(Models::Shared::SourceEnum), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('source'), 'decoder': ::KintsugiSDK::Utils.enum_from_string(Models::Shared::SourceEnum, true) } }
@@ -60,7 +60,7 @@ module KintsugiSDK
60
60
  # Exemption status (e.g., NOT_EXEMPT)
61
61
  field :exempt, Crystalline::Nilable.new(Models::Shared::TransactionExemptStatusEnum), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('exempt'), 'decoder': ::KintsugiSDK::Utils.enum_from_string(Models::Shared::TransactionExemptStatusEnum, true) } }
62
62
  # List of exemptions applied (if any).
63
- field :exemptions, Crystalline::Nilable.new(Crystalline::Array.new(Models::Shared::Exemption)), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('exemptions') } }
63
+ field :exemptions, Crystalline::Nilable.new(Crystalline::Array.new(Models::Shared::TransactionEmbeddedExemption)), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('exemptions') } }
64
64
  # Related transaction identifier.
65
65
  field :related_to, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('related_to') } }
66
66
  # Secondary External Identifier.
@@ -83,6 +83,8 @@ module KintsugiSDK
83
83
  field :tax_liability_source, Crystalline::Nilable.new(Models::Shared::TaxLiabilitySourceEnum), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('tax_liability_source'), 'decoder': ::KintsugiSDK::Utils.enum_from_string(Models::Shared::TaxLiabilitySourceEnum, true) } }
84
84
  # Taxable amount.
85
85
  field :taxable_amount, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('taxable_amount') } }
86
+ # Whether source amounts include tax. NULL means the source did not say.
87
+ field :is_tax_inclusive, Crystalline::Nilable.new(Crystalline::Boolean.new), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('is_tax_inclusive') } }
86
88
  # Transaction lock status.
87
89
  field :locked, Crystalline::Nilable.new(Crystalline::Boolean.new), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('locked') } }
88
90
  # Connection Identifier
@@ -131,6 +133,12 @@ module KintsugiSDK
131
133
  field :store_name, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('store_name') } }
132
134
  # Whether this transaction was deferred (rolled over) from a prior filing period.
133
135
  field :is_deferred_transaction, Crystalline::Nilable.new(Crystalline::Boolean.new), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('is_deferred_transaction') } }
136
+ # Recoverable input VAT across this transaction's lines, in the transaction's currency. 0.00 for sales and outside the EU and UK.
137
+ field :total_recoverable_input_vat, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('total_recoverable_input_vat') } }
138
+ # Recoverable input VAT across this transaction's lines in the destination currency. Null when the transaction is unconverted.
139
+ field :converted_total_recoverable_input_vat, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('converted_total_recoverable_input_vat') } }
140
+ # Pro-rata coefficient 0-100 used to scale recoverable input VAT on this purchase. Null for sales and outside the EU and UK. 100 when the organization has no partial exemption rate for the tax-point year.
141
+ field :input_vat_recovery_rate, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('input_vat_recovery_rate') } }
134
142
  # Customer information associated with the transaction.
135
143
  field :customer, Crystalline::Nilable.new(Models::Shared::CustomerRead), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('customer') } }
136
144
  # Total amount of all discounts applied to the transaction.
@@ -142,8 +150,8 @@ module KintsugiSDK
142
150
  # Converted final total amount including tax liability.
143
151
  field :converted_final_total_amount, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('converted_final_total_amount') } }
144
152
 
145
- sig { params(organization_id: ::String, external_id: ::String, date: ::DateTime, id: ::String, addresses: T::Array[Models::Shared::TransactionAddressReadOutput], transaction_items: T::Array[Models::Shared::TransactionItemRead], type: Models::Shared::TransactionTypeEnum, currency: T.nilable(Models::Shared::CurrencyEnum), source: T.nilable(Models::Shared::SourceEnum), status: T.nilable(Models::Shared::TransactionStatusEnum), address_status: T.nilable(Models::Shared::AddressStatus), processing_status: T.nilable(Models::Shared::ProcessingStatusEnum), direction: T.nilable(Models::Shared::TransactionDirectionEnum), requires_exemption: T.nilable(Models::Shared::ExemptionRequired), shop_date: T.nilable(::Date), shop_date_tz: T.nilable(::String), description: T.nilable(::String), refund_status: T.nilable(Models::Shared::TransactionRefundStatus), total_amount: T.nilable(::String), customer_id: T.nilable(::String), marketplace: T.nilable(T::Boolean), exempt: T.nilable(Models::Shared::TransactionExemptStatusEnum), exemptions: T.nilable(T::Array[Models::Shared::Exemption]), related_to: T.nilable(::String), secondary_external_id: T.nilable(::String), secondary_source: T.nilable(::String), external_friendly_id: T.nilable(::String), total_tax_amount_imported: T.nilable(::String), tax_rate_imported: T.nilable(::String), total_tax_amount_calculated: T.nilable(::String), tax_rate_calculated: T.nilable(::String), total_tax_liability_amount: T.nilable(::String), tax_liability_source: T.nilable(Models::Shared::TaxLiabilitySourceEnum), taxable_amount: T.nilable(::String), locked: T.nilable(T::Boolean), connection_id: T.nilable(::String), filing_id: T.nilable(::String), city: T.nilable(::String), county: T.nilable(::String), state: T.nilable(::String), country: T.nilable(Models::Shared::CountryCodeEnum), postal_code: T.nilable(::String), tax_id: T.nilable(::String), document_type: T.nilable(Models::Shared::DocumentTypeEnum), created_from: T.nilable(::String), is_duplicate: T.nilable(T::Boolean), destination_currency: T.nilable(Models::Shared::CurrencyEnum), converted_total_amount: T.nilable(::String), converted_total_tax_amount_imported: T.nilable(::String), converted_total_tax_amount_calculated: T.nilable(::String), conversion_rate: T.nilable(::String), converted_taxable_amount: T.nilable(::String), converted_total_discount: T.nilable(::String), converted_subtotal: T.nilable(::String), converted_total_tax_liability_amount: T.nilable(::String), store_name: T.nilable(::String), is_deferred_transaction: T.nilable(T::Boolean), customer: T.nilable(Models::Shared::CustomerRead), total_discount: T.nilable(::String), subtotal: T.nilable(::String), final_total_amount: T.nilable(::String), converted_final_total_amount: T.nilable(::String)).void }
146
- def initialize(organization_id:, external_id:, date:, id:, addresses:, transaction_items:, type:, currency: nil, source: nil, status: nil, address_status: nil, processing_status: nil, direction: nil, requires_exemption: nil, shop_date: nil, shop_date_tz: nil, description: nil, refund_status: nil, total_amount: '0.00', customer_id: nil, marketplace: nil, exempt: nil, exemptions: nil, related_to: nil, secondary_external_id: nil, secondary_source: nil, external_friendly_id: nil, total_tax_amount_imported: '0.00', tax_rate_imported: '0.00', total_tax_amount_calculated: '0.00', tax_rate_calculated: '0.00', total_tax_liability_amount: '0.00', tax_liability_source: nil, taxable_amount: '0.00', locked: false, connection_id: nil, filing_id: nil, city: nil, county: nil, state: nil, country: nil, postal_code: nil, tax_id: nil, document_type: nil, created_from: nil, is_duplicate: false, destination_currency: nil, converted_total_amount: nil, converted_total_tax_amount_imported: nil, converted_total_tax_amount_calculated: nil, conversion_rate: nil, converted_taxable_amount: nil, converted_total_discount: nil, converted_subtotal: nil, converted_total_tax_liability_amount: nil, store_name: nil, is_deferred_transaction: false, customer: nil, total_discount: nil, subtotal: nil, final_total_amount: nil, converted_final_total_amount: nil)
153
+ sig { params(organization_id: ::String, external_id: ::String, date: ::String, id: ::String, addresses: T::Array[Models::Shared::TransactionAddressReadOutput], transaction_items: T::Array[Models::Shared::TransactionItemRead], type: Models::Shared::TransactionTypeEnum, currency: T.nilable(Models::Shared::CurrencyEnum), source: T.nilable(Models::Shared::SourceEnum), status: T.nilable(Models::Shared::TransactionStatusEnum), address_status: T.nilable(Models::Shared::AddressStatus), processing_status: T.nilable(Models::Shared::ProcessingStatusEnum), direction: T.nilable(Models::Shared::TransactionDirectionEnum), requires_exemption: T.nilable(Models::Shared::ExemptionRequired), shop_date: T.nilable(::Date), shop_date_tz: T.nilable(::String), description: T.nilable(::String), refund_status: T.nilable(Models::Shared::TransactionRefundStatus), total_amount: T.nilable(::String), customer_id: T.nilable(::String), marketplace: T.nilable(T::Boolean), exempt: T.nilable(Models::Shared::TransactionExemptStatusEnum), exemptions: T.nilable(T::Array[Models::Shared::TransactionEmbeddedExemption]), related_to: T.nilable(::String), secondary_external_id: T.nilable(::String), secondary_source: T.nilable(::String), external_friendly_id: T.nilable(::String), total_tax_amount_imported: T.nilable(::String), tax_rate_imported: T.nilable(::String), total_tax_amount_calculated: T.nilable(::String), tax_rate_calculated: T.nilable(::String), total_tax_liability_amount: T.nilable(::String), tax_liability_source: T.nilable(Models::Shared::TaxLiabilitySourceEnum), taxable_amount: T.nilable(::String), is_tax_inclusive: T.nilable(T::Boolean), locked: T.nilable(T::Boolean), connection_id: T.nilable(::String), filing_id: T.nilable(::String), city: T.nilable(::String), county: T.nilable(::String), state: T.nilable(::String), country: T.nilable(Models::Shared::CountryCodeEnum), postal_code: T.nilable(::String), tax_id: T.nilable(::String), document_type: T.nilable(Models::Shared::DocumentTypeEnum), created_from: T.nilable(::String), is_duplicate: T.nilable(T::Boolean), destination_currency: T.nilable(Models::Shared::CurrencyEnum), converted_total_amount: T.nilable(::String), converted_total_tax_amount_imported: T.nilable(::String), converted_total_tax_amount_calculated: T.nilable(::String), conversion_rate: T.nilable(::String), converted_taxable_amount: T.nilable(::String), converted_total_discount: T.nilable(::String), converted_subtotal: T.nilable(::String), converted_total_tax_liability_amount: T.nilable(::String), store_name: T.nilable(::String), is_deferred_transaction: T.nilable(T::Boolean), total_recoverable_input_vat: T.nilable(::String), converted_total_recoverable_input_vat: T.nilable(::String), input_vat_recovery_rate: T.nilable(::String), customer: T.nilable(Models::Shared::CustomerRead), total_discount: T.nilable(::String), subtotal: T.nilable(::String), final_total_amount: T.nilable(::String), converted_final_total_amount: T.nilable(::String)).void }
154
+ def initialize(organization_id:, external_id:, date:, id:, addresses:, transaction_items:, type:, currency: nil, source: nil, status: nil, address_status: nil, processing_status: nil, direction: nil, requires_exemption: nil, shop_date: nil, shop_date_tz: nil, description: nil, refund_status: nil, total_amount: '0.00', customer_id: nil, marketplace: nil, exempt: nil, exemptions: nil, related_to: nil, secondary_external_id: nil, secondary_source: nil, external_friendly_id: nil, total_tax_amount_imported: '0.00', tax_rate_imported: '0.00', total_tax_amount_calculated: '0.00', tax_rate_calculated: '0.00', total_tax_liability_amount: '0.00', tax_liability_source: nil, taxable_amount: '0.00', is_tax_inclusive: nil, locked: false, connection_id: nil, filing_id: nil, city: nil, county: nil, state: nil, country: nil, postal_code: nil, tax_id: nil, document_type: nil, created_from: nil, is_duplicate: false, destination_currency: nil, converted_total_amount: nil, converted_total_tax_amount_imported: nil, converted_total_tax_amount_calculated: nil, conversion_rate: nil, converted_taxable_amount: nil, converted_total_discount: nil, converted_subtotal: nil, converted_total_tax_liability_amount: nil, store_name: nil, is_deferred_transaction: false, total_recoverable_input_vat: '0.00', converted_total_recoverable_input_vat: nil, input_vat_recovery_rate: nil, customer: nil, total_discount: nil, subtotal: nil, final_total_amount: nil, converted_final_total_amount: nil)
147
155
  @organization_id = organization_id
148
156
  @external_id = external_id
149
157
  @date = date
@@ -178,6 +186,7 @@ module KintsugiSDK
178
186
  @total_tax_liability_amount = total_tax_liability_amount
179
187
  @tax_liability_source = tax_liability_source
180
188
  @taxable_amount = taxable_amount
189
+ @is_tax_inclusive = is_tax_inclusive
181
190
  @locked = locked
182
191
  @connection_id = connection_id
183
192
  @filing_id = filing_id
@@ -201,6 +210,9 @@ module KintsugiSDK
201
210
  @converted_total_tax_liability_amount = converted_total_tax_liability_amount
202
211
  @store_name = store_name
203
212
  @is_deferred_transaction = is_deferred_transaction
213
+ @total_recoverable_input_vat = total_recoverable_input_vat
214
+ @converted_total_recoverable_input_vat = converted_total_recoverable_input_vat
215
+ @input_vat_recovery_rate = input_vat_recovery_rate
204
216
  @customer = customer
205
217
  @total_discount = total_discount
206
218
  @subtotal = subtotal
@@ -245,6 +257,7 @@ module KintsugiSDK
245
257
  return false unless @total_tax_liability_amount == other.total_tax_liability_amount
246
258
  return false unless @tax_liability_source == other.tax_liability_source
247
259
  return false unless @taxable_amount == other.taxable_amount
260
+ return false unless @is_tax_inclusive == other.is_tax_inclusive
248
261
  return false unless @locked == other.locked
249
262
  return false unless @connection_id == other.connection_id
250
263
  return false unless @filing_id == other.filing_id
@@ -268,6 +281,9 @@ module KintsugiSDK
268
281
  return false unless @converted_total_tax_liability_amount == other.converted_total_tax_liability_amount
269
282
  return false unless @store_name == other.store_name
270
283
  return false unless @is_deferred_transaction == other.is_deferred_transaction
284
+ return false unless @total_recoverable_input_vat == other.total_recoverable_input_vat
285
+ return false unless @converted_total_recoverable_input_vat == other.converted_total_recoverable_input_vat
286
+ return false unless @input_vat_recovery_rate == other.input_vat_recovery_rate
271
287
  return false unless @customer == other.customer
272
288
  return false unless @total_discount == other.total_discount
273
289
  return false unless @subtotal == other.subtotal
@@ -76,6 +76,8 @@ class KintsugiSDK::Models::Shared::TransactionRead
76
76
  def tax_liability_source=(str_); end
77
77
  def taxable_amount(); end
78
78
  def taxable_amount=(str_); end
79
+ def is_tax_inclusive(); end
80
+ def is_tax_inclusive=(str_); end
79
81
  def locked(); end
80
82
  def locked=(str_); end
81
83
  def connection_id(); end
@@ -122,6 +124,12 @@ class KintsugiSDK::Models::Shared::TransactionRead
122
124
  def store_name=(str_); end
123
125
  def is_deferred_transaction(); end
124
126
  def is_deferred_transaction=(str_); end
127
+ def total_recoverable_input_vat(); end
128
+ def total_recoverable_input_vat=(str_); end
129
+ def converted_total_recoverable_input_vat(); end
130
+ def converted_total_recoverable_input_vat=(str_); end
131
+ def input_vat_recovery_rate(); end
132
+ def input_vat_recovery_rate=(str_); end
125
133
  def customer(); end
126
134
  def customer=(str_); end
127
135
  def total_discount(); end
@@ -40,7 +40,7 @@ module KintsugiSDK
40
40
  field :total_tax_liability_amount, Crystalline::Nilable.new(Crystalline::Union.new(::Float, ::String)), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('total_tax_liability_amount') } }
41
41
  # Taxable amount.
42
42
  field :taxable_amount, Crystalline::Nilable.new(Crystalline::Union.new(::Float, ::String)), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('taxable_amount') } }
43
-
43
+ # ISO-4217 currency code. Pair with a monetary amount on the same object.
44
44
  field :currency, Crystalline::Nilable.new(Models::Shared::CurrencyEnum), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('currency'), 'decoder': ::KintsugiSDK::Utils.enum_from_string(Models::Shared::CurrencyEnum, true) } }
45
45
 
46
46
  field :source, Crystalline::Nilable.new(Models::Shared::SourceEnum), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('source'), 'decoder': ::KintsugiSDK::Utils.enum_from_string(Models::Shared::SourceEnum, true) } }
@@ -63,7 +63,7 @@ module KintsugiSDK
63
63
  # Exemption status (e.g., NOT_EXEMPT)
64
64
  field :exempt, Crystalline::Nilable.new(Models::Shared::TransactionExemptStatusEnum), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('exempt'), 'decoder': ::KintsugiSDK::Utils.enum_from_string(Models::Shared::TransactionExemptStatusEnum, true) } }
65
65
  # List of exemptions applied (if any).
66
- field :exemptions, Crystalline::Nilable.new(Crystalline::Array.new(Models::Shared::Exemption)), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('exemptions') } }
66
+ field :exemptions, Crystalline::Nilable.new(Crystalline::Array.new(Models::Shared::TransactionEmbeddedExemption)), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('exemptions') } }
67
67
  # Related transaction identifier.
68
68
  field :related_to, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('related_to') } }
69
69
  # Secondary External Identifier.
@@ -74,6 +74,8 @@ module KintsugiSDK
74
74
  field :external_friendly_id, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('external_friendly_id') } }
75
75
  # Source of tax liability.
76
76
  field :tax_liability_source, Crystalline::Nilable.new(Models::Shared::TaxLiabilitySourceEnum), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('tax_liability_source'), 'decoder': ::KintsugiSDK::Utils.enum_from_string(Models::Shared::TaxLiabilitySourceEnum, true) } }
77
+ # Whether source amounts include tax. NULL means the source did not say.
78
+ field :is_tax_inclusive, Crystalline::Nilable.new(Crystalline::Boolean.new), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('is_tax_inclusive') } }
77
79
  # Transaction lock status.
78
80
  field :locked, Crystalline::Nilable.new(Crystalline::Boolean.new), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('locked') } }
79
81
  # Connection Identifier
@@ -99,8 +101,8 @@ module KintsugiSDK
99
101
  # Identifier of the invoice that created from a sales order.
100
102
  field :created_from, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('created_from') } }
101
103
 
102
- sig { params(organization_id: ::String, external_id: ::String, date: ::DateTime, addresses: T::Array[Models::Shared::TransactionAddressBuilder], transaction_items: T::Array[Models::Shared::TransactionItemCreateUpdate], customer: Models::Shared::CustomerUpdate, total_amount: T.nilable(T.any(::Float, ::String)), total_tax_amount_imported: T.nilable(T.any(::Float, ::String)), tax_rate_imported: T.nilable(T.any(::Float, ::String)), total_tax_amount_calculated: T.nilable(T.any(::Float, ::String)), tax_rate_calculated: T.nilable(T.any(::Float, ::String)), total_tax_liability_amount: T.nilable(T.any(::Float, ::String)), taxable_amount: T.nilable(T.any(::Float, ::String)), currency: T.nilable(Models::Shared::CurrencyEnum), source: T.nilable(Models::Shared::SourceEnum), status: T.nilable(Models::Shared::TransactionStatusEnum), requires_exemption: T.nilable(Models::Shared::ExemptionRequired), shop_date: T.nilable(::Date), shop_date_tz: T.nilable(::String), description: T.nilable(::String), refund_status: T.nilable(Models::Shared::TransactionRefundStatus), customer_id: T.nilable(::String), marketplace: T.nilable(T::Boolean), exempt: T.nilable(Models::Shared::TransactionExemptStatusEnum), exemptions: T.nilable(T::Array[Models::Shared::Exemption]), related_to: T.nilable(::String), secondary_external_id: T.nilable(::String), secondary_source: T.nilable(::String), external_friendly_id: T.nilable(::String), tax_liability_source: T.nilable(Models::Shared::TaxLiabilitySourceEnum), locked: T.nilable(T::Boolean), connection_id: T.nilable(::String), filing_id: T.nilable(::String), city: T.nilable(::String), county: T.nilable(::String), state: T.nilable(::String), country: T.nilable(Models::Shared::CountryCodeEnum), postal_code: T.nilable(::String), tax_id: T.nilable(::String), document_type: T.nilable(Models::Shared::DocumentTypeEnum), created_from: T.nilable(::String)).void }
103
- def initialize(organization_id:, external_id:, date:, addresses:, transaction_items:, customer:, total_amount: nil, total_tax_amount_imported: nil, tax_rate_imported: nil, total_tax_amount_calculated: nil, tax_rate_calculated: nil, total_tax_liability_amount: nil, taxable_amount: nil, currency: nil, source: nil, status: nil, requires_exemption: nil, shop_date: nil, shop_date_tz: nil, description: nil, refund_status: nil, customer_id: nil, marketplace: nil, exempt: nil, exemptions: nil, related_to: nil, secondary_external_id: nil, secondary_source: nil, external_friendly_id: nil, tax_liability_source: nil, locked: false, connection_id: nil, filing_id: nil, city: nil, county: nil, state: nil, country: nil, postal_code: nil, tax_id: nil, document_type: nil, created_from: nil)
104
+ sig { params(organization_id: ::String, external_id: ::String, date: ::DateTime, addresses: T::Array[Models::Shared::TransactionAddressBuilder], transaction_items: T::Array[Models::Shared::TransactionItemCreateUpdate], customer: Models::Shared::CustomerUpdate, total_amount: T.nilable(T.any(::Float, ::String)), total_tax_amount_imported: T.nilable(T.any(::Float, ::String)), tax_rate_imported: T.nilable(T.any(::Float, ::String)), total_tax_amount_calculated: T.nilable(T.any(::Float, ::String)), tax_rate_calculated: T.nilable(T.any(::Float, ::String)), total_tax_liability_amount: T.nilable(T.any(::Float, ::String)), taxable_amount: T.nilable(T.any(::Float, ::String)), currency: T.nilable(Models::Shared::CurrencyEnum), source: T.nilable(Models::Shared::SourceEnum), status: T.nilable(Models::Shared::TransactionStatusEnum), requires_exemption: T.nilable(Models::Shared::ExemptionRequired), shop_date: T.nilable(::Date), shop_date_tz: T.nilable(::String), description: T.nilable(::String), refund_status: T.nilable(Models::Shared::TransactionRefundStatus), customer_id: T.nilable(::String), marketplace: T.nilable(T::Boolean), exempt: T.nilable(Models::Shared::TransactionExemptStatusEnum), exemptions: T.nilable(T::Array[Models::Shared::TransactionEmbeddedExemption]), related_to: T.nilable(::String), secondary_external_id: T.nilable(::String), secondary_source: T.nilable(::String), external_friendly_id: T.nilable(::String), tax_liability_source: T.nilable(Models::Shared::TaxLiabilitySourceEnum), is_tax_inclusive: T.nilable(T::Boolean), locked: T.nilable(T::Boolean), connection_id: T.nilable(::String), filing_id: T.nilable(::String), city: T.nilable(::String), county: T.nilable(::String), state: T.nilable(::String), country: T.nilable(Models::Shared::CountryCodeEnum), postal_code: T.nilable(::String), tax_id: T.nilable(::String), document_type: T.nilable(Models::Shared::DocumentTypeEnum), created_from: T.nilable(::String)).void }
105
+ def initialize(organization_id:, external_id:, date:, addresses:, transaction_items:, customer:, total_amount: nil, total_tax_amount_imported: nil, tax_rate_imported: nil, total_tax_amount_calculated: nil, tax_rate_calculated: nil, total_tax_liability_amount: nil, taxable_amount: nil, currency: nil, source: nil, status: nil, requires_exemption: nil, shop_date: nil, shop_date_tz: nil, description: nil, refund_status: nil, customer_id: nil, marketplace: nil, exempt: nil, exemptions: nil, related_to: nil, secondary_external_id: nil, secondary_source: nil, external_friendly_id: nil, tax_liability_source: nil, is_tax_inclusive: nil, locked: false, connection_id: nil, filing_id: nil, city: nil, county: nil, state: nil, country: nil, postal_code: nil, tax_id: nil, document_type: nil, created_from: nil)
104
106
  @organization_id = organization_id
105
107
  @external_id = external_id
106
108
  @date = date
@@ -131,6 +133,7 @@ module KintsugiSDK
131
133
  @secondary_source = secondary_source
132
134
  @external_friendly_id = external_friendly_id
133
135
  @tax_liability_source = tax_liability_source
136
+ @is_tax_inclusive = is_tax_inclusive
134
137
  @locked = locked
135
138
  @connection_id = connection_id
136
139
  @filing_id = filing_id
@@ -177,6 +180,7 @@ module KintsugiSDK
177
180
  return false unless @secondary_source == other.secondary_source
178
181
  return false unless @external_friendly_id == other.external_friendly_id
179
182
  return false unless @tax_liability_source == other.tax_liability_source
183
+ return false unless @is_tax_inclusive == other.is_tax_inclusive
180
184
  return false unless @locked == other.locked
181
185
  return false unless @connection_id == other.connection_id
182
186
  return false unless @filing_id == other.filing_id
@@ -68,6 +68,8 @@ class KintsugiSDK::Models::Shared::TransactionUpdate
68
68
  def external_friendly_id=(str_); end
69
69
  def tax_liability_source(); end
70
70
  def tax_liability_source=(str_); end
71
+ def is_tax_inclusive(); end
72
+ def is_tax_inclusive=(str_); end
71
73
  def locked(); end
72
74
  def locked=(str_); end
73
75
  def connection_id(); end
@@ -0,0 +1,24 @@
1
+ # Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
2
+
3
+ # typed: true
4
+ # frozen_string_literal: true
5
+
6
+
7
+ module KintsugiSDK
8
+ module Models
9
+ module Shared
10
+ # UseTaxRegistrationPath - What Register does with a use tax row, as the nexus response reports it.
11
+ #
12
+ # - ABSORBED: Register folds the row into the org's live sales tax registration
13
+ # - SEPARATE: the state always keeps use tax on its own registration
14
+ # - NONE: everything else, and always NONE on a row that is not use tax
15
+ class UseTaxRegistrationPath < T::Enum
16
+ enums do
17
+ ABSORBED = new('ABSORBED')
18
+ SEPARATE = new('SEPARATE')
19
+ NONE = new('NONE')
20
+ end
21
+ end
22
+ end
23
+ end
24
+ end
@@ -0,0 +1,11 @@
1
+ # typed: true
2
+ # frozen_string_literal: true
3
+
4
+
5
+ class KintsugiSDK::Models::Shared::UseTaxRegistrationPath
6
+ extend ::Crystalline::MetadataFields::ClassMethods
7
+ end
8
+
9
+
10
+ class KintsugiSDK::Models::Shared::UseTaxRegistrationPath
11
+ end
@@ -43,7 +43,6 @@ module KintsugiSDK
43
43
  autoload :DiscountBuilder, 'kintsugi_sdk/models/shared/discountbuilder.rb'
44
44
  autoload :DisregardedTypeEnum, 'kintsugi_sdk/models/shared/disregardedtypeenum.rb'
45
45
  autoload :DocumentTypeEnum, 'kintsugi_sdk/models/shared/documenttypeenum.rb'
46
- autoload :Exemption, 'kintsugi_sdk/models/shared/exemption.rb'
47
46
  autoload :ExemptionCreate, 'kintsugi_sdk/models/shared/exemptioncreate.rb'
48
47
  autoload :ExemptionRequired, 'kintsugi_sdk/models/shared/exemptionrequired.rb'
49
48
  autoload :ExemptionSourceEnum, 'kintsugi_sdk/models/shared/exemptionsourceenum.rb'
@@ -98,6 +97,7 @@ module KintsugiSDK
98
97
  autoload :TransactionAddressReadOutput, 'kintsugi_sdk/models/shared/transactionaddressread_output.rb'
99
98
  autoload :TransactionCreate, 'kintsugi_sdk/models/shared/transactioncreate.rb'
100
99
  autoload :TransactionDirectionEnum, 'kintsugi_sdk/models/shared/transactiondirectionenum.rb'
100
+ autoload :TransactionEmbeddedExemption, 'kintsugi_sdk/models/shared/transactionembeddedexemption.rb'
101
101
  autoload :TransactionEstimatePublicRequest, 'kintsugi_sdk/models/shared/transactionestimatepublicrequest.rb'
102
102
  autoload :TransactionEstimateResponse, 'kintsugi_sdk/models/shared/transactionestimateresponse.rb'
103
103
  autoload :TransactionEstimateResponseAddresses, 'kintsugi_sdk/models/shared/transactionestimateresponse_addresses.rb'
@@ -149,6 +149,7 @@ module KintsugiSDK
149
149
  autoload :TransactionUpdateTotalTaxAmountImported, 'kintsugi_sdk/models/shared/transactionupdate_total_tax_amount_imported.rb'
150
150
  autoload :TransactionUpdateTotalTaxLiabilityAmount, 'kintsugi_sdk/models/shared/transactionupdate_total_tax_liability_amount.rb'
151
151
  autoload :TreatmentEnum, 'kintsugi_sdk/models/shared/treatmentenum.rb'
152
+ autoload :UseTaxRegistrationPath, 'kintsugi_sdk/models/shared/usetaxregistrationpath.rb'
152
153
  autoload :ValidationAddress, 'kintsugi_sdk/models/shared/validationaddress.rb'
153
154
  autoload :ValidationError, 'kintsugi_sdk/models/shared/validationerror.rb'
154
155
  autoload :Addresses, 'kintsugi_sdk/models/shared/addresses.rb'
@@ -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::GetNexusForOrgV1NexusGetRequest, timeout_ms: T.nilable(Integer), http_headers: T.nilable(T::Hash[T.any(String, Symbol), String])).returns(T.any(Models::Shared::PageNexusResponse, T::Array[Models::Shared::NexusResponse])) }
44
+ sig { params(request: Models::Ops::GetNexusForOrgV1NexusGetRequest, timeout_ms: T.nilable(::Integer), http_headers: T.nilable(T::Hash[T.any(::String, ::Symbol), ::String])).returns(T.any(Models::Shared::PageNexusResponse, T::Array[Models::Shared::NexusResponse])) }
45
45
  def list(request:, timeout_ms: nil, http_headers: nil)
46
46
  # list - Get nexus for org
47
47
  # Get a list of all nexuses for the organization.
@@ -49,7 +49,7 @@ module KintsugiSDK
49
49
  base_url = Utils.template_url(url, params)
50
50
  url = "#{base_url}/v1/nexus"
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::GetNexusForOrgV1NexusGetRequest, 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), Crystalline::Union.new(Models::Shared::PageNexusResponse, Crystalline::Array.new(Models::Shared::NexusResponse)))
130
+ obj = Crystalline.unmarshal_json(::JSON.parse(response_data), Crystalline::Union.new(Models::Shared::PageNexusResponse, Crystalline::Array.new(Models::Shared::NexusResponse)))
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::HTTPValidationError)
145
+ obj = Crystalline.unmarshal_json(::JSON.parse(response_data), Models::Errors::HTTPValidationError)
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'
@@ -32,12 +32,12 @@ module KintsugiSDK
32
32
  params(
33
33
  client: T.nilable(Faraday::Connection),
34
34
  retry_config: T.nilable(::KintsugiSDK::Utils::RetryConfig),
35
- timeout_ms: T.nilable(Integer),
35
+ timeout_ms: T.nilable(::Integer),
36
36
  api_key_header: T.nilable(::String),
37
37
  security_source: T.nilable(T.proc.returns(Models::Shared::Security)),
38
- server_idx: T.nilable(Integer),
39
- server_url: T.nilable(String),
40
- url_params: T.nilable(T::Hash[Symbol, String])
38
+ server_idx: T.nilable(::Integer),
39
+ server_url: T.nilable(::String),
40
+ url_params: T.nilable(T::Hash[::Symbol, ::String])
41
41
  ).void
42
42
  end
43
43
  def initialize(client: nil, retry_config: nil, timeout_ms: nil, api_key_header: nil, security_source: nil, server_idx: nil, server_url: nil, url_params: nil)
@@ -87,7 +87,7 @@ module KintsugiSDK
87
87
  @transactions = Transactions.new(@sdk_configuration)
88
88
  end
89
89
 
90
- sig { params(base_url: String, url_variables: T.nilable(T::Hash[Symbol, T.any(String, T::Enum)])).returns(String) }
90
+ sig { params(base_url: ::String, url_variables: T.nilable(T::Hash[::Symbol, T.any(::String, T::Enum)])).returns(::String) }
91
91
  def get_url(base_url:, url_variables: nil)
92
92
  sd_base_url, sd_options = @sdk_configuration.get_server_details
93
93