kintsugi_sdk 5.5.14 → 5.6.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 (277) hide show
  1. checksums.yaml +4 -4
  2. data/lib/crystalline/enum.rbi +17 -0
  3. data/lib/crystalline/metadata_fields.rb +94 -38
  4. data/lib/crystalline/module.rb +103 -13
  5. data/lib/crystalline/types.rb +111 -19
  6. data/lib/crystalline/utils.rb +13 -0
  7. data/lib/kintsugi_sdk/addressvalidation.rb +24 -16
  8. data/lib/kintsugi_sdk/customers.rb +76 -53
  9. data/lib/kintsugi_sdk/exemptions.rb +55 -38
  10. data/lib/kintsugi_sdk/models/errors/apierror.rbi +2 -1
  11. data/lib/kintsugi_sdk/models/errors/backend_src_address_validation_responses_validationerrorresponse.rb +0 -1
  12. data/lib/kintsugi_sdk/models/errors/backend_src_address_validation_responses_validationerrorresponse.rbi +1 -1
  13. data/lib/kintsugi_sdk/models/errors/backend_src_customers_responses_validationerrorresponse.rb +0 -1
  14. data/lib/kintsugi_sdk/models/errors/backend_src_customers_responses_validationerrorresponse.rbi +1 -1
  15. data/lib/kintsugi_sdk/models/errors/backend_src_exemptions_responses_validationerrorresponse.rb +0 -1
  16. data/lib/kintsugi_sdk/models/errors/backend_src_exemptions_responses_validationerrorresponse.rbi +1 -1
  17. data/lib/kintsugi_sdk/models/errors/backend_src_products_responses_validationerrorresponse.rb +0 -1
  18. data/lib/kintsugi_sdk/models/errors/backend_src_products_responses_validationerrorresponse.rbi +1 -1
  19. data/lib/kintsugi_sdk/models/errors/backend_src_tax_estimation_responses_validationerrorresponse.rb +0 -1
  20. data/lib/kintsugi_sdk/models/errors/backend_src_tax_estimation_responses_validationerrorresponse.rbi +1 -1
  21. data/lib/kintsugi_sdk/models/errors/backend_src_transactions_responses_validationerrorresponse.rb +0 -1
  22. data/lib/kintsugi_sdk/models/errors/backend_src_transactions_responses_validationerrorresponse.rbi +1 -1
  23. data/lib/kintsugi_sdk/models/errors/errorresponse.rb +0 -1
  24. data/lib/kintsugi_sdk/models/errors/errorresponse.rbi +1 -1
  25. data/lib/kintsugi_sdk/models/errors/httpvalidationerror.rb +0 -1
  26. data/lib/kintsugi_sdk/models/errors/httpvalidationerror.rbi +1 -1
  27. data/lib/kintsugi_sdk/models/ops/createtransactionbycustomer_request.rb +0 -1
  28. data/lib/kintsugi_sdk/models/ops/createtransactionbycustomer_request.rbi +1 -1
  29. data/lib/kintsugi_sdk/models/ops/estimate_tax_v1_tax_estimate_post_request.rb +2 -3
  30. data/lib/kintsugi_sdk/models/ops/estimate_tax_v1_tax_estimate_post_request.rbi +1 -1
  31. data/lib/kintsugi_sdk/models/ops/get_customer_by_external_id_v1_customers_external_external_id_get_request.rb +0 -1
  32. data/lib/kintsugi_sdk/models/ops/get_customer_by_external_id_v1_customers_external_external_id_get_request.rbi +1 -1
  33. data/lib/kintsugi_sdk/models/ops/get_customer_by_id_v1_customers_customer_id_get_request.rb +0 -1
  34. data/lib/kintsugi_sdk/models/ops/get_customer_by_id_v1_customers_customer_id_get_request.rbi +1 -1
  35. data/lib/kintsugi_sdk/models/ops/get_customers_v1_request.rb +0 -1
  36. data/lib/kintsugi_sdk/models/ops/get_customers_v1_request.rbi +1 -1
  37. data/lib/kintsugi_sdk/models/ops/get_exemption_by_id_v1_exemptions_exemption_id_get_request.rb +0 -1
  38. data/lib/kintsugi_sdk/models/ops/get_exemption_by_id_v1_exemptions_exemption_id_get_request.rbi +1 -1
  39. data/lib/kintsugi_sdk/models/ops/get_exemptions_v1_exemptions_get_request.rb +0 -1
  40. data/lib/kintsugi_sdk/models/ops/get_exemptions_v1_exemptions_get_request.rbi +1 -1
  41. data/lib/kintsugi_sdk/models/ops/get_nexus_for_org_v1_nexus_get_request.rb +6 -3
  42. data/lib/kintsugi_sdk/models/ops/get_nexus_for_org_v1_nexus_get_request.rbi +3 -1
  43. data/lib/kintsugi_sdk/models/ops/get_product_by_id_v1_products_product_id_get_request.rb +0 -1
  44. data/lib/kintsugi_sdk/models/ops/get_product_by_id_v1_products_product_id_get_request.rbi +1 -1
  45. data/lib/kintsugi_sdk/models/ops/get_transaction_by_id_v1_transactions_transaction_id_get_request.rb +0 -1
  46. data/lib/kintsugi_sdk/models/ops/get_transaction_by_id_v1_transactions_transaction_id_get_request.rbi +1 -1
  47. data/lib/kintsugi_sdk/models/ops/get_transactions_v1_transactions_get_request.rb +0 -1
  48. data/lib/kintsugi_sdk/models/ops/get_transactions_v1_transactions_get_request.rbi +1 -1
  49. data/lib/kintsugi_sdk/models/ops/getexemptionattachments_request.rb +0 -1
  50. data/lib/kintsugi_sdk/models/ops/getexemptionattachments_request.rbi +1 -1
  51. data/lib/kintsugi_sdk/models/ops/gettransactionbyexternalid_request.rb +0 -1
  52. data/lib/kintsugi_sdk/models/ops/gettransactionbyexternalid_request.rbi +1 -1
  53. data/lib/kintsugi_sdk/models/ops/gettransactionsbycustomer_request.rb +0 -1
  54. data/lib/kintsugi_sdk/models/ops/gettransactionsbycustomer_request.rbi +1 -1
  55. data/lib/kintsugi_sdk/models/ops/gettransactionsbyfiling_request.rb +0 -1
  56. data/lib/kintsugi_sdk/models/ops/gettransactionsbyfiling_request.rbi +1 -1
  57. data/lib/kintsugi_sdk/models/ops/search_v1_address_validation_search_post_security.rb +0 -1
  58. data/lib/kintsugi_sdk/models/ops/search_v1_address_validation_search_post_security.rbi +1 -1
  59. data/lib/kintsugi_sdk/models/ops/update_customer_v1_customers_customer_id_put_request.rb +0 -1
  60. data/lib/kintsugi_sdk/models/ops/update_customer_v1_customers_customer_id_put_request.rbi +1 -1
  61. data/lib/kintsugi_sdk/models/ops/update_product_v1_products_product_id_put_request.rb +0 -1
  62. data/lib/kintsugi_sdk/models/ops/update_product_v1_products_product_id_put_request.rbi +1 -1
  63. data/lib/kintsugi_sdk/models/ops/update_transaction_v1_transactions_transaction_id_put_request.rb +0 -1
  64. data/lib/kintsugi_sdk/models/ops/update_transaction_v1_transactions_transaction_id_put_request.rbi +1 -1
  65. data/lib/kintsugi_sdk/models/ops/uploadexemptioncert_request.rb +0 -1
  66. data/lib/kintsugi_sdk/models/ops/uploadexemptioncert_request.rbi +1 -1
  67. data/lib/kintsugi_sdk/models/ops.rb +0 -1
  68. data/lib/kintsugi_sdk/models/shared/addressbase.rb +1 -2
  69. data/lib/kintsugi_sdk/models/shared/addressbase.rbi +1 -1
  70. data/lib/kintsugi_sdk/models/shared/addresses.rb +3 -4
  71. data/lib/kintsugi_sdk/models/shared/addresses.rbi +1 -1
  72. data/lib/kintsugi_sdk/models/shared/addressresponsedata.rb +0 -1
  73. data/lib/kintsugi_sdk/models/shared/addressresponsedata.rbi +1 -1
  74. data/lib/kintsugi_sdk/models/shared/addresssearchresponse.rb +0 -1
  75. data/lib/kintsugi_sdk/models/shared/addresssearchresponse.rbi +1 -1
  76. data/lib/kintsugi_sdk/models/shared/addressstatus.rb +0 -3
  77. data/lib/kintsugi_sdk/models/shared/addressstatus.rbi +1 -1
  78. data/lib/kintsugi_sdk/models/shared/addresssubmittedresponse.rb +0 -1
  79. data/lib/kintsugi_sdk/models/shared/addresssubmittedresponse.rbi +1 -1
  80. data/lib/kintsugi_sdk/models/shared/addresstype.rb +0 -3
  81. data/lib/kintsugi_sdk/models/shared/addresstype.rbi +1 -1
  82. data/lib/kintsugi_sdk/models/shared/appliedto.rb +0 -3
  83. data/lib/kintsugi_sdk/models/shared/appliedto.rbi +1 -1
  84. data/lib/kintsugi_sdk/models/shared/attachmentread.rb +1 -2
  85. data/lib/kintsugi_sdk/models/shared/attachmentread.rbi +1 -1
  86. data/lib/kintsugi_sdk/models/shared/backend_src_address_validation_responses_validationerroritem.rb +0 -1
  87. data/lib/kintsugi_sdk/models/shared/backend_src_address_validation_responses_validationerroritem.rbi +1 -1
  88. data/lib/kintsugi_sdk/models/shared/backend_src_customers_responses_validationerroritem.rb +0 -1
  89. data/lib/kintsugi_sdk/models/shared/backend_src_customers_responses_validationerroritem.rbi +1 -1
  90. data/lib/kintsugi_sdk/models/shared/backend_src_exemptions_models_exemptionread.rb +4 -5
  91. data/lib/kintsugi_sdk/models/shared/backend_src_exemptions_models_exemptionread.rbi +1 -1
  92. data/lib/kintsugi_sdk/models/shared/backend_src_exemptions_responses_validationerroritem.rb +0 -1
  93. data/lib/kintsugi_sdk/models/shared/backend_src_exemptions_responses_validationerroritem.rbi +1 -1
  94. data/lib/kintsugi_sdk/models/shared/backend_src_exemptions_serializers_exemptionread.rb +4 -5
  95. data/lib/kintsugi_sdk/models/shared/backend_src_exemptions_serializers_exemptionread.rbi +1 -1
  96. data/lib/kintsugi_sdk/models/shared/backend_src_products_responses_validationerroritem.rb +0 -1
  97. data/lib/kintsugi_sdk/models/shared/backend_src_products_responses_validationerroritem.rbi +1 -1
  98. data/lib/kintsugi_sdk/models/shared/backend_src_tax_estimation_responses_validationerroritem.rb +0 -1
  99. data/lib/kintsugi_sdk/models/shared/backend_src_tax_estimation_responses_validationerroritem.rbi +1 -1
  100. data/lib/kintsugi_sdk/models/shared/backend_src_transactions_responses_validationerroritem.rb +0 -1
  101. data/lib/kintsugi_sdk/models/shared/backend_src_transactions_responses_validationerroritem.rbi +1 -1
  102. data/lib/kintsugi_sdk/models/shared/body_upload_exemption_certificate_v1_exemptions_exemption_id_attachments_post.rb +0 -1
  103. data/lib/kintsugi_sdk/models/shared/body_upload_exemption_certificate_v1_exemptions_exemption_id_attachments_post.rbi +1 -1
  104. data/lib/kintsugi_sdk/models/shared/countrycodeenum.rb +1 -3
  105. data/lib/kintsugi_sdk/models/shared/countrycodeenum.rbi +1 -1
  106. data/lib/kintsugi_sdk/models/shared/currencyenum.rb +0 -3
  107. data/lib/kintsugi_sdk/models/shared/currencyenum.rbi +1 -1
  108. data/lib/kintsugi_sdk/models/shared/customerbase.rb +4 -5
  109. data/lib/kintsugi_sdk/models/shared/customerbase.rbi +1 -1
  110. data/lib/kintsugi_sdk/models/shared/customerbasebase.rb +4 -5
  111. data/lib/kintsugi_sdk/models/shared/customerbasebase.rbi +1 -1
  112. data/lib/kintsugi_sdk/models/shared/customerbasepublic.rb +4 -5
  113. data/lib/kintsugi_sdk/models/shared/customerbasepublic.rbi +1 -1
  114. data/lib/kintsugi_sdk/models/shared/customercreate.rb +4 -5
  115. data/lib/kintsugi_sdk/models/shared/customercreate.rbi +1 -1
  116. data/lib/kintsugi_sdk/models/shared/customerread.rb +4 -5
  117. data/lib/kintsugi_sdk/models/shared/customerread.rbi +1 -1
  118. data/lib/kintsugi_sdk/models/shared/customertaxregistrationread.rb +2 -3
  119. data/lib/kintsugi_sdk/models/shared/customertaxregistrationread.rbi +1 -1
  120. data/lib/kintsugi_sdk/models/shared/customertaxtypeenum.rb +0 -3
  121. data/lib/kintsugi_sdk/models/shared/customertaxtypeenum.rbi +1 -1
  122. data/lib/kintsugi_sdk/models/shared/customerupdate.rb +4 -5
  123. data/lib/kintsugi_sdk/models/shared/customerupdate.rbi +1 -1
  124. data/lib/kintsugi_sdk/models/shared/discountbuilder.rb +2 -3
  125. data/lib/kintsugi_sdk/models/shared/discountbuilder.rbi +1 -1
  126. data/lib/kintsugi_sdk/models/shared/exemption.rb +5 -6
  127. data/lib/kintsugi_sdk/models/shared/exemption.rbi +1 -1
  128. data/lib/kintsugi_sdk/models/shared/exemptioncreate.rb +4 -5
  129. data/lib/kintsugi_sdk/models/shared/exemptioncreate.rbi +1 -1
  130. data/lib/kintsugi_sdk/models/shared/exemptionrequired.rb +6 -5
  131. data/lib/kintsugi_sdk/models/shared/exemptionrequired.rbi +1 -1
  132. data/lib/kintsugi_sdk/models/shared/exemptionstatus.rb +0 -3
  133. data/lib/kintsugi_sdk/models/shared/exemptionstatus.rbi +1 -1
  134. data/lib/kintsugi_sdk/models/shared/exemptiontype.rb +0 -3
  135. data/lib/kintsugi_sdk/models/shared/exemptiontype.rbi +1 -1
  136. data/lib/kintsugi_sdk/models/shared/fastapi_pagination_default_page_exemptionread_2.rb +3 -4
  137. data/lib/kintsugi_sdk/models/shared/fastapi_pagination_default_page_exemptionread_2.rbi +1 -1
  138. data/lib/kintsugi_sdk/models/shared/file.rb +0 -1
  139. data/lib/kintsugi_sdk/models/shared/file.rbi +1 -1
  140. data/lib/kintsugi_sdk/models/shared/findthresholdcrossingtransactionstate.rb +56 -0
  141. data/lib/kintsugi_sdk/models/shared/findthresholdcrossingtransactionstate.rbi +25 -0
  142. data/lib/kintsugi_sdk/models/shared/jurisdictiontype.rb +0 -3
  143. data/lib/kintsugi_sdk/models/shared/jurisdictiontype.rbi +1 -1
  144. data/lib/kintsugi_sdk/models/shared/nexusresponse.rb +41 -22
  145. data/lib/kintsugi_sdk/models/shared/nexusresponse.rbi +11 -1
  146. data/lib/kintsugi_sdk/models/shared/nexusstateenum.rb +0 -3
  147. data/lib/kintsugi_sdk/models/shared/nexusstateenum.rbi +1 -1
  148. data/lib/kintsugi_sdk/models/shared/nexusstatusenum.rb +0 -3
  149. data/lib/kintsugi_sdk/models/shared/nexusstatusenum.rbi +1 -1
  150. data/lib/kintsugi_sdk/models/shared/nexustypeenum.rb +0 -3
  151. data/lib/kintsugi_sdk/models/shared/nexustypeenum.rbi +1 -1
  152. data/lib/kintsugi_sdk/models/shared/page_customerread_.rb +3 -4
  153. data/lib/kintsugi_sdk/models/shared/page_customerread_.rbi +1 -1
  154. data/lib/kintsugi_sdk/models/shared/page_nexusresponse_.rb +3 -4
  155. data/lib/kintsugi_sdk/models/shared/page_nexusresponse_.rbi +1 -1
  156. data/lib/kintsugi_sdk/models/shared/page_transactionestimateresponse_.rb +3 -4
  157. data/lib/kintsugi_sdk/models/shared/page_transactionestimateresponse_.rbi +1 -1
  158. data/lib/kintsugi_sdk/models/shared/page_transactionread_.rb +3 -4
  159. data/lib/kintsugi_sdk/models/shared/page_transactionread_.rbi +1 -1
  160. data/lib/kintsugi_sdk/models/shared/periodmodelenum.rb +0 -3
  161. data/lib/kintsugi_sdk/models/shared/periodmodelenum.rbi +1 -1
  162. data/lib/kintsugi_sdk/models/shared/processingstatusenum.rb +1 -3
  163. data/lib/kintsugi_sdk/models/shared/processingstatusenum.rbi +1 -1
  164. data/lib/kintsugi_sdk/models/shared/productread.rb +12 -9
  165. data/lib/kintsugi_sdk/models/shared/productread.rbi +1 -1
  166. data/lib/kintsugi_sdk/models/shared/productstatusenum.rb +0 -3
  167. data/lib/kintsugi_sdk/models/shared/productstatusenum.rbi +1 -1
  168. data/lib/kintsugi_sdk/models/shared/productupdate.rb +10 -7
  169. data/lib/kintsugi_sdk/models/shared/productupdate.rbi +1 -1
  170. data/lib/kintsugi_sdk/models/shared/registration.rb +0 -1
  171. data/lib/kintsugi_sdk/models/shared/registration.rbi +1 -1
  172. data/lib/kintsugi_sdk/models/shared/registrationsregimeenum.rb +0 -3
  173. data/lib/kintsugi_sdk/models/shared/registrationsregimeenum.rbi +1 -1
  174. data/lib/kintsugi_sdk/models/shared/relatedentitytype.rb +0 -3
  175. data/lib/kintsugi_sdk/models/shared/relatedentitytype.rbi +1 -1
  176. data/lib/kintsugi_sdk/models/shared/salesortransactionsenum.rb +0 -3
  177. data/lib/kintsugi_sdk/models/shared/salesortransactionsenum.rbi +1 -1
  178. data/lib/kintsugi_sdk/models/shared/security.rb +2 -3
  179. data/lib/kintsugi_sdk/models/shared/security.rbi +1 -1
  180. data/lib/kintsugi_sdk/models/shared/sourceenum.rb +6 -3
  181. data/lib/kintsugi_sdk/models/shared/sourceenum.rbi +1 -1
  182. data/lib/kintsugi_sdk/models/shared/statusenum.rb +0 -3
  183. data/lib/kintsugi_sdk/models/shared/statusenum.rbi +1 -1
  184. data/lib/kintsugi_sdk/models/shared/taxexemptionenum.rb +1 -3
  185. data/lib/kintsugi_sdk/models/shared/taxexemptionenum.rbi +1 -1
  186. data/lib/kintsugi_sdk/models/shared/taxitembuilder.rb +4 -5
  187. data/lib/kintsugi_sdk/models/shared/taxitembuilder.rbi +1 -1
  188. data/lib/kintsugi_sdk/models/shared/taxitemestimate.rb +1 -2
  189. data/lib/kintsugi_sdk/models/shared/taxitemestimate.rbi +1 -1
  190. data/lib/kintsugi_sdk/models/shared/taxitemread.rb +4 -5
  191. data/lib/kintsugi_sdk/models/shared/taxitemread.rbi +1 -1
  192. data/lib/kintsugi_sdk/models/shared/taxitemreturnreasonenum.rb +2 -3
  193. data/lib/kintsugi_sdk/models/shared/taxitemreturnreasonenum.rbi +1 -1
  194. data/lib/kintsugi_sdk/models/shared/taxitemtypeenum.rb +0 -3
  195. data/lib/kintsugi_sdk/models/shared/taxitemtypeenum.rbi +1 -1
  196. data/lib/kintsugi_sdk/models/shared/taxliabilitysourceenum.rb +0 -3
  197. data/lib/kintsugi_sdk/models/shared/taxliabilitysourceenum.rbi +1 -1
  198. data/lib/kintsugi_sdk/models/shared/transactionaddressbuilder.rb +3 -4
  199. data/lib/kintsugi_sdk/models/shared/transactionaddressbuilder.rbi +1 -1
  200. data/lib/kintsugi_sdk/models/shared/transactionaddresspublic.rb +2 -3
  201. data/lib/kintsugi_sdk/models/shared/transactionaddresspublic.rbi +1 -1
  202. data/lib/kintsugi_sdk/models/shared/transactionaddressread_output.rb +3 -4
  203. data/lib/kintsugi_sdk/models/shared/transactionaddressread_output.rbi +1 -1
  204. data/lib/kintsugi_sdk/models/shared/transactioncreate.rb +23 -19
  205. data/lib/kintsugi_sdk/models/shared/transactioncreate.rbi +3 -3
  206. data/lib/kintsugi_sdk/models/shared/transactionestimatepublicrequest.rb +6 -11
  207. data/lib/kintsugi_sdk/models/shared/transactionestimatepublicrequest.rbi +1 -3
  208. data/lib/kintsugi_sdk/models/shared/transactionestimateresponse.rb +7 -12
  209. data/lib/kintsugi_sdk/models/shared/transactionestimateresponse.rbi +1 -3
  210. data/lib/kintsugi_sdk/models/shared/transactionestimateresponse_addresses.rb +3 -4
  211. data/lib/kintsugi_sdk/models/shared/transactionestimateresponse_addresses.rbi +1 -1
  212. data/lib/kintsugi_sdk/models/shared/transactionestimateresponse_type.rb +0 -3
  213. data/lib/kintsugi_sdk/models/shared/transactionestimateresponse_type.rbi +1 -1
  214. data/lib/kintsugi_sdk/models/shared/transactionexemptstatusenum.rb +2 -3
  215. data/lib/kintsugi_sdk/models/shared/transactionexemptstatusenum.rbi +1 -1
  216. data/lib/kintsugi_sdk/models/shared/transactionitembuilder.rb +8 -7
  217. data/lib/kintsugi_sdk/models/shared/transactionitembuilder.rbi +1 -1
  218. data/lib/kintsugi_sdk/models/shared/transactionitemcreateupdate.rb +8 -7
  219. data/lib/kintsugi_sdk/models/shared/transactionitemcreateupdate.rbi +1 -1
  220. data/lib/kintsugi_sdk/models/shared/transactionitemestimatebase.rb +2 -3
  221. data/lib/kintsugi_sdk/models/shared/transactionitemestimatebase.rbi +1 -1
  222. data/lib/kintsugi_sdk/models/shared/transactionitemestimateresponse.rb +3 -4
  223. data/lib/kintsugi_sdk/models/shared/transactionitemestimateresponse.rbi +1 -1
  224. data/lib/kintsugi_sdk/models/shared/transactionitemread.rb +7 -6
  225. data/lib/kintsugi_sdk/models/shared/transactionitemread.rbi +1 -1
  226. data/lib/kintsugi_sdk/models/shared/transactionpublicrequest.rb +21 -17
  227. data/lib/kintsugi_sdk/models/shared/transactionpublicrequest.rbi +3 -3
  228. data/lib/kintsugi_sdk/models/shared/transactionread.rb +24 -20
  229. data/lib/kintsugi_sdk/models/shared/transactionread.rbi +3 -3
  230. data/lib/kintsugi_sdk/models/shared/transactionrefundstatus.rb +0 -3
  231. data/lib/kintsugi_sdk/models/shared/transactionrefundstatus.rbi +1 -1
  232. data/lib/kintsugi_sdk/models/shared/transactionstatusenum.rb +0 -3
  233. data/lib/kintsugi_sdk/models/shared/transactionstatusenum.rbi +1 -1
  234. data/lib/kintsugi_sdk/models/shared/transactiontypeenum.rb +0 -3
  235. data/lib/kintsugi_sdk/models/shared/transactiontypeenum.rbi +1 -1
  236. data/lib/kintsugi_sdk/models/shared/transactionupdate.rb +20 -16
  237. data/lib/kintsugi_sdk/models/shared/transactionupdate.rbi +3 -3
  238. data/lib/kintsugi_sdk/models/shared/treatmentenum.rb +0 -3
  239. data/lib/kintsugi_sdk/models/shared/treatmentenum.rbi +1 -1
  240. data/lib/kintsugi_sdk/models/shared/type.rb +0 -3
  241. data/lib/kintsugi_sdk/models/shared/type.rbi +1 -1
  242. data/lib/kintsugi_sdk/models/shared/validationaddress.rb +0 -1
  243. data/lib/kintsugi_sdk/models/shared/validationaddress.rbi +1 -1
  244. data/lib/kintsugi_sdk/models/shared/validationerror.rb +0 -1
  245. data/lib/kintsugi_sdk/models/shared/validationerror.rbi +1 -1
  246. data/lib/kintsugi_sdk/models/shared.rb +1 -7
  247. data/lib/kintsugi_sdk/nexus.rb +13 -8
  248. data/lib/kintsugi_sdk/openapisdk.rb +15 -16
  249. data/lib/kintsugi_sdk/products.rb +25 -425
  250. data/lib/kintsugi_sdk/sdk_hooks/hooks.rb +0 -1
  251. data/lib/kintsugi_sdk/sdkconfiguration.rb +7 -13
  252. data/lib/kintsugi_sdk/taxestimation.rb +15 -10
  253. data/lib/kintsugi_sdk/transactions.rb +65 -45
  254. data/lib/kintsugi_sdk/utils/forms.rb +1 -1
  255. data/lib/kintsugi_sdk/utils/query_params.rb +4 -2
  256. data/lib/kintsugi_sdk/utils/request_bodies.rb +11 -6
  257. data/lib/kintsugi_sdk/utils/retries.rb +4 -1
  258. data/lib/kintsugi_sdk/utils/security.rb +32 -11
  259. data/lib/kintsugi_sdk/utils/url.rb +11 -5
  260. data/lib/kintsugi_sdk/utils/utils.rb +45 -3
  261. metadata +73 -41
  262. data/lib/kintsugi_sdk/models/ops/get_products_v1_products_get_request.rb +0 -61
  263. data/lib/kintsugi_sdk/models/ops/get_products_v1_products_get_request.rbi +0 -27
  264. data/lib/kintsugi_sdk/models/shared/page_productread_.rb +0 -49
  265. data/lib/kintsugi_sdk/models/shared/page_productread_.rbi +0 -21
  266. data/lib/kintsugi_sdk/models/shared/productcategories.rb +0 -38
  267. data/lib/kintsugi_sdk/models/shared/productcategories.rbi +0 -15
  268. data/lib/kintsugi_sdk/models/shared/productcategoryenum.rb +0 -25
  269. data/lib/kintsugi_sdk/models/shared/productcategoryenum.rbi +0 -11
  270. data/lib/kintsugi_sdk/models/shared/productcodeenum.rb +0 -82
  271. data/lib/kintsugi_sdk/models/shared/productcodeenum.rbi +0 -11
  272. data/lib/kintsugi_sdk/models/shared/productcreatemanual.rb +0 -61
  273. data/lib/kintsugi_sdk/models/shared/productcreatemanual.rbi +0 -27
  274. data/lib/kintsugi_sdk/models/shared/productsubcategory.rb +0 -46
  275. data/lib/kintsugi_sdk/models/shared/productsubcategory.rbi +0 -19
  276. data/lib/kintsugi_sdk/models/shared/productsubcategoryenum.rb +0 -83
  277. data/lib/kintsugi_sdk/models/shared/productsubcategoryenum.rbi +0 -11
