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,32 @@
1
+ # typed: strong
2
+
3
+ module Orb
4
+ module Models
5
+ module Webhooks
6
+ class StandardUnwrapStandardParams < Orb::Internal::Type::BaseModel
7
+ extend Orb::Internal::Type::RequestParameters::Converter
8
+ include Orb::Internal::Type::RequestParameters
9
+
10
+ OrHash =
11
+ T.type_alias do
12
+ T.any(
13
+ Orb::Webhooks::StandardUnwrapStandardParams,
14
+ Orb::Internal::AnyHash
15
+ )
16
+ end
17
+
18
+ sig do
19
+ params(request_options: Orb::RequestOptions::OrHash).returns(
20
+ T.attached_class
21
+ )
22
+ end
23
+ def self.new(request_options: {})
24
+ end
25
+
26
+ sig { override.returns({ request_options: Orb::RequestOptions }) }
27
+ def to_hash
28
+ end
29
+ end
30
+ end
31
+ end
32
+ end
@@ -0,0 +1,609 @@
1
+ # typed: strong
2
+
3
+ module Orb
4
+ module Models
5
+ module Webhooks
6
+ class SubscriptionAccountingSyncFailedStandardWebhookEvent < Orb::Internal::Type::BaseModel
7
+ OrHash =
8
+ T.type_alias do
9
+ T.any(
10
+ Orb::Webhooks::SubscriptionAccountingSyncFailedStandardWebhookEvent,
11
+ Orb::Internal::AnyHash
12
+ )
13
+ end
14
+
15
+ # The ID of this webhook event.
16
+ sig { returns(String) }
17
+ attr_accessor :id
18
+
19
+ sig do
20
+ returns(
21
+ Orb::Webhooks::SubscriptionAccountingSyncFailedStandardWebhookEvent::AccountingSyncRecord
22
+ )
23
+ end
24
+ attr_reader :accounting_sync_record
25
+
26
+ sig do
27
+ params(
28
+ accounting_sync_record:
29
+ Orb::Webhooks::SubscriptionAccountingSyncFailedStandardWebhookEvent::AccountingSyncRecord::OrHash
30
+ ).void
31
+ end
32
+ attr_writer :accounting_sync_record
33
+
34
+ # The time at which this event was created, to the second.
35
+ sig { returns(Time) }
36
+ attr_accessor :created_at
37
+
38
+ # The serialization style this payload was rendered in, as configured on the
39
+ # endpoint.
40
+ sig do
41
+ returns(
42
+ Orb::Webhooks::SubscriptionAccountingSyncFailedStandardWebhookEvent::PayloadStyle::TaggedSymbol
43
+ )
44
+ end
45
+ attr_accessor :payload_style
46
+
47
+ sig do
48
+ returns(
49
+ Orb::Webhooks::SubscriptionAccountingSyncFailedStandardWebhookEvent::Properties
50
+ )
51
+ end
52
+ attr_reader :properties
53
+
54
+ sig do
55
+ params(
56
+ properties:
57
+ Orb::Webhooks::SubscriptionAccountingSyncFailedStandardWebhookEvent::Properties::OrHash
58
+ ).void
59
+ end
60
+ attr_writer :properties
61
+
62
+ # The subscription in a standard webhook payload: its own fields, with its plan
63
+ # and customer as references. Fetch the subscription for its price intervals,
64
+ # billing periods, plan phases and other derived fields.
65
+ sig do
66
+ returns(
67
+ Orb::Webhooks::SubscriptionAccountingSyncFailedStandardWebhookEvent::Subscription
68
+ )
69
+ end
70
+ attr_reader :subscription
71
+
72
+ sig do
73
+ params(
74
+ subscription:
75
+ Orb::Webhooks::SubscriptionAccountingSyncFailedStandardWebhookEvent::Subscription::OrHash
76
+ ).void
77
+ end
78
+ attr_writer :subscription
79
+
80
+ # The event this payload describes.
81
+ sig do
82
+ returns(
83
+ Orb::Webhooks::SubscriptionAccountingSyncFailedStandardWebhookEvent::Type::TaggedSymbol
84
+ )
85
+ end
86
+ attr_accessor :type
87
+
88
+ # Issued when a subscription accounting sync fails.
89
+ sig do
90
+ params(
91
+ id: String,
92
+ accounting_sync_record:
93
+ Orb::Webhooks::SubscriptionAccountingSyncFailedStandardWebhookEvent::AccountingSyncRecord::OrHash,
94
+ created_at: Time,
95
+ payload_style:
96
+ Orb::Webhooks::SubscriptionAccountingSyncFailedStandardWebhookEvent::PayloadStyle::OrSymbol,
97
+ properties:
98
+ Orb::Webhooks::SubscriptionAccountingSyncFailedStandardWebhookEvent::Properties::OrHash,
99
+ subscription:
100
+ Orb::Webhooks::SubscriptionAccountingSyncFailedStandardWebhookEvent::Subscription::OrHash,
101
+ type:
102
+ Orb::Webhooks::SubscriptionAccountingSyncFailedStandardWebhookEvent::Type::OrSymbol
103
+ ).returns(T.attached_class)
104
+ end
105
+ def self.new(
106
+ # The ID of this webhook event.
107
+ id:,
108
+ accounting_sync_record:,
109
+ # The time at which this event was created, to the second.
110
+ created_at:,
111
+ # The serialization style this payload was rendered in, as configured on the
112
+ # endpoint.
113
+ payload_style:,
114
+ properties:,
115
+ # The subscription in a standard webhook payload: its own fields, with its plan
116
+ # and customer as references. Fetch the subscription for its price intervals,
117
+ # billing periods, plan phases and other derived fields.
118
+ subscription:,
119
+ # The event this payload describes.
120
+ type:
121
+ )
122
+ end
123
+
124
+ sig do
125
+ override.returns(
126
+ {
127
+ id: String,
128
+ accounting_sync_record:
129
+ Orb::Webhooks::SubscriptionAccountingSyncFailedStandardWebhookEvent::AccountingSyncRecord,
130
+ created_at: Time,
131
+ payload_style:
132
+ Orb::Webhooks::SubscriptionAccountingSyncFailedStandardWebhookEvent::PayloadStyle::TaggedSymbol,
133
+ properties:
134
+ Orb::Webhooks::SubscriptionAccountingSyncFailedStandardWebhookEvent::Properties,
135
+ subscription:
136
+ Orb::Webhooks::SubscriptionAccountingSyncFailedStandardWebhookEvent::Subscription,
137
+ type:
138
+ Orb::Webhooks::SubscriptionAccountingSyncFailedStandardWebhookEvent::Type::TaggedSymbol
139
+ }
140
+ )
141
+ end
142
+ def to_hash
143
+ end
144
+
145
+ class AccountingSyncRecord < Orb::Internal::Type::BaseModel
146
+ OrHash =
147
+ T.type_alias do
148
+ T.any(
149
+ Orb::Webhooks::SubscriptionAccountingSyncFailedStandardWebhookEvent::AccountingSyncRecord,
150
+ Orb::Internal::AnyHash
151
+ )
152
+ end
153
+
154
+ sig { returns(String) }
155
+ attr_accessor :id
156
+
157
+ sig { returns(String) }
158
+ attr_accessor :customer_id
159
+
160
+ sig do
161
+ returns(
162
+ Orb::Webhooks::SubscriptionAccountingSyncFailedStandardWebhookEvent::AccountingSyncRecord::RecordType::TaggedSymbol
163
+ )
164
+ end
165
+ attr_accessor :record_type
166
+
167
+ sig { returns(T.nilable(T::Hash[Symbol, T.anything])) }
168
+ attr_accessor :error_details
169
+
170
+ sig { returns(T.nilable(String)) }
171
+ attr_accessor :provider_customer_id
172
+
173
+ sig { returns(T.nilable(String)) }
174
+ attr_accessor :status
175
+
176
+ sig { returns(T.nilable(String)) }
177
+ attr_accessor :subscription_id
178
+
179
+ sig { returns(T.nilable(String)) }
180
+ attr_accessor :sync_action
181
+
182
+ sig do
183
+ params(
184
+ id: String,
185
+ customer_id: String,
186
+ record_type:
187
+ Orb::Webhooks::SubscriptionAccountingSyncFailedStandardWebhookEvent::AccountingSyncRecord::RecordType::OrSymbol,
188
+ error_details: T.nilable(T::Hash[Symbol, T.anything]),
189
+ provider_customer_id: T.nilable(String),
190
+ status: T.nilable(String),
191
+ subscription_id: T.nilable(String),
192
+ sync_action: T.nilable(String)
193
+ ).returns(T.attached_class)
194
+ end
195
+ def self.new(
196
+ id:,
197
+ customer_id:,
198
+ record_type:,
199
+ error_details: nil,
200
+ provider_customer_id: nil,
201
+ status: nil,
202
+ subscription_id: nil,
203
+ sync_action: nil
204
+ )
205
+ end
206
+
207
+ sig do
208
+ override.returns(
209
+ {
210
+ id: String,
211
+ customer_id: String,
212
+ record_type:
213
+ Orb::Webhooks::SubscriptionAccountingSyncFailedStandardWebhookEvent::AccountingSyncRecord::RecordType::TaggedSymbol,
214
+ error_details: T.nilable(T::Hash[Symbol, T.anything]),
215
+ provider_customer_id: T.nilable(String),
216
+ status: T.nilable(String),
217
+ subscription_id: T.nilable(String),
218
+ sync_action: T.nilable(String)
219
+ }
220
+ )
221
+ end
222
+ def to_hash
223
+ end
224
+
225
+ module RecordType
226
+ extend Orb::Internal::Type::Enum
227
+
228
+ TaggedSymbol =
229
+ T.type_alias do
230
+ T.all(
231
+ Symbol,
232
+ Orb::Webhooks::SubscriptionAccountingSyncFailedStandardWebhookEvent::AccountingSyncRecord::RecordType
233
+ )
234
+ end
235
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
236
+
237
+ CUSTOMER =
238
+ T.let(
239
+ :customer,
240
+ Orb::Webhooks::SubscriptionAccountingSyncFailedStandardWebhookEvent::AccountingSyncRecord::RecordType::TaggedSymbol
241
+ )
242
+ INVOICE =
243
+ T.let(
244
+ :invoice,
245
+ Orb::Webhooks::SubscriptionAccountingSyncFailedStandardWebhookEvent::AccountingSyncRecord::RecordType::TaggedSymbol
246
+ )
247
+ TRANSACTION =
248
+ T.let(
249
+ :transaction,
250
+ Orb::Webhooks::SubscriptionAccountingSyncFailedStandardWebhookEvent::AccountingSyncRecord::RecordType::TaggedSymbol
251
+ )
252
+ CUSTOMER_BALANCE_TRANSACTION =
253
+ T.let(
254
+ :customer_balance_transaction,
255
+ Orb::Webhooks::SubscriptionAccountingSyncFailedStandardWebhookEvent::AccountingSyncRecord::RecordType::TaggedSymbol
256
+ )
257
+ CREDIT_NOTE =
258
+ T.let(
259
+ :credit_note,
260
+ Orb::Webhooks::SubscriptionAccountingSyncFailedStandardWebhookEvent::AccountingSyncRecord::RecordType::TaggedSymbol
261
+ )
262
+ SUBSCRIPTION =
263
+ T.let(
264
+ :subscription,
265
+ Orb::Webhooks::SubscriptionAccountingSyncFailedStandardWebhookEvent::AccountingSyncRecord::RecordType::TaggedSymbol
266
+ )
267
+ SALES_ORDER =
268
+ T.let(
269
+ :sales_order,
270
+ Orb::Webhooks::SubscriptionAccountingSyncFailedStandardWebhookEvent::AccountingSyncRecord::RecordType::TaggedSymbol
271
+ )
272
+ BLOCK =
273
+ T.let(
274
+ :block,
275
+ Orb::Webhooks::SubscriptionAccountingSyncFailedStandardWebhookEvent::AccountingSyncRecord::RecordType::TaggedSymbol
276
+ )
277
+
278
+ sig do
279
+ override.returns(
280
+ T::Array[
281
+ Orb::Webhooks::SubscriptionAccountingSyncFailedStandardWebhookEvent::AccountingSyncRecord::RecordType::TaggedSymbol
282
+ ]
283
+ )
284
+ end
285
+ def self.values
286
+ end
287
+ end
288
+ end
289
+
290
+ # The serialization style this payload was rendered in, as configured on the
291
+ # endpoint.
292
+ module PayloadStyle
293
+ extend Orb::Internal::Type::Enum
294
+
295
+ TaggedSymbol =
296
+ T.type_alias do
297
+ T.all(
298
+ Symbol,
299
+ Orb::Webhooks::SubscriptionAccountingSyncFailedStandardWebhookEvent::PayloadStyle
300
+ )
301
+ end
302
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
303
+
304
+ EXPANDED =
305
+ T.let(
306
+ :expanded,
307
+ Orb::Webhooks::SubscriptionAccountingSyncFailedStandardWebhookEvent::PayloadStyle::TaggedSymbol
308
+ )
309
+ STANDARD =
310
+ T.let(
311
+ :standard,
312
+ Orb::Webhooks::SubscriptionAccountingSyncFailedStandardWebhookEvent::PayloadStyle::TaggedSymbol
313
+ )
314
+
315
+ sig do
316
+ override.returns(
317
+ T::Array[
318
+ Orb::Webhooks::SubscriptionAccountingSyncFailedStandardWebhookEvent::PayloadStyle::TaggedSymbol
319
+ ]
320
+ )
321
+ end
322
+ def self.values
323
+ end
324
+ end
325
+
326
+ class Properties < Orb::Internal::Type::BaseModel
327
+ OrHash =
328
+ T.type_alias do
329
+ T.any(
330
+ Orb::Webhooks::SubscriptionAccountingSyncFailedStandardWebhookEvent::Properties,
331
+ Orb::Internal::AnyHash
332
+ )
333
+ end
334
+
335
+ sig { returns(String) }
336
+ attr_accessor :connection_type
337
+
338
+ sig { returns(String) }
339
+ attr_accessor :failure_reason
340
+
341
+ sig do
342
+ params(connection_type: String, failure_reason: String).returns(
343
+ T.attached_class
344
+ )
345
+ end
346
+ def self.new(connection_type:, failure_reason:)
347
+ end
348
+
349
+ sig do
350
+ override.returns(
351
+ { connection_type: String, failure_reason: String }
352
+ )
353
+ end
354
+ def to_hash
355
+ end
356
+ end
357
+
358
+ class Subscription < Orb::Internal::Type::BaseModel
359
+ OrHash =
360
+ T.type_alias do
361
+ T.any(
362
+ Orb::Webhooks::SubscriptionAccountingSyncFailedStandardWebhookEvent::Subscription,
363
+ Orb::Internal::AnyHash
364
+ )
365
+ end
366
+
367
+ sig { returns(String) }
368
+ attr_accessor :id
369
+
370
+ sig { returns(Time) }
371
+ attr_accessor :created_at
372
+
373
+ sig { returns(Orb::CustomerMinified) }
374
+ attr_reader :customer
375
+
376
+ sig { params(customer: Orb::CustomerMinified::OrHash).void }
377
+ attr_writer :customer
378
+
379
+ # The date Orb stops billing for this subscription.
380
+ sig { returns(T.nilable(Time)) }
381
+ attr_accessor :end_date
382
+
383
+ # User specified key-value pairs for the resource. If not present, this defaults
384
+ # to an empty dictionary. Individual keys can be removed by setting the value to
385
+ # `null`, and the entire metadata mapping can be cleared by setting `metadata` to
386
+ # `null`.
387
+ sig { returns(T::Hash[Symbol, String]) }
388
+ attr_accessor :metadata
389
+
390
+ # The name of the subscription.
391
+ sig { returns(String) }
392
+ attr_accessor :name
393
+
394
+ sig do
395
+ returns(
396
+ T.nilable(
397
+ Orb::Webhooks::SubscriptionAccountingSyncFailedStandardWebhookEvent::Subscription::Plan
398
+ )
399
+ )
400
+ end
401
+ attr_reader :plan
402
+
403
+ sig do
404
+ params(
405
+ plan:
406
+ T.nilable(
407
+ Orb::Webhooks::SubscriptionAccountingSyncFailedStandardWebhookEvent::Subscription::Plan::OrHash
408
+ )
409
+ ).void
410
+ end
411
+ attr_writer :plan
412
+
413
+ # The date Orb starts billing for this subscription.
414
+ sig { returns(Time) }
415
+ attr_accessor :start_date
416
+
417
+ sig do
418
+ returns(
419
+ Orb::Webhooks::SubscriptionAccountingSyncFailedStandardWebhookEvent::Subscription::Status::TaggedSymbol
420
+ )
421
+ end
422
+ attr_accessor :status
423
+
424
+ # The subscription in a standard webhook payload: its own fields, with its plan
425
+ # and customer as references. Fetch the subscription for its price intervals,
426
+ # billing periods, plan phases and other derived fields.
427
+ sig do
428
+ params(
429
+ id: String,
430
+ created_at: Time,
431
+ customer: Orb::CustomerMinified::OrHash,
432
+ end_date: T.nilable(Time),
433
+ metadata: T::Hash[Symbol, String],
434
+ name: String,
435
+ plan:
436
+ T.nilable(
437
+ Orb::Webhooks::SubscriptionAccountingSyncFailedStandardWebhookEvent::Subscription::Plan::OrHash
438
+ ),
439
+ start_date: Time,
440
+ status:
441
+ Orb::Webhooks::SubscriptionAccountingSyncFailedStandardWebhookEvent::Subscription::Status::OrSymbol
442
+ ).returns(T.attached_class)
443
+ end
444
+ def self.new(
445
+ id:,
446
+ created_at:,
447
+ customer:,
448
+ # The date Orb stops billing for this subscription.
449
+ end_date:,
450
+ # User specified key-value pairs for the resource. If not present, this defaults
451
+ # to an empty dictionary. Individual keys can be removed by setting the value to
452
+ # `null`, and the entire metadata mapping can be cleared by setting `metadata` to
453
+ # `null`.
454
+ metadata:,
455
+ # The name of the subscription.
456
+ name:,
457
+ plan:,
458
+ # The date Orb starts billing for this subscription.
459
+ start_date:,
460
+ status:
461
+ )
462
+ end
463
+
464
+ sig do
465
+ override.returns(
466
+ {
467
+ id: String,
468
+ created_at: Time,
469
+ customer: Orb::CustomerMinified,
470
+ end_date: T.nilable(Time),
471
+ metadata: T::Hash[Symbol, String],
472
+ name: String,
473
+ plan:
474
+ T.nilable(
475
+ Orb::Webhooks::SubscriptionAccountingSyncFailedStandardWebhookEvent::Subscription::Plan
476
+ ),
477
+ start_date: Time,
478
+ status:
479
+ Orb::Webhooks::SubscriptionAccountingSyncFailedStandardWebhookEvent::Subscription::Status::TaggedSymbol
480
+ }
481
+ )
482
+ end
483
+ def to_hash
484
+ end
485
+
486
+ class Plan < Orb::Internal::Type::BaseModel
487
+ OrHash =
488
+ T.type_alias do
489
+ T.any(
490
+ Orb::Webhooks::SubscriptionAccountingSyncFailedStandardWebhookEvent::Subscription::Plan,
491
+ Orb::Internal::AnyHash
492
+ )
493
+ end
494
+
495
+ sig { returns(T.nilable(String)) }
496
+ attr_accessor :id
497
+
498
+ # An optional user-defined ID for this plan resource, used throughout the system
499
+ # as an alias for this Plan. Use this field to identify a plan by an existing
500
+ # identifier in your system.
501
+ sig { returns(T.nilable(String)) }
502
+ attr_accessor :external_plan_id
503
+
504
+ sig { returns(T.nilable(String)) }
505
+ attr_accessor :name
506
+
507
+ sig do
508
+ params(
509
+ id: T.nilable(String),
510
+ external_plan_id: T.nilable(String),
511
+ name: T.nilable(String)
512
+ ).returns(T.attached_class)
513
+ end
514
+ def self.new(
515
+ id:,
516
+ # An optional user-defined ID for this plan resource, used throughout the system
517
+ # as an alias for this Plan. Use this field to identify a plan by an existing
518
+ # identifier in your system.
519
+ external_plan_id:,
520
+ name:
521
+ )
522
+ end
523
+
524
+ sig do
525
+ override.returns(
526
+ {
527
+ id: T.nilable(String),
528
+ external_plan_id: T.nilable(String),
529
+ name: T.nilable(String)
530
+ }
531
+ )
532
+ end
533
+ def to_hash
534
+ end
535
+ end
536
+
537
+ module Status
538
+ extend Orb::Internal::Type::Enum
539
+
540
+ TaggedSymbol =
541
+ T.type_alias do
542
+ T.all(
543
+ Symbol,
544
+ Orb::Webhooks::SubscriptionAccountingSyncFailedStandardWebhookEvent::Subscription::Status
545
+ )
546
+ end
547
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
548
+
549
+ ACTIVE =
550
+ T.let(
551
+ :active,
552
+ Orb::Webhooks::SubscriptionAccountingSyncFailedStandardWebhookEvent::Subscription::Status::TaggedSymbol
553
+ )
554
+ ENDED =
555
+ T.let(
556
+ :ended,
557
+ Orb::Webhooks::SubscriptionAccountingSyncFailedStandardWebhookEvent::Subscription::Status::TaggedSymbol
558
+ )
559
+ UPCOMING =
560
+ T.let(
561
+ :upcoming,
562
+ Orb::Webhooks::SubscriptionAccountingSyncFailedStandardWebhookEvent::Subscription::Status::TaggedSymbol
563
+ )
564
+
565
+ sig do
566
+ override.returns(
567
+ T::Array[
568
+ Orb::Webhooks::SubscriptionAccountingSyncFailedStandardWebhookEvent::Subscription::Status::TaggedSymbol
569
+ ]
570
+ )
571
+ end
572
+ def self.values
573
+ end
574
+ end
575
+ end
576
+
577
+ # The event this payload describes.
578
+ module Type
579
+ extend Orb::Internal::Type::Enum
580
+
581
+ TaggedSymbol =
582
+ T.type_alias do
583
+ T.all(
584
+ Symbol,
585
+ Orb::Webhooks::SubscriptionAccountingSyncFailedStandardWebhookEvent::Type
586
+ )
587
+ end
588
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
589
+
590
+ SUBSCRIPTION_ACCOUNTING_SYNC_FAILED =
591
+ T.let(
592
+ :"subscription.accounting_sync_failed",
593
+ Orb::Webhooks::SubscriptionAccountingSyncFailedStandardWebhookEvent::Type::TaggedSymbol
594
+ )
595
+
596
+ sig do
597
+ override.returns(
598
+ T::Array[
599
+ Orb::Webhooks::SubscriptionAccountingSyncFailedStandardWebhookEvent::Type::TaggedSymbol
600
+ ]
601
+ )
602
+ end
603
+ def self.values
604
+ end
605
+ end
606
+ end
607
+ end
608
+ end
609
+ end