orb-billing 1.45.0 → 1.47.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 (316) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +29 -1
  3. data/README.md +1 -1
  4. data/lib/orb/models/invoice_issue_summary_response.rb +2 -1
  5. data/lib/orb/models/invoice_issued_summary_webhook_event.rb +5 -3
  6. data/lib/orb/models/invoice_list_summary_response.rb +2 -1
  7. data/lib/orb/models/metric_list_params.rb +21 -1
  8. data/lib/orb/models/metric_update_params.rb +17 -1
  9. data/lib/orb/models/plan_update_params.rb +9 -1
  10. data/lib/orb/models/plans/external_plan_id_update_params.rb +9 -1
  11. data/lib/orb/models/subscription_alert_disabled_webhook_event.rb +5 -9
  12. data/lib/orb/models/subscription_grouped_cost_exceeded_webhook_event.rb +5 -9
  13. data/lib/orb/models/subscription_invoicing_threshold_exceeded_webhook_event.rb +5 -9
  14. data/lib/orb/models/subscription_license_allocation_reset_webhook_event.rb +5 -9
  15. data/lib/orb/models/subscription_license_balance_threshold_reached_webhook_event.rb +5 -9
  16. data/lib/orb/models/webhook_endpoint.rb +28 -1
  17. data/lib/orb/models/webhook_endpoint_create_params.rb +22 -1
  18. data/lib/orb/models/webhook_endpoint_update_params.rb +22 -1
  19. data/lib/orb/models/webhook_endpoint_with_secret.rb +28 -1
  20. data/lib/orb/models/webhooks/backfill_reflected_standard_webhook_event.rb +206 -0
  21. data/lib/orb/models/webhooks/backfill_reverted_standard_webhook_event.rb +206 -0
  22. data/lib/orb/models/webhooks/billable_metric_edited_standard_webhook_event.rb +131 -0
  23. data/lib/orb/models/webhooks/credit_block_accounting_sync_failed_standard_webhook_event.rb +537 -0
  24. data/lib/orb/models/webhooks/credit_block_accounting_sync_succeeded_standard_webhook_event.rb +531 -0
  25. data/lib/orb/models/webhooks/credit_note_accounting_sync_failed_standard_webhook_event.rb +188 -0
  26. data/lib/orb/models/webhooks/credit_note_accounting_sync_succeeded_standard_webhook_event.rb +183 -0
  27. data/lib/orb/models/webhooks/credit_note_issued_standard_webhook_event.rb +90 -0
  28. data/lib/orb/models/webhooks/credit_note_marked_as_void_standard_webhook_event.rb +92 -0
  29. data/lib/orb/models/webhooks/customer_accounting_sync_failed_standard_webhook_event.rb +198 -0
  30. data/lib/orb/models/webhooks/customer_accounting_sync_succeeded_standard_webhook_event.rb +193 -0
  31. data/lib/orb/models/webhooks/customer_balance_transaction_created_standard_webhook_event.rb +240 -0
  32. data/lib/orb/models/webhooks/customer_created_standard_webhook_event.rb +106 -0
  33. data/lib/orb/models/webhooks/customer_credit_balance_depleted_standard_webhook_event.rb +597 -0
  34. data/lib/orb/models/webhooks/customer_credit_balance_dropped_standard_webhook_event.rb +603 -0
  35. data/lib/orb/models/webhooks/customer_credit_balance_recovered_standard_webhook_event.rb +597 -0
  36. data/lib/orb/models/webhooks/customer_credit_ledger_incremented_standard_webhook_event.rb +509 -0
  37. data/lib/orb/models/webhooks/customer_edited_standard_webhook_event.rb +371 -0
  38. data/lib/orb/models/webhooks/data_exports_transfer_error_standard_webhook_event.rb +130 -0
  39. data/lib/orb/models/webhooks/data_exports_transfer_success_standard_webhook_event.rb +124 -0
  40. data/lib/orb/models/webhooks/event_unmatched_event_standard_webhook_event.rb +134 -0
  41. data/lib/orb/models/webhooks/ingestion_unmatched_customer_ids_standard_webhook_event.rb +94 -0
  42. data/lib/orb/models/webhooks/invoice_accounting_sync_failed_standard_webhook_event.rb +974 -0
  43. data/lib/orb/models/webhooks/invoice_accounting_sync_succeeded_standard_webhook_event.rb +968 -0
  44. data/lib/orb/models/webhooks/invoice_automation_schedule_step_executed_standard_webhook_event.rb +367 -0
  45. data/lib/orb/models/webhooks/invoice_cost_data_exported_standard_webhook_event.rb +113 -0
  46. data/lib/orb/models/webhooks/invoice_due_date_recalculation_canceled_standard_webhook_event.rb +101 -0
  47. data/lib/orb/models/webhooks/invoice_due_date_recalculation_completed_standard_webhook_event.rb +101 -0
  48. data/lib/orb/models/webhooks/invoice_due_date_recalculation_started_standard_webhook_event.rb +95 -0
  49. data/lib/orb/models/webhooks/invoice_dunning_schedule_created_standard_webhook_event.rb +996 -0
  50. data/lib/orb/models/webhooks/invoice_dunning_schedule_ended_standard_webhook_event.rb +990 -0
  51. data/lib/orb/models/webhooks/invoice_dunning_schedule_reset_standard_webhook_event.rb +994 -0
  52. data/lib/orb/models/webhooks/invoice_dunning_schedule_step_executed_standard_webhook_event.rb +944 -0
  53. data/lib/orb/models/webhooks/invoice_edited_standard_webhook_event.rb +1367 -0
  54. data/lib/orb/models/webhooks/invoice_invoice_date_elapsed_standard_webhook_event.rb +151 -0
  55. data/lib/orb/models/webhooks/invoice_issue_failed_standard_webhook_event.rb +887 -0
  56. data/lib/orb/models/webhooks/invoice_issued_standard_webhook_event.rb +886 -0
  57. data/lib/orb/models/webhooks/invoice_issued_summary_standard_webhook_event.rb +889 -0
  58. data/lib/orb/models/webhooks/invoice_manually_marked_as_paid_standard_webhook_event.rb +901 -0
  59. data/lib/orb/models/webhooks/invoice_manually_marked_as_void_standard_webhook_event.rb +878 -0
  60. data/lib/orb/models/webhooks/invoice_payment_failed_standard_webhook_event.rb +901 -0
  61. data/lib/orb/models/webhooks/invoice_payment_processing_standard_webhook_event.rb +895 -0
  62. data/lib/orb/models/webhooks/invoice_payment_succeeded_standard_webhook_event.rb +910 -0
  63. data/lib/orb/models/webhooks/invoice_sync_failed_standard_webhook_event.rb +892 -0
  64. data/lib/orb/models/webhooks/invoice_sync_succeeded_standard_webhook_event.rb +894 -0
  65. data/lib/orb/models/webhooks/invoice_undo_mark_as_paid_standard_webhook_event.rb +877 -0
  66. data/lib/orb/models/webhooks/metric_events_dropped_by_watermark_standard_webhook_event.rb +125 -0
  67. data/lib/orb/models/webhooks/payment_method_created_standard_webhook_event.rb +184 -0
  68. data/lib/orb/models/webhooks/payment_method_deleted_standard_webhook_event.rb +184 -0
  69. data/lib/orb/models/webhooks/plan_created_standard_webhook_event.rb +119 -0
  70. data/lib/orb/models/webhooks/plan_default_version_set_standard_webhook_event.rb +139 -0
  71. data/lib/orb/models/webhooks/plan_edited_standard_webhook_event.rb +159 -0
  72. data/lib/orb/models/webhooks/plan_version_created_standard_webhook_event.rb +138 -0
  73. data/lib/orb/models/webhooks/price_edited_standard_webhook_event.rb +132 -0
  74. data/lib/orb/models/webhooks/resource_event_test_standard_webhook_event.rb +92 -0
  75. data/lib/orb/models/webhooks/sales_order_accounting_sync_failed_standard_webhook_event.rb +974 -0
  76. data/lib/orb/models/webhooks/sales_order_accounting_sync_succeeded_standard_webhook_event.rb +969 -0
  77. data/lib/orb/models/webhooks/standard_unwrap_standard_params.rb +16 -0
  78. data/lib/orb/models/webhooks/subscription_accounting_sync_failed_standard_webhook_event.rb +322 -0
  79. data/lib/orb/models/webhooks/subscription_accounting_sync_succeeded_standard_webhook_event.rb +316 -0
  80. data/lib/orb/models/webhooks/subscription_alert_disabled_standard_webhook_event.rb +663 -0
  81. data/lib/orb/models/webhooks/subscription_cancellation_scheduled_standard_webhook_event.rb +237 -0
  82. data/lib/orb/models/webhooks/subscription_cancellation_unscheduled_standard_webhook_event.rb +237 -0
  83. data/lib/orb/models/webhooks/subscription_cost_exceeded_standard_webhook_event.rb +692 -0
  84. data/lib/orb/models/webhooks/subscription_created_standard_webhook_event.rb +221 -0
  85. data/lib/orb/models/webhooks/subscription_edited_standard_webhook_event.rb +273 -0
  86. data/lib/orb/models/webhooks/subscription_ended_standard_webhook_event.rb +219 -0
  87. data/lib/orb/models/webhooks/subscription_fixed_fee_quantity_updated_standard_webhook_event.rb +255 -0
  88. data/lib/orb/models/webhooks/subscription_grouped_cost_exceeded_standard_webhook_event.rb +689 -0
  89. data/lib/orb/models/webhooks/subscription_invoicing_threshold_exceeded_standard_webhook_event.rb +218 -0
  90. data/lib/orb/models/webhooks/subscription_license_allocation_reset_standard_webhook_event.rb +240 -0
  91. data/lib/orb/models/webhooks/subscription_license_balance_threshold_reached_standard_webhook_event.rb +683 -0
  92. data/lib/orb/models/webhooks/subscription_plan_change_scheduled_standard_webhook_event.rb +249 -0
  93. data/lib/orb/models/webhooks/subscription_plan_changed_standard_webhook_event.rb +233 -0
  94. data/lib/orb/models/webhooks/subscription_plan_version_change_scheduled_standard_webhook_event.rb +250 -0
  95. data/lib/orb/models/webhooks/subscription_plan_version_changed_standard_webhook_event.rb +248 -0
  96. data/lib/orb/models/webhooks/subscription_spend_exceeded_standard_webhook_event.rb +693 -0
  97. data/lib/orb/models/webhooks/subscription_started_standard_webhook_event.rb +221 -0
  98. data/lib/orb/models/webhooks/subscription_trial_ended_standard_webhook_event.rb +222 -0
  99. data/lib/orb/models/webhooks/subscription_usage_exceeded_standard_webhook_event.rb +700 -0
  100. data/lib/orb/models/webhooks/transaction_accounting_sync_failed_standard_webhook_event.rb +270 -0
  101. data/lib/orb/models/webhooks/transaction_accounting_sync_succeeded_standard_webhook_event.rb +264 -0
  102. data/lib/orb/models/webhooks/unwrap_standard_webhook_event.rb +258 -0
  103. data/lib/orb/models.rb +2 -0
  104. data/lib/orb/resources/metrics.rb +15 -5
  105. data/lib/orb/resources/plans/external_plan_id.rb +6 -3
  106. data/lib/orb/resources/plans.rb +6 -3
  107. data/lib/orb/resources/webhook_endpoints.rb +6 -2
  108. data/lib/orb/resources/webhooks/standard.rb +24 -0
  109. data/lib/orb/resources/webhooks.rb +4 -0
  110. data/lib/orb/version.rb +1 -1
  111. data/lib/orb.rb +84 -0
  112. data/rbi/orb/models/invoice_issue_summary_response.rbi +2 -1
  113. data/rbi/orb/models/invoice_issued_summary_webhook_event.rbi +6 -3
  114. data/rbi/orb/models/invoice_list_summary_response.rbi +2 -1
  115. data/rbi/orb/models/metric_list_params.rbi +29 -0
  116. data/rbi/orb/models/metric_update_params.rbi +16 -0
  117. data/rbi/orb/models/plan_update_params.rbi +8 -0
  118. data/rbi/orb/models/plans/external_plan_id_update_params.rbi +8 -0
  119. data/rbi/orb/models/subscription_alert_disabled_webhook_event.rbi +6 -12
  120. data/rbi/orb/models/subscription_grouped_cost_exceeded_webhook_event.rbi +6 -12
  121. data/rbi/orb/models/subscription_invoicing_threshold_exceeded_webhook_event.rbi +6 -12
  122. data/rbi/orb/models/subscription_license_allocation_reset_webhook_event.rbi +6 -12
  123. data/rbi/orb/models/subscription_license_balance_threshold_reached_webhook_event.rbi +6 -12
  124. data/rbi/orb/models/webhook_endpoint.rbi +39 -0
  125. data/rbi/orb/models/webhook_endpoint_create_params.rbi +51 -0
  126. data/rbi/orb/models/webhook_endpoint_update_params.rbi +51 -0
  127. data/rbi/orb/models/webhook_endpoint_with_secret.rbi +50 -0
  128. data/rbi/orb/models/webhooks/backfill_reflected_standard_webhook_event.rbi +349 -0
  129. data/rbi/orb/models/webhooks/backfill_reverted_standard_webhook_event.rbi +347 -0
  130. data/rbi/orb/models/webhooks/billable_metric_edited_standard_webhook_event.rbi +273 -0
  131. data/rbi/orb/models/webhooks/credit_block_accounting_sync_failed_standard_webhook_event.rbi +1106 -0
  132. data/rbi/orb/models/webhooks/credit_block_accounting_sync_succeeded_standard_webhook_event.rbi +1095 -0
  133. data/rbi/orb/models/webhooks/credit_note_accounting_sync_failed_standard_webhook_event.rbi +377 -0
  134. data/rbi/orb/models/webhooks/credit_note_accounting_sync_succeeded_standard_webhook_event.rbi +366 -0
  135. data/rbi/orb/models/webhooks/credit_note_issued_standard_webhook_event.rbi +166 -0
  136. data/rbi/orb/models/webhooks/credit_note_marked_as_void_standard_webhook_event.rbi +166 -0
  137. data/rbi/orb/models/webhooks/customer_accounting_sync_failed_standard_webhook_event.rbi +403 -0
  138. data/rbi/orb/models/webhooks/customer_accounting_sync_succeeded_standard_webhook_event.rbi +392 -0
  139. data/rbi/orb/models/webhooks/customer_balance_transaction_created_standard_webhook_event.rbi +493 -0
  140. data/rbi/orb/models/webhooks/customer_created_standard_webhook_event.rbi +198 -0
  141. data/rbi/orb/models/webhooks/customer_credit_balance_depleted_standard_webhook_event.rbi +1151 -0
  142. data/rbi/orb/models/webhooks/customer_credit_balance_dropped_standard_webhook_event.rbi +1158 -0
  143. data/rbi/orb/models/webhooks/customer_credit_balance_recovered_standard_webhook_event.rbi +1151 -0
  144. data/rbi/orb/models/webhooks/customer_credit_ledger_incremented_standard_webhook_event.rbi +1044 -0
  145. data/rbi/orb/models/webhooks/customer_edited_standard_webhook_event.rbi +678 -0
  146. data/rbi/orb/models/webhooks/data_exports_transfer_error_standard_webhook_event.rbi +236 -0
  147. data/rbi/orb/models/webhooks/data_exports_transfer_success_standard_webhook_event.rbi +230 -0
  148. data/rbi/orb/models/webhooks/event_unmatched_event_standard_webhook_event.rbi +275 -0
  149. data/rbi/orb/models/webhooks/ingestion_unmatched_customer_ids_standard_webhook_event.rbi +192 -0
  150. data/rbi/orb/models/webhooks/invoice_accounting_sync_failed_standard_webhook_event.rbi +1708 -0
  151. data/rbi/orb/models/webhooks/invoice_accounting_sync_succeeded_standard_webhook_event.rbi +1697 -0
  152. data/rbi/orb/models/webhooks/invoice_automation_schedule_step_executed_standard_webhook_event.rbi +670 -0
  153. data/rbi/orb/models/webhooks/invoice_cost_data_exported_standard_webhook_event.rbi +210 -0
  154. data/rbi/orb/models/webhooks/invoice_due_date_recalculation_canceled_standard_webhook_event.rbi +195 -0
  155. data/rbi/orb/models/webhooks/invoice_due_date_recalculation_completed_standard_webhook_event.rbi +195 -0
  156. data/rbi/orb/models/webhooks/invoice_due_date_recalculation_started_standard_webhook_event.rbi +188 -0
  157. data/rbi/orb/models/webhooks/invoice_dunning_schedule_created_standard_webhook_event.rbi +1716 -0
  158. data/rbi/orb/models/webhooks/invoice_dunning_schedule_ended_standard_webhook_event.rbi +1711 -0
  159. data/rbi/orb/models/webhooks/invoice_dunning_schedule_reset_standard_webhook_event.rbi +1716 -0
  160. data/rbi/orb/models/webhooks/invoice_dunning_schedule_step_executed_standard_webhook_event.rbi +1631 -0
  161. data/rbi/orb/models/webhooks/invoice_edited_standard_webhook_event.rbi +2340 -0
  162. data/rbi/orb/models/webhooks/invoice_invoice_date_elapsed_standard_webhook_event.rbi +324 -0
  163. data/rbi/orb/models/webhooks/invoice_issue_failed_standard_webhook_event.rbi +1532 -0
  164. data/rbi/orb/models/webhooks/invoice_issued_standard_webhook_event.rbi +1532 -0
  165. data/rbi/orb/models/webhooks/invoice_issued_summary_standard_webhook_event.rbi +1537 -0
  166. data/rbi/orb/models/webhooks/invoice_manually_marked_as_paid_standard_webhook_event.rbi +1552 -0
  167. data/rbi/orb/models/webhooks/invoice_manually_marked_as_void_standard_webhook_event.rbi +1497 -0
  168. data/rbi/orb/models/webhooks/invoice_payment_failed_standard_webhook_event.rbi +1557 -0
  169. data/rbi/orb/models/webhooks/invoice_payment_processing_standard_webhook_event.rbi +1550 -0
  170. data/rbi/orb/models/webhooks/invoice_payment_succeeded_standard_webhook_event.rbi +1566 -0
  171. data/rbi/orb/models/webhooks/invoice_sync_failed_standard_webhook_event.rbi +1545 -0
  172. data/rbi/orb/models/webhooks/invoice_sync_succeeded_standard_webhook_event.rbi +1547 -0
  173. data/rbi/orb/models/webhooks/invoice_undo_mark_as_paid_standard_webhook_event.rbi +1497 -0
  174. data/rbi/orb/models/webhooks/metric_events_dropped_by_watermark_standard_webhook_event.rbi +233 -0
  175. data/rbi/orb/models/webhooks/payment_method_created_standard_webhook_event.rbi +331 -0
  176. data/rbi/orb/models/webhooks/payment_method_deleted_standard_webhook_event.rbi +331 -0
  177. data/rbi/orb/models/webhooks/plan_created_standard_webhook_event.rbi +216 -0
  178. data/rbi/orb/models/webhooks/plan_default_version_set_standard_webhook_event.rbi +277 -0
  179. data/rbi/orb/models/webhooks/plan_edited_standard_webhook_event.rbi +337 -0
  180. data/rbi/orb/models/webhooks/plan_version_created_standard_webhook_event.rbi +271 -0
  181. data/rbi/orb/models/webhooks/price_edited_standard_webhook_event.rbi +311 -0
  182. data/rbi/orb/models/webhooks/resource_event_test_standard_webhook_event.rbi +191 -0
  183. data/rbi/orb/models/webhooks/sales_order_accounting_sync_failed_standard_webhook_event.rbi +1708 -0
  184. data/rbi/orb/models/webhooks/sales_order_accounting_sync_succeeded_standard_webhook_event.rbi +1697 -0
  185. data/rbi/orb/models/webhooks/standard_unwrap_standard_params.rbi +32 -0
  186. data/rbi/orb/models/webhooks/subscription_accounting_sync_failed_standard_webhook_event.rbi +609 -0
  187. data/rbi/orb/models/webhooks/subscription_accounting_sync_succeeded_standard_webhook_event.rbi +598 -0
  188. data/rbi/orb/models/webhooks/subscription_alert_disabled_standard_webhook_event.rbi +1296 -0
  189. data/rbi/orb/models/webhooks/subscription_cancellation_scheduled_standard_webhook_event.rbi +433 -0
  190. data/rbi/orb/models/webhooks/subscription_cancellation_unscheduled_standard_webhook_event.rbi +435 -0
  191. data/rbi/orb/models/webhooks/subscription_cost_exceeded_standard_webhook_event.rbi +1298 -0
  192. data/rbi/orb/models/webhooks/subscription_created_standard_webhook_event.rbi +398 -0
  193. data/rbi/orb/models/webhooks/subscription_edited_standard_webhook_event.rbi +520 -0
  194. data/rbi/orb/models/webhooks/subscription_ended_standard_webhook_event.rbi +398 -0
  195. data/rbi/orb/models/webhooks/subscription_fixed_fee_quantity_updated_standard_webhook_event.rbi +458 -0
  196. data/rbi/orb/models/webhooks/subscription_grouped_cost_exceeded_standard_webhook_event.rbi +1315 -0
  197. data/rbi/orb/models/webhooks/subscription_invoicing_threshold_exceeded_standard_webhook_event.rbi +422 -0
  198. data/rbi/orb/models/webhooks/subscription_license_allocation_reset_standard_webhook_event.rbi +471 -0
  199. data/rbi/orb/models/webhooks/subscription_license_balance_threshold_reached_standard_webhook_event.rbi +1313 -0
  200. data/rbi/orb/models/webhooks/subscription_plan_change_scheduled_standard_webhook_event.rbi +453 -0
  201. data/rbi/orb/models/webhooks/subscription_plan_changed_standard_webhook_event.rbi +433 -0
  202. data/rbi/orb/models/webhooks/subscription_plan_version_change_scheduled_standard_webhook_event.rbi +457 -0
  203. data/rbi/orb/models/webhooks/subscription_plan_version_changed_standard_webhook_event.rbi +457 -0
  204. data/rbi/orb/models/webhooks/subscription_spend_exceeded_standard_webhook_event.rbi +1299 -0
  205. data/rbi/orb/models/webhooks/subscription_started_standard_webhook_event.rbi +398 -0
  206. data/rbi/orb/models/webhooks/subscription_trial_ended_standard_webhook_event.rbi +398 -0
  207. data/rbi/orb/models/webhooks/subscription_usage_exceeded_standard_webhook_event.rbi +1305 -0
  208. data/rbi/orb/models/webhooks/transaction_accounting_sync_failed_standard_webhook_event.rbi +516 -0
  209. data/rbi/orb/models/webhooks/transaction_accounting_sync_succeeded_standard_webhook_event.rbi +505 -0
  210. data/rbi/orb/models/webhooks/unwrap_standard_webhook_event.rbi +107 -0
  211. data/rbi/orb/models.rbi +2 -0
  212. data/rbi/orb/resources/metrics.rbi +16 -3
  213. data/rbi/orb/resources/plans/external_plan_id.rbi +6 -2
  214. data/rbi/orb/resources/plans.rbi +6 -2
  215. data/rbi/orb/resources/webhook_endpoints.rbi +10 -0
  216. data/rbi/orb/resources/webhooks/standard.rbi +107 -0
  217. data/rbi/orb/resources/webhooks.rbi +3 -0
  218. data/sig/orb/models/metric_list_params.rbs +18 -1
  219. data/sig/orb/models/metric_update_params.rbs +14 -1
  220. data/sig/orb/models/plan_update_params.rbs +6 -1
  221. data/sig/orb/models/plans/external_plan_id_update_params.rbs +6 -1
  222. data/sig/orb/models/webhook_endpoint.rbs +16 -0
  223. data/sig/orb/models/webhook_endpoint_create_params.rbs +20 -1
  224. data/sig/orb/models/webhook_endpoint_update_params.rbs +16 -0
  225. data/sig/orb/models/webhook_endpoint_with_secret.rbs +16 -0
  226. data/sig/orb/models/webhooks/backfill_reflected_standard_webhook_event.rbs +148 -0
  227. data/sig/orb/models/webhooks/backfill_reverted_standard_webhook_event.rbs +148 -0
  228. data/sig/orb/models/webhooks/billable_metric_edited_standard_webhook_event.rbs +112 -0
  229. data/sig/orb/models/webhooks/credit_block_accounting_sync_failed_standard_webhook_event.rbs +435 -0
  230. data/sig/orb/models/webhooks/credit_block_accounting_sync_succeeded_standard_webhook_event.rbs +430 -0
  231. data/sig/orb/models/webhooks/credit_note_accounting_sync_failed_standard_webhook_event.rbs +165 -0
  232. data/sig/orb/models/webhooks/credit_note_accounting_sync_succeeded_standard_webhook_event.rbs +160 -0
  233. data/sig/orb/models/webhooks/credit_note_issued_standard_webhook_event.rbs +68 -0
  234. data/sig/orb/models/webhooks/credit_note_marked_as_void_standard_webhook_event.rbs +68 -0
  235. data/sig/orb/models/webhooks/customer_accounting_sync_failed_standard_webhook_event.rbs +160 -0
  236. data/sig/orb/models/webhooks/customer_accounting_sync_succeeded_standard_webhook_event.rbs +155 -0
  237. data/sig/orb/models/webhooks/customer_balance_transaction_created_standard_webhook_event.rbs +189 -0
  238. data/sig/orb/models/webhooks/customer_created_standard_webhook_event.rbs +68 -0
  239. data/sig/orb/models/webhooks/customer_credit_balance_depleted_standard_webhook_event.rbs +396 -0
  240. data/sig/orb/models/webhooks/customer_credit_balance_dropped_standard_webhook_event.rbs +401 -0
  241. data/sig/orb/models/webhooks/customer_credit_balance_recovered_standard_webhook_event.rbs +396 -0
  242. data/sig/orb/models/webhooks/customer_credit_ledger_incremented_standard_webhook_event.rbs +386 -0
  243. data/sig/orb/models/webhooks/customer_edited_standard_webhook_event.rbs +157 -0
  244. data/sig/orb/models/webhooks/data_exports_transfer_error_standard_webhook_event.rbs +110 -0
  245. data/sig/orb/models/webhooks/data_exports_transfer_success_standard_webhook_event.rbs +105 -0
  246. data/sig/orb/models/webhooks/event_unmatched_event_standard_webhook_event.rbs +122 -0
  247. data/sig/orb/models/webhooks/ingestion_unmatched_customer_ids_standard_webhook_event.rbs +73 -0
  248. data/sig/orb/models/webhooks/invoice_accounting_sync_failed_standard_webhook_event.rbs +614 -0
  249. data/sig/orb/models/webhooks/invoice_accounting_sync_succeeded_standard_webhook_event.rbs +609 -0
  250. data/sig/orb/models/webhooks/invoice_automation_schedule_step_executed_standard_webhook_event.rbs +331 -0
  251. data/sig/orb/models/webhooks/invoice_cost_data_exported_standard_webhook_event.rbs +91 -0
  252. data/sig/orb/models/webhooks/invoice_due_date_recalculation_canceled_standard_webhook_event.rbs +75 -0
  253. data/sig/orb/models/webhooks/invoice_due_date_recalculation_completed_standard_webhook_event.rbs +75 -0
  254. data/sig/orb/models/webhooks/invoice_due_date_recalculation_started_standard_webhook_event.rbs +73 -0
  255. data/sig/orb/models/webhooks/invoice_dunning_schedule_created_standard_webhook_event.rbs +638 -0
  256. data/sig/orb/models/webhooks/invoice_dunning_schedule_ended_standard_webhook_event.rbs +633 -0
  257. data/sig/orb/models/webhooks/invoice_dunning_schedule_reset_standard_webhook_event.rbs +623 -0
  258. data/sig/orb/models/webhooks/invoice_dunning_schedule_step_executed_standard_webhook_event.rbs +586 -0
  259. data/sig/orb/models/webhooks/invoice_edited_standard_webhook_event.rbs +859 -0
  260. data/sig/orb/models/webhooks/invoice_invoice_date_elapsed_standard_webhook_event.rbs +129 -0
  261. data/sig/orb/models/webhooks/invoice_issue_failed_standard_webhook_event.rbs +527 -0
  262. data/sig/orb/models/webhooks/invoice_issued_standard_webhook_event.rbs +527 -0
  263. data/sig/orb/models/webhooks/invoice_issued_summary_standard_webhook_event.rbs +527 -0
  264. data/sig/orb/models/webhooks/invoice_manually_marked_as_paid_standard_webhook_event.rbs +540 -0
  265. data/sig/orb/models/webhooks/invoice_manually_marked_as_void_standard_webhook_event.rbs +517 -0
  266. data/sig/orb/models/webhooks/invoice_payment_failed_standard_webhook_event.rbs +544 -0
  267. data/sig/orb/models/webhooks/invoice_payment_processing_standard_webhook_event.rbs +538 -0
  268. data/sig/orb/models/webhooks/invoice_payment_succeeded_standard_webhook_event.rbs +549 -0
  269. data/sig/orb/models/webhooks/invoice_sync_failed_standard_webhook_event.rbs +536 -0
  270. data/sig/orb/models/webhooks/invoice_sync_succeeded_standard_webhook_event.rbs +536 -0
  271. data/sig/orb/models/webhooks/invoice_undo_mark_as_paid_standard_webhook_event.rbs +517 -0
  272. data/sig/orb/models/webhooks/metric_events_dropped_by_watermark_standard_webhook_event.rbs +100 -0
  273. data/sig/orb/models/webhooks/payment_method_created_standard_webhook_event.rbs +130 -0
  274. data/sig/orb/models/webhooks/payment_method_deleted_standard_webhook_event.rbs +130 -0
  275. data/sig/orb/models/webhooks/plan_created_standard_webhook_event.rbs +90 -0
  276. data/sig/orb/models/webhooks/plan_default_version_set_standard_webhook_event.rbs +112 -0
  277. data/sig/orb/models/webhooks/plan_edited_standard_webhook_event.rbs +134 -0
  278. data/sig/orb/models/webhooks/plan_version_created_standard_webhook_event.rbs +109 -0
  279. data/sig/orb/models/webhooks/price_edited_standard_webhook_event.rbs +95 -0
  280. data/sig/orb/models/webhooks/resource_event_test_standard_webhook_event.rbs +75 -0
  281. data/sig/orb/models/webhooks/sales_order_accounting_sync_failed_standard_webhook_event.rbs +614 -0
  282. data/sig/orb/models/webhooks/sales_order_accounting_sync_succeeded_standard_webhook_event.rbs +609 -0
  283. data/sig/orb/models/webhooks/standard_unwrap_standard_params.rbs +17 -0
  284. data/sig/orb/models/webhooks/subscription_accounting_sync_failed_standard_webhook_event.rbs +256 -0
  285. data/sig/orb/models/webhooks/subscription_accounting_sync_succeeded_standard_webhook_event.rbs +251 -0
  286. data/sig/orb/models/webhooks/subscription_alert_disabled_standard_webhook_event.rbs +466 -0
  287. data/sig/orb/models/webhooks/subscription_cancellation_scheduled_standard_webhook_event.rbs +169 -0
  288. data/sig/orb/models/webhooks/subscription_cancellation_unscheduled_standard_webhook_event.rbs +169 -0
  289. data/sig/orb/models/webhooks/subscription_cost_exceeded_standard_webhook_event.rbs +475 -0
  290. data/sig/orb/models/webhooks/subscription_created_standard_webhook_event.rbs +159 -0
  291. data/sig/orb/models/webhooks/subscription_edited_standard_webhook_event.rbs +218 -0
  292. data/sig/orb/models/webhooks/subscription_ended_standard_webhook_event.rbs +159 -0
  293. data/sig/orb/models/webhooks/subscription_fixed_fee_quantity_updated_standard_webhook_event.rbs +191 -0
  294. data/sig/orb/models/webhooks/subscription_grouped_cost_exceeded_standard_webhook_event.rbs +487 -0
  295. data/sig/orb/models/webhooks/subscription_invoicing_threshold_exceeded_standard_webhook_event.rbs +176 -0
  296. data/sig/orb/models/webhooks/subscription_license_allocation_reset_standard_webhook_event.rbs +198 -0
  297. data/sig/orb/models/webhooks/subscription_license_balance_threshold_reached_standard_webhook_event.rbs +482 -0
  298. data/sig/orb/models/webhooks/subscription_plan_change_scheduled_standard_webhook_event.rbs +182 -0
  299. data/sig/orb/models/webhooks/subscription_plan_changed_standard_webhook_event.rbs +169 -0
  300. data/sig/orb/models/webhooks/subscription_plan_version_change_scheduled_standard_webhook_event.rbs +186 -0
  301. data/sig/orb/models/webhooks/subscription_plan_version_changed_standard_webhook_event.rbs +186 -0
  302. data/sig/orb/models/webhooks/subscription_spend_exceeded_standard_webhook_event.rbs +475 -0
  303. data/sig/orb/models/webhooks/subscription_started_standard_webhook_event.rbs +159 -0
  304. data/sig/orb/models/webhooks/subscription_trial_ended_standard_webhook_event.rbs +159 -0
  305. data/sig/orb/models/webhooks/subscription_usage_exceeded_standard_webhook_event.rbs +480 -0
  306. data/sig/orb/models/webhooks/transaction_accounting_sync_failed_standard_webhook_event.rbs +223 -0
  307. data/sig/orb/models/webhooks/transaction_accounting_sync_succeeded_standard_webhook_event.rbs +218 -0
  308. data/sig/orb/models/webhooks/unwrap_standard_webhook_event.rbs +94 -0
  309. data/sig/orb/models.rbs +2 -0
  310. data/sig/orb/resources/metrics.rbs +3 -0
  311. data/sig/orb/resources/plans/external_plan_id.rbs +1 -0
  312. data/sig/orb/resources/plans.rbs +1 -0
  313. data/sig/orb/resources/webhook_endpoints.rbs +2 -0
  314. data/sig/orb/resources/webhooks/standard.rbs +93 -0
  315. data/sig/orb/resources/webhooks.rbs +2 -0
  316. metadata +253 -1