@@ -7,18 +7,19 @@
7
7
  module KintsugiSDK
8
8
  module Models
9
9
  module Shared
10
-
11
10
 
12
11
  class TransactionCreate
13
12
  extend T::Sig
14
13
  include Crystalline::MetadataFields
15
14
 
16
- # Unique identifier of the organization.
15
+ # Unique identifier of the organization. This field is deprecated, and should no longer be used. The value is populated through the 'x-organization-id' header.
16
+ #
17
+ # @deprecated true: This will be removed in a future release, please migrate away from it as soon as possible.
17
18
  field :organization_id, ::String, { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('organization_id'), required: true } }
18
19
  # External identifier of the transaction.
19
20
  field :external_id, ::String, { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('external_id'), required: true } }
20
21
  # Transaction date and time
21
- field :date, ::DateTime, { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('date'), required: true, 'decoder': Utils.datetime_from_iso_format(false) } }
22
+ field :date, ::DateTime, { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('date'), required: true, 'decoder': ::KintsugiSDK::Utils.datetime_from_iso_format(false) } }
22
23
 
23
24
  field :addresses, Crystalline::Array.new(Models::Shared::TransactionAddressBuilder), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('addresses'), required: true } }
24
25
 
@@ -29,21 +30,20 @@ module KintsugiSDK
29
30
  field :shop_date, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('shop_date') } }
