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