orb-billing 1.35.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 (258) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +18 -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,540 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Orb
4
+ module Models
5
+ class SubscriptionCostExceededWebhookEvent < Orb::Internal::Type::BaseModel
6
+ # @!attribute id
7
+ # The ID of this webhook event.
8
+ #
9
+ # @return [String]
10
+ required :id, String
11
+
12
+ # @!attribute created_at
13
+ # The time at which this event was created, to the second.
14
+ #
15
+ # @return [Time]
16
+ required :created_at, Time
17
+
18
+ # @!attribute properties
19
+ #
20
+ # @return [Orb::Models::SubscriptionCostExceededWebhookEvent::Properties]
21
+ required :properties, -> { Orb::SubscriptionCostExceededWebhookEvent::Properties }
22
+
23
+ # @!attribute subscription
24
+ # A [subscription](/core-concepts#subscription) represents the purchase of a plan
25
+ # by a customer.
26
+ #
27
+ # By default, subscriptions begin on the day that they're created and renew
28
+ # automatically for each billing cycle at the cadence that's configured in the
29
+ # plan definition.
30
+ #
31
+ # Subscriptions also default to **beginning of month alignment**, which means the
32
+ # first invoice issued for the subscription will have pro-rated charges between
33
+ # the `start_date` and the first of the following month. Subsequent billing
34
+ # periods will always start and end on a month boundary (e.g. subsequent month
35
+ # starts for monthly billing).
36
+ #
37
+ # Depending on the plan configuration, any _flat_ recurring fees will be billed
38
+ # either at the beginning (in-advance) or end (in-arrears) of each billing cycle.
39
+ # Plans default to **in-advance billing**. Usage-based fees are billed in arrears
40
+ # as usage is accumulated. In the normal course of events, you can expect an
41
+ # invoice to contain usage-based charges for the previous period, and a recurring
42
+ # fee for the following period.
43
+ #
44
+ # @return [Orb::Models::Subscription]
45
+ required :subscription, -> { Orb::Subscription }
46
+
47
+ # @!attribute type
48
+ # The event this payload describes.
49
+ #
50
+ # @return [Symbol, Orb::Models::SubscriptionCostExceededWebhookEvent::Type]
51
+ required :type, enum: -> { Orb::SubscriptionCostExceededWebhookEvent::Type }
52
+
53
+ # @!method initialize(id:, created_at:, properties:, subscription:, type:)
54
+ # Some parameter documentations has been truncated, see
55
+ # {Orb::Models::SubscriptionCostExceededWebhookEvent} for more details.
56
+ #
57
+ # Issued when a subscription's cost exceeds a pre-configured amount threshold.
58
+ #
59
+ # @param id [String] The ID of this webhook event.
60
+ #
61
+ # @param created_at [Time] The time at which this event was created, to the second.
62
+ #
63
+ # @param properties [Orb::Models::SubscriptionCostExceededWebhookEvent::Properties]
64
+ #
65
+ # @param subscription [Orb::Models::Subscription] A [subscription](/core-concepts#subscription) represents the purchase of a plan
66
+ #
67
+ # @param type [Symbol, Orb::Models::SubscriptionCostExceededWebhookEvent::Type] The event this payload describes.
68
+
69
+ # @see Orb::Models::SubscriptionCostExceededWebhookEvent#properties
70
+ class Properties < Orb::Internal::Type::BaseModel
71
+ # @!attribute alert_configuration
72
+ # [Alerts within Orb](/product-catalog/configuring-alerts) monitor spending,
73
+ # usage, or credit balance and trigger webhooks when a threshold is exceeded.
74
+ #
75
+ # Alerts created through the API can be scoped to either customers or
76
+ # subscriptions.
77
+ #
78
+ # @return [Orb::Models::SubscriptionCostExceededWebhookEvent::Properties::AlertConfiguration]
79
+ required :alert_configuration,
80
+ -> { Orb::SubscriptionCostExceededWebhookEvent::Properties::AlertConfiguration }
81
+
82
+ # @!attribute amount_threshold
83
+ #
84
+ # @return [String, nil]
85
+ required :amount_threshold, String, nil?: true
86
+
87
+ # @!attribute evaluated_amount
88
+ #
89
+ # @return [String, nil]
90
+ required :evaluated_amount, String, nil?: true
91
+
92
+ # @!attribute timeframe_end
93
+ #
94
+ # @return [Time]
95
+ required :timeframe_end, Time
96
+
97
+ # @!attribute timeframe_start
98
+ #
99
+ # @return [Time]
100
+ required :timeframe_start, Time
101
+
102
+ # @!method initialize(alert_configuration:, amount_threshold:, evaluated_amount:, timeframe_end:, timeframe_start:)
103
+ # Some parameter documentations has been truncated, see
104
+ # {Orb::Models::SubscriptionCostExceededWebhookEvent::Properties} for more
105
+ # details.
106
+ #
107
+ # @param alert_configuration [Orb::Models::SubscriptionCostExceededWebhookEvent::Properties::AlertConfiguration] [Alerts within Orb](/product-catalog/configuring-alerts) monitor spending,
108
+ #
109
+ # @param amount_threshold [String, nil]
110
+ #
111
+ # @param evaluated_amount [String, nil]
112
+ #
113
+ # @param timeframe_end [Time]
114
+ #
115
+ # @param timeframe_start [Time]
116
+
117
+ # @see Orb::Models::SubscriptionCostExceededWebhookEvent::Properties#alert_configuration
118
+ class AlertConfiguration < Orb::Internal::Type::BaseModel
119
+ # @!attribute id
120
+ # Also referred to as alert_id in this documentation.
121
+ #
122
+ # @return [String]
123
+ required :id, String
124
+
125
+ # @!attribute created_at
126
+ # The creation time of the resource in Orb.
127
+ #
128
+ # @return [Time]
129
+ required :created_at, Time
130
+
131
+ # @!attribute currency
132
+ # The name of the currency the credit balance or invoice cost is denominated in.
133
+ #
134
+ # @return [String, nil]
135
+ required :currency, String, nil?: true
136
+
137
+ # @!attribute customer
138
+ # The customer the alert applies to.
139
+ #
140
+ # @return [Orb::Models::CustomerMinified, nil]
141
+ required :customer, -> { Orb::CustomerMinified }, nil?: true
142
+
143
+ # @!attribute enabled
144
+ # Whether the alert is enabled or disabled.
145
+ #
146
+ # @return [Boolean]
147
+ required :enabled, Orb::Internal::Type::Boolean
148
+
149
+ # @!attribute metric
150
+ # The metric the alert applies to.
151
+ #
152
+ # @return [Orb::Models::SubscriptionCostExceededWebhookEvent::Properties::AlertConfiguration::Metric, nil]
153
+ required :metric,
154
+ -> { Orb::SubscriptionCostExceededWebhookEvent::Properties::AlertConfiguration::Metric },
155
+ nil?: true
156
+
157
+ # @!attribute plan
158
+ # The plan the alert applies to.
159
+ #
160
+ # @return [Orb::Models::SubscriptionCostExceededWebhookEvent::Properties::AlertConfiguration::Plan, nil]
161
+ required :plan,
162
+ -> { Orb::SubscriptionCostExceededWebhookEvent::Properties::AlertConfiguration::Plan },
163
+ nil?: true
164
+
165
+ # @!attribute subscription
166
+ # The subscription the alert applies to.
167
+ #
168
+ # @return [Orb::Models::SubscriptionMinified, nil]
169
+ required :subscription, -> { Orb::SubscriptionMinified }, nil?: true
170
+
171
+ # @!attribute thresholds
172
+ # The thresholds that define the conditions under which the alert will be
173
+ # triggered.
174
+ #
175
+ # @return [Array<Orb::Models::SubscriptionCostExceededWebhookEvent::Properties::AlertConfiguration::Threshold>, nil]
176
+ required :thresholds,
177
+ -> {
178
+ Orb::Internal::Type::ArrayOf[Orb::SubscriptionCostExceededWebhookEvent::Properties::AlertConfiguration::Threshold]
179
+ },
180
+ nil?: true
181
+
182
+ # @!attribute type
183
+ # The type of alert. This must be a valid alert type.
184
+ #
185
+ # @return [Symbol, Orb::Models::SubscriptionCostExceededWebhookEvent::Properties::AlertConfiguration::Type]
186
+ required :type,
187
+ enum: -> { Orb::SubscriptionCostExceededWebhookEvent::Properties::AlertConfiguration::Type }
188
+
189
+ # @!attribute balance_alert_status
190
+ # The current status of the alert. This field is only present for credit balance
191
+ # alerts.
192
+ #
193
+ # @return [Array<Orb::Models::SubscriptionCostExceededWebhookEvent::Properties::AlertConfiguration::BalanceAlertStatus>, nil]
194
+ optional :balance_alert_status,
195
+ -> {
196
+ Orb::Internal::Type::ArrayOf[Orb::SubscriptionCostExceededWebhookEvent::Properties::AlertConfiguration::BalanceAlertStatus]
197
+ },
198
+ nil?: true
199
+
200
+ # @!attribute grouping_keys
201
+ # The property keys to group cost alerts by. Only present for cost alerts with
202
+ # grouping enabled.
203
+ #
204
+ # @return [Array<String>, nil]
205
+ optional :grouping_keys, Orb::Internal::Type::ArrayOf[String], nil?: true
206
+
207
+ # @!attribute license_type
208
+ # Minified license type for alert serialization.
209
+ #
210
+ # @return [Orb::Models::SubscriptionCostExceededWebhookEvent::Properties::AlertConfiguration::LicenseType, nil]
211
+ optional :license_type,
212
+ -> {
213
+ Orb::SubscriptionCostExceededWebhookEvent::Properties::AlertConfiguration::LicenseType
214
+ },
215
+ nil?: true
216
+
217
+ # @!attribute price_filters
218
+ # Filters scoping which prices are included in spend and grouped cost alert
219
+ # evaluation. Alerts use the price_id, item_id, and price_type fields only; the
220
+ # alert's pricing unit is reported by currency.
221
+ #
222
+ # @return [Array<Orb::Models::SubscriptionCostExceededWebhookEvent::Properties::AlertConfiguration::PriceFilter>, nil]
223
+ optional :price_filters,
224
+ -> {
225
+ Orb::Internal::Type::ArrayOf[Orb::SubscriptionCostExceededWebhookEvent::Properties::AlertConfiguration::PriceFilter]
226
+ },
227
+ nil?: true
228
+
229
+ # @!attribute threshold_overrides
230
+ # Per-group threshold overrides. Each override maps a specific combination of
231
+ # grouping_keys values to a replacement threshold list. Only present for grouped
232
+ # cost alerts that have at least one override.
233
+ #
234
+ # @return [Array<Orb::Models::SubscriptionCostExceededWebhookEvent::Properties::AlertConfiguration::ThresholdOverride>, nil]
235
+ optional :threshold_overrides,
236
+ -> {
237
+ Orb::Internal::Type::ArrayOf[Orb::SubscriptionCostExceededWebhookEvent::Properties::AlertConfiguration::ThresholdOverride]
238
+ },
239
+ nil?: true
240
+
241
+ # @!method initialize(id:, created_at:, currency:, customer:, enabled:, metric:, plan:, subscription:, thresholds:, type:, balance_alert_status: nil, grouping_keys: nil, license_type: nil, price_filters: nil, threshold_overrides: nil)
242
+ # Some parameter documentations has been truncated, see
243
+ # {Orb::Models::SubscriptionCostExceededWebhookEvent::Properties::AlertConfiguration}
244
+ # for more details.
245
+ #
246
+ # [Alerts within Orb](/product-catalog/configuring-alerts) monitor spending,
247
+ # usage, or credit balance and trigger webhooks when a threshold is exceeded.
248
+ #
249
+ # Alerts created through the API can be scoped to either customers or
250
+ # subscriptions.
251
+ #
252
+ # @param id [String] Also referred to as alert_id in this documentation.
253
+ #
254
+ # @param created_at [Time] The creation time of the resource in Orb.
255
+ #
256
+ # @param currency [String, nil] The name of the currency the credit balance or invoice cost is denominated in.
257
+ #
258
+ # @param customer [Orb::Models::CustomerMinified, nil] The customer the alert applies to.
259
+ #
260
+ # @param enabled [Boolean] Whether the alert is enabled or disabled.
261
+ #
262
+ # @param metric [Orb::Models::SubscriptionCostExceededWebhookEvent::Properties::AlertConfiguration::Metric, nil] The metric the alert applies to.
263
+ #
264
+ # @param plan [Orb::Models::SubscriptionCostExceededWebhookEvent::Properties::AlertConfiguration::Plan, nil] The plan the alert applies to.
265
+ #
266
+ # @param subscription [Orb::Models::SubscriptionMinified, nil] The subscription the alert applies to.
267
+ #
268
+ # @param thresholds [Array<Orb::Models::SubscriptionCostExceededWebhookEvent::Properties::AlertConfiguration::Threshold>, nil] The thresholds that define the conditions under which the alert will be triggere
269
+ #
270
+ # @param type [Symbol, Orb::Models::SubscriptionCostExceededWebhookEvent::Properties::AlertConfiguration::Type] The type of alert. This must be a valid alert type.
271
+ #
272
+ # @param balance_alert_status [Array<Orb::Models::SubscriptionCostExceededWebhookEvent::Properties::AlertConfiguration::BalanceAlertStatus>, nil] The current status of the alert. This field is only present for credit balance a
273
+ #
274
+ # @param grouping_keys [Array<String>, nil] The property keys to group cost alerts by. Only present for cost alerts with gro
275
+ #
276
+ # @param license_type [Orb::Models::SubscriptionCostExceededWebhookEvent::Properties::AlertConfiguration::LicenseType, nil] Minified license type for alert serialization.
277
+ #
278
+ # @param price_filters [Array<Orb::Models::SubscriptionCostExceededWebhookEvent::Properties::AlertConfiguration::PriceFilter>, nil] Filters scoping which prices are included in spend and grouped cost alert evalua
279
+ #
280
+ # @param threshold_overrides [Array<Orb::Models::SubscriptionCostExceededWebhookEvent::Properties::AlertConfiguration::ThresholdOverride>, nil] Per-group threshold overrides. Each override maps a specific combination of grou
281
+
282
+ # @see Orb::Models::SubscriptionCostExceededWebhookEvent::Properties::AlertConfiguration#metric
283
+ class Metric < Orb::Internal::Type::BaseModel
284
+ # @!attribute id
285
+ #
286
+ # @return [String]
287
+ required :id, String
288
+
289
+ # @!method initialize(id:)
290
+ # The metric the alert applies to.
291
+ #
292
+ # @param id [String]
293
+ end
294
+
295
+ # @see Orb::Models::SubscriptionCostExceededWebhookEvent::Properties::AlertConfiguration#plan
296
+ class Plan < Orb::Internal::Type::BaseModel
297
+ # @!attribute id
298
+ #
299
+ # @return [String, nil]
300
+ required :id, String, nil?: true
301
+
302
+ # @!attribute external_plan_id
303
+ # An optional user-defined ID for this plan resource, used throughout the system
304
+ # as an alias for this Plan. Use this field to identify a plan by an existing
305
+ # identifier in your system.
306
+ #
307
+ # @return [String, nil]
308
+ required :external_plan_id, String, nil?: true
309
+
310
+ # @!attribute name
311
+ #
312
+ # @return [String, nil]
313
+ required :name, String, nil?: true
314
+
315
+ # @!attribute plan_version
316
+ #
317
+ # @return [String]
318
+ required :plan_version, String
319
+
320
+ # @!method initialize(id:, external_plan_id:, name:, plan_version:)
321
+ # Some parameter documentations has been truncated, see
322
+ # {Orb::Models::SubscriptionCostExceededWebhookEvent::Properties::AlertConfiguration::Plan}
323
+ # for more details.
324
+ #
325
+ # The plan the alert applies to.
326
+ #
327
+ # @param id [String, nil]
328
+ #
329
+ # @param external_plan_id [String, nil] An optional user-defined ID for this plan resource, used throughout the system a
330
+ #
331
+ # @param name [String, nil]
332
+ #
333
+ # @param plan_version [String]
334
+ end
335
+
336
+ class Threshold < Orb::Internal::Type::BaseModel
337
+ # @!attribute value
338
+ # The value at which an alert will fire. For credit balance alerts, the alert will
339
+ # fire at or below this value. For usage and cost alerts, the alert will fire at
340
+ # or above this value.
341
+ #
342
+ # @return [String]
343
+ required :value, String
344
+
345
+ # @!method initialize(value:)
346
+ # Some parameter documentations has been truncated, see
347
+ # {Orb::Models::SubscriptionCostExceededWebhookEvent::Properties::AlertConfiguration::Threshold}
348
+ # for more details.
349
+ #
350
+ # Thresholds are used to define the conditions under which an alert will be
351
+ # triggered.
352
+ #
353
+ # @param value [String] The value at which an alert will fire. For credit balance alerts, the alert will
354
+ end
355
+
356
+ # The type of alert. This must be a valid alert type.
357
+ #
358
+ # @see Orb::Models::SubscriptionCostExceededWebhookEvent::Properties::AlertConfiguration#type
359
+ module Type
360
+ extend Orb::Internal::Type::Enum
361
+
362
+ CREDIT_BALANCE_DEPLETED = :credit_balance_depleted
363
+ CREDIT_BALANCE_DROPPED = :credit_balance_dropped
364
+ CREDIT_BALANCE_RECOVERED = :credit_balance_recovered
365
+ USAGE_EXCEEDED = :usage_exceeded
366
+ COST_EXCEEDED = :cost_exceeded
367
+ SPEND_EXCEEDED = :spend_exceeded
368
+ LICENSE_BALANCE_THRESHOLD_REACHED = :license_balance_threshold_reached
369
+
370
+ # @!method self.values
371
+ # @return [Array<Symbol>]
372
+ end
373
+
374
+ class BalanceAlertStatus < Orb::Internal::Type::BaseModel
375
+ # @!attribute in_alert
376
+ # Whether the alert is currently in-alert or not.
377
+ #
378
+ # @return [Boolean]
379
+ required :in_alert, Orb::Internal::Type::Boolean
380
+
381
+ # @!attribute threshold_value
382
+ # The value of the threshold that defines the alert status.
383
+ #
384
+ # @return [String]
385
+ required :threshold_value, String
386
+
387
+ # @!method initialize(in_alert:, threshold_value:)
388
+ # Alert status is used to determine if an alert is currently in-alert or not.
389
+ #
390
+ # @param in_alert [Boolean] Whether the alert is currently in-alert or not.
391
+ #
392
+ # @param threshold_value [String] The value of the threshold that defines the alert status.
393
+ end
394
+
395
+ # @see Orb::Models::SubscriptionCostExceededWebhookEvent::Properties::AlertConfiguration#license_type
396
+ class LicenseType < Orb::Internal::Type::BaseModel
397
+ # @!attribute id
398
+ #
399
+ # @return [String]
400
+ required :id, String
401
+
402
+ # @!method initialize(id:)
403
+ # Minified license type for alert serialization.
404
+ #
405
+ # @param id [String]
406
+ end
407
+
408
+ class PriceFilter < Orb::Internal::Type::BaseModel
409
+ # @!attribute field
410
+ # The property of the price to filter on.
411
+ #
412
+ # @return [Symbol, Orb::Models::SubscriptionCostExceededWebhookEvent::Properties::AlertConfiguration::PriceFilter::Field]
413
+ required :field,
414
+ enum: -> { Orb::SubscriptionCostExceededWebhookEvent::Properties::AlertConfiguration::PriceFilter::Field }
415
+
416
+ # @!attribute operator
417
+ # Should prices that match the filter be included or excluded.
418
+ #
419
+ # @return [Symbol, Orb::Models::SubscriptionCostExceededWebhookEvent::Properties::AlertConfiguration::PriceFilter::Operator]
420
+ required :operator,
421
+ enum: -> { Orb::SubscriptionCostExceededWebhookEvent::Properties::AlertConfiguration::PriceFilter::Operator }
422
+
423
+ # @!attribute values
424
+ # The IDs or values that match this filter.
425
+ #
426
+ # @return [Array<String>]
427
+ required :values, Orb::Internal::Type::ArrayOf[String]
428
+
429
+ # @!method initialize(field:, operator:, values:)
430
+ # @param field [Symbol, Orb::Models::SubscriptionCostExceededWebhookEvent::Properties::AlertConfiguration::PriceFilter::Field] The property of the price to filter on.
431
+ #
432
+ # @param operator [Symbol, Orb::Models::SubscriptionCostExceededWebhookEvent::Properties::AlertConfiguration::PriceFilter::Operator] Should prices that match the filter be included or excluded.
433
+ #
434
+ # @param values [Array<String>] The IDs or values that match this filter.
435
+
436
+ # The property of the price to filter on.
437
+ #
438
+ # @see Orb::Models::SubscriptionCostExceededWebhookEvent::Properties::AlertConfiguration::PriceFilter#field
439
+ module Field
440
+ extend Orb::Internal::Type::Enum
441
+
442
+ PRICE_ID = :price_id
443
+ ITEM_ID = :item_id
444
+ PRICE_TYPE = :price_type
445
+ CURRENCY = :currency
446
+ PRICING_UNIT_ID = :pricing_unit_id
447
+
448
+ # @!method self.values
449
+ # @return [Array<Symbol>]
450
+ end
451
+
452
+ # Should prices that match the filter be included or excluded.
453
+ #
454
+ # @see Orb::Models::SubscriptionCostExceededWebhookEvent::Properties::AlertConfiguration::PriceFilter#operator
455
+ module Operator
456
+ extend Orb::Internal::Type::Enum
457
+
458
+ INCLUDES = :includes
459
+ EXCLUDES = :excludes
460
+
461
+ # @!method self.values
462
+ # @return [Array<Symbol>]
463
+ end
464
+ end
465
+
466
+ class ThresholdOverride < Orb::Internal::Type::BaseModel
467
+ # @!attribute group_values
468
+ # The values identifying this group, ordered to match group_keys when set and the
469
+ # alert's grouping_keys otherwise.
470
+ #
471
+ # @return [Array<String>]
472
+ required :group_values, Orb::Internal::Type::ArrayOf[String]
473
+
474
+ # @!attribute thresholds
475
+ # The thresholds applied to this group. An empty list means the group is silenced.
476
+ #
477
+ # @return [Array<Orb::Models::SubscriptionCostExceededWebhookEvent::Properties::AlertConfiguration::ThresholdOverride::Threshold>]
478
+ required :thresholds,
479
+ -> { Orb::Internal::Type::ArrayOf[Orb::SubscriptionCostExceededWebhookEvent::Properties::AlertConfiguration::ThresholdOverride::Threshold] }
480
+
481
+ # @!attribute group_keys
482
+ # The subset of the alert's grouping_keys this override binds. Null when the
483
+ # override targets one exact group across every grouping key.
484
+ #
485
+ # @return [Array<String>, nil]
486
+ optional :group_keys, Orb::Internal::Type::ArrayOf[String], nil?: true
487
+
488
+ # @!method initialize(group_values:, thresholds:, group_keys: nil)
489
+ # Some parameter documentations has been truncated, see
490
+ # {Orb::Models::SubscriptionCostExceededWebhookEvent::Properties::AlertConfiguration::ThresholdOverride}
491
+ # for more details.
492
+ #
493
+ # A per-group threshold override on a grouped cost alert.
494
+ #
495
+ # An empty `thresholds` list means the group is silenced (never fires). A
496
+ # non-empty list fully replaces the default thresholds for that group.
497
+ #
498
+ # @param group_values [Array<String>] The values identifying this group, ordered to match group_keys when set and the
499
+ #
500
+ # @param thresholds [Array<Orb::Models::SubscriptionCostExceededWebhookEvent::Properties::AlertConfiguration::ThresholdOverride::Threshold>] The thresholds applied to this group. An empty list means the group is silenced.
501
+ #
502
+ # @param group_keys [Array<String>, nil] The subset of the alert's grouping_keys this override binds. Null when the overr
503
+
504
+ class Threshold < Orb::Internal::Type::BaseModel
505
+ # @!attribute value
506
+ # The value at which an alert will fire. For credit balance alerts, the alert will
507
+ # fire at or below this value. For usage and cost alerts, the alert will fire at
508
+ # or above this value.
509
+ #
510
+ # @return [String]
511
+ required :value, String
512
+
513
+ # @!method initialize(value:)
514
+ # Some parameter documentations has been truncated, see
515
+ # {Orb::Models::SubscriptionCostExceededWebhookEvent::Properties::AlertConfiguration::ThresholdOverride::Threshold}
516
+ # for more details.
517
+ #
518
+ # Thresholds are used to define the conditions under which an alert will be
519
+ # triggered.
520
+ #
521
+ # @param value [String] The value at which an alert will fire. For credit balance alerts, the alert will
522
+ end
523
+ end
524
+ end
525
+ end
526
+
527
+ # The event this payload describes.
528
+ #
529
+ # @see Orb::Models::SubscriptionCostExceededWebhookEvent#type
530
+ module Type
531
+ extend Orb::Internal::Type::Enum
532
+
533
+ SUBSCRIPTION_COST_EXCEEDED = :"subscription.cost_exceeded"
534
+
535
+ # @!method self.values
536
+ # @return [Array<Symbol>]
537
+ end
538
+ end
539
+ end
540
+ end
@@ -0,0 +1,82 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Orb
4
+ module Models
5
+ class SubscriptionCreatedWebhookEvent < Orb::Internal::Type::BaseModel
6
+ # @!attribute id
7
+ # The ID of this webhook event.
8
+ #
9
+ # @return [String]
10
+ required :id, String
11
+
12
+ # @!attribute created_at
13
+ # The time at which this event was created, to the second.
14
+ #
15
+ # @return [Time]
16
+ required :created_at, Time
17
+
18
+ # @!attribute properties
19
+ #
20
+ # @return [Object]
21
+ required :properties, Orb::Internal::Type::Unknown
22
+
23
+ # @!attribute subscription
24
+ # A [subscription](/core-concepts#subscription) represents the purchase of a plan
25
+ # by a customer.
26
+ #
27
+ # By default, subscriptions begin on the day that they're created and renew
28
+ # automatically for each billing cycle at the cadence that's configured in the
29
+ # plan definition.
30
+ #
31
+ # Subscriptions also default to **beginning of month alignment**, which means the
32
+ # first invoice issued for the subscription will have pro-rated charges between
33
+ # the `start_date` and the first of the following month. Subsequent billing
34
+ # periods will always start and end on a month boundary (e.g. subsequent month
35
+ # starts for monthly billing).
36
+ #
37
+ # Depending on the plan configuration, any _flat_ recurring fees will be billed
38
+ # either at the beginning (in-advance) or end (in-arrears) of each billing cycle.
39
+ # Plans default to **in-advance billing**. Usage-based fees are billed in arrears
40
+ # as usage is accumulated. In the normal course of events, you can expect an
41
+ # invoice to contain usage-based charges for the previous period, and a recurring
42
+ # fee for the following period.
43
+ #
44
+ # @return [Orb::Models::Subscription]
45
+ required :subscription, -> { Orb::Subscription }
46
+
47
+ # @!attribute type
48
+ # The event this payload describes.
49
+ #
50
+ # @return [Symbol, Orb::Models::SubscriptionCreatedWebhookEvent::Type]
51
+ required :type, enum: -> { Orb::SubscriptionCreatedWebhookEvent::Type }
52
+
53
+ # @!method initialize(id:, created_at:, properties:, subscription:, type:)
54
+ # Some parameter documentations has been truncated, see
55
+ # {Orb::Models::SubscriptionCreatedWebhookEvent} for more details.
56
+ #
57
+ # Issued when a subscription resource is created.
58
+ #
59
+ # @param id [String] The ID of this webhook event.
60
+ #
61
+ # @param created_at [Time] The time at which this event was created, to the second.
62
+ #
63
+ # @param properties [Object]
64
+ #
65
+ # @param subscription [Orb::Models::Subscription] A [subscription](/core-concepts#subscription) represents the purchase of a plan
66
+ #
67
+ # @param type [Symbol, Orb::Models::SubscriptionCreatedWebhookEvent::Type] The event this payload describes.
68
+
69
+ # The event this payload describes.
70
+ #
71
+ # @see Orb::Models::SubscriptionCreatedWebhookEvent#type
72
+ module Type
73
+ extend Orb::Internal::Type::Enum
74
+
75
+ SUBSCRIPTION_CREATED = :"subscription.created"
76
+
77
+ # @!method self.values
78
+ # @return [Array<Symbol>]
79
+ end
80
+ end
81
+ end
82
+ end