30
31
  # Timezone of the shop
31
32
  field :shop_date_tz, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('shop_date_tz') } }
32
-
33
- field :status, Crystalline::Nilable.new(Models::Shared::TransactionStatusEnum), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('status'), 'decoder': Utils.enum_from_string(Models::Shared::TransactionStatusEnum, true) } }
34
33
  # Description of the transaction.
35
34
  field :description, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('description') } }
36
35
  # Shopify has 2 order statuses for refund case: refunded and partially_refunded
37
36
  # If the given order has different status from these 2, we will set the
38
37
  # transaction's refund_status to PARTIALLY_REFUNDED by default.
39
- field :refund_status, Crystalline::Nilable.new(Models::Shared::TransactionRefundStatus), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('refund_status'), 'decoder': Utils.enum_from_string(Models::Shared::TransactionRefundStatus, true) } }
38
+ field :refund_status, Crystalline::Nilable.new(Models::Shared::TransactionRefundStatus), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('refund_status'), 'decoder': ::KintsugiSDK::Utils.enum_from_string(Models::Shared::TransactionRefundStatus, true) } }
40
39
  # Unique identifier of the customer.
41
40
  field :customer_id, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('customer_id') } }
42
41
  # Based on transaction item exempt status.
43
42
  # NOT EXEMPT: None of the items are NOT EXEMPT
