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,1547 @@
1
+ # typed: strong
2
+
3
+ module Orb
4
+ module Models
5
+ module Webhooks
6
+ class InvoiceSyncSucceededStandardWebhookEvent < Orb::Internal::Type::BaseModel
7
+ OrHash =
8
+ T.type_alias do
9
+ T.any(
10
+ Orb::Webhooks::InvoiceSyncSucceededStandardWebhookEvent,
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::InvoiceSyncSucceededStandardWebhookEvent::Invoice
28
+ )
29
+ end
30
+ attr_reader :invoice
31
+
32
+ sig do
33
+ params(
34
+ invoice:
35
+ Orb::Webhooks::InvoiceSyncSucceededStandardWebhookEvent::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::InvoiceSyncSucceededStandardWebhookEvent::PayloadStyle::TaggedSymbol
45
+ )
46
+ end
47
+ attr_accessor :payload_style
48
+
49
+ sig do
50
+ returns(
51
+ Orb::Webhooks::InvoiceSyncSucceededStandardWebhookEvent::Properties
52
+ )
53
+ end
54
+ attr_reader :properties
55
+
56
+ sig do
57
+ params(
58
+ properties:
59
+ Orb::Webhooks::InvoiceSyncSucceededStandardWebhookEvent::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::InvoiceSyncSucceededStandardWebhookEvent::Type::TaggedSymbol
68
+ )
69
+ end
70
+ attr_accessor :type
71
+
72
+ # Issued when an invoice sync succeeds.
73
+ sig do
74
+ params(
75
+ id: String,
76
+ created_at: Time,
77
+ invoice:
78
+ Orb::Webhooks::InvoiceSyncSucceededStandardWebhookEvent::Invoice::OrHash,
79
+ payload_style:
80
+ Orb::Webhooks::InvoiceSyncSucceededStandardWebhookEvent::PayloadStyle::OrSymbol,
81
+ properties:
82
+ Orb::Webhooks::InvoiceSyncSucceededStandardWebhookEvent::Properties::OrHash,
83
+ type:
84
+ Orb::Webhooks::InvoiceSyncSucceededStandardWebhookEvent::Type::OrSymbol
85
+ ).returns(T.attached_class)
86
+ end
87
+ def self.new(
88
+ # The ID of this webhook event.
89
+ id:,
90
+ # The time at which this event was created, to the second.
91
+ created_at:,
92
+ # An invoice without its line items, subtotal, discounts, minimums or maximums.
93
+ # Fetch the invoice for those.
94
+ invoice:,
95
+ # The serialization style this payload was rendered in, as configured on the
96
+ # endpoint.
97
+ payload_style:,
98
+ properties:,
99
+ # The event this payload describes.
100
+ type:
101
+ )
102
+ end
103
+
104
+ sig do
105
+ override.returns(
106
+ {
107
+ id: String,
108
+ created_at: Time,
109
+ invoice:
110
+ Orb::Webhooks::InvoiceSyncSucceededStandardWebhookEvent::Invoice,
111
+ payload_style:
112
+ Orb::Webhooks::InvoiceSyncSucceededStandardWebhookEvent::PayloadStyle::TaggedSymbol,
113
+ properties:
114
+ Orb::Webhooks::InvoiceSyncSucceededStandardWebhookEvent::Properties,
115
+ type:
116
+ Orb::Webhooks::InvoiceSyncSucceededStandardWebhookEvent::Type::TaggedSymbol
117
+ }
118
+ )
119
+ end
120
+ def to_hash
121
+ end
122
+
123
+ class Invoice < Orb::Internal::Type::BaseModel
124
+ OrHash =
125
+ T.type_alias do
126
+ T.any(
127
+ Orb::Webhooks::InvoiceSyncSucceededStandardWebhookEvent::Invoice,
128
+ Orb::Internal::AnyHash
129
+ )
130
+ end
131
+
132
+ sig { returns(String) }
133
+ attr_accessor :id
134
+
135
+ # This is the final amount required to be charged to the customer and reflects the
136
+ # application of the customer balance to the `total` of the invoice.
137
+ sig { returns(String) }
138
+ attr_accessor :amount_due
139
+
140
+ sig do
141
+ returns(
142
+ Orb::Webhooks::InvoiceSyncSucceededStandardWebhookEvent::Invoice::AutoCollection
143
+ )
144
+ end
145
+ attr_reader :auto_collection
146
+
147
+ sig do
148
+ params(
149
+ auto_collection:
150
+ Orb::Webhooks::InvoiceSyncSucceededStandardWebhookEvent::Invoice::AutoCollection::OrHash
151
+ ).void
152
+ end
153
+ attr_writer :auto_collection
154
+
155
+ sig { returns(T.nilable(Orb::Address)) }
156
+ attr_reader :billing_address
157
+
158
+ sig { params(billing_address: T.nilable(Orb::Address::OrHash)).void }
159
+ attr_writer :billing_address
160
+
161
+ # The creation time of the resource in Orb.
162
+ sig { returns(Time) }
163
+ attr_accessor :created_at
164
+
165
+ # A list of credit notes associated with the invoice
166
+ sig do
167
+ returns(
168
+ T::Array[
169
+ Orb::Webhooks::InvoiceSyncSucceededStandardWebhookEvent::Invoice::CreditNote
170
+ ]
171
+ )
172
+ end
173
+ attr_accessor :credit_notes
174
+
175
+ # An ISO 4217 currency string or `credits`
176
+ sig { returns(String) }
177
+ attr_accessor :currency
178
+
179
+ sig { returns(Orb::CustomerMinified) }
180
+ attr_reader :customer
181
+
182
+ sig { params(customer: Orb::CustomerMinified::OrHash).void }
183
+ attr_writer :customer
184
+
185
+ sig do
186
+ returns(
187
+ T::Array[
188
+ Orb::Webhooks::InvoiceSyncSucceededStandardWebhookEvent::Invoice::CustomerBalanceTransaction
189
+ ]
190
+ )
191
+ end
192
+ attr_accessor :customer_balance_transactions
193
+
194
+ # Tax IDs are commonly required to be displayed on customer invoices, which are
195
+ # added to the headers of invoices.
196
+ #
197
+ # ### Supported Tax ID Countries and Types
198
+ #
199
+ # | Country | Type | Description |
200
+ # | ---------------------- | ------------ | ------------------------------------------------------------------------------------------------------- |
201
+ # | Albania | `al_tin` | Albania Tax Identification Number |
202
+ # | Andorra | `ad_nrt` | Andorran NRT Number |
203
+ # | Angola | `ao_tin` | Angola Tax Identification Number |
204
+ # | Argentina | `ar_cuit` | Argentinian Tax ID Number |
205
+ # | Armenia | `am_tin` | Armenia Tax Identification Number |
206
+ # | Aruba | `aw_tin` | Aruba Tax Identification Number |
207
+ # | Australia | `au_abn` | Australian Business Number (AU ABN) |
208
+ # | Australia | `au_arn` | Australian Taxation Office Reference Number |
209
+ # | Austria | `eu_vat` | European VAT Number |
210
+ # | Azerbaijan | `az_tin` | Azerbaijan Tax Identification Number |
211
+ # | Bahamas | `bs_tin` | Bahamas Tax Identification Number |
212
+ # | Bahrain | `bh_vat` | Bahraini VAT Number |
213
+ # | Bangladesh | `bd_bin` | Bangladesh Business Identification Number |
214
+ # | Barbados | `bb_tin` | Barbados Tax Identification Number |
215
+ # | Belarus | `by_tin` | Belarus TIN Number |
216
+ # | Belgium | `eu_vat` | European VAT Number |
217
+ # | Benin | `bj_ifu` | Benin Tax Identification Number (Identifiant Fiscal Unique) |
218
+ # | Bolivia | `bo_tin` | Bolivian Tax ID |
219
+ # | Bosnia and Herzegovina | `ba_tin` | Bosnia and Herzegovina Tax Identification Number |
220
+ # | Brazil | `br_cnpj` | Brazilian CNPJ Number |
221
+ # | Brazil | `br_cpf` | Brazilian CPF Number |
222
+ # | Bulgaria | `bg_uic` | Bulgaria Unified Identification Code |
223
+ # | Bulgaria | `eu_vat` | European VAT Number |
224
+ # | Burkina Faso | `bf_ifu` | Burkina Faso Tax Identification Number (Numéro d'Identifiant Fiscal Unique) |
225
+ # | Cambodia | `kh_tin` | Cambodia Tax Identification Number |
226
+ # | Cameroon | `cm_niu` | Cameroon Tax Identification Number (Numéro d'Identifiant fiscal Unique) |
227
+ # | Canada | `ca_bn` | Canadian BN |
228
+ # | Canada | `ca_gst_hst` | Canadian GST/HST Number |
229
+ # | Canada | `ca_pst_bc` | Canadian PST Number (British Columbia) |
230
+ # | Canada | `ca_pst_mb` | Canadian PST Number (Manitoba) |
231
+ # | Canada | `ca_pst_sk` | Canadian PST Number (Saskatchewan) |
232
+ # | Canada | `ca_qst` | Canadian QST Number (Québec) |
233
+ # | Cape Verde | `cv_nif` | Cape Verde Tax Identification Number (Número de Identificação Fiscal) |
234
+ # | Chile | `cl_tin` | Chilean TIN |
235
+ # | China | `cn_tin` | Chinese Tax ID |
236
+ # | Colombia | `co_nit` | Colombian NIT Number |
237
+ # | Congo-Kinshasa | `cd_nif` | Congo (DR) Tax Identification Number (Número de Identificação Fiscal) |
238
+ # | Costa Rica | `cr_tin` | Costa Rican Tax ID |
239
+ # | Croatia | `eu_vat` | European VAT Number |
240
+ # | Croatia | `hr_oib` | Croatian Personal Identification Number (OIB) |
241
+ # | Cyprus | `eu_vat` | European VAT Number |
242
+ # | Czech Republic | `eu_vat` | European VAT Number |
243
+ # | Denmark | `eu_vat` | European VAT Number |
244
+ # | Dominican Republic | `do_rcn` | Dominican RCN Number |
245
+ # | Ecuador | `ec_ruc` | Ecuadorian RUC Number |
246
+ # | Egypt | `eg_tin` | Egyptian Tax Identification Number |
247
+ # | El Salvador | `sv_nit` | El Salvadorian NIT Number |
248
+ # | Estonia | `eu_vat` | European VAT Number |
249
+ # | Ethiopia | `et_tin` | Ethiopia Tax Identification Number |
250
+ # | European Union | `eu_oss_vat` | European One Stop Shop VAT Number for non-Union scheme |
251
+ # | Faroe Islands | `fo_vat` | Faroe Islands VAT Number |
252
+ # | Finland | `eu_vat` | European VAT Number |
253
+ # | France | `eu_vat` | European VAT Number |
254
+ # | Georgia | `ge_vat` | Georgian VAT |
255
+ # | Germany | `de_stn` | German Tax Number (Steuernummer) |
256
+ # | Germany | `eu_vat` | European VAT Number |
257
+ # | Gibraltar | `gi_tin` | Gibraltar Tax Identification Number |
258
+ # | Greece | `eu_vat` | European VAT Number |
259
+ # | Guinea | `gn_nif` | Guinea Tax Identification Number (Número de Identificação Fiscal) |
260
+ # | Hong Kong | `hk_br` | Hong Kong BR Number |
261
+ # | Hungary | `eu_vat` | European VAT Number |
262
+ # | Hungary | `hu_tin` | Hungary Tax Number (adószám) |
263
+ # | Iceland | `is_vat` | Icelandic VAT |
264
+ # | India | `in_gst` | Indian GST Number |
265
+ # | Indonesia | `id_npwp` | Indonesian NPWP Number |
266
+ # | Ireland | `eu_vat` | European VAT Number |
267
+ # | Israel | `il_vat` | Israel VAT |
268
+ # | Italy | `eu_vat` | European VAT Number |
269
+ # | Italy | `it_cf` | Italian Codice Fiscale Number |
270
+ # | Japan | `jp_cn` | Japanese Corporate Number (_Hōjin Bangō_) |
271
+ # | Japan | `jp_rn` | Japanese Registered Foreign Businesses' Registration Number (_Tōroku Kokugai Jigyōsha no Tōroku Bangō_) |
272
+ # | Japan | `jp_trn` | Japanese Tax Registration Number (_Tōroku Bangō_) |
273
+ # | Kazakhstan | `kz_bin` | Kazakhstani Business Identification Number |
274
+ # | Kenya | `ke_pin` | Kenya Revenue Authority Personal Identification Number |
275
+ # | Kyrgyzstan | `kg_tin` | Kyrgyzstan Tax Identification Number |
276
+ # | Laos | `la_tin` | Laos Tax Identification Number |
277
+ # | Latvia | `eu_vat` | European VAT Number |
278
+ # | Liechtenstein | `li_uid` | Liechtensteinian UID Number |
279
+ # | Liechtenstein | `li_vat` | Liechtenstein VAT Number |
280
+ # | Lithuania | `eu_vat` | European VAT Number |
281
+ # | Luxembourg | `eu_vat` | European VAT Number |
282
+ # | Malaysia | `my_frp` | Malaysian FRP Number |
283
+ # | Malaysia | `my_itn` | Malaysian ITN |
284
+ # | Malaysia | `my_sst` | Malaysian SST Number |
285
+ # | Malta | `eu_vat` | European VAT Number |
286
+ # | Mauritania | `mr_nif` | Mauritania Tax Identification Number (Número de Identificação Fiscal) |
287
+ # | Mexico | `mx_rfc` | Mexican RFC Number |
288
+ # | Moldova | `md_vat` | Moldova VAT Number |
289
+ # | Montenegro | `me_pib` | Montenegro PIB Number |
290
+ # | Morocco | `ma_vat` | Morocco VAT Number |
291
+ # | Nepal | `np_pan` | Nepal PAN Number |
292
+ # | Netherlands | `eu_vat` | European VAT Number |
293
+ # | New Zealand | `nz_gst` | New Zealand GST Number |
294
+ # | Nigeria | `ng_tin` | Nigerian Tax Identification Number |
295
+ # | North Macedonia | `mk_vat` | North Macedonia VAT Number |
296
+ # | Northern Ireland | `eu_vat` | Northern Ireland VAT Number |
297
+ # | Norway | `no_vat` | Norwegian VAT Number |
298
+ # | Norway | `no_voec` | Norwegian VAT on e-commerce Number |
299
+ # | Oman | `om_vat` | Omani VAT Number |
300
+ # | Paraguay | `py_ruc` | Paraguayan RUC Number |
301
+ # | Peru | `pe_ruc` | Peruvian RUC Number |
302
+ # | Philippines | `ph_tin` | Philippines Tax Identification Number |
303
+ # | Poland | `eu_vat` | European VAT Number |
304
+ # | Poland | `pl_nip` | Polish Tax ID Number |
305
+ # | Portugal | `eu_vat` | European VAT Number |
306
+ # | Romania | `eu_vat` | European VAT Number |
307
+ # | Romania | `ro_tin` | Romanian Tax ID Number |
308
+ # | Russia | `ru_inn` | Russian INN |
309
+ # | Russia | `ru_kpp` | Russian KPP |
310
+ # | Saudi Arabia | `sa_vat` | Saudi Arabia VAT |
311
+ # | Senegal | `sn_ninea` | Senegal NINEA Number |
312
+ # | Serbia | `rs_pib` | Serbian PIB Number |
313
+ # | Singapore | `sg_gst` | Singaporean GST |
314
+ # | Singapore | `sg_uen` | Singaporean UEN |
315
+ # | Slovakia | `eu_vat` | European VAT Number |
316
+ # | Slovenia | `eu_vat` | European VAT Number |
317
+ # | Slovenia | `si_tin` | Slovenia Tax Number (davčna številka) |
318
+ # | South Africa | `za_vat` | South African VAT Number |
319
+ # | South Korea | `kr_brn` | Korean BRN |
320
+ # | Spain | `es_cif` | Spanish NIF Number (previously Spanish CIF Number) |
321
+ # | Spain | `eu_vat` | European VAT Number |
322
+ # | Sri Lanka | `lk_vat` | Sri Lanka VAT Number |
323
+ # | Suriname | `sr_fin` | Suriname FIN Number |
324
+ # | Sweden | `eu_vat` | European VAT Number |
325
+ # | Switzerland | `ch_uid` | Switzerland UID Number |
326
+ # | Switzerland | `ch_vat` | Switzerland VAT Number |
327
+ # | Taiwan | `tw_vat` | Taiwanese VAT |
328
+ # | Tajikistan | `tj_tin` | Tajikistan Tax Identification Number |
329
+ # | Tanzania | `tz_vat` | Tanzania VAT Number |
330
+ # | Thailand | `th_vat` | Thai VAT |
331
+ # | Turkey | `tr_tin` | Turkish Tax Identification Number |
332
+ # | Uganda | `ug_tin` | Uganda Tax Identification Number |
333
+ # | Ukraine | `ua_vat` | Ukrainian VAT |
334
+ # | United Arab Emirates | `ae_trn` | United Arab Emirates TRN |
335
+ # | United Kingdom | `gb_vat` | United Kingdom VAT Number |
336
+ # | United States | `us_ein` | United States EIN |
337
+ # | Uruguay | `uy_ruc` | Uruguayan RUC Number |
338
+ # | Uzbekistan | `uz_tin` | Uzbekistan TIN Number |
339
+ # | Uzbekistan | `uz_vat` | Uzbekistan VAT Number |
340
+ # | Venezuela | `ve_rif` | Venezuelan RIF Number |
341
+ # | Vietnam | `vn_tin` | Vietnamese Tax ID Number |
342
+ # | Zambia | `zm_tin` | Zambia Tax Identification Number |
343
+ # | Zimbabwe | `zw_tin` | Zimbabwe Tax Identification Number |
344
+ sig { returns(T.nilable(Orb::CustomerTaxID)) }
345
+ attr_reader :customer_tax_id
346
+
347
+ sig do
348
+ params(customer_tax_id: T.nilable(Orb::CustomerTaxID::OrHash)).void
349
+ end
350
+ attr_writer :customer_tax_id
351
+
352
+ # When the invoice payment is due. The due date is null if the invoice is not yet
353
+ # finalized.
354
+ sig { returns(T.nilable(Time)) }
355
+ attr_accessor :due_date
356
+
357
+ # If the invoice has a status of `draft`, this will be the time that the invoice
358
+ # will be eligible to be issued, otherwise it will be `null`. If `auto-issue` is
359
+ # true, the invoice will automatically begin issuing at this time.
360
+ sig { returns(T.nilable(Time)) }
361
+ attr_accessor :eligible_to_issue_at
362
+
363
+ # A URL for the customer-facing invoice portal. This URL expires 60 days after the
364
+ # link is generated, or 30 days after the invoice's due date — whichever is later.
365
+ sig { returns(T.nilable(String)) }
366
+ attr_accessor :hosted_invoice_url
367
+
368
+ # The scheduled date of the invoice
369
+ sig { returns(Time) }
370
+ attr_accessor :invoice_date
371
+
372
+ # Automatically generated invoice number to help track and reconcile invoices.
373
+ # Invoice numbers have a prefix such as `RFOBWG`. These can be sequential per
374
+ # account or customer.
375
+ sig { returns(String) }
376
+ attr_accessor :invoice_number
377
+
378
+ # The link to download the PDF representation of the `Invoice`.
379
+ sig { returns(T.nilable(String)) }
380
+ attr_accessor :invoice_pdf
381
+
382
+ sig do
383
+ returns(
384
+ Orb::Webhooks::InvoiceSyncSucceededStandardWebhookEvent::Invoice::InvoiceSource::TaggedSymbol
385
+ )
386
+ end
387
+ attr_accessor :invoice_source
388
+
389
+ # If the invoice failed to issue, this will be the last time it failed to issue
390
+ # (even if it is now in a different state.)
391
+ sig { returns(T.nilable(Time)) }
392
+ attr_accessor :issue_failed_at
393
+
394
+ # If the invoice has been issued, this will be the time it transitioned to
395
+ # `issued` (even if it is now in a different state.)
396
+ sig { returns(T.nilable(Time)) }
397
+ attr_accessor :issued_at
398
+
399
+ # Free-form text which is available on the invoice PDF and the Orb invoice portal.
400
+ sig { returns(T.nilable(String)) }
401
+ attr_accessor :memo
402
+
403
+ # User specified key-value pairs for the resource. If not present, this defaults
404
+ # to an empty dictionary. Individual keys can be removed by setting the value to
405
+ # `null`, and the entire metadata mapping can be cleared by setting `metadata` to
406
+ # `null`.
407
+ sig { returns(T::Hash[Symbol, String]) }
408
+ attr_accessor :metadata
409
+
410
+ # If the invoice has a status of `paid`, this gives a timestamp when the invoice
411
+ # was paid.
412
+ sig { returns(T.nilable(Time)) }
413
+ attr_accessor :paid_at
414
+
415
+ # A list of payment attempts associated with the invoice
416
+ sig do
417
+ returns(
418
+ T::Array[
419
+ Orb::Webhooks::InvoiceSyncSucceededStandardWebhookEvent::Invoice::PaymentAttempt
420
+ ]
421
+ )
422
+ end
423
+ attr_accessor :payment_attempts
424
+
425
+ # If payment was attempted on this invoice but failed, this will be the time of
426
+ # the most recent attempt.
427
+ sig { returns(T.nilable(Time)) }
428
+ attr_accessor :payment_failed_at
429
+
430
+ # When payment for this invoice was received. For an invoice manually marked as
431
+ # paid, this is the `payment_received_date` that was supplied. For an invoice paid
432
+ # through a payment provider, this is the settlement time reported by that
433
+ # provider. It is `null` for an invoice that became `paid` without a payment, such
434
+ # as a $0 invoice or one fully covered by credit notes. By contrast, `paid_at` is
435
+ # when the invoice reached the `paid` status in Orb.
436
+ sig { returns(T.nilable(Time)) }
437
+ attr_accessor :payment_received_at
438
+
439
+ # If payment was attempted on this invoice, this will be the start time of the
440
+ # most recent attempt. This field is especially useful for delayed-notification
441
+ # payment mechanisms (like bank transfers), where payment can take 3 days or more.
442
+ sig { returns(T.nilable(Time)) }
443
+ attr_accessor :payment_started_at
444
+
445
+ # If the invoice is in draft, this timestamp will reflect when the invoice is
446
+ # scheduled to be issued.
447
+ sig { returns(T.nilable(Time)) }
448
+ attr_accessor :scheduled_issue_at
449
+
450
+ sig { returns(T.nilable(Orb::Address)) }
451
+ attr_reader :shipping_address
452
+
453
+ sig { params(shipping_address: T.nilable(Orb::Address::OrHash)).void }
454
+ attr_writer :shipping_address
455
+
456
+ sig do
457
+ returns(
458
+ Orb::Webhooks::InvoiceSyncSucceededStandardWebhookEvent::Invoice::Status::TaggedSymbol
459
+ )
460
+ end
461
+ attr_accessor :status
462
+
463
+ sig { returns(T.nilable(Orb::SubscriptionMinified)) }
464
+ attr_reader :subscription
465
+
466
+ sig do
467
+ params(
468
+ subscription: T.nilable(Orb::SubscriptionMinified::OrHash)
469
+ ).void
470
+ end
471
+ attr_writer :subscription
472
+
473
+ # If the invoice failed to sync, this will be the last time an external invoicing
474
+ # provider sync was attempted. This field will always be `null` for invoices using
475
+ # Orb Invoicing.
476
+ sig { returns(T.nilable(Time)) }
477
+ attr_accessor :sync_failed_at
478
+
479
+ # The total after any minimums and discounts have been applied.
480
+ sig { returns(String) }
481
+ attr_accessor :total
482
+
483
+ # If the invoice has a status of `void`, this gives a timestamp when the invoice
484
+ # was voided.
485
+ sig { returns(T.nilable(Time)) }
486
+ attr_accessor :voided_at
487
+
488
+ # This is true if the invoice will be automatically issued in the future, and
489
+ # false otherwise.
490
+ sig { returns(T::Boolean) }
491
+ attr_accessor :will_auto_issue
492
+
493
+ # An invoice without its line items, subtotal, discounts, minimums or maximums.
494
+ # Fetch the invoice for those.
495
+ sig do
496
+ params(
497
+ id: String,
498
+ amount_due: String,
499
+ auto_collection:
500
+ Orb::Webhooks::InvoiceSyncSucceededStandardWebhookEvent::Invoice::AutoCollection::OrHash,
501
+ billing_address: T.nilable(Orb::Address::OrHash),
502
+ created_at: Time,
503
+ credit_notes:
504
+ T::Array[
505
+ Orb::Webhooks::InvoiceSyncSucceededStandardWebhookEvent::Invoice::CreditNote::OrHash
506
+ ],
507
+ currency: String,
508
+ customer: Orb::CustomerMinified::OrHash,
509
+ customer_balance_transactions:
510
+ T::Array[
511
+ Orb::Webhooks::InvoiceSyncSucceededStandardWebhookEvent::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::InvoiceSyncSucceededStandardWebhookEvent::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::InvoiceSyncSucceededStandardWebhookEvent::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::InvoiceSyncSucceededStandardWebhookEvent::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::InvoiceSyncSucceededStandardWebhookEvent::Invoice::AutoCollection,
790
+ billing_address: T.nilable(Orb::Address),
791
+ created_at: Time,
792
+ credit_notes:
793
+ T::Array[
794
+ Orb::Webhooks::InvoiceSyncSucceededStandardWebhookEvent::Invoice::CreditNote
795
+ ],
796
+ currency: String,
797
+ customer: Orb::CustomerMinified,
798
+ customer_balance_transactions:
799
+ T::Array[
800
+ Orb::Webhooks::InvoiceSyncSucceededStandardWebhookEvent::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::InvoiceSyncSucceededStandardWebhookEvent::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::InvoiceSyncSucceededStandardWebhookEvent::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::InvoiceSyncSucceededStandardWebhookEvent::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::InvoiceSyncSucceededStandardWebhookEvent::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::InvoiceSyncSucceededStandardWebhookEvent::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::InvoiceSyncSucceededStandardWebhookEvent::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::InvoiceSyncSucceededStandardWebhookEvent::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::InvoiceSyncSucceededStandardWebhookEvent::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::InvoiceSyncSucceededStandardWebhookEvent::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::InvoiceSyncSucceededStandardWebhookEvent::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::InvoiceSyncSucceededStandardWebhookEvent::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::InvoiceSyncSucceededStandardWebhookEvent::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::InvoiceSyncSucceededStandardWebhookEvent::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::InvoiceSyncSucceededStandardWebhookEvent::Invoice::CustomerBalanceTransaction::Action::TaggedSymbol
1124
+ )
1125
+ MANUAL_ADJUSTMENT =
1126
+ T.let(
1127
+ :manual_adjustment,
1128
+ Orb::Webhooks::InvoiceSyncSucceededStandardWebhookEvent::Invoice::CustomerBalanceTransaction::Action::TaggedSymbol
1129
+ )
1130
+ PRORATED_REFUND =
1131
+ T.let(
1132
+ :prorated_refund,
1133
+ Orb::Webhooks::InvoiceSyncSucceededStandardWebhookEvent::Invoice::CustomerBalanceTransaction::Action::TaggedSymbol
1134
+ )
1135
+ REVERT_PRORATED_REFUND =
1136
+ T.let(
1137
+ :revert_prorated_refund,
1138
+ Orb::Webhooks::InvoiceSyncSucceededStandardWebhookEvent::Invoice::CustomerBalanceTransaction::Action::TaggedSymbol
1139
+ )
1140
+ RETURN_FROM_VOIDING =
1141
+ T.let(
1142
+ :return_from_voiding,
1143
+ Orb::Webhooks::InvoiceSyncSucceededStandardWebhookEvent::Invoice::CustomerBalanceTransaction::Action::TaggedSymbol
1144
+ )
1145
+ CREDIT_NOTE_APPLIED =
1146
+ T.let(
1147
+ :credit_note_applied,
1148
+ Orb::Webhooks::InvoiceSyncSucceededStandardWebhookEvent::Invoice::CustomerBalanceTransaction::Action::TaggedSymbol
1149
+ )
1150
+ CREDIT_NOTE_VOIDED =
1151
+ T.let(
1152
+ :credit_note_voided,
1153
+ Orb::Webhooks::InvoiceSyncSucceededStandardWebhookEvent::Invoice::CustomerBalanceTransaction::Action::TaggedSymbol
1154
+ )
1155
+ OVERPAYMENT_REFUND =
1156
+ T.let(
1157
+ :overpayment_refund,
1158
+ Orb::Webhooks::InvoiceSyncSucceededStandardWebhookEvent::Invoice::CustomerBalanceTransaction::Action::TaggedSymbol
1159
+ )
1160
+ EXTERNAL_PAYMENT =
1161
+ T.let(
1162
+ :external_payment,
1163
+ Orb::Webhooks::InvoiceSyncSucceededStandardWebhookEvent::Invoice::CustomerBalanceTransaction::Action::TaggedSymbol
1164
+ )
1165
+ SMALL_INVOICE_CARRYOVER =
1166
+ T.let(
1167
+ :small_invoice_carryover,
1168
+ Orb::Webhooks::InvoiceSyncSucceededStandardWebhookEvent::Invoice::CustomerBalanceTransaction::Action::TaggedSymbol
1169
+ )
1170
+ PREPAID_COMMIT_CANCEL =
1171
+ T.let(
1172
+ :prepaid_commit_cancel,
1173
+ Orb::Webhooks::InvoiceSyncSucceededStandardWebhookEvent::Invoice::CustomerBalanceTransaction::Action::TaggedSymbol
1174
+ )
1175
+
1176
+ sig do
1177
+ override.returns(
1178
+ T::Array[
1179
+ Orb::Webhooks::InvoiceSyncSucceededStandardWebhookEvent::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::InvoiceSyncSucceededStandardWebhookEvent::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::InvoiceSyncSucceededStandardWebhookEvent::Invoice::CustomerBalanceTransaction::Type::TaggedSymbol
1203
+ )
1204
+ DECREMENT =
1205
+ T.let(
1206
+ :decrement,
1207
+ Orb::Webhooks::InvoiceSyncSucceededStandardWebhookEvent::Invoice::CustomerBalanceTransaction::Type::TaggedSymbol
1208
+ )
1209
+
1210
+ sig do
1211
+ override.returns(
1212
+ T::Array[
1213
+ Orb::Webhooks::InvoiceSyncSucceededStandardWebhookEvent::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::InvoiceSyncSucceededStandardWebhookEvent::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::InvoiceSyncSucceededStandardWebhookEvent::Invoice::InvoiceSource::TaggedSymbol
1238
+ )
1239
+ PARTIAL =
1240
+ T.let(
1241
+ :partial,
1242
+ Orb::Webhooks::InvoiceSyncSucceededStandardWebhookEvent::Invoice::InvoiceSource::TaggedSymbol
1243
+ )
1244
+ ONE_OFF =
1245
+ T.let(
1246
+ :one_off,
1247
+ Orb::Webhooks::InvoiceSyncSucceededStandardWebhookEvent::Invoice::InvoiceSource::TaggedSymbol
1248
+ )
1249
+
1250
+ sig do
1251
+ override.returns(
1252
+ T::Array[
1253
+ Orb::Webhooks::InvoiceSyncSucceededStandardWebhookEvent::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::InvoiceSyncSucceededStandardWebhookEvent::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::InvoiceSyncSucceededStandardWebhookEvent::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::InvoiceSyncSucceededStandardWebhookEvent::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::InvoiceSyncSucceededStandardWebhookEvent::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::InvoiceSyncSucceededStandardWebhookEvent::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::InvoiceSyncSucceededStandardWebhookEvent::Invoice::PaymentAttempt::PaymentProvider::TaggedSymbol
1374
+ )
1375
+ ADYEN =
1376
+ T.let(
1377
+ :adyen,
1378
+ Orb::Webhooks::InvoiceSyncSucceededStandardWebhookEvent::Invoice::PaymentAttempt::PaymentProvider::TaggedSymbol
1379
+ )
1380
+
1381
+ sig do
1382
+ override.returns(
1383
+ T::Array[
1384
+ Orb::Webhooks::InvoiceSyncSucceededStandardWebhookEvent::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::InvoiceSyncSucceededStandardWebhookEvent::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::InvoiceSyncSucceededStandardWebhookEvent::Invoice::Status::TaggedSymbol
1409
+ )
1410
+ PAID =
1411
+ T.let(
1412
+ :paid,
1413
+ Orb::Webhooks::InvoiceSyncSucceededStandardWebhookEvent::Invoice::Status::TaggedSymbol
1414
+ )
1415
+ SYNCED =
1416
+ T.let(
1417
+ :synced,
1418
+ Orb::Webhooks::InvoiceSyncSucceededStandardWebhookEvent::Invoice::Status::TaggedSymbol
1419
+ )
1420
+ VOID =
1421
+ T.let(
1422
+ :void,
1423
+ Orb::Webhooks::InvoiceSyncSucceededStandardWebhookEvent::Invoice::Status::TaggedSymbol
1424
+ )
1425
+ DRAFT =
1426
+ T.let(
1427
+ :draft,
1428
+ Orb::Webhooks::InvoiceSyncSucceededStandardWebhookEvent::Invoice::Status::TaggedSymbol
1429
+ )
1430
+
1431
+ sig do
1432
+ override.returns(
1433
+ T::Array[
1434
+ Orb::Webhooks::InvoiceSyncSucceededStandardWebhookEvent::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::InvoiceSyncSucceededStandardWebhookEvent::PayloadStyle
1453
+ )
1454
+ end
1455
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
1456
+
1457
+ EXPANDED =
1458
+ T.let(
1459
+ :expanded,
1460
+ Orb::Webhooks::InvoiceSyncSucceededStandardWebhookEvent::PayloadStyle::TaggedSymbol
1461
+ )
1462
+ STANDARD =
1463
+ T.let(
1464
+ :standard,
1465
+ Orb::Webhooks::InvoiceSyncSucceededStandardWebhookEvent::PayloadStyle::TaggedSymbol
1466
+ )
1467
+
1468
+ sig do
1469
+ override.returns(
1470
+ T::Array[
1471
+ Orb::Webhooks::InvoiceSyncSucceededStandardWebhookEvent::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::InvoiceSyncSucceededStandardWebhookEvent::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 do
1495
+ params(
1496
+ payment_provider: T.nilable(String),
1497
+ payment_provider_id: T.nilable(String)
1498
+ ).returns(T.attached_class)
1499
+ end
1500
+ def self.new(payment_provider:, payment_provider_id:)
1501
+ end
1502
+
1503
+ sig do
1504
+ override.returns(
1505
+ {
1506
+ payment_provider: T.nilable(String),
1507
+ payment_provider_id: T.nilable(String)
1508
+ }
1509
+ )
1510
+ end
1511
+ def to_hash
1512
+ end
1513
+ end
1514
+
1515
+ # The event this payload describes.
1516
+ module Type
1517
+ extend Orb::Internal::Type::Enum
1518
+
1519
+ TaggedSymbol =
1520
+ T.type_alias do
1521
+ T.all(
1522
+ Symbol,
1523
+ Orb::Webhooks::InvoiceSyncSucceededStandardWebhookEvent::Type
1524
+ )
1525
+ end
1526
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
1527
+
1528
+ INVOICE_SYNC_SUCCEEDED =
1529
+ T.let(
1530
+ :"invoice.sync_succeeded",
1531
+ Orb::Webhooks::InvoiceSyncSucceededStandardWebhookEvent::Type::TaggedSymbol
1532
+ )
1533
+
1534
+ sig do
1535
+ override.returns(
1536
+ T::Array[
1537
+ Orb::Webhooks::InvoiceSyncSucceededStandardWebhookEvent::Type::TaggedSymbol
1538
+ ]
1539
+ )
1540
+ end
1541
+ def self.values
1542
+ end
1543
+ end
1544
+ end
1545
+ end
1546
+ end
1547
+ end