kintsugi_sdk 5.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (278) hide show
  1. checksums.yaml +7 -0
  2. data/lib/crystalline/metadata_fields.rb +209 -0
  3. data/lib/crystalline/module.rb +92 -0
  4. data/lib/crystalline/types.rb +78 -0
  5. data/lib/crystalline/utils.rb +56 -0
  6. data/lib/crystalline.rb +13 -0
  7. data/lib/kintsugi_sdk/addressvalidation.rb +350 -0
  8. data/lib/kintsugi_sdk/customers.rb +981 -0
  9. data/lib/kintsugi_sdk/exemptions.rb +779 -0
  10. data/lib/kintsugi_sdk/models/callbacks.rb +12 -0
  11. data/lib/kintsugi_sdk/models/errors/apierror.rb +37 -0
  12. data/lib/kintsugi_sdk/models/errors/apierror.rbi +16 -0
  13. data/lib/kintsugi_sdk/models/errors/backend_src_address_validation_responses_validationerrorresponse.rb +33 -0
  14. data/lib/kintsugi_sdk/models/errors/backend_src_address_validation_responses_validationerrorresponse.rbi +13 -0
  15. data/lib/kintsugi_sdk/models/errors/backend_src_customers_responses_validationerrorresponse.rb +33 -0
  16. data/lib/kintsugi_sdk/models/errors/backend_src_customers_responses_validationerrorresponse.rbi +13 -0
  17. data/lib/kintsugi_sdk/models/errors/backend_src_exemptions_responses_validationerrorresponse.rb +33 -0
  18. data/lib/kintsugi_sdk/models/errors/backend_src_exemptions_responses_validationerrorresponse.rbi +13 -0
  19. data/lib/kintsugi_sdk/models/errors/backend_src_products_responses_validationerrorresponse.rb +33 -0
  20. data/lib/kintsugi_sdk/models/errors/backend_src_products_responses_validationerrorresponse.rbi +13 -0
  21. data/lib/kintsugi_sdk/models/errors/backend_src_tax_estimation_responses_validationerrorresponse.rb +33 -0
  22. data/lib/kintsugi_sdk/models/errors/backend_src_tax_estimation_responses_validationerrorresponse.rbi +13 -0
  23. data/lib/kintsugi_sdk/models/errors/backend_src_transactions_responses_validationerrorresponse.rb +33 -0
  24. data/lib/kintsugi_sdk/models/errors/backend_src_transactions_responses_validationerrorresponse.rbi +13 -0
  25. data/lib/kintsugi_sdk/models/errors/errorresponse.rb +33 -0
  26. data/lib/kintsugi_sdk/models/errors/errorresponse.rbi +13 -0
  27. data/lib/kintsugi_sdk/models/errors/httpvalidationerror.rb +33 -0
  28. data/lib/kintsugi_sdk/models/errors/httpvalidationerror.rbi +13 -0
  29. data/lib/kintsugi_sdk/models/errors.rb +20 -0
  30. data/lib/kintsugi_sdk/models/ops/createtransactionbycustomer_request.rb +37 -0
  31. data/lib/kintsugi_sdk/models/ops/createtransactionbycustomer_request.rbi +15 -0
  32. data/lib/kintsugi_sdk/models/ops/estimate_tax_v1_tax_estimate_post_request.rb +39 -0
  33. data/lib/kintsugi_sdk/models/ops/estimate_tax_v1_tax_estimate_post_request.rbi +15 -0
  34. data/lib/kintsugi_sdk/models/ops/get_customer_by_external_id_v1_customers_external_external_id_get_request.rb +33 -0
  35. data/lib/kintsugi_sdk/models/ops/get_customer_by_external_id_v1_customers_external_external_id_get_request.rbi +13 -0
  36. data/lib/kintsugi_sdk/models/ops/get_customer_by_id_v1_customers_customer_id_get_request.rb +33 -0
  37. data/lib/kintsugi_sdk/models/ops/get_customer_by_id_v1_customers_customer_id_get_request.rbi +13 -0
  38. data/lib/kintsugi_sdk/models/ops/get_customers_v1_request.rb +57 -0
  39. data/lib/kintsugi_sdk/models/ops/get_customers_v1_request.rbi +25 -0
  40. data/lib/kintsugi_sdk/models/ops/get_exemption_by_id_v1_exemptions_exemption_id_get_request.rb +33 -0
  41. data/lib/kintsugi_sdk/models/ops/get_exemption_by_id_v1_exemptions_exemption_id_get_request.rbi +13 -0
  42. data/lib/kintsugi_sdk/models/ops/get_exemptions_v1_exemptions_get_request.rb +73 -0
  43. data/lib/kintsugi_sdk/models/ops/get_exemptions_v1_exemptions_get_request.rbi +33 -0
  44. data/lib/kintsugi_sdk/models/ops/get_nexus_for_org_v1_nexus_get_request.rb +57 -0
  45. data/lib/kintsugi_sdk/models/ops/get_nexus_for_org_v1_nexus_get_request.rbi +25 -0
  46. data/lib/kintsugi_sdk/models/ops/get_product_by_id_v1_products_product_id_get_request.rb +33 -0
  47. data/lib/kintsugi_sdk/models/ops/get_product_by_id_v1_products_product_id_get_request.rbi +13 -0
  48. data/lib/kintsugi_sdk/models/ops/get_products_v1_products_get_request.rb +61 -0
  49. data/lib/kintsugi_sdk/models/ops/get_products_v1_products_get_request.rbi +27 -0
  50. data/lib/kintsugi_sdk/models/ops/get_transaction_by_id_v1_transactions_transaction_id_get_request.rb +33 -0
  51. data/lib/kintsugi_sdk/models/ops/get_transaction_by_id_v1_transactions_transaction_id_get_request.rbi +13 -0
  52. data/lib/kintsugi_sdk/models/ops/get_transactions_v1_transactions_get_request.rb +107 -0
  53. data/lib/kintsugi_sdk/models/ops/get_transactions_v1_transactions_get_request.rbi +45 -0
  54. data/lib/kintsugi_sdk/models/ops/getexemptionattachments_request.rb +34 -0
  55. data/lib/kintsugi_sdk/models/ops/getexemptionattachments_request.rbi +13 -0
  56. data/lib/kintsugi_sdk/models/ops/gettransactionbyexternalid_request.rb +33 -0
  57. data/lib/kintsugi_sdk/models/ops/gettransactionbyexternalid_request.rbi +13 -0
  58. data/lib/kintsugi_sdk/models/ops/gettransactionsbycustomer_request.rb +33 -0
  59. data/lib/kintsugi_sdk/models/ops/gettransactionsbycustomer_request.rbi +13 -0
  60. data/lib/kintsugi_sdk/models/ops/gettransactionsbyfiling_request.rb +35 -0
  61. data/lib/kintsugi_sdk/models/ops/gettransactionsbyfiling_request.rbi +13 -0
  62. data/lib/kintsugi_sdk/models/ops/search_v1_address_validation_search_post_security.rb +33 -0
  63. data/lib/kintsugi_sdk/models/ops/search_v1_address_validation_search_post_security.rbi +13 -0
  64. data/lib/kintsugi_sdk/models/ops/update_customer_v1_customers_customer_id_put_request.rb +37 -0
  65. data/lib/kintsugi_sdk/models/ops/update_customer_v1_customers_customer_id_put_request.rbi +15 -0
  66. data/lib/kintsugi_sdk/models/ops/update_product_v1_products_product_id_put_request.rb +37 -0
  67. data/lib/kintsugi_sdk/models/ops/update_product_v1_products_product_id_put_request.rbi +15 -0
  68. data/lib/kintsugi_sdk/models/ops/update_transaction_v1_transactions_transaction_id_put_request.rb +37 -0
  69. data/lib/kintsugi_sdk/models/ops/update_transaction_v1_transactions_transaction_id_put_request.rbi +15 -0
  70. data/lib/kintsugi_sdk/models/ops/uploadexemptioncert_request.rb +37 -0
  71. data/lib/kintsugi_sdk/models/ops/uploadexemptioncert_request.rbi +15 -0
  72. data/lib/kintsugi_sdk/models/ops.rb +32 -0
  73. data/lib/kintsugi_sdk/models/shared/addressbase.rb +65 -0
  74. data/lib/kintsugi_sdk/models/shared/addressbase.rbi +29 -0
  75. data/lib/kintsugi_sdk/models/shared/addresses.rb +76 -0
  76. data/lib/kintsugi_sdk/models/shared/addresses.rbi +33 -0
  77. data/lib/kintsugi_sdk/models/shared/addressresponsedata.rb +61 -0
  78. data/lib/kintsugi_sdk/models/shared/addressresponsedata.rbi +27 -0
  79. data/lib/kintsugi_sdk/models/shared/addresssearchresponse.rb +45 -0
  80. data/lib/kintsugi_sdk/models/shared/addresssearchresponse.rbi +19 -0
  81. data/lib/kintsugi_sdk/models/shared/addressstatus.rb +26 -0
  82. data/lib/kintsugi_sdk/models/shared/addressstatus.rbi +11 -0
  83. data/lib/kintsugi_sdk/models/shared/addresssubmittedresponse.rb +61 -0
  84. data/lib/kintsugi_sdk/models/shared/addresssubmittedresponse.rbi +27 -0
  85. data/lib/kintsugi_sdk/models/shared/addresstype.rb +24 -0
  86. data/lib/kintsugi_sdk/models/shared/addresstype.rbi +11 -0
  87. data/lib/kintsugi_sdk/models/shared/appliedto.rb +22 -0
  88. data/lib/kintsugi_sdk/models/shared/appliedto.rbi +11 -0
  89. data/lib/kintsugi_sdk/models/shared/attachmentread.rb +42 -0
  90. data/lib/kintsugi_sdk/models/shared/attachmentread.rbi +17 -0
  91. data/lib/kintsugi_sdk/models/shared/backend_src_address_validation_responses_validationerroritem.rb +49 -0
  92. data/lib/kintsugi_sdk/models/shared/backend_src_address_validation_responses_validationerroritem.rbi +21 -0
  93. data/lib/kintsugi_sdk/models/shared/backend_src_customers_responses_validationerroritem.rb +49 -0
  94. data/lib/kintsugi_sdk/models/shared/backend_src_customers_responses_validationerroritem.rbi +21 -0
  95. data/lib/kintsugi_sdk/models/shared/backend_src_exemptions_models_exemptionread.rb +87 -0
  96. data/lib/kintsugi_sdk/models/shared/backend_src_exemptions_models_exemptionread.rbi +39 -0
  97. data/lib/kintsugi_sdk/models/shared/backend_src_exemptions_responses_validationerroritem.rb +50 -0
  98. data/lib/kintsugi_sdk/models/shared/backend_src_exemptions_responses_validationerroritem.rbi +21 -0
  99. data/lib/kintsugi_sdk/models/shared/backend_src_exemptions_serializers_exemptionread.rb +81 -0
  100. data/lib/kintsugi_sdk/models/shared/backend_src_exemptions_serializers_exemptionread.rbi +37 -0
  101. data/lib/kintsugi_sdk/models/shared/backend_src_products_responses_validationerroritem.rb +50 -0
  102. data/lib/kintsugi_sdk/models/shared/backend_src_products_responses_validationerroritem.rbi +21 -0
  103. data/lib/kintsugi_sdk/models/shared/backend_src_tax_estimation_responses_validationerroritem.rb +49 -0
  104. data/lib/kintsugi_sdk/models/shared/backend_src_tax_estimation_responses_validationerroritem.rbi +21 -0
  105. data/lib/kintsugi_sdk/models/shared/backend_src_transactions_responses_validationerroritem.rb +50 -0
  106. data/lib/kintsugi_sdk/models/shared/backend_src_transactions_responses_validationerroritem.rbi +21 -0
  107. data/lib/kintsugi_sdk/models/shared/body_upload_exemption_certificate_v1_exemptions_exemption_id_attachments_post.rb +33 -0
  108. data/lib/kintsugi_sdk/models/shared/body_upload_exemption_certificate_v1_exemptions_exemption_id_attachments_post.rbi +13 -0
  109. data/lib/kintsugi_sdk/models/shared/countrycodeenum.rb +270 -0
  110. data/lib/kintsugi_sdk/models/shared/countrycodeenum.rbi +11 -0
  111. data/lib/kintsugi_sdk/models/shared/currencyenum.rb +182 -0
  112. data/lib/kintsugi_sdk/models/shared/currencyenum.rbi +11 -0
  113. data/lib/kintsugi_sdk/models/shared/customerbase.rb +97 -0
  114. data/lib/kintsugi_sdk/models/shared/customerbase.rbi +45 -0
  115. data/lib/kintsugi_sdk/models/shared/customerbasebase.rb +109 -0
  116. data/lib/kintsugi_sdk/models/shared/customerbasebase.rbi +51 -0
  117. data/lib/kintsugi_sdk/models/shared/customerbasepublic.rb +97 -0
  118. data/lib/kintsugi_sdk/models/shared/customerbasepublic.rbi +45 -0
  119. data/lib/kintsugi_sdk/models/shared/customercreate.rb +97 -0
  120. data/lib/kintsugi_sdk/models/shared/customercreate.rbi +45 -0
  121. data/lib/kintsugi_sdk/models/shared/customerread.rb +105 -0
  122. data/lib/kintsugi_sdk/models/shared/customerread.rbi +49 -0
  123. data/lib/kintsugi_sdk/models/shared/customerupdate.rb +89 -0
  124. data/lib/kintsugi_sdk/models/shared/customerupdate.rbi +41 -0
  125. data/lib/kintsugi_sdk/models/shared/discountbuilder.rb +41 -0
  126. data/lib/kintsugi_sdk/models/shared/discountbuilder.rbi +17 -0
  127. data/lib/kintsugi_sdk/models/shared/exemption.rb +91 -0
  128. data/lib/kintsugi_sdk/models/shared/exemption.rbi +41 -0
  129. data/lib/kintsugi_sdk/models/shared/exemptioncreate.rb +73 -0
  130. data/lib/kintsugi_sdk/models/shared/exemptioncreate.rbi +33 -0
  131. data/lib/kintsugi_sdk/models/shared/exemptionrequired.rb +57 -0
  132. data/lib/kintsugi_sdk/models/shared/exemptionrequired.rbi +25 -0
  133. data/lib/kintsugi_sdk/models/shared/exemptionstatus.rb +25 -0
  134. data/lib/kintsugi_sdk/models/shared/exemptionstatus.rbi +11 -0
  135. data/lib/kintsugi_sdk/models/shared/exemptiontype.rb +23 -0
  136. data/lib/kintsugi_sdk/models/shared/exemptiontype.rbi +11 -0
  137. data/lib/kintsugi_sdk/models/shared/fastapi_pagination_default_page_exemptionread_2.rb +49 -0
  138. data/lib/kintsugi_sdk/models/shared/fastapi_pagination_default_page_exemptionread_2.rbi +21 -0
  139. data/lib/kintsugi_sdk/models/shared/file.rb +37 -0
  140. data/lib/kintsugi_sdk/models/shared/file.rbi +15 -0
  141. data/lib/kintsugi_sdk/models/shared/jurisdictiontype.rb +28 -0
  142. data/lib/kintsugi_sdk/models/shared/jurisdictiontype.rbi +11 -0
  143. data/lib/kintsugi_sdk/models/shared/nexusresponse.rb +253 -0
  144. data/lib/kintsugi_sdk/models/shared/nexusresponse.rbi +121 -0
  145. data/lib/kintsugi_sdk/models/shared/nexusstateenum.rb +27 -0
  146. data/lib/kintsugi_sdk/models/shared/nexusstateenum.rbi +11 -0
  147. data/lib/kintsugi_sdk/models/shared/nexusstatusenum.rb +23 -0
  148. data/lib/kintsugi_sdk/models/shared/nexusstatusenum.rbi +11 -0
  149. data/lib/kintsugi_sdk/models/shared/nexustypeenum.rb +24 -0
  150. data/lib/kintsugi_sdk/models/shared/nexustypeenum.rbi +11 -0
  151. data/lib/kintsugi_sdk/models/shared/page_customerread_.rb +49 -0
  152. data/lib/kintsugi_sdk/models/shared/page_customerread_.rbi +21 -0
  153. data/lib/kintsugi_sdk/models/shared/page_nexusresponse_.rb +49 -0
  154. data/lib/kintsugi_sdk/models/shared/page_nexusresponse_.rbi +21 -0
  155. data/lib/kintsugi_sdk/models/shared/page_productread_.rb +49 -0
  156. data/lib/kintsugi_sdk/models/shared/page_productread_.rbi +21 -0
  157. data/lib/kintsugi_sdk/models/shared/page_transactionestimateresponse_.rb +49 -0
  158. data/lib/kintsugi_sdk/models/shared/page_transactionestimateresponse_.rbi +21 -0
  159. data/lib/kintsugi_sdk/models/shared/page_transactionread_.rb +49 -0
  160. data/lib/kintsugi_sdk/models/shared/page_transactionread_.rbi +21 -0
  161. data/lib/kintsugi_sdk/models/shared/periodmodelenum.rb +29 -0
  162. data/lib/kintsugi_sdk/models/shared/periodmodelenum.rbi +11 -0
  163. data/lib/kintsugi_sdk/models/shared/processingstatusenum.rb +34 -0
  164. data/lib/kintsugi_sdk/models/shared/processingstatusenum.rbi +11 -0
  165. data/lib/kintsugi_sdk/models/shared/productcategories.rb +38 -0
  166. data/lib/kintsugi_sdk/models/shared/productcategories.rbi +15 -0
  167. data/lib/kintsugi_sdk/models/shared/productcategoryenum.rb +25 -0
  168. data/lib/kintsugi_sdk/models/shared/productcategoryenum.rbi +11 -0
  169. data/lib/kintsugi_sdk/models/shared/productcodeenum.rb +82 -0
  170. data/lib/kintsugi_sdk/models/shared/productcodeenum.rbi +11 -0
  171. data/lib/kintsugi_sdk/models/shared/productcreatemanual.rb +61 -0
  172. data/lib/kintsugi_sdk/models/shared/productcreatemanual.rbi +27 -0
  173. data/lib/kintsugi_sdk/models/shared/productread.rb +81 -0
  174. data/lib/kintsugi_sdk/models/shared/productread.rbi +37 -0
  175. data/lib/kintsugi_sdk/models/shared/productstatusenum.rb +23 -0
  176. data/lib/kintsugi_sdk/models/shared/productstatusenum.rbi +11 -0
  177. data/lib/kintsugi_sdk/models/shared/productsubcategory.rb +46 -0
  178. data/lib/kintsugi_sdk/models/shared/productsubcategory.rbi +19 -0
  179. data/lib/kintsugi_sdk/models/shared/productsubcategoryenum.rb +83 -0
  180. data/lib/kintsugi_sdk/models/shared/productsubcategoryenum.rbi +11 -0
  181. data/lib/kintsugi_sdk/models/shared/productupdate.rb +70 -0
  182. data/lib/kintsugi_sdk/models/shared/productupdate.rbi +31 -0
  183. data/lib/kintsugi_sdk/models/shared/registration.rb +28 -0
  184. data/lib/kintsugi_sdk/models/shared/registration.rbi +11 -0
  185. data/lib/kintsugi_sdk/models/shared/registrationsregimeenum.rb +22 -0
  186. data/lib/kintsugi_sdk/models/shared/registrationsregimeenum.rbi +11 -0
  187. data/lib/kintsugi_sdk/models/shared/relatedentitytype.rb +24 -0
  188. data/lib/kintsugi_sdk/models/shared/relatedentitytype.rbi +11 -0
  189. data/lib/kintsugi_sdk/models/shared/salesortransactionsenum.rb +24 -0
  190. data/lib/kintsugi_sdk/models/shared/salesortransactionsenum.rbi +11 -0
  191. data/lib/kintsugi_sdk/models/shared/security.rb +37 -0
  192. data/lib/kintsugi_sdk/models/shared/security.rbi +15 -0
  193. data/lib/kintsugi_sdk/models/shared/sourceenum.rb +70 -0
  194. data/lib/kintsugi_sdk/models/shared/sourceenum.rbi +11 -0
  195. data/lib/kintsugi_sdk/models/shared/statusenum.rb +22 -0
  196. data/lib/kintsugi_sdk/models/shared/statusenum.rbi +11 -0
  197. data/lib/kintsugi_sdk/models/shared/taxexemptionenum.rb +31 -0
  198. data/lib/kintsugi_sdk/models/shared/taxexemptionenum.rbi +11 -0
  199. data/lib/kintsugi_sdk/models/shared/taxitembuilder.rb +77 -0
  200. data/lib/kintsugi_sdk/models/shared/taxitembuilder.rbi +35 -0
  201. data/lib/kintsugi_sdk/models/shared/taxitemestimate.rb +53 -0
  202. data/lib/kintsugi_sdk/models/shared/taxitemestimate.rbi +23 -0
  203. data/lib/kintsugi_sdk/models/shared/taxitemread.rb +73 -0
  204. data/lib/kintsugi_sdk/models/shared/taxitemread.rbi +33 -0
  205. data/lib/kintsugi_sdk/models/shared/taxitemreturnreasonenum.rb +25 -0
  206. data/lib/kintsugi_sdk/models/shared/taxitemreturnreasonenum.rbi +11 -0
  207. data/lib/kintsugi_sdk/models/shared/taxitemtypeenum.rb +23 -0
  208. data/lib/kintsugi_sdk/models/shared/taxitemtypeenum.rbi +11 -0
  209. data/lib/kintsugi_sdk/models/shared/taxliabilitysourceenum.rb +22 -0
  210. data/lib/kintsugi_sdk/models/shared/taxliabilitysourceenum.rbi +11 -0
  211. data/lib/kintsugi_sdk/models/shared/transactionaddressbuilder.rb +81 -0
  212. data/lib/kintsugi_sdk/models/shared/transactionaddressbuilder.rbi +37 -0
  213. data/lib/kintsugi_sdk/models/shared/transactionaddresspublic.rb +69 -0
  214. data/lib/kintsugi_sdk/models/shared/transactionaddresspublic.rbi +31 -0
  215. data/lib/kintsugi_sdk/models/shared/transactionaddressread_output.rb +85 -0
  216. data/lib/kintsugi_sdk/models/shared/transactionaddressread_output.rbi +39 -0
  217. data/lib/kintsugi_sdk/models/shared/transactioncreate.rb +235 -0
  218. data/lib/kintsugi_sdk/models/shared/transactioncreate.rbi +111 -0
  219. data/lib/kintsugi_sdk/models/shared/transactionestimatepublicrequest.rb +70 -0
  220. data/lib/kintsugi_sdk/models/shared/transactionestimatepublicrequest.rbi +31 -0
  221. data/lib/kintsugi_sdk/models/shared/transactionestimateresponse.rb +91 -0
  222. data/lib/kintsugi_sdk/models/shared/transactionestimateresponse.rbi +41 -0
  223. data/lib/kintsugi_sdk/models/shared/transactionestimateresponse_addresses.rb +80 -0
  224. data/lib/kintsugi_sdk/models/shared/transactionestimateresponse_addresses.rbi +35 -0
  225. data/lib/kintsugi_sdk/models/shared/transactionestimateresponse_type.rb +23 -0
  226. data/lib/kintsugi_sdk/models/shared/transactionestimateresponse_type.rbi +11 -0
  227. data/lib/kintsugi_sdk/models/shared/transactionexemptstatusenum.rb +26 -0
  228. data/lib/kintsugi_sdk/models/shared/transactionexemptstatusenum.rbi +11 -0
  229. data/lib/kintsugi_sdk/models/shared/transactionitembuilder.rb +141 -0
  230. data/lib/kintsugi_sdk/models/shared/transactionitembuilder.rbi +67 -0
  231. data/lib/kintsugi_sdk/models/shared/transactionitemcreateupdate.rb +141 -0
  232. data/lib/kintsugi_sdk/models/shared/transactionitemcreateupdate.rbi +67 -0
  233. data/lib/kintsugi_sdk/models/shared/transactionitemestimatebase.rb +78 -0
  234. data/lib/kintsugi_sdk/models/shared/transactionitemestimatebase.rbi +35 -0
  235. data/lib/kintsugi_sdk/models/shared/transactionitemestimateresponse.rb +98 -0
  236. data/lib/kintsugi_sdk/models/shared/transactionitemestimateresponse.rbi +45 -0
  237. data/lib/kintsugi_sdk/models/shared/transactionitemread.rb +149 -0
  238. data/lib/kintsugi_sdk/models/shared/transactionitemread.rbi +71 -0
  239. data/lib/kintsugi_sdk/models/shared/transactionpublicrequest.rb +194 -0
  240. data/lib/kintsugi_sdk/models/shared/transactionpublicrequest.rbi +91 -0
  241. data/lib/kintsugi_sdk/models/shared/transactionread.rb +259 -0
  242. data/lib/kintsugi_sdk/models/shared/transactionread.rbi +123 -0
  243. data/lib/kintsugi_sdk/models/shared/transactionrefundstatus.rb +24 -0
  244. data/lib/kintsugi_sdk/models/shared/transactionrefundstatus.rbi +11 -0
  245. data/lib/kintsugi_sdk/models/shared/transactionstatusenum.rb +27 -0
  246. data/lib/kintsugi_sdk/models/shared/transactionstatusenum.rbi +11 -0
  247. data/lib/kintsugi_sdk/models/shared/transactiontypeenum.rb +25 -0
  248. data/lib/kintsugi_sdk/models/shared/transactiontypeenum.rbi +11 -0
  249. data/lib/kintsugi_sdk/models/shared/transactionupdate.rb +235 -0
  250. data/lib/kintsugi_sdk/models/shared/transactionupdate.rbi +111 -0
  251. data/lib/kintsugi_sdk/models/shared/treatmentenum.rb +25 -0
  252. data/lib/kintsugi_sdk/models/shared/treatmentenum.rbi +11 -0
  253. data/lib/kintsugi_sdk/models/shared/type.rb +23 -0
  254. data/lib/kintsugi_sdk/models/shared/type.rbi +11 -0
  255. data/lib/kintsugi_sdk/models/shared/validationaddress.rb +73 -0
  256. data/lib/kintsugi_sdk/models/shared/validationaddress.rbi +31 -0
  257. data/lib/kintsugi_sdk/models/shared/validationerror.rb +41 -0
  258. data/lib/kintsugi_sdk/models/shared/validationerror.rbi +17 -0
  259. data/lib/kintsugi_sdk/models/shared.rb +104 -0
  260. data/lib/kintsugi_sdk/nexus.rb +155 -0
  261. data/lib/kintsugi_sdk/openapisdk.rb +104 -0
  262. data/lib/kintsugi_sdk/products.rb +756 -0
  263. data/lib/kintsugi_sdk/sdk_hooks/hooks.rb +95 -0
  264. data/lib/kintsugi_sdk/sdk_hooks/types.rb +170 -0
  265. data/lib/kintsugi_sdk/sdkconfiguration.rb +104 -0
  266. data/lib/kintsugi_sdk/sdkconfiguration.rbi +57 -0
  267. data/lib/kintsugi_sdk/taxestimation.rb +197 -0
  268. data/lib/kintsugi_sdk/transactions.rb +902 -0
  269. data/lib/kintsugi_sdk/utils/forms.rb +206 -0
  270. data/lib/kintsugi_sdk/utils/headers.rb +77 -0
  271. data/lib/kintsugi_sdk/utils/query_params.rb +131 -0
  272. data/lib/kintsugi_sdk/utils/request_bodies.rb +61 -0
  273. data/lib/kintsugi_sdk/utils/retries.rb +95 -0
  274. data/lib/kintsugi_sdk/utils/security.rb +130 -0
  275. data/lib/kintsugi_sdk/utils/url.rb +100 -0
  276. data/lib/kintsugi_sdk/utils/utils.rb +187 -0
  277. data/lib/kintsugi_sdk.rb +31 -0
  278. metadata +492 -0