44
43
  # PARTIALLY EXEMPT: At least some of the items are NOT EXEMPT
45
44
  # FULLY_EXEMPT: All items sold in the transaction are EXEMPT
46
- field :exempt, Crystalline::Nilable.new(Models::Shared::TransactionExemptStatusEnum), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('exempt'), 'decoder': Utils.enum_from_string(Models::Shared::TransactionExemptStatusEnum, true) } }
45
+ # ZERO_RATE_NOT_EXEMPT: All items sold in the transaction are zero-rated
46
+ 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) } }
47
47
  # List of exemptions applied (if any).
48
48
  field :exemptions, Crystalline::Nilable.new(Crystalline::Array.new(Models::Shared::Exemption)), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('exemptions') } }
49
49
  # Related transaction identifier.
@@ -55,11 +55,11 @@ module KintsugiSDK
55
55
  # Friendly identifier of the original item.
56
56
  field :external_friendly_id, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('external_friendly_id') } }
57
57
 
58
- field :tax_liability_source, Crystalline::Nilable.new(Models::Shared::TaxLiabilitySourceEnum), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('tax_liability_source'), 'decoder': Utils.enum_from_string(Models::Shared::TaxLiabilitySourceEnum, true) } }
58
+ 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) } }
59
59
 
60
- field :currency, Crystalline::Nilable.new(Models::Shared::CurrencyEnum), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('currency'), 'decoder': Utils.enum_from_string(Models::Shared::CurrencyEnum, true) } }
60
+ 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) } }
61
61
 
62
- field :source, Crystalline::Nilable.new(Models::Shared::SourceEnum), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('source'), 'decoder': Utils.enum_from_string(Models::Shared::SourceEnum, true) } }
62
+ 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
63
  # Connection Identifier
64
64
  field :connection_id, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('connection_id') } }
65
65
  # Filing identifier.
@@ -71,18 +71,22 @@ module KintsugiSDK
71
71
  # State of the transaction address.
72
72
  field :state, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('state') } }
73
73
 
74
- field :country, Crystalline::Nilable.new(Models::Shared::CountryCodeEnum), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('country'), 'decoder': Utils.enum_from_string(Models::Shared::CountryCodeEnum, true) } }
74
+ field :country, Crystalline::Nilable.new(Models::Shared::CountryCodeEnum), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('country'), 'decoder': ::KintsugiSDK::Utils.enum_from_string(Models::Shared::CountryCodeEnum, true) } }
75
75
  # Postal code of the transaction.
76
76
  field :postal_code, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('postal_code') } }
77
- # Tax ID associated with the transaction
77
+ # Tax ID associated with the transaction. DEPRECATED: This field is only populated for QuickBooks integrations and will be removed in a future version.
78
+ #
79
+ # @deprecated true: This will be removed in a future release, please migrate away from it as soon as possible.
78
80
  field :tax_id, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('tax_id') } }
79
81
 
80
- field :address_status, Crystalline::Nilable.new(Models::Shared::AddressStatus), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('address_status'), 'decoder': Utils.enum_from_string(Models::Shared::AddressStatus, true) } }
82
+ field :status, Crystalline::Nilable.new(Models::Shared::TransactionStatusEnum), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('status'), 'decoder': ::KintsugiSDK::Utils.enum_from_string(Models::Shared::TransactionStatusEnum, true) } }
83
+
84
+ field :address_status, Crystalline::Nilable.new(Models::Shared::AddressStatus), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('address_status'), 'decoder': ::KintsugiSDK::Utils.enum_from_string(Models::Shared::AddressStatus, true) } }
81
85
  # Our transaction state, used to determine when/if a transaction needs additional
82
86
  # processing.
83
- field :processing_status, Crystalline::Nilable.new(Models::Shared::ProcessingStatusEnum), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('processing_status'), 'decoder': Utils.enum_from_string(Models::Shared::ProcessingStatusEnum, true) } }
87
+ field :processing_status, Crystalline::Nilable.new(Models::Shared::ProcessingStatusEnum), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('processing_status'), 'decoder': ::KintsugiSDK::Utils.enum_from_string(Models::Shared::ProcessingStatusEnum, true) } }
84
88
 
85
- field :destination_currency, Crystalline::Nilable.new(Models::Shared::CurrencyEnum), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('destination_currency'), 'decoder': Utils.enum_from_string(Models::Shared::CurrencyEnum, true) } }
89
+ field :destination_currency, Crystalline::Nilable.new(Models::Shared::CurrencyEnum), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('destination_currency'), 'decoder': ::KintsugiSDK::Utils.enum_from_string(Models::Shared::CurrencyEnum, true) } }
86
90
  # Converted total amount.
87
91
  field :converted_total_amount, Crystalline::Nilable.new(::Float), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('converted_total_amount') } }
88
92
  # Converted imported tax amount.
