orb-billing 1.34.0 → 1.36.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 (260) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +25 -0
  3. data/README.md +1 -1
  4. data/lib/orb/client.rb +4 -0
  5. data/lib/orb/models/backfill_reflected_webhook_event.rb +180 -0
  6. data/lib/orb/models/backfill_reverted_webhook_event.rb +180 -0
  7. data/lib/orb/models/billable_metric_edited_webhook_event.rb +104 -0
  8. data/lib/orb/models/credit_block_accounting_sync_failed_webhook_event.rb +499 -0
  9. data/lib/orb/models/credit_block_accounting_sync_succeeded_webhook_event.rb +494 -0
  10. data/lib/orb/models/credit_note_accounting_sync_failed_webhook_event.rb +161 -0
  11. data/lib/orb/models/credit_note_accounting_sync_succeeded_webhook_event.rb +155 -0
  12. data/lib/orb/models/credit_note_issued_webhook_event.rb +65 -0
  13. data/lib/orb/models/credit_note_marked_as_void_webhook_event.rb +65 -0
  14. data/lib/orb/models/customer_accounting_sync_failed_webhook_event.rb +171 -0
  15. data/lib/orb/models/customer_accounting_sync_succeeded_webhook_event.rb +165 -0
  16. data/lib/orb/models/customer_balance_transaction_created_webhook_event.rb +212 -0
  17. data/lib/orb/models/customer_created_webhook_event.rb +81 -0
  18. data/lib/orb/models/customer_credit_balance_depleted_webhook_event.rb +560 -0
  19. data/lib/orb/models/customer_credit_balance_dropped_webhook_event.rb +566 -0
  20. data/lib/orb/models/customer_credit_balance_recovered_webhook_event.rb +560 -0
  21. data/lib/orb/models/customer_credit_ledger_incremented_webhook_event.rb +474 -0
  22. data/lib/orb/models/customer_edited_webhook_event.rb +344 -0
  23. data/lib/orb/models/data_exports_transfer_error_webhook_event.rb +100 -0
  24. data/lib/orb/models/data_exports_transfer_success_webhook_event.rb +94 -0
  25. data/lib/orb/models/event_unmatched_event_webhook_event.rb +105 -0
  26. data/lib/orb/models/ingestion_unmatched_customer_ids_webhook_event.rb +64 -0
  27. data/lib/orb/models/invoice_accounting_sync_failed_webhook_event.rb +164 -0
  28. data/lib/orb/models/invoice_accounting_sync_succeeded_webhook_event.rb +158 -0
  29. data/lib/orb/models/invoice_automation_schedule_step_executed_webhook_event.rb +338 -0
  30. data/lib/orb/models/invoice_cost_data_exported_webhook_event.rb +83 -0
  31. data/lib/orb/models/invoice_due_date_recalculation_canceled_webhook_event.rb +70 -0
  32. data/lib/orb/models/invoice_due_date_recalculation_completed_webhook_event.rb +70 -0
  33. data/lib/orb/models/invoice_due_date_recalculation_started_webhook_event.rb +64 -0
  34. data/lib/orb/models/invoice_dunning_schedule_created_webhook_event.rb +186 -0
  35. data/lib/orb/models/invoice_dunning_schedule_ended_webhook_event.rb +180 -0
  36. data/lib/orb/models/invoice_dunning_schedule_reset_webhook_event.rb +184 -0
  37. data/lib/orb/models/invoice_dunning_schedule_step_executed_webhook_event.rb +133 -0
  38. data/lib/orb/models/invoice_edited_webhook_event.rb +550 -0
  39. data/lib/orb/models/invoice_invoice_date_elapsed_webhook_event.rb +120 -0
  40. data/lib/orb/models/invoice_issue_failed_webhook_event.rb +79 -0
  41. data/lib/orb/models/invoice_issued_summary_webhook_event.rb +841 -0
  42. data/lib/orb/models/invoice_issued_webhook_event.rb +79 -0
  43. data/lib/orb/models/invoice_manually_marked_as_paid_webhook_event.rb +91 -0
  44. data/lib/orb/models/invoice_manually_marked_as_void_webhook_event.rb +68 -0
  45. data/lib/orb/models/invoice_payment_failed_webhook_event.rb +92 -0
  46. data/lib/orb/models/invoice_payment_processing_webhook_event.rb +85 -0
  47. data/lib/orb/models/invoice_payment_succeeded_webhook_event.rb +101 -0
  48. data/lib/orb/models/invoice_sync_failed_webhook_event.rb +85 -0
  49. data/lib/orb/models/invoice_sync_succeeded_webhook_event.rb +85 -0
  50. data/lib/orb/models/invoice_undo_mark_as_paid_webhook_event.rb +68 -0
  51. data/lib/orb/models/metric_events_dropped_by_watermark_webhook_event.rb +98 -0
  52. data/lib/orb/models/payment_method_created_webhook_event.rb +156 -0
  53. data/lib/orb/models/payment_method_deleted_webhook_event.rb +156 -0
  54. data/lib/orb/models/plan_default_version_set_webhook_event.rb +108 -0
  55. data/lib/orb/models/plan_version_created_webhook_event.rb +108 -0
  56. data/lib/orb/models/price_edited_webhook_event.rb +105 -0
  57. data/lib/orb/models/resource_event_test_webhook_event.rb +64 -0
  58. data/lib/orb/models/sales_order_accounting_sync_failed_webhook_event.rb +164 -0
  59. data/lib/orb/models/sales_order_accounting_sync_succeeded_webhook_event.rb +158 -0
  60. data/lib/orb/models/subscription_accounting_sync_failed_webhook_event.rb +178 -0
  61. data/lib/orb/models/subscription_accounting_sync_succeeded_webhook_event.rb +172 -0
  62. data/lib/orb/models/subscription_alert_disabled_webhook_event.rb +624 -0
  63. data/lib/orb/models/subscription_cancellation_scheduled_webhook_event.rb +93 -0
  64. data/lib/orb/models/subscription_cancellation_unscheduled_webhook_event.rb +93 -0
  65. data/lib/orb/models/subscription_cost_exceeded_webhook_event.rb +540 -0
  66. data/lib/orb/models/subscription_created_webhook_event.rb +82 -0
  67. data/lib/orb/models/subscription_edited_webhook_event.rb +134 -0
  68. data/lib/orb/models/subscription_ended_webhook_event.rb +82 -0
  69. data/lib/orb/models/subscription_fixed_fee_quantity_updated_webhook_event.rb +111 -0
  70. data/lib/orb/models/subscription_grouped_cost_exceeded_webhook_event.rb +655 -0
  71. data/lib/orb/models/subscription_invoicing_threshold_exceeded_webhook_event.rb +191 -0
  72. data/lib/orb/models/subscription_license_allocation_reset_webhook_event.rb +214 -0
  73. data/lib/orb/models/subscription_license_balance_threshold_reached_webhook_event.rb +652 -0
  74. data/lib/orb/models/subscription_plan_change_scheduled_webhook_event.rb +105 -0
  75. data/lib/orb/models/subscription_plan_changed_webhook_event.rb +93 -0
  76. data/lib/orb/models/subscription_plan_version_change_scheduled_webhook_event.rb +106 -0
  77. data/lib/orb/models/subscription_plan_version_changed_webhook_event.rb +105 -0
  78. data/lib/orb/models/subscription_spend_exceeded_webhook_event.rb +541 -0
  79. data/lib/orb/models/subscription_started_webhook_event.rb +82 -0
  80. data/lib/orb/models/subscription_trial_ended_webhook_event.rb +82 -0
  81. data/lib/orb/models/subscription_usage_exceeded_webhook_event.rb +548 -0
  82. data/lib/orb/models/transaction_accounting_sync_failed_webhook_event.rb +236 -0
  83. data/lib/orb/models/transaction_accounting_sync_succeeded_webhook_event.rb +232 -0
  84. data/lib/orb/models/unwrap_webhook_event.rb +250 -0
  85. data/lib/orb/models/webhook_unwrap_params.rb +14 -0
  86. data/lib/orb/models.rb +180 -0
  87. data/lib/orb/resources/subscriptions.rb +13 -0
  88. data/lib/orb/resources/webhooks.rb +22 -0
  89. data/lib/orb/version.rb +1 -1
  90. data/lib/orb.rb +82 -0
  91. data/rbi/orb/client.rbi +3 -0
  92. data/rbi/orb/models/backfill_reflected_webhook_event.rbi +274 -0
  93. data/rbi/orb/models/backfill_reverted_webhook_event.rbi +271 -0
  94. data/rbi/orb/models/billable_metric_edited_webhook_event.rbi +198 -0
  95. data/rbi/orb/models/credit_block_accounting_sync_failed_webhook_event.rbi +1039 -0
  96. data/rbi/orb/models/credit_block_accounting_sync_succeeded_webhook_event.rbi +1034 -0
  97. data/rbi/orb/models/credit_note_accounting_sync_failed_webhook_event.rbi +315 -0
  98. data/rbi/orb/models/credit_note_accounting_sync_succeeded_webhook_event.rbi +310 -0
  99. data/rbi/orb/models/credit_note_issued_webhook_event.rbi +98 -0
  100. data/rbi/orb/models/credit_note_marked_as_void_webhook_event.rbi +102 -0
  101. data/rbi/orb/models/customer_accounting_sync_failed_webhook_event.rbi +339 -0
  102. data/rbi/orb/models/customer_accounting_sync_succeeded_webhook_event.rbi +335 -0
  103. data/rbi/orb/models/customer_balance_transaction_created_webhook_event.rbi +437 -0
  104. data/rbi/orb/models/customer_created_webhook_event.rbi +128 -0
  105. data/rbi/orb/models/customer_credit_balance_depleted_webhook_event.rbi +1091 -0
  106. data/rbi/orb/models/customer_credit_balance_dropped_webhook_event.rbi +1096 -0
  107. data/rbi/orb/models/customer_credit_balance_recovered_webhook_event.rbi +1091 -0
  108. data/rbi/orb/models/customer_credit_ledger_incremented_webhook_event.rbi +987 -0
  109. data/rbi/orb/models/customer_edited_webhook_event.rbi +599 -0
  110. data/rbi/orb/models/data_exports_transfer_error_webhook_event.rbi +170 -0
  111. data/rbi/orb/models/data_exports_transfer_success_webhook_event.rbi +165 -0
  112. data/rbi/orb/models/event_unmatched_event_webhook_event.rbi +193 -0
  113. data/rbi/orb/models/ingestion_unmatched_customer_ids_webhook_event.rbi +132 -0
  114. data/rbi/orb/models/invoice_accounting_sync_failed_webhook_event.rbi +319 -0
  115. data/rbi/orb/models/invoice_accounting_sync_succeeded_webhook_event.rbi +312 -0
  116. data/rbi/orb/models/invoice_automation_schedule_step_executed_webhook_event.rbi +614 -0
  117. data/rbi/orb/models/invoice_cost_data_exported_webhook_event.rbi +144 -0
  118. data/rbi/orb/models/invoice_due_date_recalculation_canceled_webhook_event.rbi +139 -0
  119. data/rbi/orb/models/invoice_due_date_recalculation_completed_webhook_event.rbi +139 -0
  120. data/rbi/orb/models/invoice_due_date_recalculation_started_webhook_event.rbi +132 -0
  121. data/rbi/orb/models/invoice_dunning_schedule_created_webhook_event.rbi +331 -0
  122. data/rbi/orb/models/invoice_dunning_schedule_ended_webhook_event.rbi +324 -0
  123. data/rbi/orb/models/invoice_dunning_schedule_reset_webhook_event.rbi +329 -0
  124. data/rbi/orb/models/invoice_dunning_schedule_step_executed_webhook_event.rbi +250 -0
  125. data/rbi/orb/models/invoice_edited_webhook_event.rbi +942 -0
  126. data/rbi/orb/models/invoice_invoice_date_elapsed_webhook_event.rbi +251 -0
  127. data/rbi/orb/models/invoice_issue_failed_webhook_event.rbi +132 -0
  128. data/rbi/orb/models/invoice_issued_summary_webhook_event.rbi +1432 -0
  129. data/rbi/orb/models/invoice_issued_webhook_event.rbi +134 -0
  130. data/rbi/orb/models/invoice_manually_marked_as_paid_webhook_event.rbi +165 -0
  131. data/rbi/orb/models/invoice_manually_marked_as_void_webhook_event.rbi +114 -0
  132. data/rbi/orb/models/invoice_payment_failed_webhook_event.rbi +157 -0
  133. data/rbi/orb/models/invoice_payment_processing_webhook_event.rbi +156 -0
  134. data/rbi/orb/models/invoice_payment_succeeded_webhook_event.rbi +175 -0
  135. data/rbi/orb/models/invoice_sync_failed_webhook_event.rbi +147 -0
  136. data/rbi/orb/models/invoice_sync_succeeded_webhook_event.rbi +147 -0
  137. data/rbi/orb/models/invoice_undo_mark_as_paid_webhook_event.rbi +106 -0
  138. data/rbi/orb/models/metric_events_dropped_by_watermark_webhook_event.rbi +167 -0
  139. data/rbi/orb/models/payment_method_created_webhook_event.rbi +259 -0
  140. data/rbi/orb/models/payment_method_deleted_webhook_event.rbi +259 -0
  141. data/rbi/orb/models/plan_default_version_set_webhook_event.rbi +196 -0
  142. data/rbi/orb/models/plan_version_created_webhook_event.rbi +190 -0
  143. data/rbi/orb/models/price_edited_webhook_event.rbi +235 -0
  144. data/rbi/orb/models/resource_event_test_webhook_event.rbi +116 -0
  145. data/rbi/orb/models/sales_order_accounting_sync_failed_webhook_event.rbi +321 -0
  146. data/rbi/orb/models/sales_order_accounting_sync_succeeded_webhook_event.rbi +316 -0
  147. data/rbi/orb/models/subscription_accounting_sync_failed_webhook_event.rbi +353 -0
  148. data/rbi/orb/models/subscription_accounting_sync_succeeded_webhook_event.rbi +346 -0
  149. data/rbi/orb/models/subscription_alert_disabled_webhook_event.rbi +1232 -0
  150. data/rbi/orb/models/subscription_cancellation_scheduled_webhook_event.rbi +179 -0
  151. data/rbi/orb/models/subscription_cancellation_unscheduled_webhook_event.rbi +183 -0
  152. data/rbi/orb/models/subscription_cost_exceeded_webhook_event.rbi +1034 -0
  153. data/rbi/orb/models/subscription_created_webhook_event.rbi +132 -0
  154. data/rbi/orb/models/subscription_edited_webhook_event.rbi +247 -0
  155. data/rbi/orb/models/subscription_ended_webhook_event.rbi +132 -0
  156. data/rbi/orb/models/subscription_fixed_fee_quantity_updated_webhook_event.rbi +206 -0
  157. data/rbi/orb/models/subscription_grouped_cost_exceeded_webhook_event.rbi +1262 -0
  158. data/rbi/orb/models/subscription_invoicing_threshold_exceeded_webhook_event.rbi +374 -0
  159. data/rbi/orb/models/subscription_license_allocation_reset_webhook_event.rbi +421 -0
  160. data/rbi/orb/models/subscription_license_balance_threshold_reached_webhook_event.rbi +1265 -0
  161. data/rbi/orb/models/subscription_plan_change_scheduled_webhook_event.rbi +198 -0
  162. data/rbi/orb/models/subscription_plan_changed_webhook_event.rbi +169 -0
  163. data/rbi/orb/models/subscription_plan_version_change_scheduled_webhook_event.rbi +205 -0
  164. data/rbi/orb/models/subscription_plan_version_changed_webhook_event.rbi +199 -0
  165. data/rbi/orb/models/subscription_spend_exceeded_webhook_event.rbi +1035 -0
  166. data/rbi/orb/models/subscription_started_webhook_event.rbi +132 -0
  167. data/rbi/orb/models/subscription_trial_ended_webhook_event.rbi +136 -0
  168. data/rbi/orb/models/subscription_usage_exceeded_webhook_event.rbi +1041 -0
  169. data/rbi/orb/models/transaction_accounting_sync_failed_webhook_event.rbi +455 -0
  170. data/rbi/orb/models/transaction_accounting_sync_succeeded_webhook_event.rbi +449 -0
  171. data/rbi/orb/models/unwrap_webhook_event.rbi +99 -0
  172. data/rbi/orb/models/webhook_unwrap_params.rbi +25 -0
  173. data/rbi/orb/models.rbi +224 -0
  174. data/rbi/orb/resources/subscriptions.rbi +13 -0
  175. data/rbi/orb/resources/webhooks.rbi +103 -0
  176. data/sig/orb/client.rbs +2 -0
  177. data/sig/orb/models/backfill_reflected_webhook_event.rbs +130 -0
  178. data/sig/orb/models/backfill_reverted_webhook_event.rbs +130 -0
  179. data/sig/orb/models/billable_metric_edited_webhook_event.rbs +94 -0
  180. data/sig/orb/models/credit_block_accounting_sync_failed_webhook_event.rbs +412 -0
  181. data/sig/orb/models/credit_block_accounting_sync_succeeded_webhook_event.rbs +407 -0
  182. data/sig/orb/models/credit_note_accounting_sync_failed_webhook_event.rbs +147 -0
  183. data/sig/orb/models/credit_note_accounting_sync_succeeded_webhook_event.rbs +142 -0
  184. data/sig/orb/models/credit_note_issued_webhook_event.rbs +50 -0
  185. data/sig/orb/models/credit_note_marked_as_void_webhook_event.rbs +50 -0
  186. data/sig/orb/models/customer_accounting_sync_failed_webhook_event.rbs +142 -0
  187. data/sig/orb/models/customer_accounting_sync_succeeded_webhook_event.rbs +137 -0
  188. data/sig/orb/models/customer_balance_transaction_created_webhook_event.rbs +171 -0
  189. data/sig/orb/models/customer_created_webhook_event.rbs +50 -0
  190. data/sig/orb/models/customer_credit_balance_depleted_webhook_event.rbs +374 -0
  191. data/sig/orb/models/customer_credit_balance_dropped_webhook_event.rbs +379 -0
  192. data/sig/orb/models/customer_credit_balance_recovered_webhook_event.rbs +374 -0
  193. data/sig/orb/models/customer_credit_ledger_incremented_webhook_event.rbs +364 -0
  194. data/sig/orb/models/customer_edited_webhook_event.rbs +139 -0
  195. data/sig/orb/models/data_exports_transfer_error_webhook_event.rbs +92 -0
  196. data/sig/orb/models/data_exports_transfer_success_webhook_event.rbs +87 -0
  197. data/sig/orb/models/event_unmatched_event_webhook_event.rbs +102 -0
  198. data/sig/orb/models/ingestion_unmatched_customer_ids_webhook_event.rbs +55 -0
  199. data/sig/orb/models/invoice_accounting_sync_failed_webhook_event.rbs +147 -0
  200. data/sig/orb/models/invoice_accounting_sync_succeeded_webhook_event.rbs +142 -0
  201. data/sig/orb/models/invoice_automation_schedule_step_executed_webhook_event.rbs +313 -0
  202. data/sig/orb/models/invoice_cost_data_exported_webhook_event.rbs +73 -0
  203. data/sig/orb/models/invoice_due_date_recalculation_canceled_webhook_event.rbs +57 -0
  204. data/sig/orb/models/invoice_due_date_recalculation_completed_webhook_event.rbs +57 -0
  205. data/sig/orb/models/invoice_due_date_recalculation_started_webhook_event.rbs +55 -0
  206. data/sig/orb/models/invoice_dunning_schedule_created_webhook_event.rbs +171 -0
  207. data/sig/orb/models/invoice_dunning_schedule_ended_webhook_event.rbs +166 -0
  208. data/sig/orb/models/invoice_dunning_schedule_reset_webhook_event.rbs +156 -0
  209. data/sig/orb/models/invoice_dunning_schedule_step_executed_webhook_event.rbs +119 -0
  210. data/sig/orb/models/invoice_edited_webhook_event.rbs +388 -0
  211. data/sig/orb/models/invoice_invoice_date_elapsed_webhook_event.rbs +111 -0
  212. data/sig/orb/models/invoice_issue_failed_webhook_event.rbs +60 -0
  213. data/sig/orb/models/invoice_issued_summary_webhook_event.rbs +504 -0
  214. data/sig/orb/models/invoice_issued_webhook_event.rbs +60 -0
  215. data/sig/orb/models/invoice_manually_marked_as_paid_webhook_event.rbs +73 -0
  216. data/sig/orb/models/invoice_manually_marked_as_void_webhook_event.rbs +50 -0
  217. data/sig/orb/models/invoice_payment_failed_webhook_event.rbs +77 -0
  218. data/sig/orb/models/invoice_payment_processing_webhook_event.rbs +71 -0
  219. data/sig/orb/models/invoice_payment_succeeded_webhook_event.rbs +82 -0
  220. data/sig/orb/models/invoice_sync_failed_webhook_event.rbs +69 -0
  221. data/sig/orb/models/invoice_sync_succeeded_webhook_event.rbs +69 -0
  222. data/sig/orb/models/invoice_undo_mark_as_paid_webhook_event.rbs +50 -0
  223. data/sig/orb/models/metric_events_dropped_by_watermark_webhook_event.rbs +82 -0
  224. data/sig/orb/models/payment_method_created_webhook_event.rbs +112 -0
  225. data/sig/orb/models/payment_method_deleted_webhook_event.rbs +112 -0
  226. data/sig/orb/models/plan_default_version_set_webhook_event.rbs +94 -0
  227. data/sig/orb/models/plan_version_created_webhook_event.rbs +91 -0
  228. data/sig/orb/models/price_edited_webhook_event.rbs +77 -0
  229. data/sig/orb/models/resource_event_test_webhook_event.rbs +57 -0
  230. data/sig/orb/models/sales_order_accounting_sync_failed_webhook_event.rbs +147 -0
  231. data/sig/orb/models/sales_order_accounting_sync_succeeded_webhook_event.rbs +142 -0
  232. data/sig/orb/models/subscription_accounting_sync_failed_webhook_event.rbs +147 -0
  233. data/sig/orb/models/subscription_accounting_sync_succeeded_webhook_event.rbs +142 -0
  234. data/sig/orb/models/subscription_alert_disabled_webhook_event.rbs +444 -0
  235. data/sig/orb/models/subscription_cancellation_scheduled_webhook_event.rbs +60 -0
  236. data/sig/orb/models/subscription_cancellation_unscheduled_webhook_event.rbs +60 -0
  237. data/sig/orb/models/subscription_cost_exceeded_webhook_event.rbs +362 -0
  238. data/sig/orb/models/subscription_created_webhook_event.rbs +50 -0
  239. data/sig/orb/models/subscription_edited_webhook_event.rbs +109 -0
  240. data/sig/orb/models/subscription_ended_webhook_event.rbs +50 -0
  241. data/sig/orb/models/subscription_fixed_fee_quantity_updated_webhook_event.rbs +82 -0
  242. data/sig/orb/models/subscription_grouped_cost_exceeded_webhook_event.rbs +465 -0
  243. data/sig/orb/models/subscription_invoicing_threshold_exceeded_webhook_event.rbs +158 -0
  244. data/sig/orb/models/subscription_license_allocation_reset_webhook_event.rbs +180 -0
  245. data/sig/orb/models/subscription_license_balance_threshold_reached_webhook_event.rbs +460 -0
  246. data/sig/orb/models/subscription_plan_change_scheduled_webhook_event.rbs +73 -0
  247. data/sig/orb/models/subscription_plan_changed_webhook_event.rbs +60 -0
  248. data/sig/orb/models/subscription_plan_version_change_scheduled_webhook_event.rbs +77 -0
  249. data/sig/orb/models/subscription_plan_version_changed_webhook_event.rbs +77 -0
  250. data/sig/orb/models/subscription_spend_exceeded_webhook_event.rbs +362 -0
  251. data/sig/orb/models/subscription_started_webhook_event.rbs +50 -0
  252. data/sig/orb/models/subscription_trial_ended_webhook_event.rbs +50 -0
  253. data/sig/orb/models/subscription_usage_exceeded_webhook_event.rbs +367 -0
  254. data/sig/orb/models/transaction_accounting_sync_failed_webhook_event.rbs +205 -0
  255. data/sig/orb/models/transaction_accounting_sync_succeeded_webhook_event.rbs +200 -0
  256. data/sig/orb/models/unwrap_webhook_event.rbs +90 -0
  257. data/sig/orb/models/webhook_unwrap_params.rbs +14 -0
  258. data/sig/orb/models.rbs +162 -0
  259. data/sig/orb/resources/webhooks.rbs +89 -0
  260. metadata +248 -2