@@ -0,0 +1,141 @@
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
+
11
+
12
+ class TransactionItemCreateUpdate
13
+ extend T::Sig
14
+ include Crystalline::MetadataFields
15
+
16
+ # Organization identifier.
17
+ field :organization_id, ::String, { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('organization_id'), required: true } }
18
+ # 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
+ # External product identifier.
21
+ field :external_product_id, ::String, { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('external_product_id'), required: true } }
22
+ # External item identifier.
23
+ field :external_id, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('external_id') } }
24
+ # Item description
25
+ field :description, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('description') } }
26
+ # Product name
27
+ field :product, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('product') } }
28
+ # Product identifier.
29
+ field :product_id, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('product_id') } }
30
+ # Product name (detailed)
31
+ field :product_name, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('product_name') } }
32
+ # Product description
33
+ field :product_description, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('product_description') } }
34
+
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
+
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
+ # Converted item amount.
39
+ field :converted_amount, Crystalline::Nilable.new(::Float), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('converted_amount') } }
40
+ # Converted taxable amount.
41
+ field :converted_taxable_amount, Crystalline::Nilable.new(::Float), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('converted_taxable_amount') } }
42
+ # Converted imported tax amount.
43
+ field :converted_tax_amount_imported, Crystalline::Nilable.new(::Float), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('converted_tax_amount_imported') } }
44
+ # Converted calculated tax amount
45
+ field :converted_tax_amount_calculated, Crystalline::Nilable.new(::Float), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('converted_tax_amount_calculated') } }
46
+ # Converted total discount amount.
47
+ field :converted_total_discount, Crystalline::Nilable.new(::Float), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('converted_total_discount') } }
48
+ # Converted subtotal amount.
49
+ field :converted_subtotal, Crystalline::Nilable.new(::Float), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('converted_subtotal') } }
50
+ # 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
+
53
+ field :tax_items, Crystalline::Nilable.new(Crystalline::Array.new(Models::Shared::TaxItemBuilder)), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('tax_items') } }
54
+
55
+ field :discount_builder, Crystalline::Nilable.new(Models::Shared::DiscountBuilder), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('discount_builder') } }
56
+ # Quantity of item.
57
+ field :quantity, Crystalline::Nilable.new(::Float), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('quantity') } }
58
+ # Item amount.
59
+ field :amount, Crystalline::Nilable.new(::Float), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('amount') } }
60
+ # Imported tax amount for the item.
61
+ field :tax_amount_imported, Crystalline::Nilable.new(::Float), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('tax_amount_imported') } }
62
+ # Imported tax rate.
63
+ field :tax_rate_imported, Crystalline::Nilable.new(::Float), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('tax_rate_imported') } }
64
+ # Calculated tax amount for the item.
65
+ field :tax_amount_calculated, Crystalline::Nilable.new(::Float), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('tax_amount_calculated') } }
66
+ # Calculated tax rate.
67
+ field :tax_rate_calculated, Crystalline::Nilable.new(::Float), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('tax_rate_calculated') } }
68
+ # Taxable amount for the item.
69
+ field :taxable_amount, Crystalline::Nilable.new(::Float), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('taxable_amount') } }
70
+ # Indicates if the item is exempt.
71
+ field :exempt, Crystalline::Nilable.new(Crystalline::Boolean.new), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('exempt') } }
72
+
73
+ 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
+ @organization_id = organization_id
76
+ @date = date
77
+ @external_product_id = external_product_id
78
+ @external_id = external_id
79
+ @description = description
80
+ @product = product
81
+ @product_id = product_id
82
+ @product_name = product_name
83
+ @product_description = product_description
84
+ @original_currency = original_currency
85
+ @destination_currency = destination_currency
86
+ @converted_amount = converted_amount
87
+ @converted_taxable_amount = converted_taxable_amount
88
+ @converted_tax_amount_imported = converted_tax_amount_imported
89
+ @converted_tax_amount_calculated = converted_tax_amount_calculated
90
+ @converted_total_discount = converted_total_discount
91
+ @converted_subtotal = converted_subtotal
92
+ @tax_exemption = tax_exemption
93
+ @tax_items = tax_items
94
+ @discount_builder = discount_builder
95
+ @quantity = quantity
96
+ @amount = amount
97
+ @tax_amount_imported = tax_amount_imported
98
+ @tax_rate_imported = tax_rate_imported
99
+ @tax_amount_calculated = tax_amount_calculated
100
+ @tax_rate_calculated = tax_rate_calculated
101
+ @taxable_amount = taxable_amount
102
+ @exempt = exempt
103
+ end
104
+
105
+ sig { params(other: T.untyped).returns(T::Boolean) }
106
+ def ==(other)
107
+ return false unless other.is_a? self.class
108
+ return false unless @organization_id == other.organization_id
109
+ return false unless @date == other.date
110
+ return false unless @external_product_id == other.external_product_id
111
+ return false unless @external_id == other.external_id
112
+ return false unless @description == other.description
113
+ return false unless @product == other.product
114
+ return false unless @product_id == other.product_id
115
+ return false unless @product_name == other.product_name
116
+ return false unless @product_description == other.product_description
117
+ return false unless @original_currency == other.original_currency
118
+ return false unless @destination_currency == other.destination_currency
119
+ return false unless @converted_amount == other.converted_amount
120
+ return false unless @converted_taxable_amount == other.converted_taxable_amount
121
+ return false unless @converted_tax_amount_imported == other.converted_tax_amount_imported
122
+ return false unless @converted_tax_amount_calculated == other.converted_tax_amount_calculated
123
+ return false unless @converted_total_discount == other.converted_total_discount
124
+ return false unless @converted_subtotal == other.converted_subtotal
125
+ return false unless @tax_exemption == other.tax_exemption
126
+ return false unless @tax_items == other.tax_items
127
+ return false unless @discount_builder == other.discount_builder
128
+ return false unless @quantity == other.quantity
129
+ return false unless @amount == other.amount
130
+ return false unless @tax_amount_imported == other.tax_amount_imported
131
+ return false unless @tax_rate_imported == other.tax_rate_imported
132
+ return false unless @tax_amount_calculated == other.tax_amount_calculated
133
+ return false unless @tax_rate_calculated == other.tax_rate_calculated
134
+ return false unless @taxable_amount == other.taxable_amount
135
+ return false unless @exempt == other.exempt
136
+ true
137
+ end
138
+ end
139
+ end
140
+ end
141
+ end
@@ -0,0 +1,67 @@
1
+ # typed: true
2
+ # frozen_string_literal: true
3
+
4
+
5
+ class KintsugiSDK::Models::Shared::TransactionItemCreateUpdate
6
+ extend ::Crystalline::MetadataFields::ClassMethods
7
+ end
8
+
9
+
10
+ class KintsugiSDK::Models::Shared::TransactionItemCreateUpdate
11
+ def organization_id(); end
12
+ def organization_id=(str_); end
13
+ def date(); end
14
+ def date=(str_); end
15
+ def external_product_id(); end
16
+ def external_product_id=(str_); end
17
+ def external_id(); end
18
+ def external_id=(str_); end
19
+ def description(); end
20
+ def description=(str_); end
21
+ def product(); end
22
+ def product=(str_); end
23
+ def product_id(); end
24
+ def product_id=(str_); end
25
+ def product_name(); end
26
+ def product_name=(str_); end
27
+ def product_description(); end
28
+ def product_description=(str_); end
29
+ def original_currency(); end
30
+ def original_currency=(str_); end
31
+ def destination_currency(); end
32
+ def destination_currency=(str_); end
33
+ def converted_amount(); end
34
+ def converted_amount=(str_); end
35
+ def converted_taxable_amount(); end
36
+ def converted_taxable_amount=(str_); end
37
+ def converted_tax_amount_imported(); end
38
+ def converted_tax_amount_imported=(str_); end
39
+ def converted_tax_amount_calculated(); end
40
+ def converted_tax_amount_calculated=(str_); end
41
+ def converted_total_discount(); end
42
+ def converted_total_discount=(str_); end
43
+ def converted_subtotal(); end
44
+ def converted_subtotal=(str_); end
45
+ def tax_exemption(); end
46
+ def tax_exemption=(str_); end
47
+ def tax_items(); end
48
+ def tax_items=(str_); end
49
+ def discount_builder(); end
50
+ def discount_builder=(str_); end
51
+ def quantity(); end
52
+ def quantity=(str_); end
53
+ def amount(); end
54
+ def amount=(str_); end
55
+ def tax_amount_imported(); end
56
+ def tax_amount_imported=(str_); end
57
+ def tax_rate_imported(); end
58
+ def tax_rate_imported=(str_); end
59
+ def tax_amount_calculated(); end
60
+ def tax_amount_calculated=(str_); end
61
+ def tax_rate_calculated(); end
62
+ def tax_rate_calculated=(str_); end
63
+ def taxable_amount(); end
64
+ def taxable_amount=(str_); end
65
+ def exempt(); end
66
+ def exempt=(str_); end
67
+ end
@@ -0,0 +1,78 @@
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
+
11
+
12
+ class TransactionItemEstimateBase
13
+ extend T::Sig
14
+ include Crystalline::MetadataFields
15
+
16
+ # 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) } }
18
+ # The total amount of the item.
19
+ field :amount, ::Float, { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('amount'), required: true } }
20
+ # A unique identifier for the transaction item.
21
+ field :external_id, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('external_id') } }
22
+ # A description of the item.
23
+ field :description, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('description') } }
24
+ # External product identifier. If not found and product_subcategory
25
+ # and product_category are not provided, an error occurs.
26
+ field :external_product_id, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('external_product_id') } }
27
+ # Name of the product. Used if creating a new product.
28
+ field :product_name, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('product_name') } }
29
+ # Description of the product. Used if creating a new product.
30
+ field :product_description, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('product_description') } }
31
+
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) } }
33
+
34
+ field :product_subcategory, Crystalline::Nilable.new(Models::Shared::ProductSubCategoryEnum), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('product_subcategory'), 'decoder': Utils.enum_from_string(Models::Shared::ProductSubCategoryEnum, true) } }
35
+
36
+ field :product_category, Crystalline::Nilable.new(Models::Shared::ProductCategoryEnum), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('product_category'), 'decoder': Utils.enum_from_string(Models::Shared::ProductCategoryEnum, true) } }
37
+ # Defaults to 1.0. The quantity of the item.
38
+ field :quantity, Crystalline::Nilable.new(::Float), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('quantity') } }
39
+ # Defaults to false. Indicates whether the item is exempt from tax.
40
+ field :exempt, Crystalline::Nilable.new(Crystalline::Boolean.new), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('exempt') } }
41
+
42
+ sig { params(date: ::DateTime, amount: ::Float, 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(Models::Shared::ProductSubCategoryEnum), product_category: T.nilable(Models::Shared::ProductCategoryEnum), quantity: T.nilable(::Float), exempt: T.nilable(T::Boolean)).void }
43
+ def initialize(date:, amount:, external_id: nil, description: nil, external_product_id: nil, product_name: nil, product_description: nil, product_source: nil, product_subcategory: nil, product_category: nil, quantity: 1.0, exempt: false)
44
+ @date = date
45
+ @amount = amount
46
+ @external_id = external_id
47
+ @description = description
48
+ @external_product_id = external_product_id
49
+ @product_name = product_name
50
+ @product_description = product_description
51
+ @product_source = product_source
52
+ @product_subcategory = product_subcategory
53
+ @product_category = product_category
54
+ @quantity = quantity
55
+ @exempt = exempt
56
+ end
57
+
58
+ sig { params(other: T.untyped).returns(T::Boolean) }
59
+ def ==(other)
60
+ return false unless other.is_a? self.class
61
+ return false unless @date == other.date
62
+ return false unless @amount == other.amount
63
+ return false unless @external_id == other.external_id
64
+ return false unless @description == other.description
65
+ return false unless @external_product_id == other.external_product_id
66
+ return false unless @product_name == other.product_name
67
+ return false unless @product_description == other.product_description
68
+ return false unless @product_source == other.product_source
69
+ return false unless @product_subcategory == other.product_subcategory
70
+ return false unless @product_category == other.product_category
71
+ return false unless @quantity == other.quantity
72
+ return false unless @exempt == other.exempt
73
+ true
74
+ end
75
+ end
76
+ end
77
+ end
78
+ end
@@ -0,0 +1,35 @@
1
+ # typed: true
2
+ # frozen_string_literal: true
3
+
4
+
5
+ class KintsugiSDK::Models::Shared::TransactionItemEstimateBase
6
+ extend ::Crystalline::MetadataFields::ClassMethods
7
+ end
8
+
9
+
10
+ class KintsugiSDK::Models::Shared::TransactionItemEstimateBase
11
+ def date(); end
12
+ def date=(str_); end
13
+ def amount(); end
14
+ def amount=(str_); end
15
+ def external_id(); end
16
+ def external_id=(str_); end
17
+ def description(); end
18
+ def description=(str_); end
19
+ def external_product_id(); end
20
+ def external_product_id=(str_); end
21
+ def product_name(); end
22
+ def product_name=(str_); end
23
+ def product_description(); end
24
+ def product_description=(str_); end
25
+ def product_source(); end
26
+ def product_source=(str_); end
27
+ def product_subcategory(); end
28
+ def product_subcategory=(str_); end
29
+ def product_category(); end
30
+ def product_category=(str_); end
31
+ def quantity(); end
32
+ def quantity=(str_); end
33
+ def exempt(); end
34
+ def exempt=(str_); end
35
+ end
@@ -0,0 +1,98 @@
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
+
11
+
12
+ class TransactionItemEstimateResponse
13
+ extend T::Sig
14
+ include Crystalline::MetadataFields
15
+
16
+ # 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) } }
18
+ # The total amount of the item.
19
+ field :amount, ::String, { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('amount'), required: true } }
20
+ # A unique identifier for the transaction item.
21
+ field :external_id, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('external_id') } }
22
+ # A description of the item.
23
+ field :description, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('description') } }
24
+ # External product identifier. If not found and product_subcategory
25
+ # and product_category are not provided, an error occurs.
26
+ field :external_product_id, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('external_product_id') } }
27
+ # Name of the product. Used if creating a new product.
28
+ field :product_name, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('product_name') } }
29
+ # Description of the product. Used if creating a new product.
30
+ field :product_description, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('product_description') } }
31
+
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) } }
33
+
34
+ field :product_subcategory, Crystalline::Nilable.new(Models::Shared::ProductSubCategoryEnum), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('product_subcategory'), 'decoder': Utils.enum_from_string(Models::Shared::ProductSubCategoryEnum, true) } }
35
+
36
+ field :product_category, Crystalline::Nilable.new(Models::Shared::ProductCategoryEnum), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('product_category'), 'decoder': Utils.enum_from_string(Models::Shared::ProductCategoryEnum, true) } }
37
+ # This enum is used to determine if a transaction is exempt from tax.
38
+ field :exempt_reason, Crystalline::Nilable.new(Models::Shared::TaxExemptionEnum), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('exempt_reason'), 'decoder': Utils.enum_from_string(Models::Shared::TaxExemptionEnum, true) } }
39
+ # List of tax items applied to the transaction item.
40
+ field :tax_items, Crystalline::Nilable.new(Crystalline::Array.new(Models::Shared::TaxItemEstimate)), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('tax_items') } }
41
+ # Defaults to 1.0. The quantity of the item.
42
+ field :quantity, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('quantity') } }
43
+ # Indicates whether the transaction item is exempt from tax.
44
+ field :exempt, Crystalline::Nilable.new(Crystalline::Boolean.new), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('exempt') } }
45
+ # The total tax amount for the transaction item.
46
+ field :tax_amount, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('tax_amount') } }
47
+ # The taxable amount for the transaction item.
48
+ field :taxable_amount, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('taxable_amount') } }
49
+ # The tax rate applied to the transaction item.
50
+ field :tax_rate, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('tax_rate') } }
51
+
52
+ sig { params(date: ::DateTime, amount: ::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(Models::Shared::ProductSubCategoryEnum), product_category: T.nilable(Models::Shared::ProductCategoryEnum), exempt_reason: T.nilable(Models::Shared::TaxExemptionEnum), tax_items: T.nilable(T::Array[Models::Shared::TaxItemEstimate]), quantity: T.nilable(::String), exempt: T.nilable(T::Boolean), tax_amount: T.nilable(::String), taxable_amount: T.nilable(::String), tax_rate: T.nilable(::String)).void }
53
+ def initialize(date:, amount:, external_id: nil, description: nil, external_product_id: nil, product_name: nil, product_description: nil, product_source: nil, product_subcategory: nil, product_category: nil, exempt_reason: nil, tax_items: nil, quantity: '1.0', exempt: false, tax_amount: '0.00', taxable_amount: '0.00', tax_rate: '0.00')
54
+ @date = date
55
+ @amount = amount
56
+ @external_id = external_id
57
+ @description = description
58
+ @external_product_id = external_product_id
59
+ @product_name = product_name
60
+ @product_description = product_description
61
+ @product_source = product_source
62
+ @product_subcategory = product_subcategory
63
+ @product_category = product_category
64
+ @exempt_reason = exempt_reason
65
+ @tax_items = tax_items
66
+ @quantity = quantity
67
+ @exempt = exempt
68
+ @tax_amount = tax_amount
69
+ @taxable_amount = taxable_amount
70
+ @tax_rate = tax_rate
71
+ end
72
+
73
+ sig { params(other: T.untyped).returns(T::Boolean) }
74
+ def ==(other)
75
+ return false unless other.is_a? self.class
76
+ return false unless @date == other.date
77
+ return false unless @amount == other.amount
78
+ return false unless @external_id == other.external_id
79
+ return false unless @description == other.description
80
+ return false unless @external_product_id == other.external_product_id
81
+ return false unless @product_name == other.product_name
82
+ return false unless @product_description == other.product_description
83
+ return false unless @product_source == other.product_source
84
+ return false unless @product_subcategory == other.product_subcategory
85
+ return false unless @product_category == other.product_category
86
+ return false unless @exempt_reason == other.exempt_reason
87
+ return false unless @tax_items == other.tax_items
88
+ return false unless @quantity == other.quantity
89
+ return false unless @exempt == other.exempt
90
+ return false unless @tax_amount == other.tax_amount
91
+ return false unless @taxable_amount == other.taxable_amount
92
+ return false unless @tax_rate == other.tax_rate
93
+ true
94
+ end
95
+ end
96
+ end
97
+ end
98
+ end
@@ -0,0 +1,45 @@
1
+ # typed: true
2
+ # frozen_string_literal: true
3
+
4
+
5
+ class KintsugiSDK::Models::Shared::TransactionItemEstimateResponse
6
+ extend ::Crystalline::MetadataFields::ClassMethods
7
+ end
8
+
9
+
10
+ class KintsugiSDK::Models::Shared::TransactionItemEstimateResponse
11
+ def date(); end
12
+ def date=(str_); end
13
+ def amount(); end
14
+ def amount=(str_); end
15
+ def external_id(); end
16
+ def external_id=(str_); end
17
+ def description(); end
18
+ def description=(str_); end
19
+ def external_product_id(); end
20
+ def external_product_id=(str_); end
21
+ def product_name(); end
22
+ def product_name=(str_); end
23
+ def product_description(); end
24
+ def product_description=(str_); end
25
+ def product_source(); end
26
+ def product_source=(str_); end
27
+ def product_subcategory(); end
28
+ def product_subcategory=(str_); end
29
+ def product_category(); end
30
+ def product_category=(str_); end
31
+ def exempt_reason(); end
32
+ def exempt_reason=(str_); end
33
+ def tax_items(); end
34
+ def tax_items=(str_); end
35
+ def quantity(); end
36
+ def quantity=(str_); end
37
+ def exempt(); end
38
+ def exempt=(str_); end
39
+ def tax_amount(); end
40
+ def tax_amount=(str_); end
41
+ def taxable_amount(); end
42
+ def taxable_amount=(str_); end
43
+ def tax_rate(); end
44
+ def tax_rate=(str_); end
45
+ end
@@ -0,0 +1,149 @@
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
+
11
+
12
+ class TransactionItemRead
13
+ extend T::Sig
14
+ include Crystalline::MetadataFields
15
+
16
+ # Organization identifier.
17
+ field :organization_id, ::String, { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('organization_id'), required: true } }
18
+ # 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
+ # External product identifier.
21
+ field :external_product_id, ::String, { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('external_product_id'), required: true } }
22
+ # The unique transaction item identifier.
23
+ field :id, ::String, { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('id'), required: true } }
24
+ # List of tax items associated with the transaction item.
25
+ field :tax_items, Crystalline::Array.new(Models::Shared::TaxItemRead), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('tax_items'), required: true } }
26
+ # External item identifier.
27
+ field :external_id, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('external_id') } }
28
+ # Item description
29
+ field :description, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('description') } }
30
+ # Product name
31
+ field :product, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('product') } }
32
+ # Product identifier.
33
+ field :product_id, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('product_id') } }
34
+ # Product name (detailed)
35
+ field :product_name, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('product_name') } }
36
+ # Product description
37
+ field :product_description, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('product_description') } }
38
+
39
+ 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) } }
40
+
41
+ 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) } }
42
+ # Converted item amount.
43
+ field :converted_amount, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('converted_amount') } }
44
+ # Converted taxable amount.
45
+ field :converted_taxable_amount, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('converted_taxable_amount') } }
46
+ # Converted imported tax amount.
47
+ field :converted_tax_amount_imported, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('converted_tax_amount_imported') } }
48
+ # Converted calculated tax amount
49
+ field :converted_tax_amount_calculated, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('converted_tax_amount_calculated') } }
50
+ # Converted total discount amount.
51
+ field :converted_total_discount, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('converted_total_discount') } }
52
+ # Converted subtotal amount.
53
+ field :converted_subtotal, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('converted_subtotal') } }
54
+ # This enum is used to determine if a transaction is exempt from tax.
55
+ 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) } }
56
+ # Total discount amount applied to this transaction item.
57
+ field :total_discount, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('total_discount') } }
58
+ # Subtotal amount before any discount is applied.
59
+ field :subtotal, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('subtotal') } }
60
+ # Quantity of item.
61
+ field :quantity, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('quantity') } }
62
+ # Item amount.
63
+ field :amount, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('amount') } }
64
+ # Imported tax amount for the item.
65
+ field :tax_amount_imported, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('tax_amount_imported') } }
66
+ # Imported tax rate.
67
+ field :tax_rate_imported, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('tax_rate_imported') } }
68
+ # Calculated tax amount for the item.
69
+ field :tax_amount_calculated, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('tax_amount_calculated') } }
70
+ # Calculated tax rate.
71
+ field :tax_rate_calculated, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('tax_rate_calculated') } }
72
+ # Taxable amount for the item.
73
+ field :taxable_amount, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('taxable_amount') } }
74
+ # Indicates if the item is exempt.
75
+ field :exempt, Crystalline::Nilable.new(Crystalline::Boolean.new), { 'format_json': { 'letter_case': ::KintsugiSDK::Utils.field_name('exempt') } }
76
+
77
+ sig { params(organization_id: ::String, date: ::DateTime, external_product_id: ::String, id: ::String, tax_items: T::Array[Models::Shared::TaxItemRead], 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(::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), tax_exemption: T.nilable(Models::Shared::TaxExemptionEnum), total_discount: T.nilable(::String), subtotal: 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), taxable_amount: T.nilable(::String), exempt: T.nilable(T::Boolean)).void }
78
+ def initialize(organization_id:, date:, external_product_id:, id:, tax_items:, 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, total_discount: nil, subtotal: 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)
79
+ @organization_id = organization_id
80
+ @date = date
81
+ @external_product_id = external_product_id
82
+ @id = id
83
+ @tax_items = tax_items
84
+ @external_id = external_id
85
+ @description = description
86
+ @product = product
87
+ @product_id = product_id
88
+ @product_name = product_name
89
+ @product_description = product_description
90
+ @original_currency = original_currency
91
+ @destination_currency = destination_currency
92
+ @converted_amount = converted_amount
93
+ @converted_taxable_amount = converted_taxable_amount
94
+ @converted_tax_amount_imported = converted_tax_amount_imported
95
+ @converted_tax_amount_calculated = converted_tax_amount_calculated
96
+ @converted_total_discount = converted_total_discount
97
+ @converted_subtotal = converted_subtotal
98
+ @tax_exemption = tax_exemption
99
+ @total_discount = total_discount
100
+ @subtotal = subtotal
101
+ @quantity = quantity
102
+ @amount = amount
103
+ @tax_amount_imported = tax_amount_imported
104
+ @tax_rate_imported = tax_rate_imported
105
+ @tax_amount_calculated = tax_amount_calculated
106
+ @tax_rate_calculated = tax_rate_calculated
107
+ @taxable_amount = taxable_amount
108
+ @exempt = exempt
109
+ end
110
+
111
+ sig { params(other: T.untyped).returns(T::Boolean) }
112
+ def ==(other)
113
+ return false unless other.is_a? self.class
114
+ return false unless @organization_id == other.organization_id
115
+ return false unless @date == other.date
116
+ return false unless @external_product_id == other.external_product_id
117
+ return false unless @id == other.id
118
+ return false unless @tax_items == other.tax_items
119
+ return false unless @external_id == other.external_id
120
+ return false unless @description == other.description
121
+ return false unless @product == other.product
122
+ return false unless @product_id == other.product_id
123
+ return false unless @product_name == other.product_name
124
+ return false unless @product_description == other.product_description
125
+ return false unless @original_currency == other.original_currency
126
+ return false unless @destination_currency == other.destination_currency
127
+ return false unless @converted_amount == other.converted_amount
128
+ return false unless @converted_taxable_amount == other.converted_taxable_amount
129
+ return false unless @converted_tax_amount_imported == other.converted_tax_amount_imported
130
+ return false unless @converted_tax_amount_calculated == other.converted_tax_amount_calculated
131
+ return false unless @converted_total_discount == other.converted_total_discount
132
+ return false unless @converted_subtotal == other.converted_subtotal
133
+ return false unless @tax_exemption == other.tax_exemption
134
+ return false unless @total_discount == other.total_discount
135
+ return false unless @subtotal == other.subtotal
136
+ return false unless @quantity == other.quantity
137
+ return false unless @amount == other.amount
138
+ return false unless @tax_amount_imported == other.tax_amount_imported
139
+ return false unless @tax_rate_imported == other.tax_rate_imported
140
+ return false unless @tax_amount_calculated == other.tax_amount_calculated
141
+ return false unless @tax_rate_calculated == other.tax_rate_calculated
142
+ return false unless @taxable_amount == other.taxable_amount
143
+ return false unless @exempt == other.exempt
144
+ true
145
+ end
146
+ end
147
+ end
148
+ end
149
+ end