@@ -120,8 +124,8 @@ module KintsugiSDK
120
124
  # Transaction lock status.
121
125
  field :locked, Crystalline::Nilable.new(Crystalline::Boolean.new), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('locked') } }
122
126
 
123
- sig { params(organization_id: ::String, external_id: ::String, date: ::DateTime, addresses: T::Array[Models::Shared::TransactionAddressBuilder], transaction_items: T::Array[Models::Shared::TransactionItemCreateUpdate], requires_exemption: T.nilable(Models::Shared::ExemptionRequired), shop_date: T.nilable(::String), shop_date_tz: T.nilable(::String), status: T.nilable(Models::Shared::TransactionStatusEnum), description: T.nilable(::String), refund_status: T.nilable(Models::Shared::TransactionRefundStatus), customer_id: T.nilable(::String), 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), currency: T.nilable(Models::Shared::CurrencyEnum), source: T.nilable(Models::Shared::SourceEnum), 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), address_status: T.nilable(Models::Shared::AddressStatus), processing_status: T.nilable(Models::Shared::ProcessingStatusEnum), destination_currency: T.nilable(Models::Shared::CurrencyEnum), converted_total_amount: T.nilable(::Float), converted_total_tax_amount_imported: T.nilable(::Float), converted_total_tax_amount_calculated: T.nilable(::Float), conversion_rate: T.nilable(::Float), converted_taxable_amount: T.nilable(::Float), converted_total_discount: T.nilable(::Float), converted_subtotal: T.nilable(::Float), converted_total_tax_liability_amount: T.nilable(::Float), customer: T.nilable(Models::Shared::CustomerCreate), total_amount: T.nilable(::Float), marketplace: T.nilable(T::Boolean), total_tax_amount_imported: T.nilable(::Float), tax_rate_imported: T.nilable(::Float), total_tax_amount_calculated: T.nilable(::Float), tax_rate_calculated: T.nilable(::Float), total_tax_liability_amount: T.nilable(::Float), taxable_amount: T.nilable(::Float), locked: T.nilable(T::Boolean)).void }
124
- def initialize(organization_id:, external_id:, date:, addresses:, transaction_items:, requires_exemption: nil, shop_date: nil, shop_date_tz: nil, status: nil, description: nil, refund_status: nil, customer_id: nil, exempt: nil, exemptions: nil, related_to: nil, secondary_external_id: nil, secondary_source: nil, external_friendly_id: nil, tax_liability_source: nil, currency: nil, source: nil, connection_id: nil, filing_id: nil, city: nil, county: nil, state: nil, country: nil, postal_code: nil, tax_id: nil, address_status: nil, processing_status: nil, 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, customer: nil, total_amount: 0.00, marketplace: false, 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, taxable_amount: 0.00, locked: false)
127
+ sig { params(organization_id: ::String, external_id: ::String, date: ::DateTime, addresses: T::Array[Models::Shared::TransactionAddressBuilder], transaction_items: T::Array[Models::Shared::TransactionItemCreateUpdate], requires_exemption: T.nilable(Models::Shared::ExemptionRequired), shop_date: T.nilable(::String), shop_date_tz: T.nilable(::String), description: T.nilable(::String), refund_status: T.nilable(Models::Shared::TransactionRefundStatus), customer_id: T.nilable(::String), 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), currency: T.nilable(Models::Shared::CurrencyEnum), source: T.nilable(Models::Shared::SourceEnum), 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), status: T.nilable(Models::Shared::TransactionStatusEnum), address_status: T.nilable(Models::Shared::AddressStatus), processing_status: T.nilable(Models::Shared::ProcessingStatusEnum), destination_currency: T.nilable(Models::Shared::CurrencyEnum), converted_total_amount: T.nilable(::Float), converted_total_tax_amount_imported: T.nilable(::Float), converted_total_tax_amount_calculated: T.nilable(::Float), conversion_rate: T.nilable(::Float), converted_taxable_amount: T.nilable(::Float), converted_total_discount: T.nilable(::Float), converted_subtotal: T.nilable(::Float), converted_total_tax_liability_amount: T.nilable(::Float), customer: T.nilable(Models::Shared::CustomerCreate), total_amount: T.nilable(::Float), marketplace: T.nilable(T::Boolean), total_tax_amount_imported: T.nilable(::Float), tax_rate_imported: T.nilable(::Float), total_tax_amount_calculated: T.nilable(::Float), tax_rate_calculated: T.nilable(::Float), total_tax_liability_amount: T.nilable(::Float), taxable_amount: T.nilable(::Float), locked: T.nilable(T::Boolean)).void }
128
+ def initialize(organization_id:, external_id:, date:, addresses:, transaction_items:, requires_exemption: nil, shop_date: nil, shop_date_tz: nil, description: nil, refund_status: nil, customer_id: nil, exempt: nil, exemptions: nil, related_to: nil, secondary_external_id: nil, secondary_source: nil, external_friendly_id: nil, tax_liability_source: nil, currency: nil, source: nil, connection_id: nil, filing_id: nil, city: nil, county: nil, state: nil, country: nil, postal_code: nil, tax_id: nil, status: nil, address_status: nil, processing_status: nil, 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, customer: nil, total_amount: 0.0, marketplace: false, total_tax_amount_imported: 0.0, tax_rate_imported: 0.0, total_tax_amount_calculated: 0.0, tax_rate_calculated: 0.0, total_tax_liability_amount: 0.0, taxable_amount: 0.0, locked: false)
125
129
  @organization_id = organization_id
126
130
  @external_id = external_id
127
131
  @date = date
@@ -130,7 +134,6 @@ module KintsugiSDK
130
134
  @requires_exemption = requires_exemption
131
135
  @shop_date = shop_date
132
136
  @shop_date_tz = shop_date_tz
133
- @status = status
134
137
  @description = description
135
138
  @refund_status = refund_status
136
139
  @customer_id = customer_id
@@ -151,6 +154,7 @@ module KintsugiSDK
151
154
  @country = country
152
155
  @postal_code = postal_code
153
156
  @tax_id = tax_id
157
+ @status = status
154
158
  @address_status = address_status
155
159
  @processing_status = processing_status
156
160
  @destination_currency = destination_currency
@@ -185,7 +189,6 @@ module KintsugiSDK
185
189
  return false unless @requires_exemption == other.requires_exemption
186
190
  return false unless @shop_date == other.shop_date
187
191
  return false unless @shop_date_tz == other.shop_date_tz
188
- return false unless @status == other.status
189
192
  return false unless @description == other.description
190
193
  return false unless @refund_status == other.refund_status
191
194
  return false unless @customer_id == other.customer_id
@@ -206,6 +209,7 @@ module KintsugiSDK
206
209
  return false unless @country == other.country
207
210
  return false unless @postal_code == other.postal_code
208
211
  return false unless @tax_id == other.tax_id
212
+ return false unless @status == other.status
209
213
  return false unless @address_status == other.address_status
210
214
  return false unless @processing_status == other.processing_status
211
215
  return false unless @destination_currency == other.destination_currency
@@ -24,8 +24,6 @@ class KintsugiSDK::Models::Shared::TransactionCreate
24
24
  def shop_date=(str_); end
25
25
  def shop_date_tz(); end
26
26
  def shop_date_tz=(str_); end
27
- def status(); end
28
- def status=(str_); end
29
27
  def description(); end
30
28
  def description=(str_); end
31
29
  def refund_status(); end
@@ -66,6 +64,8 @@ class KintsugiSDK::Models::Shared::TransactionCreate
66
64
  def postal_code=(str_); end
67
65
  def tax_id(); end
68
66
  def tax_id=(str_); end
67
+ def status(); end
68
+ def status=(str_); end
69
69
  def address_status(); end
70
70
  def address_status=(str_); end
71
71
  def processing_status(); end
@@ -108,4 +108,4 @@ class KintsugiSDK::Models::Shared::TransactionCreate
108
108
  def taxable_amount=(str_); end
109
109
  def locked(); end
110
110
  def locked=(str_); end
111
- end
111
+ end
@@ -7,19 +7,18 @@
7
7
  module KintsugiSDK
8
8
  module Models
9
9
  module Shared
10
-
11
10
  # Public request model for tax estimation API documentation.
12
- # This model excludes internal fields like enriched_fields that should not be exposed in API docs.
11
+ # This model excludes internal fields like enriched_fields and total_amount that should not be exposed in API docs.
13
12
  class TransactionEstimatePublicRequest
14
13
  extend T::Sig
15
14
  include Crystalline::MetadataFields
16
15
 
17
16
  # The date of the transaction in ISO 8601 format (e.g., 2025-01-25T12:00:00Z).
18
- field :date, ::DateTime, { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('date'), required: true, 'decoder': Utils.datetime_from_iso_format(false) } }
17
+ field :date, ::DateTime, { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('date'), required: true, 'decoder': ::KintsugiSDK::Utils.datetime_from_iso_format(false) } }
19
18
  # Unique identifier of this transaction in the source system.
20
19
  field :external_id, ::String, { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('external_id'), required: true } }
