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