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