21
20
 
22
- field :currency, Models::Shared::CurrencyEnum, { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('currency'), required: true, 'decoder': Utils.enum_from_string(Models::Shared::CurrencyEnum, false) } }
21
+ field :currency, Models::Shared::CurrencyEnum, { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('currency'), required: true, 'decoder': ::KintsugiSDK::Utils.enum_from_string(Models::Shared::CurrencyEnum, false) } }
23
22
  # List of items involved in the transaction.
24
23
  field :transaction_items, Crystalline::Array.new(Models::Shared::TransactionItemEstimateBase), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('transaction_items'), required: true } }
25
24
  # List of addresses related to the transaction. At least one BILL_TO or SHIP_TO address must be provided. The address will be validated during estimation, and the transaction may be rejected if the address does not pass validation. The SHIP_TO will be preferred to use for determining tax liability.
@@ -27,16 +26,14 @@ module KintsugiSDK
27
26
  # An optional description of the transaction.
28
27
  field :description, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('description') } }
29
28
 
30
- field :source, Crystalline::Nilable.new(Models::Shared::SourceEnum), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('source'), 'decoder': Utils.enum_from_string(Models::Shared::SourceEnum, true) } }
29
+ 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) } }
31
30
 
32
31
  field :customer, Crystalline::Nilable.new(Models::Shared::CustomerBasePublic), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('customer') } }
33
- # Total amount of the transaction.
34
- field :total_amount, Crystalline::Nilable.new(::Float), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('total_amount') } }
35
32
  # Indicates if the transaction involves a marketplace.
36
33
  field :marketplace, Crystalline::Nilable.new(Crystalline::Boolean.new), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('marketplace') } }
37
34
 
38
- sig { params(date: ::DateTime, external_id: ::String, currency: Models::Shared::CurrencyEnum, transaction_items: T::Array[Models::Shared::TransactionItemEstimateBase], addresses: T::Array[Models::Shared::Addresses], description: T.nilable(::String), source: T.nilable(Models::Shared::SourceEnum), customer: T.nilable(Models::Shared::CustomerBasePublic), total_amount: T.nilable(::Float), marketplace: T.nilable(T::Boolean)).void }
39
- def initialize(date:, external_id:, currency:, transaction_items:, addresses:, description: nil, source: nil, customer: nil, total_amount: 0.0, marketplace: false)
35
+ sig { params(date: ::DateTime, external_id: ::String, currency: Models::Shared::CurrencyEnum, transaction_items: T::Array[Models::Shared::TransactionItemEstimateBase], addresses: T::Array[Models::Shared::Addresses], description: T.nilable(::String), source: T.nilable(Models::Shared::SourceEnum), customer: T.nilable(Models::Shared::CustomerBasePublic), marketplace: T.nilable(T::Boolean)).void }
36
+ def initialize(date:, external_id:, currency:, transaction_items:, addresses:, description: nil, source: nil, customer: nil, marketplace: false)
40
37
  @date = date
41
38
  @external_id = external_id
42
39
  @currency = currency
@@ -45,7 +42,6 @@ module KintsugiSDK
45
42
  @description = description
46
43
  @source = source
47
44
  @customer = customer
48
- @total_amount = total_amount
49
45
  @marketplace = marketplace
50
46
  end
51
47
 
@@ -60,7 +56,6 @@ module KintsugiSDK
60
56
  return false unless @description == other.description
61
57
  return false unless @source == other.source
62
58
  return false unless @customer == other.customer
63
- return false unless @total_amount == other.total_amount
64
59
  return false unless @marketplace == other.marketplace
65
60
  true
66
61
  end
@@ -24,8 +24,6 @@ class KintsugiSDK::Models::Shared::TransactionEstimatePublicRequest
24
24
  def source=(str_); end
25
25
  def customer(); end
26
26
  def customer=(str_); end
27
- def total_amount(); end
28
- def total_amount=(str_); end
29
27
  def marketplace(); end
30
28
  def marketplace=(str_); end
31
- end
29
+ end
@@ -7,18 +7,17 @@
7
7
  module KintsugiSDK
8
8
  module Models
9
9
  module Shared
10
-
11
10
 
12
11
  class TransactionEstimateResponse
13
12
  extend T::Sig
14
13
  include Crystalline::MetadataFields
15
14
 
16
15
  # The date of the transaction in ISO 8601 format (e.g., 2025-01-25T12:00:00Z).
17
- field :date, ::DateTime, { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('date'), required: true, 'decoder': Utils.datetime_from_iso_format(false) } }
16
+ field :date, ::DateTime, { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('date'), required: true, 'decoder': ::KintsugiSDK::Utils.datetime_from_iso_format(false) } }
18
17
  # Unique identifier of this transaction in the source system.
19
18
  field :external_id, ::String, { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('external_id'), required: true } }
20
19
 
21
- field :currency, Models::Shared::CurrencyEnum, { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('currency'), required: true, 'decoder': Utils.enum_from_string(Models::Shared::CurrencyEnum, false) } }
20
+ field :currency, Models::Shared::CurrencyEnum, { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('currency'), required: true, 'decoder': ::KintsugiSDK::Utils.enum_from_string(Models::Shared::CurrencyEnum, false) } }
22
21
 
23
22
  field :transaction_items, Crystalline::Array.new(Models::Shared::TransactionItemEstimateResponse), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('transaction_items'), required: true } }
24
23
  # List of addresses related to the transaction. At least one BILL_TO or SHIP_TO address must be provided. The address will be validated during estimation, and the transaction may be rejected if the address does not pass validation. The SHIP_TO will be preferred to use for determining tax liability. **Deprecated:** Use of `address.status` in estimate api is ignored and will be removed in the future status will be considered UNVERIFIED by default and always validated
@@ -26,11 +25,9 @@ module KintsugiSDK
26
25
  # An optional description of the transaction.
27
26
  field :description, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('description') } }
28
27
 
29
- field :source, Crystalline::Nilable.new(Models::Shared::SourceEnum), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('source'), 'decoder': Utils.enum_from_string(Models::Shared::SourceEnum, true) } }
28
+ 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) } }
30
29
 
31
30
  field :customer, Crystalline::Nilable.new(Models::Shared::CustomerBase), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('customer') } }
32
- # Total amount of the transaction.
33
- field :total_amount, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('total_amount') } }
34
31
  # Indicates if the transaction involves a marketplace.
35
32
  field :marketplace, Crystalline::Nilable.new(Crystalline::Boolean.new), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('marketplace') } }
36
33
  # The total amount of tax determined for the transaction.
@@ -40,14 +37,14 @@ module KintsugiSDK
40
37
  # The calculated tax rate for the transaction.
41
38
  field :tax_rate_calculated, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('tax_rate_calculated') } }
42
39
  # Indicates if nexus was met for the transaction.**Deprecated:** Use `has_active_registration` instead.
43
- #
44
- # @deprecated true: This will be removed in a future release, please migrate away from it as soon as possible.
40
+ #
41
+ # @deprecated true: This will be removed in a future release, please migrate away from it as soon as possible.
45
42
  field :nexus_met, Crystalline::Nilable.new(Crystalline::Boolean.new), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('nexus_met') } }
46
43
  # Indicates if there is an active registration for the transaction.
47
44
  field :has_active_registration, Crystalline::Nilable.new(Crystalline::Boolean.new), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('has_active_registration') } }
48
45
 
49
- sig { params(date: ::DateTime, external_id: ::String, currency: Models::Shared::CurrencyEnum, transaction_items: T::Array[Models::Shared::TransactionItemEstimateResponse], addresses: T::Array[Models::Shared::TransactionEstimateResponseAddresses], description: T.nilable(::String), source: T.nilable(Models::Shared::SourceEnum), customer: T.nilable(Models::Shared::CustomerBase), total_amount: T.nilable(::String), marketplace: T.nilable(T::Boolean), total_tax_amount_calculated: T.nilable(::String), taxable_amount: T.nilable(::String), tax_rate_calculated: T.nilable(::String), nexus_met: T.nilable(T::Boolean), has_active_registration: T.nilable(T::Boolean)).void }
50
- def initialize(date:, external_id:, currency:, transaction_items:, addresses:, description: nil, source: nil, customer: nil, total_amount: '0.0', marketplace: false, total_tax_amount_calculated: '0.00', taxable_amount: '0.00', tax_rate_calculated: '0.00', nexus_met: false, has_active_registration: false)
46
+ sig { params(date: ::DateTime, external_id: ::String, currency: Models::Shared::CurrencyEnum, transaction_items: T::Array[Models::Shared::TransactionItemEstimateResponse], addresses: T::Array[Models::Shared::TransactionEstimateResponseAddresses], description: T.nilable(::String), source: T.nilable(Models::Shared::SourceEnum), customer: T.nilable(Models::Shared::CustomerBase), marketplace: T.nilable(T::Boolean), total_tax_amount_calculated: T.nilable(::String), taxable_amount: T.nilable(::String), tax_rate_calculated: T.nilable(::String), nexus_met: T.nilable(T::Boolean), has_active_registration: T.nilable(T::Boolean)).void }
47
+ def initialize(date:, external_id:, currency:, transaction_items:, addresses:, description: nil, source: nil, customer: nil, marketplace: false, total_tax_amount_calculated: '0.00', taxable_amount: '0.00', tax_rate_calculated: '0.00', nexus_met: false, has_active_registration: false)
51
48
  @date = date