@@ -0,0 +1,1034 @@
1
+ # typed: strong
2
+
3
+ module Orb
4
+ module Models
5
+ class CreditBlockAccountingSyncSucceededWebhookEvent < Orb::Internal::Type::BaseModel
6
+ OrHash =
7
+ T.type_alias do
8
+ T.any(
9
+ Orb::CreditBlockAccountingSyncSucceededWebhookEvent,
10
+ Orb::Internal::AnyHash
11
+ )
12
+ end
13
+
14
+ # The ID of this webhook event.
15
+ sig { returns(String) }
16
+ attr_accessor :id
17
+
18
+ sig do
19
+ returns(
20
+ Orb::CreditBlockAccountingSyncSucceededWebhookEvent::AccountingSyncRecord
21
+ )
22
+ end
23
+ attr_reader :accounting_sync_record
24
+
25
+ sig do
26
+ params(
27
+ accounting_sync_record:
28
+ Orb::CreditBlockAccountingSyncSucceededWebhookEvent::AccountingSyncRecord::OrHash
29
+ ).void
30
+ end
31
+ attr_writer :accounting_sync_record
32
+
33
+ # The Credit Block resource models prepaid credits within Orb.
34
+ sig do
35
+ returns(Orb::CreditBlockAccountingSyncSucceededWebhookEvent::Block)
36
+ end
37
+ attr_reader :block
38
+
39
+ sig do
40
+ params(
41
+ block:
42
+ Orb::CreditBlockAccountingSyncSucceededWebhookEvent::Block::OrHash
43
+ ).void
44
+ end
45
+ attr_writer :block
46
+
47
+ # The time at which this event was created, to the second.
48
+ sig { returns(Time) }
49
+ attr_accessor :created_at
50
+
51
+ sig do
52
+ returns(Orb::CreditBlockAccountingSyncSucceededWebhookEvent::Properties)
53
+ end
54
+ attr_reader :properties
55
+
56
+ sig do
57
+ params(
58
+ properties:
59
+ Orb::CreditBlockAccountingSyncSucceededWebhookEvent::Properties::OrHash
60
+ ).void
61
+ end
62
+ attr_writer :properties
63
+
64
+ # The event this payload describes.
65
+ sig do
66
+ returns(
67
+ Orb::CreditBlockAccountingSyncSucceededWebhookEvent::Type::TaggedSymbol
68
+ )
69
+ end
70
+ attr_accessor :type
71
+
72
+ # Issued when a credit block accounting sync succeeds.
73
+ sig do
74
+ params(
75
+ id: String,
76
+ accounting_sync_record:
77
+ Orb::CreditBlockAccountingSyncSucceededWebhookEvent::AccountingSyncRecord::OrHash,
78
+ block:
79
+ Orb::CreditBlockAccountingSyncSucceededWebhookEvent::Block::OrHash,
80
+ created_at: Time,
81
+ properties:
82
+ Orb::CreditBlockAccountingSyncSucceededWebhookEvent::Properties::OrHash,
83
+ type:
84
+ Orb::CreditBlockAccountingSyncSucceededWebhookEvent::Type::OrSymbol
85
+ ).returns(T.attached_class)
86
+ end
87
+ def self.new(
88
+ # The ID of this webhook event.
89
+ id:,
90
+ accounting_sync_record:,
91
+ # The Credit Block resource models prepaid credits within Orb.
92
+ block:,
93
+ # The time at which this event was created, to the second.
94
+ created_at:,
95
+ properties:,
96
+ # The event this payload describes.
97
+ type:
98
+ )
99
+ end
100
+
101
+ sig do
102
+ override.returns(
103
+ {
104
+ id: String,
105
+ accounting_sync_record:
106
+ Orb::CreditBlockAccountingSyncSucceededWebhookEvent::AccountingSyncRecord,
107
+ block: Orb::CreditBlockAccountingSyncSucceededWebhookEvent::Block,
108
+ created_at: Time,
109
+ properties:
110
+ Orb::CreditBlockAccountingSyncSucceededWebhookEvent::Properties,
111
+ type:
112
+ Orb::CreditBlockAccountingSyncSucceededWebhookEvent::Type::TaggedSymbol
113
+ }
114
+ )
115
+ end
116
+ def to_hash
117
+ end
118
+
119
+ class AccountingSyncRecord < Orb::Internal::Type::BaseModel
120
+ OrHash =
121
+ T.type_alias do
122
+ T.any(
123
+ Orb::CreditBlockAccountingSyncSucceededWebhookEvent::AccountingSyncRecord,
124
+ Orb::Internal::AnyHash
125
+ )
126
+ end
127
+
128
+ sig { returns(String) }
129
+ attr_accessor :id
130
+
131
+ sig { returns(String) }
132
+ attr_accessor :customer_id
133
+
134
+ sig do
135
+ returns(
136
+ Orb::CreditBlockAccountingSyncSucceededWebhookEvent::AccountingSyncRecord::RecordType::TaggedSymbol
137
+ )
138
+ end
139
+ attr_accessor :record_type
140
+
141
+ sig { returns(T.nilable(String)) }
142
+ attr_accessor :block_id
143
+
144
+ sig { returns(T.nilable(T::Hash[Symbol, T.anything])) }
145
+ attr_accessor :error_details
146
+
147
+ sig { returns(T.nilable(String)) }
148
+ attr_accessor :invoice_id
149
+
150
+ sig { returns(T.nilable(String)) }
151
+ attr_accessor :provider_customer_id
152
+
153
+ sig { returns(T.nilable(String)) }
154
+ attr_accessor :status
155
+
156
+ sig { returns(T.nilable(String)) }
157
+ attr_accessor :sync_action
158
+
159
+ sig do
160
+ params(
161
+ id: String,
162
+ customer_id: String,
163
+ record_type:
164
+ Orb::CreditBlockAccountingSyncSucceededWebhookEvent::AccountingSyncRecord::RecordType::OrSymbol,
165
+ block_id: T.nilable(String),
166
+ error_details: T.nilable(T::Hash[Symbol, T.anything]),
167
+ invoice_id: T.nilable(String),
168
+ provider_customer_id: T.nilable(String),
169
+ status: T.nilable(String),
170
+ sync_action: T.nilable(String)
171
+ ).returns(T.attached_class)
172
+ end
173
+ def self.new(
174
+ id:,
175
+ customer_id:,
176
+ record_type:,
177
+ block_id: nil,
178
+ error_details: nil,
179
+ invoice_id: nil,
180
+ provider_customer_id: nil,
181
+ status: nil,
182
+ sync_action: nil
183
+ )
184
+ end
185
+
186
+ sig do
187
+ override.returns(
188
+ {
189
+ id: String,
190
+ customer_id: String,
191
+ record_type:
192
+ Orb::CreditBlockAccountingSyncSucceededWebhookEvent::AccountingSyncRecord::RecordType::TaggedSymbol,
193
+ block_id: T.nilable(String),
194
+ error_details: T.nilable(T::Hash[Symbol, T.anything]),
195
+ invoice_id: T.nilable(String),
196
+ provider_customer_id: T.nilable(String),
197
+ status: T.nilable(String),
198
+ sync_action: T.nilable(String)
199
+ }
200
+ )
201
+ end
202
+ def to_hash
203
+ end
204
+
205
+ module RecordType
206
+ extend Orb::Internal::Type::Enum
207
+
208
+ TaggedSymbol =
209
+ T.type_alias do
210
+ T.all(
211
+ Symbol,
212
+ Orb::CreditBlockAccountingSyncSucceededWebhookEvent::AccountingSyncRecord::RecordType
213
+ )
214
+ end
215
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
216
+
217
+ CUSTOMER =
218
+ T.let(
219
+ :customer,
220
+ Orb::CreditBlockAccountingSyncSucceededWebhookEvent::AccountingSyncRecord::RecordType::TaggedSymbol
221
+ )
222
+ INVOICE =
223
+ T.let(
224
+ :invoice,
225
+ Orb::CreditBlockAccountingSyncSucceededWebhookEvent::AccountingSyncRecord::RecordType::TaggedSymbol
226
+ )
227
+ TRANSACTION =
228
+ T.let(
229
+ :transaction,
230
+ Orb::CreditBlockAccountingSyncSucceededWebhookEvent::AccountingSyncRecord::RecordType::TaggedSymbol
231
+ )
232
+ CUSTOMER_BALANCE_TRANSACTION =
233
+ T.let(
234
+ :customer_balance_transaction,
235
+ Orb::CreditBlockAccountingSyncSucceededWebhookEvent::AccountingSyncRecord::RecordType::TaggedSymbol
236
+ )
237
+ CREDIT_NOTE =
238
+ T.let(
239
+ :credit_note,
240
+ Orb::CreditBlockAccountingSyncSucceededWebhookEvent::AccountingSyncRecord::RecordType::TaggedSymbol
241
+ )
242
+ SUBSCRIPTION =
243
+ T.let(
244
+ :subscription,
245
+ Orb::CreditBlockAccountingSyncSucceededWebhookEvent::AccountingSyncRecord::RecordType::TaggedSymbol
246
+ )
247
+ SALES_ORDER =
248
+ T.let(
249
+ :sales_order,
250
+ Orb::CreditBlockAccountingSyncSucceededWebhookEvent::AccountingSyncRecord::RecordType::TaggedSymbol
251
+ )
252
+ BLOCK =
253
+ T.let(
254
+ :block,
255
+ Orb::CreditBlockAccountingSyncSucceededWebhookEvent::AccountingSyncRecord::RecordType::TaggedSymbol
256
+ )
257
+
258
+ sig do
259
+ override.returns(
260
+ T::Array[
261
+ Orb::CreditBlockAccountingSyncSucceededWebhookEvent::AccountingSyncRecord::RecordType::TaggedSymbol
262
+ ]
263
+ )
264
+ end
265
+ def self.values
266
+ end
267
+ end
268
+ end
269
+
270
+ class Block < Orb::Internal::Type::BaseModel
271
+ OrHash =
272
+ T.type_alias do
273
+ T.any(
274
+ Orb::CreditBlockAccountingSyncSucceededWebhookEvent::Block,
275
+ Orb::Internal::AnyHash
276
+ )
277
+ end
278
+
279
+ sig { returns(String) }
280
+ attr_accessor :id
281
+
282
+ sig { returns(String) }
283
+ attr_accessor :balance
284
+
285
+ # How this credit block was created: `allocation` (a subscription's recurring
286
+ # credit allocation), `top_up` (an automatic balance-threshold top-up),
287
+ # `commitment` (a subscription commitment true-up rolled forward as credit), or
288
+ # `manual` (a manual credit ledger increment, including credits voided or expired
289
+ # off another block).
290
+ sig do
291
+ returns(
292
+ Orb::CreditBlockAccountingSyncSucceededWebhookEvent::Block::CreditBlockSource::TaggedSymbol
293
+ )
294
+ end
295
+ attr_accessor :credit_block_source
296
+
297
+ sig { returns(T.nilable(Time)) }
298
+ attr_accessor :effective_date
299
+
300
+ sig { returns(T.nilable(Time)) }
301
+ attr_accessor :expiry_date
302
+
303
+ sig do
304
+ returns(
305
+ T::Array[
306
+ Orb::CreditBlockAccountingSyncSucceededWebhookEvent::Block::Filter
307
+ ]
308
+ )
309
+ end
310
+ attr_accessor :filters
311
+
312
+ sig { returns(T.nilable(String)) }
313
+ attr_accessor :maximum_initial_balance
314
+
315
+ # User specified key-value pairs for the resource. If not present, this defaults
316
+ # to an empty dictionary. Individual keys can be removed by setting the value to
317
+ # `null`, and the entire metadata mapping can be cleared by setting `metadata` to
318
+ # `null`.
319
+ sig { returns(T::Hash[Symbol, String]) }
320
+ attr_accessor :metadata
321
+
322
+ sig { returns(T.nilable(String)) }
323
+ attr_accessor :per_unit_cost_basis
324
+
325
+ sig do
326
+ returns(
327
+ Orb::CreditBlockAccountingSyncSucceededWebhookEvent::Block::Status::TaggedSymbol
328
+ )
329
+ end
330
+ attr_accessor :status
331
+
332
+ # The credit allocation that funded a block. Extends the allocation resource
333
+ # serialized on prices with the catalog-item attribution of the funding price.
334
+ sig do
335
+ returns(
336
+ T.nilable(
337
+ Orb::CreditBlockAccountingSyncSucceededWebhookEvent::Block::CreditAllocation
338
+ )
339
+ )
340
+ end
341
+ attr_reader :credit_allocation
342
+
343
+ sig do
344
+ params(
345
+ credit_allocation:
346
+ T.nilable(
347
+ Orb::CreditBlockAccountingSyncSucceededWebhookEvent::Block::CreditAllocation::OrHash
348
+ )
349
+ ).void
350
+ end
351
+ attr_writer :credit_allocation
352
+
353
+ # The subscription commitment whose true-up rolled forward into this credit block.
354
+ # Present only when `credit_block_source` is `commitment`.
355
+ sig do
356
+ returns(
357
+ T.nilable(
358
+ Orb::CreditBlockAccountingSyncSucceededWebhookEvent::Block::CreditCommitment
359
+ )
360
+ )
361
+ end
362
+ attr_reader :credit_commitment
363
+
364
+ sig do
365
+ params(
366
+ credit_commitment:
367
+ T.nilable(
368
+ Orb::CreditBlockAccountingSyncSucceededWebhookEvent::Block::CreditCommitment::OrHash
369
+ )
370
+ ).void
371
+ end
372
+ attr_writer :credit_commitment
373
+
374
+ # The Credit Block resource models prepaid credits within Orb.
375
+ sig do
376
+ params(
377
+ id: String,
378
+ balance: String,
379
+ credit_block_source:
380
+ Orb::CreditBlockAccountingSyncSucceededWebhookEvent::Block::CreditBlockSource::OrSymbol,
381
+ effective_date: T.nilable(Time),
382
+ expiry_date: T.nilable(Time),
383
+ filters:
384
+ T::Array[
385
+ Orb::CreditBlockAccountingSyncSucceededWebhookEvent::Block::Filter::OrHash
386
+ ],
387
+ maximum_initial_balance: T.nilable(String),
388
+ metadata: T::Hash[Symbol, String],
389
+ per_unit_cost_basis: T.nilable(String),
390
+ status:
391
+ Orb::CreditBlockAccountingSyncSucceededWebhookEvent::Block::Status::OrSymbol,
392
+ credit_allocation:
393
+ T.nilable(
394
+ Orb::CreditBlockAccountingSyncSucceededWebhookEvent::Block::CreditAllocation::OrHash
395
+ ),
396
+ credit_commitment:
397
+ T.nilable(
398
+ Orb::CreditBlockAccountingSyncSucceededWebhookEvent::Block::CreditCommitment::OrHash
399
+ )
400
+ ).returns(T.attached_class)
401
+ end
402
+ def self.new(
403
+ id:,
404
+ balance:,
405
+ # How this credit block was created: `allocation` (a subscription's recurring
406
+ # credit allocation), `top_up` (an automatic balance-threshold top-up),
407
+ # `commitment` (a subscription commitment true-up rolled forward as credit), or
408
+ # `manual` (a manual credit ledger increment, including credits voided or expired
409
+ # off another block).
410
+ credit_block_source:,
411
+ effective_date:,
412
+ expiry_date:,
413
+ filters:,
414
+ maximum_initial_balance:,
415
+ # User specified key-value pairs for the resource. If not present, this defaults
416
+ # to an empty dictionary. Individual keys can be removed by setting the value to
417
+ # `null`, and the entire metadata mapping can be cleared by setting `metadata` to
418
+ # `null`.
419
+ metadata:,
420
+ per_unit_cost_basis:,
421
+ status:,
422
+ # The credit allocation that funded a block. Extends the allocation resource
423
+ # serialized on prices with the catalog-item attribution of the funding price.
424
+ credit_allocation: nil,
425
+ # The subscription commitment whose true-up rolled forward into this credit block.
426
+ # Present only when `credit_block_source` is `commitment`.
427
+ credit_commitment: nil
428
+ )
429
+ end
430
+
431
+ sig do
432
+ override.returns(
433
+ {
434
+ id: String,
435
+ balance: String,
436
+ credit_block_source:
437
+ Orb::CreditBlockAccountingSyncSucceededWebhookEvent::Block::CreditBlockSource::TaggedSymbol,
438
+ effective_date: T.nilable(Time),
439
+ expiry_date: T.nilable(Time),
440
+ filters:
441
+ T::Array[
442
+ Orb::CreditBlockAccountingSyncSucceededWebhookEvent::Block::Filter
443
+ ],
444
+ maximum_initial_balance: T.nilable(String),
445
+ metadata: T::Hash[Symbol, String],
446
+ per_unit_cost_basis: T.nilable(String),
447
+ status:
448
+ Orb::CreditBlockAccountingSyncSucceededWebhookEvent::Block::Status::TaggedSymbol,
449
+ credit_allocation:
450
+ T.nilable(
451
+ Orb::CreditBlockAccountingSyncSucceededWebhookEvent::Block::CreditAllocation
452
+ ),
453
+ credit_commitment:
454
+ T.nilable(
455
+ Orb::CreditBlockAccountingSyncSucceededWebhookEvent::Block::CreditCommitment
456
+ )
457
+ }
458
+ )
459
+ end
460
+ def to_hash
461
+ end
462
+
463
+ # How this credit block was created: `allocation` (a subscription's recurring
464
+ # credit allocation), `top_up` (an automatic balance-threshold top-up),
465
+ # `commitment` (a subscription commitment true-up rolled forward as credit), or
466
+ # `manual` (a manual credit ledger increment, including credits voided or expired
467
+ # off another block).
468
+ module CreditBlockSource
469
+ extend Orb::Internal::Type::Enum
470
+
471
+ TaggedSymbol =
472
+ T.type_alias do
473
+ T.all(
474
+ Symbol,
475
+ Orb::CreditBlockAccountingSyncSucceededWebhookEvent::Block::CreditBlockSource
476
+ )
477
+ end
478
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
479
+
480
+ ALLOCATION =
481
+ T.let(
482
+ :allocation,
483
+ Orb::CreditBlockAccountingSyncSucceededWebhookEvent::Block::CreditBlockSource::TaggedSymbol
484
+ )
485
+ TOP_UP =
486
+ T.let(
487
+ :top_up,
488
+ Orb::CreditBlockAccountingSyncSucceededWebhookEvent::Block::CreditBlockSource::TaggedSymbol
489
+ )
490
+ COMMITMENT =
491
+ T.let(
492
+ :commitment,
493
+ Orb::CreditBlockAccountingSyncSucceededWebhookEvent::Block::CreditBlockSource::TaggedSymbol
494
+ )
495
+ MANUAL =
496
+ T.let(
497
+ :manual,
498
+ Orb::CreditBlockAccountingSyncSucceededWebhookEvent::Block::CreditBlockSource::TaggedSymbol
499
+ )
500
+
501
+ sig do
502
+ override.returns(
503
+ T::Array[
504
+ Orb::CreditBlockAccountingSyncSucceededWebhookEvent::Block::CreditBlockSource::TaggedSymbol
505
+ ]
506
+ )
507
+ end
508
+ def self.values
509
+ end
510
+ end
511
+
512
+ class Filter < Orb::Internal::Type::BaseModel
513
+ OrHash =
514
+ T.type_alias do
515
+ T.any(
516
+ Orb::CreditBlockAccountingSyncSucceededWebhookEvent::Block::Filter,
517
+ Orb::Internal::AnyHash
518
+ )
519
+ end
520
+
521
+ # The property of the price to filter on.
522
+ sig do
523
+ returns(
524
+ Orb::CreditBlockAccountingSyncSucceededWebhookEvent::Block::Filter::Field::TaggedSymbol
525
+ )
526
+ end
527
+ attr_accessor :field
528
+
529
+ # Should prices that match the filter be included or excluded.
530
+ sig do
531
+ returns(
532
+ Orb::CreditBlockAccountingSyncSucceededWebhookEvent::Block::Filter::Operator::TaggedSymbol
533
+ )
534
+ end
535
+ attr_accessor :operator
536
+
537
+ # The IDs or values that match this filter.
538
+ sig { returns(T::Array[String]) }
539
+ attr_accessor :values
540
+
541
+ sig do
542
+ params(
543
+ field:
544
+ Orb::CreditBlockAccountingSyncSucceededWebhookEvent::Block::Filter::Field::OrSymbol,
545
+ operator:
546
+ Orb::CreditBlockAccountingSyncSucceededWebhookEvent::Block::Filter::Operator::OrSymbol,
547
+ values: T::Array[String]
548
+ ).returns(T.attached_class)
549
+ end
550
+ def self.new(
551
+ # The property of the price to filter on.
552
+ field:,
553
+ # Should prices that match the filter be included or excluded.
554
+ operator:,
555
+ # The IDs or values that match this filter.
556
+ values:
557
+ )
558
+ end
559
+
560
+ sig do
561
+ override.returns(
562
+ {
563
+ field:
564
+ Orb::CreditBlockAccountingSyncSucceededWebhookEvent::Block::Filter::Field::TaggedSymbol,
565
+ operator:
566
+ Orb::CreditBlockAccountingSyncSucceededWebhookEvent::Block::Filter::Operator::TaggedSymbol,
567
+ values: T::Array[String]
568
+ }
569
+ )
570
+ end
571
+ def to_hash
572
+ end
573
+
574
+ # The property of the price to filter on.
575
+ module Field
576
+ extend Orb::Internal::Type::Enum
577
+
578
+ TaggedSymbol =
579
+ T.type_alias do
580
+ T.all(
581
+ Symbol,
582
+ Orb::CreditBlockAccountingSyncSucceededWebhookEvent::Block::Filter::Field
583
+ )
584
+ end
585
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
586
+
587
+ PRICE_ID =
588
+ T.let(
589
+ :price_id,
590
+ Orb::CreditBlockAccountingSyncSucceededWebhookEvent::Block::Filter::Field::TaggedSymbol
591
+ )
592
+ ITEM_ID =
593
+ T.let(
594
+ :item_id,
595
+ Orb::CreditBlockAccountingSyncSucceededWebhookEvent::Block::Filter::Field::TaggedSymbol
596
+ )
597
+ PRICE_TYPE =
598
+ T.let(
599
+ :price_type,
600
+ Orb::CreditBlockAccountingSyncSucceededWebhookEvent::Block::Filter::Field::TaggedSymbol
601
+ )
602
+ CURRENCY =
603
+ T.let(
604
+ :currency,
605
+ Orb::CreditBlockAccountingSyncSucceededWebhookEvent::Block::Filter::Field::TaggedSymbol
606
+ )
607
+ PRICING_UNIT_ID =
608
+ T.let(
609
+ :pricing_unit_id,
610
+ Orb::CreditBlockAccountingSyncSucceededWebhookEvent::Block::Filter::Field::TaggedSymbol
611
+ )
612
+
613
+ sig do
614
+ override.returns(
615
+ T::Array[
616
+ Orb::CreditBlockAccountingSyncSucceededWebhookEvent::Block::Filter::Field::TaggedSymbol
617
+ ]
618
+ )
619
+ end
620
+ def self.values
621
+ end
622
+ end
623
+
624
+ # Should prices that match the filter be included or excluded.
625
+ module Operator
626
+ extend Orb::Internal::Type::Enum
627
+
628
+ TaggedSymbol =
629
+ T.type_alias do
630
+ T.all(
631
+ Symbol,
632
+ Orb::CreditBlockAccountingSyncSucceededWebhookEvent::Block::Filter::Operator
633
+ )
634
+ end
635
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
636
+
637
+ INCLUDES =
638
+ T.let(
639
+ :includes,
640
+ Orb::CreditBlockAccountingSyncSucceededWebhookEvent::Block::Filter::Operator::TaggedSymbol
641
+ )
642
+ EXCLUDES =
643
+ T.let(
644
+ :excludes,
645
+ Orb::CreditBlockAccountingSyncSucceededWebhookEvent::Block::Filter::Operator::TaggedSymbol
646
+ )
647
+
648
+ sig do
649
+ override.returns(
650
+ T::Array[
651
+ Orb::CreditBlockAccountingSyncSucceededWebhookEvent::Block::Filter::Operator::TaggedSymbol
652
+ ]
653
+ )
654
+ end
655
+ def self.values
656
+ end
657
+ end
658
+ end
659
+
660
+ module Status
661
+ extend Orb::Internal::Type::Enum
662
+
663
+ TaggedSymbol =
664
+ T.type_alias do
665
+ T.all(
666
+ Symbol,
667
+ Orb::CreditBlockAccountingSyncSucceededWebhookEvent::Block::Status
668
+ )
669
+ end
670
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
671
+
672
+ ACTIVE =
673
+ T.let(
674
+ :active,
675
+ Orb::CreditBlockAccountingSyncSucceededWebhookEvent::Block::Status::TaggedSymbol
676
+ )
677
+ PENDING_PAYMENT =
678
+ T.let(
679
+ :pending_payment,
680
+ Orb::CreditBlockAccountingSyncSucceededWebhookEvent::Block::Status::TaggedSymbol
681
+ )
682
+
683
+ sig do
684
+ override.returns(
685
+ T::Array[
686
+ Orb::CreditBlockAccountingSyncSucceededWebhookEvent::Block::Status::TaggedSymbol
687
+ ]
688
+ )
689
+ end
690
+ def self.values
691
+ end
692
+ end
693
+
694
+ class CreditAllocation < Orb::Internal::Type::BaseModel
695
+ OrHash =
696
+ T.type_alias do
697
+ T.any(
698
+ Orb::CreditBlockAccountingSyncSucceededWebhookEvent::Block::CreditAllocation,
699
+ Orb::Internal::AnyHash
700
+ )
701
+ end
702
+
703
+ sig { returns(T::Boolean) }
704
+ attr_accessor :allows_rollover
705
+
706
+ sig { returns(String) }
707
+ attr_accessor :currency
708
+
709
+ sig { returns(T.nilable(Orb::CustomExpiration)) }
710
+ attr_reader :custom_expiration
711
+
712
+ sig do
713
+ params(
714
+ custom_expiration: T.nilable(Orb::CustomExpiration::OrHash)
715
+ ).void
716
+ end
717
+ attr_writer :custom_expiration
718
+
719
+ # The ID of the catalog item this block was allocated from, derived from the
720
+ # allocation's price.
721
+ sig { returns(String) }
722
+ attr_accessor :item_id
723
+
724
+ sig do
725
+ returns(
726
+ T.nilable(
727
+ T::Array[
728
+ Orb::CreditBlockAccountingSyncSucceededWebhookEvent::Block::CreditAllocation::Filter
729
+ ]
730
+ )
731
+ )
732
+ end
733
+ attr_reader :filters
734
+
735
+ sig do
736
+ params(
737
+ filters:
738
+ T::Array[
739
+ Orb::CreditBlockAccountingSyncSucceededWebhookEvent::Block::CreditAllocation::Filter::OrHash
740
+ ]
741
+ ).void
742
+ end
743
+ attr_writer :filters
744
+
745
+ sig { returns(T.nilable(String)) }
746
+ attr_accessor :license_type_id
747
+
748
+ # The credit allocation that funded a block. Extends the allocation resource
749
+ # serialized on prices with the catalog-item attribution of the funding price.
750
+ sig do
751
+ params(
752
+ allows_rollover: T::Boolean,
753
+ currency: String,
754
+ custom_expiration: T.nilable(Orb::CustomExpiration::OrHash),
755
+ item_id: String,
756
+ filters:
757
+ T::Array[
758
+ Orb::CreditBlockAccountingSyncSucceededWebhookEvent::Block::CreditAllocation::Filter::OrHash
759
+ ],
760
+ license_type_id: T.nilable(String)
761
+ ).returns(T.attached_class)
762
+ end
763
+ def self.new(
764
+ allows_rollover:,
765
+ currency:,
766
+ custom_expiration:,
767
+ # The ID of the catalog item this block was allocated from, derived from the
768
+ # allocation's price.
769
+ item_id:,
770
+ filters: nil,
771
+ license_type_id: nil
772
+ )
773
+ end
774
+
775
+ sig do
776
+ override.returns(
777
+ {
778
+ allows_rollover: T::Boolean,
779
+ currency: String,
780
+ custom_expiration: T.nilable(Orb::CustomExpiration),
781
+ item_id: String,
782
+ filters:
783
+ T::Array[
784
+ Orb::CreditBlockAccountingSyncSucceededWebhookEvent::Block::CreditAllocation::Filter
785
+ ],
786
+ license_type_id: T.nilable(String)
787
+ }
788
+ )
789
+ end
790
+ def to_hash
791
+ end
792
+
793
+ class Filter < Orb::Internal::Type::BaseModel
794
+ OrHash =
795
+ T.type_alias do
796
+ T.any(
797
+ Orb::CreditBlockAccountingSyncSucceededWebhookEvent::Block::CreditAllocation::Filter,
798
+ Orb::Internal::AnyHash
799
+ )
800
+ end
801
+
802
+ # The property of the price to filter on.
803
+ sig do
804
+ returns(
805
+ Orb::CreditBlockAccountingSyncSucceededWebhookEvent::Block::CreditAllocation::Filter::Field::TaggedSymbol
806
+ )
807
+ end
808
+ attr_accessor :field
809
+
810
+ # Should prices that match the filter be included or excluded.
811
+ sig do
812
+ returns(
813
+ Orb::CreditBlockAccountingSyncSucceededWebhookEvent::Block::CreditAllocation::Filter::Operator::TaggedSymbol
814
+ )
815
+ end
816
+ attr_accessor :operator
817
+
818
+ # The IDs or values that match this filter.
819
+ sig { returns(T::Array[String]) }
820
+ attr_accessor :values
821
+
822
+ sig do
823
+ params(
824
+ field:
825
+ Orb::CreditBlockAccountingSyncSucceededWebhookEvent::Block::CreditAllocation::Filter::Field::OrSymbol,
826
+ operator:
827
+ Orb::CreditBlockAccountingSyncSucceededWebhookEvent::Block::CreditAllocation::Filter::Operator::OrSymbol,
828
+ values: T::Array[String]
829
+ ).returns(T.attached_class)
830
+ end
831
+ def self.new(
832
+ # The property of the price to filter on.
833
+ field:,
834
+ # Should prices that match the filter be included or excluded.
835
+ operator:,
836
+ # The IDs or values that match this filter.
837
+ values:
838
+ )
839
+ end
840
+
841
+ sig do
842
+ override.returns(
843
+ {
844
+ field:
845
+ Orb::CreditBlockAccountingSyncSucceededWebhookEvent::Block::CreditAllocation::Filter::Field::TaggedSymbol,
846
+ operator:
847
+ Orb::CreditBlockAccountingSyncSucceededWebhookEvent::Block::CreditAllocation::Filter::Operator::TaggedSymbol,
848
+ values: T::Array[String]
849
+ }
850
+ )
851
+ end
852
+ def to_hash
853
+ end
854
+
855
+ # The property of the price to filter on.
856
+ module Field
857
+ extend Orb::Internal::Type::Enum
858
+
859
+ TaggedSymbol =
860
+ T.type_alias do
861
+ T.all(
862
+ Symbol,
863
+ Orb::CreditBlockAccountingSyncSucceededWebhookEvent::Block::CreditAllocation::Filter::Field
864
+ )
865
+ end
866
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
867
+
868
+ PRICE_ID =
869
+ T.let(
870
+ :price_id,
871
+ Orb::CreditBlockAccountingSyncSucceededWebhookEvent::Block::CreditAllocation::Filter::Field::TaggedSymbol
872
+ )
873
+ ITEM_ID =
874
+ T.let(
875
+ :item_id,
876
+ Orb::CreditBlockAccountingSyncSucceededWebhookEvent::Block::CreditAllocation::Filter::Field::TaggedSymbol
877
+ )
878
+ PRICE_TYPE =
879
+ T.let(
880
+ :price_type,
881
+ Orb::CreditBlockAccountingSyncSucceededWebhookEvent::Block::CreditAllocation::Filter::Field::TaggedSymbol
882
+ )
883
+ CURRENCY =
884
+ T.let(
885
+ :currency,
886
+ Orb::CreditBlockAccountingSyncSucceededWebhookEvent::Block::CreditAllocation::Filter::Field::TaggedSymbol
887
+ )
888
+ PRICING_UNIT_ID =
889
+ T.let(
890
+ :pricing_unit_id,
891
+ Orb::CreditBlockAccountingSyncSucceededWebhookEvent::Block::CreditAllocation::Filter::Field::TaggedSymbol
892
+ )
893
+
894
+ sig do
895
+ override.returns(
896
+ T::Array[
897
+ Orb::CreditBlockAccountingSyncSucceededWebhookEvent::Block::CreditAllocation::Filter::Field::TaggedSymbol
898
+ ]
899
+ )
900
+ end
901
+ def self.values
902
+ end
903
+ end
904
+
905
+ # Should prices that match the filter be included or excluded.
906
+ module Operator
907
+ extend Orb::Internal::Type::Enum
908
+
909
+ TaggedSymbol =
910
+ T.type_alias do
911
+ T.all(
912
+ Symbol,
913
+ Orb::CreditBlockAccountingSyncSucceededWebhookEvent::Block::CreditAllocation::Filter::Operator
914
+ )
915
+ end
916
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
917
+
918
+ INCLUDES =
919
+ T.let(
920
+ :includes,
921
+ Orb::CreditBlockAccountingSyncSucceededWebhookEvent::Block::CreditAllocation::Filter::Operator::TaggedSymbol
922
+ )
923
+ EXCLUDES =
924
+ T.let(
925
+ :excludes,
926
+ Orb::CreditBlockAccountingSyncSucceededWebhookEvent::Block::CreditAllocation::Filter::Operator::TaggedSymbol
927
+ )
928
+
929
+ sig do
930
+ override.returns(
931
+ T::Array[
932
+ Orb::CreditBlockAccountingSyncSucceededWebhookEvent::Block::CreditAllocation::Filter::Operator::TaggedSymbol
933
+ ]
934
+ )
935
+ end
936
+ def self.values
937
+ end
938
+ end
939
+ end
940
+ end
941
+
942
+ class CreditCommitment < Orb::Internal::Type::BaseModel
943
+ OrHash =
944
+ T.type_alias do
945
+ T.any(
946
+ Orb::CreditBlockAccountingSyncSucceededWebhookEvent::Block::CreditCommitment,
947
+ Orb::Internal::AnyHash
948
+ )
949
+ end
950
+
951
+ # The ID of the subscription commitment this block was rolled forward from.
952
+ sig { returns(String) }
953
+ attr_accessor :id
954
+
955
+ # The subscription the commitment belongs to.
956
+ sig { returns(T.nilable(String)) }
957
+ attr_accessor :subscription_id
958
+
959
+ # The subscription commitment whose true-up rolled forward into this credit block.
960
+ # Present only when `credit_block_source` is `commitment`.
961
+ sig do
962
+ params(id: String, subscription_id: T.nilable(String)).returns(
963
+ T.attached_class
964
+ )
965
+ end
966
+ def self.new(
967
+ # The ID of the subscription commitment this block was rolled forward from.
968
+ id:,
969
+ # The subscription the commitment belongs to.
970
+ subscription_id: nil
971
+ )
972
+ end
973
+
974
+ sig do
975
+ override.returns({ id: String, subscription_id: T.nilable(String) })
976
+ end
977
+ def to_hash
978
+ end
979
+ end
980
+ end
981
+
982
+ class Properties < Orb::Internal::Type::BaseModel
983
+ OrHash =
984
+ T.type_alias do
985
+ T.any(
986
+ Orb::CreditBlockAccountingSyncSucceededWebhookEvent::Properties,
987
+ Orb::Internal::AnyHash
988
+ )
989
+ end
990
+
991
+ sig { returns(String) }
992
+ attr_accessor :connection_type
993
+
994
+ sig { params(connection_type: String).returns(T.attached_class) }
995
+ def self.new(connection_type:)
996
+ end
997
+
998
+ sig { override.returns({ connection_type: String }) }
999
+ def to_hash
1000
+ end
1001
+ end
1002
+
1003
+ # The event this payload describes.
1004
+ module Type
1005
+ extend Orb::Internal::Type::Enum
1006
+
1007
+ TaggedSymbol =
1008
+ T.type_alias do
1009
+ T.all(
1010
+ Symbol,
1011
+ Orb::CreditBlockAccountingSyncSucceededWebhookEvent::Type
1012
+ )
1013
+ end
1014
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
1015
+
1016
+ CREDIT_BLOCK_ACCOUNTING_SYNC_SUCCEEDED =
1017
+ T.let(
1018
+ :"credit_block.accounting_sync_succeeded",
1019
+ Orb::CreditBlockAccountingSyncSucceededWebhookEvent::Type::TaggedSymbol
1020
+ )
1021
+
1022
+ sig do
1023
+ override.returns(
1024
+ T::Array[
1025
+ Orb::CreditBlockAccountingSyncSucceededWebhookEvent::Type::TaggedSymbol
1026
+ ]
1027
+ )
1028
+ end
1029
+ def self.values
1030
+ end
1031
+ end
1032
+ end
1033
+ end
1034
+ end