@@ -0,0 +1,1697 @@
1
+ # typed: strong
2
+
3
+ module Orb
4
+ module Models
5
+ module Webhooks
6
+ class SalesOrderAccountingSyncSucceededStandardWebhookEvent < Orb::Internal::Type::BaseModel
7
+ OrHash =
8
+ T.type_alias do
9
+ T.any(
10
+ Orb::Webhooks::SalesOrderAccountingSyncSucceededStandardWebhookEvent,
11
+ Orb::Internal::AnyHash
12
+ )
13
+ end
14
+
15
+ # The ID of this webhook event.
16
+ sig { returns(String) }
17
+ attr_accessor :id
18
+
19
+ sig do
20
+ returns(
21
+ Orb::Webhooks::SalesOrderAccountingSyncSucceededStandardWebhookEvent::AccountingSyncRecord
22
+ )
23
+ end
24
+ attr_reader :accounting_sync_record
25
+
26
+ sig do
27
+ params(
28
+ accounting_sync_record:
29
+ Orb::Webhooks::SalesOrderAccountingSyncSucceededStandardWebhookEvent::AccountingSyncRecord::OrHash
30
+ ).void
31
+ end
32
+ attr_writer :accounting_sync_record
33
+
34
+ # The time at which this event was created, to the second.
35
+ sig { returns(Time) }
36
+ attr_accessor :created_at
37
+
38
+ # An invoice without its line items, subtotal, discounts, minimums or maximums.
39
+ # Fetch the invoice for those.
40
+ sig do
41
+ returns(
42
+ Orb::Webhooks::SalesOrderAccountingSyncSucceededStandardWebhookEvent::Invoice
43
+ )
44
+ end
45
+ attr_reader :invoice
46
+
47
+ sig do
48
+ params(
49
+ invoice:
50
+ Orb::Webhooks::SalesOrderAccountingSyncSucceededStandardWebhookEvent::Invoice::OrHash
51
+ ).void
52
+ end
53
+ attr_writer :invoice
54
+
55
+ # The serialization style this payload was rendered in, as configured on the
56
+ # endpoint.
57
+ sig do
58
+ returns(
59
+ Orb::Webhooks::SalesOrderAccountingSyncSucceededStandardWebhookEvent::PayloadStyle::TaggedSymbol
60
+ )
61
+ end
62
+ attr_accessor :payload_style
63
+
64
+ sig do
65
+ returns(
66
+ Orb::Webhooks::SalesOrderAccountingSyncSucceededStandardWebhookEvent::Properties
67
+ )
68
+ end
69
+ attr_reader :properties
70
+
71
+ sig do
72
+ params(
73
+ properties:
74
+ Orb::Webhooks::SalesOrderAccountingSyncSucceededStandardWebhookEvent::Properties::OrHash
75
+ ).void
76
+ end
77
+ attr_writer :properties
78
+
79
+ # The event this payload describes.
80
+ sig do
81
+ returns(
82
+ Orb::Webhooks::SalesOrderAccountingSyncSucceededStandardWebhookEvent::Type::TaggedSymbol
83
+ )
84
+ end
85
+ attr_accessor :type
86
+
87
+ # Issued when a sales order accounting sync succeeds.
88
+ sig do
89
+ params(
90
+ id: String,
91
+ accounting_sync_record:
92
+ Orb::Webhooks::SalesOrderAccountingSyncSucceededStandardWebhookEvent::AccountingSyncRecord::OrHash,
93
+ created_at: Time,
94
+ invoice:
95
+ Orb::Webhooks::SalesOrderAccountingSyncSucceededStandardWebhookEvent::Invoice::OrHash,
96
+ payload_style:
97
+ Orb::Webhooks::SalesOrderAccountingSyncSucceededStandardWebhookEvent::PayloadStyle::OrSymbol,
98
+ properties:
99
+ Orb::Webhooks::SalesOrderAccountingSyncSucceededStandardWebhookEvent::Properties::OrHash,
100
+ type:
101
+ Orb::Webhooks::SalesOrderAccountingSyncSucceededStandardWebhookEvent::Type::OrSymbol
102
+ ).returns(T.attached_class)
103
+ end
104
+ def self.new(
105
+ # The ID of this webhook event.
106
+ id:,
107
+ accounting_sync_record:,
108
+ # The time at which this event was created, to the second.
109
+ created_at:,
110
+ # An invoice without its line items, subtotal, discounts, minimums or maximums.
111
+ # Fetch the invoice for those.
112
+ invoice:,
113
+ # The serialization style this payload was rendered in, as configured on the
114
+ # endpoint.
115
+ payload_style:,
116
+ properties:,
117
+ # The event this payload describes.
118
+ type:
119
+ )
120
+ end
121
+
122
+ sig do
123
+ override.returns(
124
+ {
125
+ id: String,
126
+ accounting_sync_record:
127
+ Orb::Webhooks::SalesOrderAccountingSyncSucceededStandardWebhookEvent::AccountingSyncRecord,
128
+ created_at: Time,
129
+ invoice:
130
+ Orb::Webhooks::SalesOrderAccountingSyncSucceededStandardWebhookEvent::Invoice,
131
+ payload_style:
132
+ Orb::Webhooks::SalesOrderAccountingSyncSucceededStandardWebhookEvent::PayloadStyle::TaggedSymbol,
133
+ properties:
134
+ Orb::Webhooks::SalesOrderAccountingSyncSucceededStandardWebhookEvent::Properties,
135
+ type:
136
+ Orb::Webhooks::SalesOrderAccountingSyncSucceededStandardWebhookEvent::Type::TaggedSymbol
137
+ }
138
+ )
139
+ end
140
+ def to_hash
141
+ end
142
+
143
+ class AccountingSyncRecord < Orb::Internal::Type::BaseModel
144
+ OrHash =
145
+ T.type_alias do
146
+ T.any(
147
+ Orb::Webhooks::SalesOrderAccountingSyncSucceededStandardWebhookEvent::AccountingSyncRecord,
148
+ Orb::Internal::AnyHash
149
+ )
150
+ end
151
+
152
+ sig { returns(String) }
153
+ attr_accessor :id
154
+
155
+ sig { returns(String) }
156
+ attr_accessor :customer_id
157
+
158
+ sig do
159
+ returns(
160
+ Orb::Webhooks::SalesOrderAccountingSyncSucceededStandardWebhookEvent::AccountingSyncRecord::RecordType::TaggedSymbol
161
+ )
162
+ end
163
+ attr_accessor :record_type
164
+
165
+ sig { returns(T.nilable(T::Hash[Symbol, T.anything])) }
166
+ attr_accessor :error_details
167
+
168
+ sig { returns(T.nilable(String)) }
169
+ attr_accessor :invoice_id
170
+
171
+ sig { returns(T.nilable(String)) }
172
+ attr_accessor :provider_customer_id
173
+
174
+ sig { returns(T.nilable(String)) }
175
+ attr_accessor :status
176
+
177
+ sig { returns(T.nilable(String)) }
178
+ attr_accessor :sync_action
179
+
180
+ sig do
181
+ params(
182
+ id: String,
183
+ customer_id: String,
184
+ record_type:
185
+ Orb::Webhooks::SalesOrderAccountingSyncSucceededStandardWebhookEvent::AccountingSyncRecord::RecordType::OrSymbol,
186
+ error_details: T.nilable(T::Hash[Symbol, T.anything]),
187
+ invoice_id: T.nilable(String),
188
+ provider_customer_id: T.nilable(String),
189
+ status: T.nilable(String),
190
+ sync_action: T.nilable(String)
191
+ ).returns(T.attached_class)
192
+ end
193
+ def self.new(
194
+ id:,
195
+ customer_id:,
196
+ record_type:,
197
+ error_details: nil,
198
+ invoice_id: nil,
199
+ provider_customer_id: nil,
200
+ status: nil,
201
+ sync_action: nil
202
+ )
203
+ end
204
+
205
+ sig do
206
+ override.returns(
207
+ {
208
+ id: String,
209
+ customer_id: String,
210
+ record_type:
211
+ Orb::Webhooks::SalesOrderAccountingSyncSucceededStandardWebhookEvent::AccountingSyncRecord::RecordType::TaggedSymbol,
212
+ error_details: T.nilable(T::Hash[Symbol, T.anything]),
213
+ invoice_id: T.nilable(String),
214
+ provider_customer_id: T.nilable(String),
215
+ status: T.nilable(String),
216
+ sync_action: T.nilable(String)
217
+ }
218
+ )
219
+ end
220
+ def to_hash
221
+ end
222
+
223
+ module RecordType
224
+ extend Orb::Internal::Type::Enum
225
+
226
+ TaggedSymbol =
227
+ T.type_alias do
228
+ T.all(
229
+ Symbol,
230
+ Orb::Webhooks::SalesOrderAccountingSyncSucceededStandardWebhookEvent::AccountingSyncRecord::RecordType
231
+ )
232
+ end
233
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
234
+
235
+ CUSTOMER =
236
+ T.let(
237
+ :customer,
238
+ Orb::Webhooks::SalesOrderAccountingSyncSucceededStandardWebhookEvent::AccountingSyncRecord::RecordType::TaggedSymbol
239
+ )
240
+ INVOICE =
241
+ T.let(
242
+ :invoice,
243
+ Orb::Webhooks::SalesOrderAccountingSyncSucceededStandardWebhookEvent::AccountingSyncRecord::RecordType::TaggedSymbol
244
+ )
245
+ TRANSACTION =
246
+ T.let(
247
+ :transaction,
248
+ Orb::Webhooks::SalesOrderAccountingSyncSucceededStandardWebhookEvent::AccountingSyncRecord::RecordType::TaggedSymbol
249
+ )
250
+ CUSTOMER_BALANCE_TRANSACTION =
251
+ T.let(
252
+ :customer_balance_transaction,
253
+ Orb::Webhooks::SalesOrderAccountingSyncSucceededStandardWebhookEvent::AccountingSyncRecord::RecordType::TaggedSymbol
254
+ )
255
+ CREDIT_NOTE =
256
+ T.let(
257
+ :credit_note,
258
+ Orb::Webhooks::SalesOrderAccountingSyncSucceededStandardWebhookEvent::AccountingSyncRecord::RecordType::TaggedSymbol
259
+ )
260
+ SUBSCRIPTION =
261
+ T.let(
262
+ :subscription,
263
+ Orb::Webhooks::SalesOrderAccountingSyncSucceededStandardWebhookEvent::AccountingSyncRecord::RecordType::TaggedSymbol
264
+ )
265
+ SALES_ORDER =
266
+ T.let(
267
+ :sales_order,
268
+ Orb::Webhooks::SalesOrderAccountingSyncSucceededStandardWebhookEvent::AccountingSyncRecord::RecordType::TaggedSymbol
269
+ )
270
+ BLOCK =
271
+ T.let(
272
+ :block,
273
+ Orb::Webhooks::SalesOrderAccountingSyncSucceededStandardWebhookEvent::AccountingSyncRecord::RecordType::TaggedSymbol
274
+ )
275
+
276
+ sig do
277
+ override.returns(
278
+ T::Array[
279
+ Orb::Webhooks::SalesOrderAccountingSyncSucceededStandardWebhookEvent::AccountingSyncRecord::RecordType::TaggedSymbol
280
+ ]
281
+ )
282
+ end
283
+ def self.values
284
+ end
285
+ end
286
+ end
287
+
288
+ class Invoice < Orb::Internal::Type::BaseModel
289
+ OrHash =
290
+ T.type_alias do
291
+ T.any(
292
+ Orb::Webhooks::SalesOrderAccountingSyncSucceededStandardWebhookEvent::Invoice,
293
+ Orb::Internal::AnyHash
294
+ )
295
+ end
296
+
297
+ sig { returns(String) }
298
+ attr_accessor :id
299
+
300
+ # This is the final amount required to be charged to the customer and reflects the
301
+ # application of the customer balance to the `total` of the invoice.
302
+ sig { returns(String) }
303
+ attr_accessor :amount_due
304
+
305
+ sig do
306
+ returns(
307
+ Orb::Webhooks::SalesOrderAccountingSyncSucceededStandardWebhookEvent::Invoice::AutoCollection
308
+ )
309
+ end
310
+ attr_reader :auto_collection
311
+
312
+ sig do
313
+ params(
314
+ auto_collection:
315
+ Orb::Webhooks::SalesOrderAccountingSyncSucceededStandardWebhookEvent::Invoice::AutoCollection::OrHash
316
+ ).void
317
+ end
318
+ attr_writer :auto_collection
319
+
320
+ sig { returns(T.nilable(Orb::Address)) }
321
+ attr_reader :billing_address
322
+
323
+ sig { params(billing_address: T.nilable(Orb::Address::OrHash)).void }
324
+ attr_writer :billing_address
325
+
326
+ # The creation time of the resource in Orb.
327
+ sig { returns(Time) }
328
+ attr_accessor :created_at
329
+
330
+ # A list of credit notes associated with the invoice
331
+ sig do
332
+ returns(
333
+ T::Array[
334
+ Orb::Webhooks::SalesOrderAccountingSyncSucceededStandardWebhookEvent::Invoice::CreditNote
335
+ ]
336
+ )
337
+ end
338
+ attr_accessor :credit_notes
339
+
340
+ # An ISO 4217 currency string or `credits`
341
+ sig { returns(String) }
342
+ attr_accessor :currency
343
+
344
+ sig { returns(Orb::CustomerMinified) }
345
+ attr_reader :customer
346
+
347
+ sig { params(customer: Orb::CustomerMinified::OrHash).void }
348
+ attr_writer :customer
349
+
350
+ sig do
351
+ returns(
352
+ T::Array[
353
+ Orb::Webhooks::SalesOrderAccountingSyncSucceededStandardWebhookEvent::Invoice::CustomerBalanceTransaction
354
+ ]
355
+ )
356
+ end
357
+ attr_accessor :customer_balance_transactions
358
+
359
+ # Tax IDs are commonly required to be displayed on customer invoices, which are
360
+ # added to the headers of invoices.
361
+ #
362
+ # ### Supported Tax ID Countries and Types
363
+ #
364
+ # | Country | Type | Description |
365
+ # | ---------------------- | ------------ | ------------------------------------------------------------------------------------------------------- |
366
+ # | Albania | `al_tin` | Albania Tax Identification Number |
367
+ # | Andorra | `ad_nrt` | Andorran NRT Number |
368
+ # | Angola | `ao_tin` | Angola Tax Identification Number |
369
+ # | Argentina | `ar_cuit` | Argentinian Tax ID Number |
370
+ # | Armenia | `am_tin` | Armenia Tax Identification Number |
371
+ # | Aruba | `aw_tin` | Aruba Tax Identification Number |
372
+ # | Australia | `au_abn` | Australian Business Number (AU ABN) |
373
+ # | Australia | `au_arn` | Australian Taxation Office Reference Number |
374
+ # | Austria | `eu_vat` | European VAT Number |
375
+ # | Azerbaijan | `az_tin` | Azerbaijan Tax Identification Number |
376
+ # | Bahamas | `bs_tin` | Bahamas Tax Identification Number |
377
+ # | Bahrain | `bh_vat` | Bahraini VAT Number |
378
+ # | Bangladesh | `bd_bin` | Bangladesh Business Identification Number |
379
+ # | Barbados | `bb_tin` | Barbados Tax Identification Number |
380
+ # | Belarus | `by_tin` | Belarus TIN Number |
381
+ # | Belgium | `eu_vat` | European VAT Number |
382
+ # | Benin | `bj_ifu` | Benin Tax Identification Number (Identifiant Fiscal Unique) |
383
+ # | Bolivia | `bo_tin` | Bolivian Tax ID |
384
+ # | Bosnia and Herzegovina | `ba_tin` | Bosnia and Herzegovina Tax Identification Number |
385
+ # | Brazil | `br_cnpj` | Brazilian CNPJ Number |
386
+ # | Brazil | `br_cpf` | Brazilian CPF Number |
387
+ # | Bulgaria | `bg_uic` | Bulgaria Unified Identification Code |
388
+ # | Bulgaria | `eu_vat` | European VAT Number |
389
+ # | Burkina Faso | `bf_ifu` | Burkina Faso Tax Identification Number (Numéro d'Identifiant Fiscal Unique) |
390
+ # | Cambodia | `kh_tin` | Cambodia Tax Identification Number |
391
+ # | Cameroon | `cm_niu` | Cameroon Tax Identification Number (Numéro d'Identifiant fiscal Unique) |
392
+ # | Canada | `ca_bn` | Canadian BN |
393
+ # | Canada | `ca_gst_hst` | Canadian GST/HST Number |
394
+ # | Canada | `ca_pst_bc` | Canadian PST Number (British Columbia) |
395
+ # | Canada | `ca_pst_mb` | Canadian PST Number (Manitoba) |
396
+ # | Canada | `ca_pst_sk` | Canadian PST Number (Saskatchewan) |
397
+ # | Canada | `ca_qst` | Canadian QST Number (Québec) |
398
+ # | Cape Verde | `cv_nif` | Cape Verde Tax Identification Number (Número de Identificação Fiscal) |
399
+ # | Chile | `cl_tin` | Chilean TIN |
400
+ # | China | `cn_tin` | Chinese Tax ID |
401
+ # | Colombia | `co_nit` | Colombian NIT Number |
402
+ # | Congo-Kinshasa | `cd_nif` | Congo (DR) Tax Identification Number (Número de Identificação Fiscal) |
403
+ # | Costa Rica | `cr_tin` | Costa Rican Tax ID |
404
+ # | Croatia | `eu_vat` | European VAT Number |
405
+ # | Croatia | `hr_oib` | Croatian Personal Identification Number (OIB) |
406
+ # | Cyprus | `eu_vat` | European VAT Number |
407
+ # | Czech Republic | `eu_vat` | European VAT Number |
408
+ # | Denmark | `eu_vat` | European VAT Number |
409
+ # | Dominican Republic | `do_rcn` | Dominican RCN Number |
410
+ # | Ecuador | `ec_ruc` | Ecuadorian RUC Number |
411
+ # | Egypt | `eg_tin` | Egyptian Tax Identification Number |
412
+ # | El Salvador | `sv_nit` | El Salvadorian NIT Number |
413
+ # | Estonia | `eu_vat` | European VAT Number |
414
+ # | Ethiopia | `et_tin` | Ethiopia Tax Identification Number |
415
+ # | European Union | `eu_oss_vat` | European One Stop Shop VAT Number for non-Union scheme |
416
+ # | Faroe Islands | `fo_vat` | Faroe Islands VAT Number |
417
+ # | Finland | `eu_vat` | European VAT Number |
418
+ # | France | `eu_vat` | European VAT Number |
419
+ # | Georgia | `ge_vat` | Georgian VAT |
420
+ # | Germany | `de_stn` | German Tax Number (Steuernummer) |
421
+ # | Germany | `eu_vat` | European VAT Number |
422
+ # | Gibraltar | `gi_tin` | Gibraltar Tax Identification Number |
423
+ # | Greece | `eu_vat` | European VAT Number |
424
+ # | Guinea | `gn_nif` | Guinea Tax Identification Number (Número de Identificação Fiscal) |
425
+ # | Hong Kong | `hk_br` | Hong Kong BR Number |
426
+ # | Hungary | `eu_vat` | European VAT Number |
427
+ # | Hungary | `hu_tin` | Hungary Tax Number (adószám) |
428
+ # | Iceland | `is_vat` | Icelandic VAT |
429
+ # | India | `in_gst` | Indian GST Number |
430
+ # | Indonesia | `id_npwp` | Indonesian NPWP Number |
431
+ # | Ireland | `eu_vat` | European VAT Number |
432
+ # | Israel | `il_vat` | Israel VAT |
433
+ # | Italy | `eu_vat` | European VAT Number |
434
+ # | Italy | `it_cf` | Italian Codice Fiscale Number |
435
+ # | Japan | `jp_cn` | Japanese Corporate Number (_Hōjin Bangō_) |
436
+ # | Japan | `jp_rn` | Japanese Registered Foreign Businesses' Registration Number (_Tōroku Kokugai Jigyōsha no Tōroku Bangō_) |
437
+ # | Japan | `jp_trn` | Japanese Tax Registration Number (_Tōroku Bangō_) |
438
+ # | Kazakhstan | `kz_bin` | Kazakhstani Business Identification Number |
439
+ # | Kenya | `ke_pin` | Kenya Revenue Authority Personal Identification Number |
440
+ # | Kyrgyzstan | `kg_tin` | Kyrgyzstan Tax Identification Number |
441
+ # | Laos | `la_tin` | Laos Tax Identification Number |
442
+ # | Latvia | `eu_vat` | European VAT Number |
443
+ # | Liechtenstein | `li_uid` | Liechtensteinian UID Number |
444
+ # | Liechtenstein | `li_vat` | Liechtenstein VAT Number |
445
+ # | Lithuania | `eu_vat` | European VAT Number |
446
+ # | Luxembourg | `eu_vat` | European VAT Number |
447
+ # | Malaysia | `my_frp` | Malaysian FRP Number |
448
+ # | Malaysia | `my_itn` | Malaysian ITN |
449
+ # | Malaysia | `my_sst` | Malaysian SST Number |
450
+ # | Malta | `eu_vat` | European VAT Number |
451
+ # | Mauritania | `mr_nif` | Mauritania Tax Identification Number (Número de Identificação Fiscal) |
452
+ # | Mexico | `mx_rfc` | Mexican RFC Number |
453
+ # | Moldova | `md_vat` | Moldova VAT Number |
454
+ # | Montenegro | `me_pib` | Montenegro PIB Number |
455
+ # | Morocco | `ma_vat` | Morocco VAT Number |
456
+ # | Nepal | `np_pan` | Nepal PAN Number |
457
+ # | Netherlands | `eu_vat` | European VAT Number |
458
+ # | New Zealand | `nz_gst` | New Zealand GST Number |
459
+ # | Nigeria | `ng_tin` | Nigerian Tax Identification Number |
460
+ # | North Macedonia | `mk_vat` | North Macedonia VAT Number |
461
+ # | Northern Ireland | `eu_vat` | Northern Ireland VAT Number |
462
+ # | Norway | `no_vat` | Norwegian VAT Number |
463
+ # | Norway | `no_voec` | Norwegian VAT on e-commerce Number |
464
+ # | Oman | `om_vat` | Omani VAT Number |
465
+ # | Paraguay | `py_ruc` | Paraguayan RUC Number |
466
+ # | Peru | `pe_ruc` | Peruvian RUC Number |
467
+ # | Philippines | `ph_tin` | Philippines Tax Identification Number |
468
+ # | Poland | `eu_vat` | European VAT Number |
469
+ # | Poland | `pl_nip` | Polish Tax ID Number |
470
+ # | Portugal | `eu_vat` | European VAT Number |
471
+ # | Romania | `eu_vat` | European VAT Number |
472
+ # | Romania | `ro_tin` | Romanian Tax ID Number |
473
+ # | Russia | `ru_inn` | Russian INN |
474
+ # | Russia | `ru_kpp` | Russian KPP |
475
+ # | Saudi Arabia | `sa_vat` | Saudi Arabia VAT |
476
+ # | Senegal | `sn_ninea` | Senegal NINEA Number |
477
+ # | Serbia | `rs_pib` | Serbian PIB Number |
478
+ # | Singapore | `sg_gst` | Singaporean GST |
479
+ # | Singapore | `sg_uen` | Singaporean UEN |
480
+ # | Slovakia | `eu_vat` | European VAT Number |
481
+ # | Slovenia | `eu_vat` | European VAT Number |
482
+ # | Slovenia | `si_tin` | Slovenia Tax Number (davčna številka) |
483
+ # | South Africa | `za_vat` | South African VAT Number |
484
+ # | South Korea | `kr_brn` | Korean BRN |
485
+ # | Spain | `es_cif` | Spanish NIF Number (previously Spanish CIF Number) |
486
+ # | Spain | `eu_vat` | European VAT Number |
487
+ # | Sri Lanka | `lk_vat` | Sri Lanka VAT Number |
488
+ # | Suriname | `sr_fin` | Suriname FIN Number |
489
+ # | Sweden | `eu_vat` | European VAT Number |
490
+ # | Switzerland | `ch_uid` | Switzerland UID Number |
491
+ # | Switzerland | `ch_vat` | Switzerland VAT Number |
492
+ # | Taiwan | `tw_vat` | Taiwanese VAT |
493
+ # | Tajikistan | `tj_tin` | Tajikistan Tax Identification Number |
494
+ # | Tanzania | `tz_vat` | Tanzania VAT Number |
495
+ # | Thailand | `th_vat` | Thai VAT |
496
+ # | Turkey | `tr_tin` | Turkish Tax Identification Number |
497
+ # | Uganda | `ug_tin` | Uganda Tax Identification Number |
498
+ # | Ukraine | `ua_vat` | Ukrainian VAT |
499
+ # | United Arab Emirates | `ae_trn` | United Arab Emirates TRN |
500
+ # | United Kingdom | `gb_vat` | United Kingdom VAT Number |
501
+ # | United States | `us_ein` | United States EIN |
502
+ # | Uruguay | `uy_ruc` | Uruguayan RUC Number |
503
+ # | Uzbekistan | `uz_tin` | Uzbekistan TIN Number |
504
+ # | Uzbekistan | `uz_vat` | Uzbekistan VAT Number |
505
+ # | Venezuela | `ve_rif` | Venezuelan RIF Number |
506
+ # | Vietnam | `vn_tin` | Vietnamese Tax ID Number |
507
+ # | Zambia | `zm_tin` | Zambia Tax Identification Number |
508
+ # | Zimbabwe | `zw_tin` | Zimbabwe Tax Identification Number |
509
+ sig { returns(T.nilable(Orb::CustomerTaxID)) }
510
+ attr_reader :customer_tax_id
511
+
512
+ sig do
513
+ params(customer_tax_id: T.nilable(Orb::CustomerTaxID::OrHash)).void
514
+ end
515
+ attr_writer :customer_tax_id
516
+
517
+ # When the invoice payment is due. The due date is null if the invoice is not yet
518
+ # finalized.
519
+ sig { returns(T.nilable(Time)) }
520
+ attr_accessor :due_date
521
+
522
+ # If the invoice has a status of `draft`, this will be the time that the invoice
523
+ # will be eligible to be issued, otherwise it will be `null`. If `auto-issue` is
524
+ # true, the invoice will automatically begin issuing at this time.
525
+ sig { returns(T.nilable(Time)) }
526
+ attr_accessor :eligible_to_issue_at
527
+
528
+ # A URL for the customer-facing invoice portal. This URL expires 60 days after the
529
+ # link is generated, or 30 days after the invoice's due date — whichever is later.
530
+ sig { returns(T.nilable(String)) }
531
+ attr_accessor :hosted_invoice_url
532
+
533
+ # The scheduled date of the invoice
534
+ sig { returns(Time) }
535
+ attr_accessor :invoice_date
536
+
537
+ # Automatically generated invoice number to help track and reconcile invoices.
538
+ # Invoice numbers have a prefix such as `RFOBWG`. These can be sequential per
539
+ # account or customer.
540
+ sig { returns(String) }
541
+ attr_accessor :invoice_number
542
+
543
+ # The link to download the PDF representation of the `Invoice`.
544
+ sig { returns(T.nilable(String)) }
545
+ attr_accessor :invoice_pdf
546
+
547
+ sig do
548
+ returns(
549
+ Orb::Webhooks::SalesOrderAccountingSyncSucceededStandardWebhookEvent::Invoice::InvoiceSource::TaggedSymbol
550
+ )
551
+ end
552
+ attr_accessor :invoice_source
553
+
554
+ # If the invoice failed to issue, this will be the last time it failed to issue
555
+ # (even if it is now in a different state.)
556
+ sig { returns(T.nilable(Time)) }
557
+ attr_accessor :issue_failed_at
558
+
559
+ # If the invoice has been issued, this will be the time it transitioned to
560
+ # `issued` (even if it is now in a different state.)
561
+ sig { returns(T.nilable(Time)) }
562
+ attr_accessor :issued_at
563
+
564
+ # Free-form text which is available on the invoice PDF and the Orb invoice portal.
565
+ sig { returns(T.nilable(String)) }
566
+ attr_accessor :memo
567
+
568
+ # User specified key-value pairs for the resource. If not present, this defaults
569
+ # to an empty dictionary. Individual keys can be removed by setting the value to
570
+ # `null`, and the entire metadata mapping can be cleared by setting `metadata` to
571
+ # `null`.
572
+ sig { returns(T::Hash[Symbol, String]) }
573
+ attr_accessor :metadata
574
+
575
+ # If the invoice has a status of `paid`, this gives a timestamp when the invoice
576
+ # was paid.
577
+ sig { returns(T.nilable(Time)) }
578
+ attr_accessor :paid_at
579
+
580
+ # A list of payment attempts associated with the invoice
581
+ sig do
582
+ returns(
583
+ T::Array[
584
+ Orb::Webhooks::SalesOrderAccountingSyncSucceededStandardWebhookEvent::Invoice::PaymentAttempt
585
+ ]
586
+ )
587
+ end
588
+ attr_accessor :payment_attempts
589
+
590
+ # If payment was attempted on this invoice but failed, this will be the time of
591
+ # the most recent attempt.
592
+ sig { returns(T.nilable(Time)) }
593
+ attr_accessor :payment_failed_at
594
+
595
+ # When payment for this invoice was received. For an invoice manually marked as
596
+ # paid, this is the `payment_received_date` that was supplied. For an invoice paid
597
+ # through a payment provider, this is the settlement time reported by that
598
+ # provider. It is `null` for an invoice that became `paid` without a payment, such
599
+ # as a $0 invoice or one fully covered by credit notes. By contrast, `paid_at` is
600
+ # when the invoice reached the `paid` status in Orb.
601
+ sig { returns(T.nilable(Time)) }
602
+ attr_accessor :payment_received_at
603
+
604
+ # If payment was attempted on this invoice, this will be the start time of the
605
+ # most recent attempt. This field is especially useful for delayed-notification
606
+ # payment mechanisms (like bank transfers), where payment can take 3 days or more.
607
+ sig { returns(T.nilable(Time)) }
608
+ attr_accessor :payment_started_at
609
+
610
+ # If the invoice is in draft, this timestamp will reflect when the invoice is
611
+ # scheduled to be issued.
612
+ sig { returns(T.nilable(Time)) }
613
+ attr_accessor :scheduled_issue_at
614
+
615
+ sig { returns(T.nilable(Orb::Address)) }
616
+ attr_reader :shipping_address
617
+
618
+ sig { params(shipping_address: T.nilable(Orb::Address::OrHash)).void }
619
+ attr_writer :shipping_address
620
+
621
+ sig do
622
+ returns(
623
+ Orb::Webhooks::SalesOrderAccountingSyncSucceededStandardWebhookEvent::Invoice::Status::TaggedSymbol
624
+ )
625
+ end
626
+ attr_accessor :status
627
+
628
+ sig { returns(T.nilable(Orb::SubscriptionMinified)) }
629
+ attr_reader :subscription
630
+
631
+ sig do
632
+ params(
633
+ subscription: T.nilable(Orb::SubscriptionMinified::OrHash)
634
+ ).void
635
+ end
636
+ attr_writer :subscription
637
+
638
+ # If the invoice failed to sync, this will be the last time an external invoicing
639
+ # provider sync was attempted. This field will always be `null` for invoices using
640
+ # Orb Invoicing.
641
+ sig { returns(T.nilable(Time)) }
642
+ attr_accessor :sync_failed_at
643
+
644
+ # The total after any minimums and discounts have been applied.
645
+ sig { returns(String) }
646
+ attr_accessor :total
647
+
648
+ # If the invoice has a status of `void`, this gives a timestamp when the invoice
649
+ # was voided.
650
+ sig { returns(T.nilable(Time)) }
651
+ attr_accessor :voided_at
652
+
653
+ # This is true if the invoice will be automatically issued in the future, and
654
+ # false otherwise.
655
+ sig { returns(T::Boolean) }
656
+ attr_accessor :will_auto_issue
657
+
658
+ # An invoice without its line items, subtotal, discounts, minimums or maximums.
659
+ # Fetch the invoice for those.
660
+ sig do
661
+ params(
662
+ id: String,
663
+ amount_due: String,
664
+ auto_collection:
665
+ Orb::Webhooks::SalesOrderAccountingSyncSucceededStandardWebhookEvent::Invoice::AutoCollection::OrHash,
666
+ billing_address: T.nilable(Orb::Address::OrHash),
667
+ created_at: Time,
668
+ credit_notes:
669
+ T::Array[
670
+ Orb::Webhooks::SalesOrderAccountingSyncSucceededStandardWebhookEvent::Invoice::CreditNote::OrHash
671
+ ],
672
+ currency: String,
673
+ customer: Orb::CustomerMinified::OrHash,
674
+ customer_balance_transactions:
675
+ T::Array[
676
+ Orb::Webhooks::SalesOrderAccountingSyncSucceededStandardWebhookEvent::Invoice::CustomerBalanceTransaction::OrHash
677
+ ],
678
+ customer_tax_id: T.nilable(Orb::CustomerTaxID::OrHash),
679
+ due_date: T.nilable(Time),
680
+ eligible_to_issue_at: T.nilable(Time),
681
+ hosted_invoice_url: T.nilable(String),
682
+ invoice_date: Time,
683
+ invoice_number: String,
684
+ invoice_pdf: T.nilable(String),
685
+ invoice_source:
686
+ Orb::Webhooks::SalesOrderAccountingSyncSucceededStandardWebhookEvent::Invoice::InvoiceSource::OrSymbol,
687
+ issue_failed_at: T.nilable(Time),
688
+ issued_at: T.nilable(Time),
689
+ memo: T.nilable(String),
690
+ metadata: T::Hash[Symbol, String],
691
+ paid_at: T.nilable(Time),
692
+ payment_attempts:
693
+ T::Array[
694
+ Orb::Webhooks::SalesOrderAccountingSyncSucceededStandardWebhookEvent::Invoice::PaymentAttempt::OrHash
695
+ ],
696
+ payment_failed_at: T.nilable(Time),
697
+ payment_received_at: T.nilable(Time),
698
+ payment_started_at: T.nilable(Time),
699
+ scheduled_issue_at: T.nilable(Time),
700
+ shipping_address: T.nilable(Orb::Address::OrHash),
701
+ status:
702
+ Orb::Webhooks::SalesOrderAccountingSyncSucceededStandardWebhookEvent::Invoice::Status::OrSymbol,
703
+ subscription: T.nilable(Orb::SubscriptionMinified::OrHash),
704
+ sync_failed_at: T.nilable(Time),
705
+ total: String,
706
+ voided_at: T.nilable(Time),
707
+ will_auto_issue: T::Boolean
708
+ ).returns(T.attached_class)
709
+ end
710
+ def self.new(
711
+ id:,
712
+ # This is the final amount required to be charged to the customer and reflects the
713
+ # application of the customer balance to the `total` of the invoice.
714
+ amount_due:,
715
+ auto_collection:,
716
+ billing_address:,
717
+ # The creation time of the resource in Orb.
718
+ created_at:,
719
+ # A list of credit notes associated with the invoice
720
+ credit_notes:,
721
+ # An ISO 4217 currency string or `credits`
722
+ currency:,
723
+ customer:,
724
+ customer_balance_transactions:,
725
+ # Tax IDs are commonly required to be displayed on customer invoices, which are
726
+ # added to the headers of invoices.
727
+ #
728
+ # ### Supported Tax ID Countries and Types
729
+ #
730
+ # | Country | Type | Description |
731
+ # | ---------------------- | ------------ | ------------------------------------------------------------------------------------------------------- |
732
+ # | Albania | `al_tin` | Albania Tax Identification Number |
733
+ # | Andorra | `ad_nrt` | Andorran NRT Number |
734
+ # | Angola | `ao_tin` | Angola Tax Identification Number |
735
+ # | Argentina | `ar_cuit` | Argentinian Tax ID Number |
736
+ # | Armenia | `am_tin` | Armenia Tax Identification Number |
737
+ # | Aruba | `aw_tin` | Aruba Tax Identification Number |
738
+ # | Australia | `au_abn` | Australian Business Number (AU ABN) |
739
+ # | Australia | `au_arn` | Australian Taxation Office Reference Number |
740
+ # | Austria | `eu_vat` | European VAT Number |
741
+ # | Azerbaijan | `az_tin` | Azerbaijan Tax Identification Number |
742
+ # | Bahamas | `bs_tin` | Bahamas Tax Identification Number |
743
+ # | Bahrain | `bh_vat` | Bahraini VAT Number |
744
+ # | Bangladesh | `bd_bin` | Bangladesh Business Identification Number |
745
+ # | Barbados | `bb_tin` | Barbados Tax Identification Number |
746
+ # | Belarus | `by_tin` | Belarus TIN Number |
747
+ # | Belgium | `eu_vat` | European VAT Number |
748
+ # | Benin | `bj_ifu` | Benin Tax Identification Number (Identifiant Fiscal Unique) |
749
+ # | Bolivia | `bo_tin` | Bolivian Tax ID |
750
+ # | Bosnia and Herzegovina | `ba_tin` | Bosnia and Herzegovina Tax Identification Number |
751
+ # | Brazil | `br_cnpj` | Brazilian CNPJ Number |
752
+ # | Brazil | `br_cpf` | Brazilian CPF Number |
753
+ # | Bulgaria | `bg_uic` | Bulgaria Unified Identification Code |
754
+ # | Bulgaria | `eu_vat` | European VAT Number |
755
+ # | Burkina Faso | `bf_ifu` | Burkina Faso Tax Identification Number (Numéro d'Identifiant Fiscal Unique) |
756
+ # | Cambodia | `kh_tin` | Cambodia Tax Identification Number |
757
+ # | Cameroon | `cm_niu` | Cameroon Tax Identification Number (Numéro d'Identifiant fiscal Unique) |
758
+ # | Canada | `ca_bn` | Canadian BN |
759
+ # | Canada | `ca_gst_hst` | Canadian GST/HST Number |
760
+ # | Canada | `ca_pst_bc` | Canadian PST Number (British Columbia) |
761
+ # | Canada | `ca_pst_mb` | Canadian PST Number (Manitoba) |
762
+ # | Canada | `ca_pst_sk` | Canadian PST Number (Saskatchewan) |
763
+ # | Canada | `ca_qst` | Canadian QST Number (Québec) |
764
+ # | Cape Verde | `cv_nif` | Cape Verde Tax Identification Number (Número de Identificação Fiscal) |
765
+ # | Chile | `cl_tin` | Chilean TIN |
766
+ # | China | `cn_tin` | Chinese Tax ID |
767
+ # | Colombia | `co_nit` | Colombian NIT Number |
768
+ # | Congo-Kinshasa | `cd_nif` | Congo (DR) Tax Identification Number (Número de Identificação Fiscal) |
769
+ # | Costa Rica | `cr_tin` | Costa Rican Tax ID |
770
+ # | Croatia | `eu_vat` | European VAT Number |
771
+ # | Croatia | `hr_oib` | Croatian Personal Identification Number (OIB) |
772
+ # | Cyprus | `eu_vat` | European VAT Number |
773
+ # | Czech Republic | `eu_vat` | European VAT Number |
774
+ # | Denmark | `eu_vat` | European VAT Number |
775
+ # | Dominican Republic | `do_rcn` | Dominican RCN Number |
776
+ # | Ecuador | `ec_ruc` | Ecuadorian RUC Number |
777
+ # | Egypt | `eg_tin` | Egyptian Tax Identification Number |
778
+ # | El Salvador | `sv_nit` | El Salvadorian NIT Number |
779
+ # | Estonia | `eu_vat` | European VAT Number |
780
+ # | Ethiopia | `et_tin` | Ethiopia Tax Identification Number |
781
+ # | European Union | `eu_oss_vat` | European One Stop Shop VAT Number for non-Union scheme |
782
+ # | Faroe Islands | `fo_vat` | Faroe Islands VAT Number |
783
+ # | Finland | `eu_vat` | European VAT Number |
784
+ # | France | `eu_vat` | European VAT Number |
785
+ # | Georgia | `ge_vat` | Georgian VAT |
786
+ # | Germany | `de_stn` | German Tax Number (Steuernummer) |
787
+ # | Germany | `eu_vat` | European VAT Number |
788
+ # | Gibraltar | `gi_tin` | Gibraltar Tax Identification Number |
789
+ # | Greece | `eu_vat` | European VAT Number |
790
+ # | Guinea | `gn_nif` | Guinea Tax Identification Number (Número de Identificação Fiscal) |
791
+ # | Hong Kong | `hk_br` | Hong Kong BR Number |
792
+ # | Hungary | `eu_vat` | European VAT Number |
793
+ # | Hungary | `hu_tin` | Hungary Tax Number (adószám) |
794
+ # | Iceland | `is_vat` | Icelandic VAT |
795
+ # | India | `in_gst` | Indian GST Number |
796
+ # | Indonesia | `id_npwp` | Indonesian NPWP Number |
797
+ # | Ireland | `eu_vat` | European VAT Number |
798
+ # | Israel | `il_vat` | Israel VAT |
799
+ # | Italy | `eu_vat` | European VAT Number |
800
+ # | Italy | `it_cf` | Italian Codice Fiscale Number |
801
+ # | Japan | `jp_cn` | Japanese Corporate Number (_Hōjin Bangō_) |
802
+ # | Japan | `jp_rn` | Japanese Registered Foreign Businesses' Registration Number (_Tōroku Kokugai Jigyōsha no Tōroku Bangō_) |
803
+ # | Japan | `jp_trn` | Japanese Tax Registration Number (_Tōroku Bangō_) |
804
+ # | Kazakhstan | `kz_bin` | Kazakhstani Business Identification Number |
805
+ # | Kenya | `ke_pin` | Kenya Revenue Authority Personal Identification Number |
806
+ # | Kyrgyzstan | `kg_tin` | Kyrgyzstan Tax Identification Number |
807
+ # | Laos | `la_tin` | Laos Tax Identification Number |
808
+ # | Latvia | `eu_vat` | European VAT Number |
809
+ # | Liechtenstein | `li_uid` | Liechtensteinian UID Number |
810
+ # | Liechtenstein | `li_vat` | Liechtenstein VAT Number |
811
+ # | Lithuania | `eu_vat` | European VAT Number |
812
+ # | Luxembourg | `eu_vat` | European VAT Number |
813
+ # | Malaysia | `my_frp` | Malaysian FRP Number |
814
+ # | Malaysia | `my_itn` | Malaysian ITN |
815
+ # | Malaysia | `my_sst` | Malaysian SST Number |
816
+ # | Malta | `eu_vat` | European VAT Number |
817
+ # | Mauritania | `mr_nif` | Mauritania Tax Identification Number (Número de Identificação Fiscal) |
818
+ # | Mexico | `mx_rfc` | Mexican RFC Number |
819
+ # | Moldova | `md_vat` | Moldova VAT Number |
820
+ # | Montenegro | `me_pib` | Montenegro PIB Number |
821
+ # | Morocco | `ma_vat` | Morocco VAT Number |
822
+ # | Nepal | `np_pan` | Nepal PAN Number |
823
+ # | Netherlands | `eu_vat` | European VAT Number |
824
+ # | New Zealand | `nz_gst` | New Zealand GST Number |
825
+ # | Nigeria | `ng_tin` | Nigerian Tax Identification Number |
826
+ # | North Macedonia | `mk_vat` | North Macedonia VAT Number |
827
+ # | Northern Ireland | `eu_vat` | Northern Ireland VAT Number |
828
+ # | Norway | `no_vat` | Norwegian VAT Number |
829
+ # | Norway | `no_voec` | Norwegian VAT on e-commerce Number |
830
+ # | Oman | `om_vat` | Omani VAT Number |
831
+ # | Paraguay | `py_ruc` | Paraguayan RUC Number |
832
+ # | Peru | `pe_ruc` | Peruvian RUC Number |
833
+ # | Philippines | `ph_tin` | Philippines Tax Identification Number |
834
+ # | Poland | `eu_vat` | European VAT Number |
835
+ # | Poland | `pl_nip` | Polish Tax ID Number |
836
+ # | Portugal | `eu_vat` | European VAT Number |
837
+ # | Romania | `eu_vat` | European VAT Number |
838
+ # | Romania | `ro_tin` | Romanian Tax ID Number |
839
+ # | Russia | `ru_inn` | Russian INN |
840
+ # | Russia | `ru_kpp` | Russian KPP |
841
+ # | Saudi Arabia | `sa_vat` | Saudi Arabia VAT |
842
+ # | Senegal | `sn_ninea` | Senegal NINEA Number |
843
+ # | Serbia | `rs_pib` | Serbian PIB Number |
844
+ # | Singapore | `sg_gst` | Singaporean GST |
845
+ # | Singapore | `sg_uen` | Singaporean UEN |
846
+ # | Slovakia | `eu_vat` | European VAT Number |
847
+ # | Slovenia | `eu_vat` | European VAT Number |
848
+ # | Slovenia | `si_tin` | Slovenia Tax Number (davčna številka) |
849
+ # | South Africa | `za_vat` | South African VAT Number |
850
+ # | South Korea | `kr_brn` | Korean BRN |
851
+ # | Spain | `es_cif` | Spanish NIF Number (previously Spanish CIF Number) |
852
+ # | Spain | `eu_vat` | European VAT Number |
853
+ # | Sri Lanka | `lk_vat` | Sri Lanka VAT Number |
854
+ # | Suriname | `sr_fin` | Suriname FIN Number |
855
+ # | Sweden | `eu_vat` | European VAT Number |
856
+ # | Switzerland | `ch_uid` | Switzerland UID Number |
857
+ # | Switzerland | `ch_vat` | Switzerland VAT Number |
858
+ # | Taiwan | `tw_vat` | Taiwanese VAT |
859
+ # | Tajikistan | `tj_tin` | Tajikistan Tax Identification Number |
860
+ # | Tanzania | `tz_vat` | Tanzania VAT Number |
861
+ # | Thailand | `th_vat` | Thai VAT |
862
+ # | Turkey | `tr_tin` | Turkish Tax Identification Number |
863
+ # | Uganda | `ug_tin` | Uganda Tax Identification Number |
864
+ # | Ukraine | `ua_vat` | Ukrainian VAT |
865
+ # | United Arab Emirates | `ae_trn` | United Arab Emirates TRN |
866
+ # | United Kingdom | `gb_vat` | United Kingdom VAT Number |
867
+ # | United States | `us_ein` | United States EIN |
868
+ # | Uruguay | `uy_ruc` | Uruguayan RUC Number |
869
+ # | Uzbekistan | `uz_tin` | Uzbekistan TIN Number |
870
+ # | Uzbekistan | `uz_vat` | Uzbekistan VAT Number |
871
+ # | Venezuela | `ve_rif` | Venezuelan RIF Number |
872
+ # | Vietnam | `vn_tin` | Vietnamese Tax ID Number |
873
+ # | Zambia | `zm_tin` | Zambia Tax Identification Number |
874
+ # | Zimbabwe | `zw_tin` | Zimbabwe Tax Identification Number |
875
+ customer_tax_id:,
876
+ # When the invoice payment is due. The due date is null if the invoice is not yet
877
+ # finalized.
878
+ due_date:,
879
+ # If the invoice has a status of `draft`, this will be the time that the invoice
880
+ # will be eligible to be issued, otherwise it will be `null`. If `auto-issue` is
881
+ # true, the invoice will automatically begin issuing at this time.
882
+ eligible_to_issue_at:,
883
+ # A URL for the customer-facing invoice portal. This URL expires 60 days after the
884
+ # link is generated, or 30 days after the invoice's due date — whichever is later.
885
+ hosted_invoice_url:,
886
+ # The scheduled date of the invoice
887
+ invoice_date:,
888
+ # Automatically generated invoice number to help track and reconcile invoices.
889
+ # Invoice numbers have a prefix such as `RFOBWG`. These can be sequential per
890
+ # account or customer.
891
+ invoice_number:,
892
+ # The link to download the PDF representation of the `Invoice`.
893
+ invoice_pdf:,
894
+ invoice_source:,
895
+ # If the invoice failed to issue, this will be the last time it failed to issue
896
+ # (even if it is now in a different state.)
897
+ issue_failed_at:,
898
+ # If the invoice has been issued, this will be the time it transitioned to
899
+ # `issued` (even if it is now in a different state.)
900
+ issued_at:,
901
+ # Free-form text which is available on the invoice PDF and the Orb invoice portal.
902
+ memo:,
903
+ # User specified key-value pairs for the resource. If not present, this defaults
904
+ # to an empty dictionary. Individual keys can be removed by setting the value to
905
+ # `null`, and the entire metadata mapping can be cleared by setting `metadata` to
906
+ # `null`.
907
+ metadata:,
908
+ # If the invoice has a status of `paid`, this gives a timestamp when the invoice
909
+ # was paid.
910
+ paid_at:,
911
+ # A list of payment attempts associated with the invoice
912
+ payment_attempts:,
913
+ # If payment was attempted on this invoice but failed, this will be the time of
914
+ # the most recent attempt.
915
+ payment_failed_at:,
916
+ # When payment for this invoice was received. For an invoice manually marked as
917
+ # paid, this is the `payment_received_date` that was supplied. For an invoice paid
918
+ # through a payment provider, this is the settlement time reported by that
919
+ # provider. It is `null` for an invoice that became `paid` without a payment, such
920
+ # as a $0 invoice or one fully covered by credit notes. By contrast, `paid_at` is
921
+ # when the invoice reached the `paid` status in Orb.
922
+ payment_received_at:,
923
+ # If payment was attempted on this invoice, this will be the start time of the
924
+ # most recent attempt. This field is especially useful for delayed-notification
925
+ # payment mechanisms (like bank transfers), where payment can take 3 days or more.
926
+ payment_started_at:,
927
+ # If the invoice is in draft, this timestamp will reflect when the invoice is
928
+ # scheduled to be issued.
929
+ scheduled_issue_at:,
930
+ shipping_address:,
931
+ status:,
932
+ subscription:,
933
+ # If the invoice failed to sync, this will be the last time an external invoicing
934
+ # provider sync was attempted. This field will always be `null` for invoices using
935
+ # Orb Invoicing.
936
+ sync_failed_at:,
937
+ # The total after any minimums and discounts have been applied.
938
+ total:,
939
+ # If the invoice has a status of `void`, this gives a timestamp when the invoice
940
+ # was voided.
941
+ voided_at:,
942
+ # This is true if the invoice will be automatically issued in the future, and
943
+ # false otherwise.
944
+ will_auto_issue:
945
+ )
946
+ end
947
+
948
+ sig do
949
+ override.returns(
950
+ {
951
+ id: String,
952
+ amount_due: String,
953
+ auto_collection:
954
+ Orb::Webhooks::SalesOrderAccountingSyncSucceededStandardWebhookEvent::Invoice::AutoCollection,
955
+ billing_address: T.nilable(Orb::Address),
956
+ created_at: Time,
957
+ credit_notes:
958
+ T::Array[
959
+ Orb::Webhooks::SalesOrderAccountingSyncSucceededStandardWebhookEvent::Invoice::CreditNote
960
+ ],
961
+ currency: String,
962
+ customer: Orb::CustomerMinified,
963
+ customer_balance_transactions:
964
+ T::Array[
965
+ Orb::Webhooks::SalesOrderAccountingSyncSucceededStandardWebhookEvent::Invoice::CustomerBalanceTransaction
966
+ ],
967
+ customer_tax_id: T.nilable(Orb::CustomerTaxID),
968
+ due_date: T.nilable(Time),
969
+ eligible_to_issue_at: T.nilable(Time),
970
+ hosted_invoice_url: T.nilable(String),
971
+ invoice_date: Time,
972
+ invoice_number: String,
973
+ invoice_pdf: T.nilable(String),
974
+ invoice_source:
975
+ Orb::Webhooks::SalesOrderAccountingSyncSucceededStandardWebhookEvent::Invoice::InvoiceSource::TaggedSymbol,
976
+ issue_failed_at: T.nilable(Time),
977
+ issued_at: T.nilable(Time),
978
+ memo: T.nilable(String),
979
+ metadata: T::Hash[Symbol, String],
980
+ paid_at: T.nilable(Time),
981
+ payment_attempts:
982
+ T::Array[
983
+ Orb::Webhooks::SalesOrderAccountingSyncSucceededStandardWebhookEvent::Invoice::PaymentAttempt
984
+ ],
985
+ payment_failed_at: T.nilable(Time),
986
+ payment_received_at: T.nilable(Time),
987
+ payment_started_at: T.nilable(Time),
988
+ scheduled_issue_at: T.nilable(Time),
989
+ shipping_address: T.nilable(Orb::Address),
990
+ status:
991
+ Orb::Webhooks::SalesOrderAccountingSyncSucceededStandardWebhookEvent::Invoice::Status::TaggedSymbol,
992
+ subscription: T.nilable(Orb::SubscriptionMinified),
993
+ sync_failed_at: T.nilable(Time),
994
+ total: String,
995
+ voided_at: T.nilable(Time),
996
+ will_auto_issue: T::Boolean
997
+ }
998
+ )
999
+ end
1000
+ def to_hash
1001
+ end
1002
+
1003
+ class AutoCollection < Orb::Internal::Type::BaseModel
1004
+ OrHash =
1005
+ T.type_alias do
1006
+ T.any(
1007
+ Orb::Webhooks::SalesOrderAccountingSyncSucceededStandardWebhookEvent::Invoice::AutoCollection,
1008
+ Orb::Internal::AnyHash
1009
+ )
1010
+ end
1011
+
1012
+ # True only if auto-collection is enabled for this invoice.
1013
+ sig { returns(T.nilable(T::Boolean)) }
1014
+ attr_accessor :enabled
1015
+
1016
+ # If the invoice is scheduled for auto-collection, this field will reflect when
1017
+ # the next attempt will occur. If dunning has been exhausted, or auto-collection
1018
+ # is not enabled for this invoice, this field will be `null`.
1019
+ sig { returns(T.nilable(Time)) }
1020
+ attr_accessor :next_attempt_at
1021
+
1022
+ # Number of auto-collection payment attempts.
1023
+ sig { returns(T.nilable(Integer)) }
1024
+ attr_accessor :num_attempts
1025
+
1026
+ # If Orb has ever attempted payment auto-collection for this invoice, this field
1027
+ # will reflect when that attempt occurred. In conjunction with `next_attempt_at`,
1028
+ # this can be used to tell whether the invoice is currently in dunning (that is,
1029
+ # `previously_attempted_at` is non-null, and `next_attempt_at` is non-null), or if
1030
+ # dunning has been exhausted (`previously_attempted_at` is non-null, but
1031
+ # `next_attempt_at` is null).
1032
+ sig { returns(T.nilable(Time)) }
1033
+ attr_accessor :previously_attempted_at
1034
+
1035
+ sig do
1036
+ params(
1037
+ enabled: T.nilable(T::Boolean),
1038
+ next_attempt_at: T.nilable(Time),
1039
+ num_attempts: T.nilable(Integer),
1040
+ previously_attempted_at: T.nilable(Time)
1041
+ ).returns(T.attached_class)
1042
+ end
1043
+ def self.new(
1044
+ # True only if auto-collection is enabled for this invoice.
1045
+ enabled:,
1046
+ # If the invoice is scheduled for auto-collection, this field will reflect when
1047
+ # the next attempt will occur. If dunning has been exhausted, or auto-collection
1048
+ # is not enabled for this invoice, this field will be `null`.
1049
+ next_attempt_at:,
1050
+ # Number of auto-collection payment attempts.
1051
+ num_attempts:,
1052
+ # If Orb has ever attempted payment auto-collection for this invoice, this field
1053
+ # will reflect when that attempt occurred. In conjunction with `next_attempt_at`,
1054
+ # this can be used to tell whether the invoice is currently in dunning (that is,
1055
+ # `previously_attempted_at` is non-null, and `next_attempt_at` is non-null), or if
1056
+ # dunning has been exhausted (`previously_attempted_at` is non-null, but
1057
+ # `next_attempt_at` is null).
1058
+ previously_attempted_at:
1059
+ )
1060
+ end
1061
+
1062
+ sig do
1063
+ override.returns(
1064
+ {
1065
+ enabled: T.nilable(T::Boolean),
1066
+ next_attempt_at: T.nilable(Time),
1067
+ num_attempts: T.nilable(Integer),
1068
+ previously_attempted_at: T.nilable(Time)
1069
+ }
1070
+ )
1071
+ end
1072
+ def to_hash
1073
+ end
1074
+ end
1075
+
1076
+ class CreditNote < Orb::Internal::Type::BaseModel
1077
+ OrHash =
1078
+ T.type_alias do
1079
+ T.any(
1080
+ Orb::Webhooks::SalesOrderAccountingSyncSucceededStandardWebhookEvent::Invoice::CreditNote,
1081
+ Orb::Internal::AnyHash
1082
+ )
1083
+ end
1084
+
1085
+ sig { returns(String) }
1086
+ attr_accessor :id
1087
+
1088
+ sig { returns(String) }
1089
+ attr_accessor :credit_note_number
1090
+
1091
+ # An optional memo supplied on the credit note.
1092
+ sig { returns(T.nilable(String)) }
1093
+ attr_accessor :memo
1094
+
1095
+ sig { returns(String) }
1096
+ attr_accessor :reason
1097
+
1098
+ sig { returns(String) }
1099
+ attr_accessor :total
1100
+
1101
+ sig { returns(String) }
1102
+ attr_accessor :type
1103
+
1104
+ # If the credit note has a status of `void`, this gives a timestamp when the
1105
+ # credit note was voided.
1106
+ sig { returns(T.nilable(Time)) }
1107
+ attr_accessor :voided_at
1108
+
1109
+ sig do
1110
+ params(
1111
+ id: String,
1112
+ credit_note_number: String,
1113
+ memo: T.nilable(String),
1114
+ reason: String,
1115
+ total: String,
1116
+ type: String,
1117
+ voided_at: T.nilable(Time)
1118
+ ).returns(T.attached_class)
1119
+ end
1120
+ def self.new(
1121
+ id:,
1122
+ credit_note_number:,
1123
+ # An optional memo supplied on the credit note.
1124
+ memo:,
1125
+ reason:,
1126
+ total:,
1127
+ type:,
1128
+ # If the credit note has a status of `void`, this gives a timestamp when the
1129
+ # credit note was voided.
1130
+ voided_at:
1131
+ )
1132
+ end
1133
+
1134
+ sig do
1135
+ override.returns(
1136
+ {
1137
+ id: String,
1138
+ credit_note_number: String,
1139
+ memo: T.nilable(String),
1140
+ reason: String,
1141
+ total: String,
1142
+ type: String,
1143
+ voided_at: T.nilable(Time)
1144
+ }
1145
+ )
1146
+ end
1147
+ def to_hash
1148
+ end
1149
+ end
1150
+
1151
+ class CustomerBalanceTransaction < Orb::Internal::Type::BaseModel
1152
+ OrHash =
1153
+ T.type_alias do
1154
+ T.any(
1155
+ Orb::Webhooks::SalesOrderAccountingSyncSucceededStandardWebhookEvent::Invoice::CustomerBalanceTransaction,
1156
+ Orb::Internal::AnyHash
1157
+ )
1158
+ end
1159
+
1160
+ # A unique id for this transaction.
1161
+ sig { returns(String) }
1162
+ attr_accessor :id
1163
+
1164
+ sig do
1165
+ returns(
1166
+ Orb::Webhooks::SalesOrderAccountingSyncSucceededStandardWebhookEvent::Invoice::CustomerBalanceTransaction::Action::TaggedSymbol
1167
+ )
1168
+ end
1169
+ attr_accessor :action
1170
+
1171
+ # The value of the amount changed in the transaction.
1172
+ sig { returns(String) }
1173
+ attr_accessor :amount
1174
+
1175
+ # The creation time of this transaction.
1176
+ sig { returns(Time) }
1177
+ attr_accessor :created_at
1178
+
1179
+ sig { returns(T.nilable(Orb::CreditNoteTiny)) }
1180
+ attr_reader :credit_note
1181
+
1182
+ sig do
1183
+ params(credit_note: T.nilable(Orb::CreditNoteTiny::OrHash)).void
1184
+ end
1185
+ attr_writer :credit_note
1186
+
1187
+ # An optional description provided for manual customer balance adjustments.
1188
+ sig { returns(T.nilable(String)) }
1189
+ attr_accessor :description
1190
+
1191
+ # The new value of the customer's balance prior to the transaction, in the
1192
+ # customer's currency.
1193
+ sig { returns(String) }
1194
+ attr_accessor :ending_balance
1195
+
1196
+ sig { returns(T.nilable(Orb::InvoiceTiny)) }
1197
+ attr_reader :invoice
1198
+
1199
+ sig { params(invoice: T.nilable(Orb::InvoiceTiny::OrHash)).void }
1200
+ attr_writer :invoice
1201
+
1202
+ # The original value of the customer's balance prior to the transaction, in the
1203
+ # customer's currency.
1204
+ sig { returns(String) }
1205
+ attr_accessor :starting_balance
1206
+
1207
+ sig do
1208
+ returns(
1209
+ Orb::Webhooks::SalesOrderAccountingSyncSucceededStandardWebhookEvent::Invoice::CustomerBalanceTransaction::Type::TaggedSymbol
1210
+ )
1211
+ end
1212
+ attr_accessor :type
1213
+
1214
+ sig do
1215
+ params(
1216
+ id: String,
1217
+ action:
1218
+ Orb::Webhooks::SalesOrderAccountingSyncSucceededStandardWebhookEvent::Invoice::CustomerBalanceTransaction::Action::OrSymbol,
1219
+ amount: String,
1220
+ created_at: Time,
1221
+ credit_note: T.nilable(Orb::CreditNoteTiny::OrHash),
1222
+ description: T.nilable(String),
1223
+ ending_balance: String,
1224
+ invoice: T.nilable(Orb::InvoiceTiny::OrHash),
1225
+ starting_balance: String,
1226
+ type:
1227
+ Orb::Webhooks::SalesOrderAccountingSyncSucceededStandardWebhookEvent::Invoice::CustomerBalanceTransaction::Type::OrSymbol
1228
+ ).returns(T.attached_class)
1229
+ end
1230
+ def self.new(
1231
+ # A unique id for this transaction.
1232
+ id:,
1233
+ action:,
1234
+ # The value of the amount changed in the transaction.
1235
+ amount:,
1236
+ # The creation time of this transaction.
1237
+ created_at:,
1238
+ credit_note:,
1239
+ # An optional description provided for manual customer balance adjustments.
1240
+ description:,
1241
+ # The new value of the customer's balance prior to the transaction, in the
1242
+ # customer's currency.
1243
+ ending_balance:,
1244
+ invoice:,
1245
+ # The original value of the customer's balance prior to the transaction, in the
1246
+ # customer's currency.
1247
+ starting_balance:,
1248
+ type:
1249
+ )
1250
+ end
1251
+
1252
+ sig do
1253
+ override.returns(
1254
+ {
1255
+ id: String,
1256
+ action:
1257
+ Orb::Webhooks::SalesOrderAccountingSyncSucceededStandardWebhookEvent::Invoice::CustomerBalanceTransaction::Action::TaggedSymbol,
1258
+ amount: String,
1259
+ created_at: Time,
1260
+ credit_note: T.nilable(Orb::CreditNoteTiny),
1261
+ description: T.nilable(String),
1262
+ ending_balance: String,
1263
+ invoice: T.nilable(Orb::InvoiceTiny),
1264
+ starting_balance: String,
1265
+ type:
1266
+ Orb::Webhooks::SalesOrderAccountingSyncSucceededStandardWebhookEvent::Invoice::CustomerBalanceTransaction::Type::TaggedSymbol
1267
+ }
1268
+ )
1269
+ end
1270
+ def to_hash
1271
+ end
1272
+
1273
+ module Action
1274
+ extend Orb::Internal::Type::Enum
1275
+
1276
+ TaggedSymbol =
1277
+ T.type_alias do
1278
+ T.all(
1279
+ Symbol,
1280
+ Orb::Webhooks::SalesOrderAccountingSyncSucceededStandardWebhookEvent::Invoice::CustomerBalanceTransaction::Action
1281
+ )
1282
+ end
1283
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
1284
+
1285
+ APPLIED_TO_INVOICE =
1286
+ T.let(
1287
+ :applied_to_invoice,
1288
+ Orb::Webhooks::SalesOrderAccountingSyncSucceededStandardWebhookEvent::Invoice::CustomerBalanceTransaction::Action::TaggedSymbol
1289
+ )
1290
+ MANUAL_ADJUSTMENT =
1291
+ T.let(
1292
+ :manual_adjustment,
1293
+ Orb::Webhooks::SalesOrderAccountingSyncSucceededStandardWebhookEvent::Invoice::CustomerBalanceTransaction::Action::TaggedSymbol
1294
+ )
1295
+ PRORATED_REFUND =
1296
+ T.let(
1297
+ :prorated_refund,
1298
+ Orb::Webhooks::SalesOrderAccountingSyncSucceededStandardWebhookEvent::Invoice::CustomerBalanceTransaction::Action::TaggedSymbol
1299
+ )
1300
+ REVERT_PRORATED_REFUND =
1301
+ T.let(
1302
+ :revert_prorated_refund,
1303
+ Orb::Webhooks::SalesOrderAccountingSyncSucceededStandardWebhookEvent::Invoice::CustomerBalanceTransaction::Action::TaggedSymbol
1304
+ )
1305
+ RETURN_FROM_VOIDING =
1306
+ T.let(
1307
+ :return_from_voiding,
1308
+ Orb::Webhooks::SalesOrderAccountingSyncSucceededStandardWebhookEvent::Invoice::CustomerBalanceTransaction::Action::TaggedSymbol
1309
+ )
1310
+ CREDIT_NOTE_APPLIED =
1311
+ T.let(
1312
+ :credit_note_applied,
1313
+ Orb::Webhooks::SalesOrderAccountingSyncSucceededStandardWebhookEvent::Invoice::CustomerBalanceTransaction::Action::TaggedSymbol
1314
+ )
1315
+ CREDIT_NOTE_VOIDED =
1316
+ T.let(
1317
+ :credit_note_voided,
1318
+ Orb::Webhooks::SalesOrderAccountingSyncSucceededStandardWebhookEvent::Invoice::CustomerBalanceTransaction::Action::TaggedSymbol
1319
+ )
1320
+ OVERPAYMENT_REFUND =
1321
+ T.let(
1322
+ :overpayment_refund,
1323
+ Orb::Webhooks::SalesOrderAccountingSyncSucceededStandardWebhookEvent::Invoice::CustomerBalanceTransaction::Action::TaggedSymbol
1324
+ )
1325
+ EXTERNAL_PAYMENT =
1326
+ T.let(
1327
+ :external_payment,
1328
+ Orb::Webhooks::SalesOrderAccountingSyncSucceededStandardWebhookEvent::Invoice::CustomerBalanceTransaction::Action::TaggedSymbol
1329
+ )
1330
+ SMALL_INVOICE_CARRYOVER =
1331
+ T.let(
1332
+ :small_invoice_carryover,
1333
+ Orb::Webhooks::SalesOrderAccountingSyncSucceededStandardWebhookEvent::Invoice::CustomerBalanceTransaction::Action::TaggedSymbol
1334
+ )
1335
+ PREPAID_COMMIT_CANCEL =
1336
+ T.let(
1337
+ :prepaid_commit_cancel,
1338
+ Orb::Webhooks::SalesOrderAccountingSyncSucceededStandardWebhookEvent::Invoice::CustomerBalanceTransaction::Action::TaggedSymbol
1339
+ )
1340
+
1341
+ sig do
1342
+ override.returns(
1343
+ T::Array[
1344
+ Orb::Webhooks::SalesOrderAccountingSyncSucceededStandardWebhookEvent::Invoice::CustomerBalanceTransaction::Action::TaggedSymbol
1345
+ ]
1346
+ )
1347
+ end
1348
+ def self.values
1349
+ end
1350
+ end
1351
+
1352
+ module Type
1353
+ extend Orb::Internal::Type::Enum
1354
+
1355
+ TaggedSymbol =
1356
+ T.type_alias do
1357
+ T.all(
1358
+ Symbol,
1359
+ Orb::Webhooks::SalesOrderAccountingSyncSucceededStandardWebhookEvent::Invoice::CustomerBalanceTransaction::Type
1360
+ )
1361
+ end
1362
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
1363
+
1364
+ INCREMENT =
1365
+ T.let(
1366
+ :increment,
1367
+ Orb::Webhooks::SalesOrderAccountingSyncSucceededStandardWebhookEvent::Invoice::CustomerBalanceTransaction::Type::TaggedSymbol
1368
+ )
1369
+ DECREMENT =
1370
+ T.let(
1371
+ :decrement,
1372
+ Orb::Webhooks::SalesOrderAccountingSyncSucceededStandardWebhookEvent::Invoice::CustomerBalanceTransaction::Type::TaggedSymbol
1373
+ )
1374
+
1375
+ sig do
1376
+ override.returns(
1377
+ T::Array[
1378
+ Orb::Webhooks::SalesOrderAccountingSyncSucceededStandardWebhookEvent::Invoice::CustomerBalanceTransaction::Type::TaggedSymbol
1379
+ ]
1380
+ )
1381
+ end
1382
+ def self.values
1383
+ end
1384
+ end
1385
+ end
1386
+
1387
+ module InvoiceSource
1388
+ extend Orb::Internal::Type::Enum
1389
+
1390
+ TaggedSymbol =
1391
+ T.type_alias do
1392
+ T.all(
1393
+ Symbol,
1394
+ Orb::Webhooks::SalesOrderAccountingSyncSucceededStandardWebhookEvent::Invoice::InvoiceSource
1395
+ )
1396
+ end
1397
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
1398
+
1399
+ SUBSCRIPTION =
1400
+ T.let(
1401
+ :subscription,
1402
+ Orb::Webhooks::SalesOrderAccountingSyncSucceededStandardWebhookEvent::Invoice::InvoiceSource::TaggedSymbol
1403
+ )
1404
+ PARTIAL =
1405
+ T.let(
1406
+ :partial,
1407
+ Orb::Webhooks::SalesOrderAccountingSyncSucceededStandardWebhookEvent::Invoice::InvoiceSource::TaggedSymbol
1408
+ )
1409
+ ONE_OFF =
1410
+ T.let(
1411
+ :one_off,
1412
+ Orb::Webhooks::SalesOrderAccountingSyncSucceededStandardWebhookEvent::Invoice::InvoiceSource::TaggedSymbol
1413
+ )
1414
+
1415
+ sig do
1416
+ override.returns(
1417
+ T::Array[
1418
+ Orb::Webhooks::SalesOrderAccountingSyncSucceededStandardWebhookEvent::Invoice::InvoiceSource::TaggedSymbol
1419
+ ]
1420
+ )
1421
+ end
1422
+ def self.values
1423
+ end
1424
+ end
1425
+
1426
+ class PaymentAttempt < Orb::Internal::Type::BaseModel
1427
+ OrHash =
1428
+ T.type_alias do
1429
+ T.any(
1430
+ Orb::Webhooks::SalesOrderAccountingSyncSucceededStandardWebhookEvent::Invoice::PaymentAttempt,
1431
+ Orb::Internal::AnyHash
1432
+ )
1433
+ end
1434
+
1435
+ # The ID of the payment attempt.
1436
+ sig { returns(String) }
1437
+ attr_accessor :id
1438
+
1439
+ # The amount of the payment attempt.
1440
+ sig { returns(String) }
1441
+ attr_accessor :amount
1442
+
1443
+ # The time at which the payment attempt was created.
1444
+ sig { returns(Time) }
1445
+ attr_accessor :created_at
1446
+
1447
+ # The payment provider that attempted to collect the payment.
1448
+ sig do
1449
+ returns(
1450
+ T.nilable(
1451
+ Orb::Webhooks::SalesOrderAccountingSyncSucceededStandardWebhookEvent::Invoice::PaymentAttempt::PaymentProvider::TaggedSymbol
1452
+ )
1453
+ )
1454
+ end
1455
+ attr_accessor :payment_provider
1456
+
1457
+ # The ID of the payment attempt in the payment provider.
1458
+ sig { returns(T.nilable(String)) }
1459
+ attr_accessor :payment_provider_id
1460
+
1461
+ # URL to the downloadable PDF version of the receipt. This field will be `null`
1462
+ # for payment attempts that did not succeed.
1463
+ sig { returns(T.nilable(String)) }
1464
+ attr_accessor :receipt_pdf
1465
+
1466
+ # Whether the payment attempt succeeded.
1467
+ sig { returns(T::Boolean) }
1468
+ attr_accessor :succeeded
1469
+
1470
+ sig do
1471
+ params(
1472
+ id: String,
1473
+ amount: String,
1474
+ created_at: Time,
1475
+ payment_provider:
1476
+ T.nilable(
1477
+ Orb::Webhooks::SalesOrderAccountingSyncSucceededStandardWebhookEvent::Invoice::PaymentAttempt::PaymentProvider::OrSymbol
1478
+ ),
1479
+ payment_provider_id: T.nilable(String),
1480
+ receipt_pdf: T.nilable(String),
1481
+ succeeded: T::Boolean
1482
+ ).returns(T.attached_class)
1483
+ end
1484
+ def self.new(
1485
+ # The ID of the payment attempt.
1486
+ id:,
1487
+ # The amount of the payment attempt.
1488
+ amount:,
1489
+ # The time at which the payment attempt was created.
1490
+ created_at:,
1491
+ # The payment provider that attempted to collect the payment.
1492
+ payment_provider:,
1493
+ # The ID of the payment attempt in the payment provider.
1494
+ payment_provider_id:,
1495
+ # URL to the downloadable PDF version of the receipt. This field will be `null`
1496
+ # for payment attempts that did not succeed.
1497
+ receipt_pdf:,
1498
+ # Whether the payment attempt succeeded.
1499
+ succeeded:
1500
+ )
1501
+ end
1502
+
1503
+ sig do
1504
+ override.returns(
1505
+ {
1506
+ id: String,
1507
+ amount: String,
1508
+ created_at: Time,
1509
+ payment_provider:
1510
+ T.nilable(
1511
+ Orb::Webhooks::SalesOrderAccountingSyncSucceededStandardWebhookEvent::Invoice::PaymentAttempt::PaymentProvider::TaggedSymbol
1512
+ ),
1513
+ payment_provider_id: T.nilable(String),
1514
+ receipt_pdf: T.nilable(String),
1515
+ succeeded: T::Boolean
1516
+ }
1517
+ )
1518
+ end
1519
+ def to_hash
1520
+ end
1521
+
1522
+ # The payment provider that attempted to collect the payment.
1523
+ module PaymentProvider
1524
+ extend Orb::Internal::Type::Enum
1525
+
1526
+ TaggedSymbol =
1527
+ T.type_alias do
1528
+ T.all(
1529
+ Symbol,
1530
+ Orb::Webhooks::SalesOrderAccountingSyncSucceededStandardWebhookEvent::Invoice::PaymentAttempt::PaymentProvider
1531
+ )
1532
+ end
1533
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
1534
+
1535
+ STRIPE =
1536
+ T.let(
1537
+ :stripe,
1538
+ Orb::Webhooks::SalesOrderAccountingSyncSucceededStandardWebhookEvent::Invoice::PaymentAttempt::PaymentProvider::TaggedSymbol
1539
+ )
1540
+ ADYEN =
1541
+ T.let(
1542
+ :adyen,
1543
+ Orb::Webhooks::SalesOrderAccountingSyncSucceededStandardWebhookEvent::Invoice::PaymentAttempt::PaymentProvider::TaggedSymbol
1544
+ )
1545
+
1546
+ sig do
1547
+ override.returns(
1548
+ T::Array[
1549
+ Orb::Webhooks::SalesOrderAccountingSyncSucceededStandardWebhookEvent::Invoice::PaymentAttempt::PaymentProvider::TaggedSymbol
1550
+ ]
1551
+ )
1552
+ end
1553
+ def self.values
1554
+ end
1555
+ end
1556
+ end
1557
+
1558
+ module Status
1559
+ extend Orb::Internal::Type::Enum
1560
+
1561
+ TaggedSymbol =
1562
+ T.type_alias do
1563
+ T.all(
1564
+ Symbol,
1565
+ Orb::Webhooks::SalesOrderAccountingSyncSucceededStandardWebhookEvent::Invoice::Status
1566
+ )
1567
+ end
1568
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
1569
+
1570
+ ISSUED =
1571
+ T.let(
1572
+ :issued,
1573
+ Orb::Webhooks::SalesOrderAccountingSyncSucceededStandardWebhookEvent::Invoice::Status::TaggedSymbol
1574
+ )
1575
+ PAID =
1576
+ T.let(
1577
+ :paid,
1578
+ Orb::Webhooks::SalesOrderAccountingSyncSucceededStandardWebhookEvent::Invoice::Status::TaggedSymbol
1579
+ )
1580
+ SYNCED =
1581
+ T.let(
1582
+ :synced,
1583
+ Orb::Webhooks::SalesOrderAccountingSyncSucceededStandardWebhookEvent::Invoice::Status::TaggedSymbol
1584
+ )
1585
+ VOID =
1586
+ T.let(
1587
+ :void,
1588
+ Orb::Webhooks::SalesOrderAccountingSyncSucceededStandardWebhookEvent::Invoice::Status::TaggedSymbol
1589
+ )
1590
+ DRAFT =
1591
+ T.let(
1592
+ :draft,
1593
+ Orb::Webhooks::SalesOrderAccountingSyncSucceededStandardWebhookEvent::Invoice::Status::TaggedSymbol
1594
+ )
1595
+
1596
+ sig do
1597
+ override.returns(
1598
+ T::Array[
1599
+ Orb::Webhooks::SalesOrderAccountingSyncSucceededStandardWebhookEvent::Invoice::Status::TaggedSymbol
1600
+ ]
1601
+ )
1602
+ end
1603
+ def self.values
1604
+ end
1605
+ end
1606
+ end
1607
+
1608
+ # The serialization style this payload was rendered in, as configured on the
1609
+ # endpoint.
1610
+ module PayloadStyle
1611
+ extend Orb::Internal::Type::Enum
1612
+
1613
+ TaggedSymbol =
1614
+ T.type_alias do
1615
+ T.all(
1616
+ Symbol,
1617
+ Orb::Webhooks::SalesOrderAccountingSyncSucceededStandardWebhookEvent::PayloadStyle
1618
+ )
1619
+ end
1620
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
1621
+
1622
+ EXPANDED =
1623
+ T.let(
1624
+ :expanded,
1625
+ Orb::Webhooks::SalesOrderAccountingSyncSucceededStandardWebhookEvent::PayloadStyle::TaggedSymbol
1626
+ )
1627
+ STANDARD =
1628
+ T.let(
1629
+ :standard,
1630
+ Orb::Webhooks::SalesOrderAccountingSyncSucceededStandardWebhookEvent::PayloadStyle::TaggedSymbol
1631
+ )
1632
+
1633
+ sig do
1634
+ override.returns(
1635
+ T::Array[
1636
+ Orb::Webhooks::SalesOrderAccountingSyncSucceededStandardWebhookEvent::PayloadStyle::TaggedSymbol
1637
+ ]
1638
+ )
1639
+ end
1640
+ def self.values
1641
+ end
1642
+ end
1643
+
1644
+ class Properties < Orb::Internal::Type::BaseModel
1645
+ OrHash =
1646
+ T.type_alias do
1647
+ T.any(
1648
+ Orb::Webhooks::SalesOrderAccountingSyncSucceededStandardWebhookEvent::Properties,
1649
+ Orb::Internal::AnyHash
1650
+ )
1651
+ end
1652
+
1653
+ sig { returns(String) }
1654
+ attr_accessor :connection_type
1655
+
1656
+ sig { params(connection_type: String).returns(T.attached_class) }
1657
+ def self.new(connection_type:)
1658
+ end
1659
+
1660
+ sig { override.returns({ connection_type: String }) }
1661
+ def to_hash
1662
+ end
1663
+ end
1664
+
1665
+ # The event this payload describes.
1666
+ module Type
1667
+ extend Orb::Internal::Type::Enum
1668
+
1669
+ TaggedSymbol =
1670
+ T.type_alias do
1671
+ T.all(
1672
+ Symbol,
1673
+ Orb::Webhooks::SalesOrderAccountingSyncSucceededStandardWebhookEvent::Type
1674
+ )
1675
+ end
1676
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
1677
+
1678
+ SALES_ORDER_ACCOUNTING_SYNC_SUCCEEDED =
1679
+ T.let(
1680
+ :"sales_order.accounting_sync_succeeded",
1681
+ Orb::Webhooks::SalesOrderAccountingSyncSucceededStandardWebhookEvent::Type::TaggedSymbol
1682
+ )
1683
+
1684
+ sig do
1685
+ override.returns(
1686
+ T::Array[
1687
+ Orb::Webhooks::SalesOrderAccountingSyncSucceededStandardWebhookEvent::Type::TaggedSymbol
1688
+ ]
1689
+ )
1690
+ end
1691
+ def self.values
1692
+ end
1693
+ end
1694
+ end
1695
+ end
1696
+ end
1697
+ end