52
49
  @external_id = external_id
53
50
  @currency = currency
@@ -56,7 +53,6 @@ module KintsugiSDK
56
53
  @description = description
57
54
  @source = source
58
55
  @customer = customer
59
- @total_amount = total_amount
60
56
  @marketplace = marketplace
61
57
  @total_tax_amount_calculated = total_tax_amount_calculated
62
58
  @taxable_amount = taxable_amount
@@ -76,7 +72,6 @@ module KintsugiSDK
76
72
  return false unless @description == other.description
77
73
  return false unless @source == other.source
78
74
  return false unless @customer == other.customer
79
- return false unless @total_amount == other.total_amount
80
75
  return false unless @marketplace == other.marketplace
81
76
  return false unless @total_tax_amount_calculated == other.total_tax_amount_calculated
82
77
  return false unless @taxable_amount == other.taxable_amount
@@ -24,8 +24,6 @@ class KintsugiSDK::Models::Shared::TransactionEstimateResponse
24
24
  def source=(str_); end
25
25
  def customer(); end
26
26
  def customer=(str_); end
27
- def total_amount(); end
28
- def total_amount=(str_); end
29
27
  def marketplace(); end
30
28
  def marketplace=(str_); end
31
29
  def total_tax_amount_calculated(); end
@@ -38,4 +36,4 @@ class KintsugiSDK::Models::Shared::TransactionEstimateResponse
38
36
  def nexus_met=(str_); end
39
37
  def has_active_registration(); end
40
38
  def has_active_registration=(str_); end
41
- end
39
+ end
@@ -7,7 +7,6 @@
7
7
  module KintsugiSDK
8
8
  module Models
9
9
  module Shared
10
-
11
10
 
12
11
  class TransactionEstimateResponseAddresses
13
12
  extend T::Sig
@@ -15,7 +14,7 @@ module KintsugiSDK
15
14
 
16
15
  # Type of the address. Must be either
17
16
  # SHIP_TO or BILL_TO.
18
- field :type, Models::Shared::TransactionEstimateResponseType, { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('type'), required: true, 'decoder': Utils.enum_from_string(Models::Shared::TransactionEstimateResponseType, false) } }
17
+ field :type, Models::Shared::TransactionEstimateResponseType, { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('type'), required: true, 'decoder': ::KintsugiSDK::Utils.enum_from_string(Models::Shared::TransactionEstimateResponseType, false) } }
19
18
  # State or province of the address.
20
19
  field :state, ::String, { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('state'), required: true } }
21
20
  # Postal code of the address.
@@ -35,8 +34,8 @@ module KintsugiSDK
35
34
  # Complete address string of the customer, which can be used as an alternative to individual fields.
36
35
  field :full_address, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('full_address') } }
37
36
  # Status of the address. Deprecated and ignored.
38
- #
39
- # @deprecated true: This will be removed in a future release, please migrate away from it as soon as possible.
37
+ #
38
+ # @deprecated true: This will be removed in a future release, please migrate away from it as soon as possible.
40
39
  field :status, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('status') } }
41
40
  # Additional enriched fields related to the address.
42
41
  field :enriched_fields, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('enriched_fields') } }
@@ -32,4 +32,4 @@ class KintsugiSDK::Models::Shared::TransactionEstimateResponseAddresses
32
32
  def status=(str_); end
33
33
  def enriched_fields(); end
34
34
  def enriched_fields=(str_); end
35
- end
35
+ end
@@ -7,12 +7,9 @@
7
7
  module KintsugiSDK
8
8
  module Models
9
9
  module Shared
10
-
11
10
  # TransactionEstimateResponseType - Type of the address. Must be either
12
11
  # SHIP_TO or BILL_TO.
13
12
  class TransactionEstimateResponseType < T::Enum
14
-
15
-
16
13
  enums do
17
14
  SHIP_TO = new('SHIP_TO')
18
15
  BILL_TO = new('BILL_TO')
@@ -8,4 +8,4 @@ end
8
8
 
9
9
 
10
10
  class KintsugiSDK::Models::Shared::TransactionEstimateResponseType
11
- end
11
+ end
@@ -7,18 +7,17 @@
7
7
  module KintsugiSDK
8
8
  module Models
9
9
  module Shared
10
-
11
10
  # TransactionExemptStatusEnum - Based on transaction item exempt status.
12
11
  # NOT EXEMPT: None of the items are NOT EXEMPT
13
12
  # PARTIALLY EXEMPT: At least some of the items are NOT EXEMPT
14
13
  # FULLY_EXEMPT: All items sold in the transaction are EXEMPT
14
+ # ZERO_RATE_NOT_EXEMPT: All items sold in the transaction are zero-rated
15
15
  class TransactionExemptStatusEnum < T::Enum
16
-
17
-
18
16
  enums do
19
17
  NOT_EXEMPT = new('NOT_EXEMPT')
20
18
  PARTIALLY_EXEMPT = new('PARTIALLY_EXEMPT')
21
19
  FULLY_EXEMPT = new('FULLY_EXEMPT')
20
+ ZERO_RATE_NOT_EXEMPT = new('ZERO_RATE_NOT_EXEMPT')
22
21
  end
23
22
  end
24
23
  end
@@ -8,4 +8,4 @@ end
8
8
 
9
9
 
10
10
  class KintsugiSDK::Models::Shared::TransactionExemptStatusEnum
11
- end
11
+ end
@@ -7,16 +7,17 @@
7
7
  module KintsugiSDK
8
8
  module Models
9
9
  module Shared
10
-
11
10
 
12
11
  class TransactionItemBuilder
13
12
  extend T::Sig
14
13
  include Crystalline::MetadataFields
15
14
 
16
- # Organization identifier.
15
+ # Unique identifier of the organization. This field is deprecated, and should no longer be used. The value is populated through the 'x-organization-id' header.
16
+ #
17
+ # @deprecated true: This will be removed in a future release, please migrate away from it as soon as possible.
17
18
  field :organization_id, ::String, { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('organization_id'), required: true } }
18
19
  # Date/time of item.
19
- field :date, ::DateTime, { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('date'), required: true, 'decoder': Utils.datetime_from_iso_format(false) } }
20
+ field :date, ::DateTime, { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('date'), required: true, 'decoder': ::KintsugiSDK::Utils.datetime_from_iso_format(false) } }
20
21
  # External product identifier.
21
22
  field :external_product_id, ::String, { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('external_product_id'), required: true } }
22
23
  # External item identifier.
@@ -32,9 +33,9 @@ module KintsugiSDK
32
33
  # Product description
33
34
  field :product_description, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('product_description') } }
34
35
 
35
- field :original_currency, Crystalline::Nilable.new(Models::Shared::CurrencyEnum), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('original_currency'), 'decoder': Utils.enum_from_string(Models::Shared::CurrencyEnum, true) } }
36
+ field :original_currency, Crystalline::Nilable.new(Models::Shared::CurrencyEnum), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('original_currency'), 'decoder': ::KintsugiSDK::Utils.enum_from_string(Models::Shared::CurrencyEnum, true) } }
36
37
 
37
- field :destination_currency, Crystalline::Nilable.new(Models::Shared::CurrencyEnum), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('destination_currency'), 'decoder': Utils.enum_from_string(Models::Shared::CurrencyEnum, true) } }
38
+ field :destination_currency, Crystalline::Nilable.new(Models::Shared::CurrencyEnum), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('destination_currency'), 'decoder': ::KintsugiSDK::Utils.enum_from_string(Models::Shared::CurrencyEnum, true) } }
38
39
  # Converted item amount.
39
40
  field :converted_amount, Crystalline::Nilable.new(::Float), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('converted_amount') } }
40
41
  # Converted taxable amount.
@@ -48,7 +49,7 @@ module KintsugiSDK
48
49
  # Converted subtotal amount.
49
50
  field :converted_subtotal, Crystalline::Nilable.new(::Float), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('converted_subtotal') } }
50
51
  # This enum is used to determine if a transaction is exempt from tax.
51
- field :tax_exemption, Crystalline::Nilable.new(Models::Shared::TaxExemptionEnum), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('tax_exemption'), 'decoder': Utils.enum_from_string(Models::Shared::TaxExemptionEnum, true) } }
52
+ 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) } }
52
53
 
53
54
  field :tax_items, Crystalline::Nilable.new(Crystalline::Array.new(Models::Shared::TaxItemBuilder)), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('tax_items') } }
54
55
 
@@ -71,7 +72,7 @@ module KintsugiSDK
71
72
  field :exempt, Crystalline::Nilable.new(Crystalline::Boolean.new), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('exempt') } }
72
73
 
73
74
  sig { params(organization_id: ::String, date: ::DateTime, external_product_id: ::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), original_currency: T.nilable(Models::Shared::CurrencyEnum), destination_currency: T.nilable(Models::Shared::CurrencyEnum), converted_amount: T.nilable(::Float), converted_taxable_amount: T.nilable(::Float), converted_tax_amount_imported: T.nilable(::Float), converted_tax_amount_calculated: T.nilable(::Float), converted_total_discount: T.nilable(::Float), converted_subtotal: T.nilable(::Float), tax_exemption: T.nilable(Models::Shared::TaxExemptionEnum), tax_items: T.nilable(T::Array[Models::Shared::TaxItemBuilder]), discount_builder: T.nilable(Models::Shared::DiscountBuilder), quantity: T.nilable(::Float), amount: T.nilable(::Float), tax_amount_imported: T.nilable(::Float), tax_rate_imported: T.nilable(::Float), tax_amount_calculated: T.nilable(::Float), tax_rate_calculated: T.nilable(::Float), taxable_amount: T.nilable(::Float), exempt: T.nilable(T::Boolean)).void }
74
- def initialize(organization_id:, date:, external_product_id:, 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, tax_items: nil, discount_builder: 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, taxable_amount: 0.00, exempt: false)
75
+ def initialize(organization_id:, date:, external_product_id:, 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, tax_items: nil, discount_builder: nil, quantity: 1.0, amount: 0.0, tax_amount_imported: 0.0, tax_rate_imported: 0.0, tax_amount_calculated: 0.0, tax_rate_calculated: 0.0, taxable_amount: 0.0, exempt: false)
75
76
  @organization_id = organization_id
76
77
  @date = date
77
78
  @external_product_id = external_product_id
@@ -64,4 +64,4 @@ class KintsugiSDK::Models::Shared::TransactionItemBuilder
64
64
  def taxable_amount=(str_); end
65
65
  def exempt(); end
66
66
  def exempt=(str_); end
67
- end
67
+ end
@@ -7,16 +7,17 @@
7
7
  module KintsugiSDK
8
8
  module Models
9
9
  module Shared
10
-
11
10
 
12
11
  class TransactionItemCreateUpdate
13
12
  extend T::Sig
14
13
  include Crystalline::MetadataFields
15
14
 
16
- # Organization identifier.
15
+ # Unique identifier of the organization. This field is deprecated, and should no longer be used. The value is populated through the 'x-organization-id' header.
16
+ #
17
+ # @deprecated true: This will be removed in a future release, please migrate away from it as soon as possible.
17
18
  field :organization_id, ::String, { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('organization_id'), required: true } }
18
19
  # Date/time of item.
19
- field :date, ::DateTime, { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('date'), required: true, 'decoder': Utils.datetime_from_iso_format(false) } }
20
+ field :date, ::DateTime, { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('date'), required: true, 'decoder': ::KintsugiSDK::Utils.datetime_from_iso_format(false) } }
20
21
  # External product identifier.
21
22
  field :external_product_id, ::String, { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('external_product_id'), required: true } }
22
23
  # External item identifier.
@@ -32,9 +33,9 @@ module KintsugiSDK
32
33
  # Product description
33
34
  field :product_description, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('product_description') } }
34
35
 
35
- field :original_currency, Crystalline::Nilable.new(Models::Shared::CurrencyEnum), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('original_currency'), 'decoder': Utils.enum_from_string(Models::Shared::CurrencyEnum, true) } }
36
+ field :original_currency, Crystalline::Nilable.new(Models::Shared::CurrencyEnum), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('original_currency'), 'decoder': ::KintsugiSDK::Utils.enum_from_string(Models::Shared::CurrencyEnum, true) } }
36
37
 
37
- field :destination_currency, Crystalline::Nilable.new(Models::Shared::CurrencyEnum), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('destination_currency'), 'decoder': Utils.enum_from_string(Models::Shared::CurrencyEnum, true) } }
38
+ field :destination_currency, Crystalline::Nilable.new(Models::Shared::CurrencyEnum), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('destination_currency'), 'decoder': ::KintsugiSDK::Utils.enum_from_string(Models::Shared::CurrencyEnum, true) } }
38
39
  # Converted item amount.
39
40
  field :converted_amount, Crystalline::Nilable.new(::Float), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('converted_amount') } }
40
41
  # Converted taxable amount.
@@ -48,7 +49,7 @@ module KintsugiSDK
48
49
  # Converted subtotal amount.
49
50
  field :converted_subtotal, Crystalline::Nilable.new(::Float), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('converted_subtotal') } }
50
51
  # This enum is used to determine if a transaction is exempt from tax.
51
- field :tax_exemption, Crystalline::Nilable.new(Models::Shared::TaxExemptionEnum), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('tax_exemption'), 'decoder': Utils.enum_from_string(Models::Shared::TaxExemptionEnum, true) } }
52
+ 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) } }
52
53
 
53
54
  field :tax_items, Crystalline::Nilable.new(Crystalline::Array.new(Models::Shared::TaxItemBuilder)), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('tax_items') } }
54
55
 
@@ -71,7 +72,7 @@ module KintsugiSDK
71
72
  field :exempt, Crystalline::Nilable.new(Crystalline::Boolean.new), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('exempt') } }
72
73
 
73
74
  sig { params(organization_id: ::String, date: ::DateTime, external_product_id: ::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), original_currency: T.nilable(Models::Shared::CurrencyEnum), destination_currency: T.nilable(Models::Shared::CurrencyEnum), converted_amount: T.nilable(::Float), converted_taxable_amount: T.nilable(::Float), converted_tax_amount_imported: T.nilable(::Float), converted_tax_amount_calculated: T.nilable(::Float), converted_total_discount: T.nilable(::Float), converted_subtotal: T.nilable(::Float), tax_exemption: T.nilable(Models::Shared::TaxExemptionEnum), tax_items: T.nilable(T::Array[Models::Shared::TaxItemBuilder]), discount_builder: T.nilable(Models::Shared::DiscountBuilder), quantity: T.nilable(::Float), amount: T.nilable(::Float), tax_amount_imported: T.nilable(::Float), tax_rate_imported: T.nilable(::Float), tax_amount_calculated: T.nilable(::Float), tax_rate_calculated: T.nilable(::Float), taxable_amount: T.nilable(::Float), exempt: T.nilable(T::Boolean)).void }
74
- def initialize(organization_id:, date:, external_product_id:, 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, tax_items: nil, discount_builder: 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, taxable_amount: 0.00, exempt: false)
75
+ def initialize(organization_id:, date:, external_product_id:, 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, tax_items: nil, discount_builder: nil, quantity: 1.0, amount: 0.0, tax_amount_imported: 0.0, tax_rate_imported: 0.0, tax_amount_calculated: 0.0, tax_rate_calculated: 0.0, taxable_amount: 0.0, exempt: false)
75
76
  @organization_id = organization_id
76
77
  @date = date
77
78
  @external_product_id = external_product_id
@@ -64,4 +64,4 @@ class KintsugiSDK::Models::Shared::TransactionItemCreateUpdate
64
64
  def taxable_amount=(str_); end
65
65
  def exempt(); end
66
66
  def exempt=(str_); end
67
- end
67
+ end
@@ -7,14 +7,13 @@
7
7
  module KintsugiSDK
8
8
  module Models
9
9
  module Shared
10
-
11
10
 
12
11
  class TransactionItemEstimateBase
13
12
  extend T::Sig
14
13
  include Crystalline::MetadataFields
15
14
 
16
15
  # The date of the transaction item.
17
- field :date, ::DateTime, { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('date'), required: true, 'decoder': Utils.datetime_from_iso_format(false) } }
16
+ field :date, ::DateTime, { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('date'), required: true, 'decoder': ::KintsugiSDK::Utils.datetime_from_iso_format(false) } }
18
17
  # The total amount of the item.
19
18
  field :amount, ::Float, { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('amount'), required: true } }
20
19
  # A unique identifier for the transaction item.
@@ -29,7 +28,7 @@ module KintsugiSDK
29
28
  # Description of the product. Used if creating a new product.
30
29
  field :product_description, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('product_description') } }
31
30
 
32
- field :product_source, Crystalline::Nilable.new(Models::Shared::SourceEnum), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('product_source'), 'decoder': Utils.enum_from_string(Models::Shared::SourceEnum, true) } }
31
+ field :product_source, Crystalline::Nilable.new(Models::Shared::SourceEnum), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('product_source'), 'decoder': ::KintsugiSDK::Utils.enum_from_string(Models::Shared::SourceEnum, true) } }
33
32
  # Subcategory of the product. Required if product_category is used
34
33
  # in place of external_product_id.
35
34
  field :product_subcategory, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('product_subcategory') } }
@@ -32,4 +32,4 @@ class KintsugiSDK::Models::Shared::TransactionItemEstimateBase
32
32
  def quantity=(str_); end
33
33
  def exempt(); end
34
34
  def exempt=(str_); end
35
- end
35
+ end