orb-billing 1.14.0 → 1.16.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 (351) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +20 -0
  3. data/README.md +1 -1
  4. data/lib/orb/client.rb +14 -0
  5. data/lib/orb/internal/transport/base_client.rb +5 -0
  6. data/lib/orb/internal/type/union.rb +13 -27
  7. data/lib/orb/models/accounting_provider_config.rb +14 -3
  8. data/lib/orb/models/adjustment_interval.rb +185 -3
  9. data/lib/orb/models/alert.rb +105 -1
  10. data/lib/orb/models/alert_create_for_subscription_params.rb +120 -7
  11. data/lib/orb/models/alert_update_params.rb +113 -1
  12. data/lib/orb/models/beta/external_plan_id_create_plan_version_params.rb +2419 -17109
  13. data/lib/orb/models/beta_create_plan_version_params.rb +2361 -16947
  14. data/lib/orb/models/billable_metric.rb +10 -1
  15. data/lib/orb/models/changed_subscription_resources.rb +200 -10
  16. data/lib/orb/models/conversion_rate_config.rb +18 -0
  17. data/lib/orb/models/credit_block_list_invoices_response.rb +192 -1
  18. data/lib/orb/models/credit_block_retrieve_response.rb +185 -1
  19. data/lib/orb/models/customer.rb +111 -4
  20. data/lib/orb/models/customer_create_params.rb +6 -1
  21. data/lib/orb/models/customer_tax_id.rb +15 -1
  22. data/lib/orb/models/customer_update_by_external_id_params.rb +16 -2
  23. data/lib/orb/models/customer_update_params.rb +16 -2
  24. data/lib/orb/models/customers/credit_list_by_external_id_response.rb +192 -1
  25. data/lib/orb/models/customers/credit_list_response.rb +189 -1
  26. data/lib/orb/models/customers/credits/ledger_create_entry_by_external_id_params.rb +4 -4
  27. data/lib/orb/models/customers/credits/ledger_create_entry_params.rb +4 -4
  28. data/lib/orb/models/dimensional_price_group.rb +1 -1
  29. data/lib/orb/models/discount.rb +145 -1
  30. data/lib/orb/models/event_ingest_params.rb +5 -2
  31. data/lib/orb/models/invoice.rb +198 -10
  32. data/lib/orb/models/invoice_create_params.rb +6 -5
  33. data/lib/orb/models/invoice_fetch_upcoming_response.rb +200 -10
  34. data/lib/orb/models/invoice_issue_summary_response.rb +9 -3
  35. data/lib/orb/models/invoice_level_discount.rb +145 -1
  36. data/lib/orb/models/invoice_line_item_create_response.rb +189 -5
  37. data/lib/orb/models/invoice_list_summary_response.rb +9 -3
  38. data/lib/orb/models/licenses/external_license_get_usage_params.rb +3 -3
  39. data/lib/orb/models/licenses/usage_get_all_usage_params.rb +3 -3
  40. data/lib/orb/models/licenses/usage_get_usage_params.rb +3 -3
  41. data/lib/orb/models/mutated_subscription.rb +169 -4
  42. data/lib/orb/models/new_allocation_price.rb +11 -1
  43. data/lib/orb/models/new_floating_bulk_price.rb +1 -3
  44. data/lib/orb/models/new_floating_bulk_with_proration_price.rb +1 -3
  45. data/lib/orb/models/new_floating_cumulative_grouped_bulk_price.rb +1 -3
  46. data/lib/orb/models/new_floating_grouped_allocation_price.rb +1 -3
  47. data/lib/orb/models/new_floating_grouped_tiered_package_price.rb +1 -3
  48. data/lib/orb/models/new_floating_grouped_tiered_price.rb +1 -3
  49. data/lib/orb/models/new_floating_grouped_with_metered_minimum_price.rb +1 -3
  50. data/lib/orb/models/new_floating_grouped_with_prorated_minimum_price.rb +1 -3
  51. data/lib/orb/models/new_floating_matrix_price.rb +1 -3
  52. data/lib/orb/models/new_floating_matrix_with_allocation_price.rb +1 -3
  53. data/lib/orb/models/new_floating_matrix_with_display_name_price.rb +1 -3
  54. data/lib/orb/models/new_floating_max_group_tiered_package_price.rb +1 -3
  55. data/lib/orb/models/new_floating_minimum_composite_price.rb +1 -3
  56. data/lib/orb/models/new_floating_package_price.rb +1 -3
  57. data/lib/orb/models/new_floating_package_with_allocation_price.rb +1 -3
  58. data/lib/orb/models/new_floating_scalable_matrix_with_tiered_pricing_price.rb +1 -3
  59. data/lib/orb/models/new_floating_scalable_matrix_with_unit_pricing_price.rb +1 -3
  60. data/lib/orb/models/new_floating_threshold_total_amount_price.rb +1 -3
  61. data/lib/orb/models/new_floating_tiered_package_price.rb +1 -3
  62. data/lib/orb/models/new_floating_tiered_package_with_minimum_price.rb +1 -3
  63. data/lib/orb/models/new_floating_tiered_price.rb +1 -3
  64. data/lib/orb/models/new_floating_tiered_with_minimum_price.rb +1 -3
  65. data/lib/orb/models/new_floating_tiered_with_proration_price.rb +1 -3
  66. data/lib/orb/models/new_floating_unit_price.rb +1 -3
  67. data/lib/orb/models/new_floating_unit_with_percent_price.rb +1 -3
  68. data/lib/orb/models/new_floating_unit_with_proration_price.rb +1 -3
  69. data/lib/orb/models/new_plan_bulk_price.rb +1 -1
  70. data/lib/orb/models/new_plan_bulk_with_proration_price.rb +1 -3
  71. data/lib/orb/models/new_plan_cumulative_grouped_bulk_price.rb +1 -3
  72. data/lib/orb/models/new_plan_grouped_allocation_price.rb +1 -3
  73. data/lib/orb/models/new_plan_grouped_tiered_package_price.rb +1 -3
  74. data/lib/orb/models/new_plan_grouped_tiered_price.rb +1 -3
  75. data/lib/orb/models/new_plan_grouped_with_metered_minimum_price.rb +1 -3
  76. data/lib/orb/models/new_plan_grouped_with_prorated_minimum_price.rb +1 -3
  77. data/lib/orb/models/new_plan_matrix_price.rb +1 -5
  78. data/lib/orb/models/new_plan_matrix_with_allocation_price.rb +1 -3
  79. data/lib/orb/models/new_plan_matrix_with_display_name_price.rb +1 -3
  80. data/lib/orb/models/new_plan_max_group_tiered_package_price.rb +1 -3
  81. data/lib/orb/models/new_plan_minimum_composite_price.rb +1 -3
  82. data/lib/orb/models/new_plan_package_price.rb +1 -5
  83. data/lib/orb/models/new_plan_package_with_allocation_price.rb +1 -3
  84. data/lib/orb/models/new_plan_scalable_matrix_with_tiered_pricing_price.rb +1 -3
  85. data/lib/orb/models/new_plan_scalable_matrix_with_unit_pricing_price.rb +1 -3
  86. data/lib/orb/models/new_plan_threshold_total_amount_price.rb +1 -3
  87. data/lib/orb/models/new_plan_tiered_package_price.rb +1 -3
  88. data/lib/orb/models/new_plan_tiered_package_with_minimum_price.rb +1 -3
  89. data/lib/orb/models/new_plan_tiered_price.rb +1 -5
  90. data/lib/orb/models/new_plan_tiered_with_minimum_price.rb +1 -3
  91. data/lib/orb/models/new_plan_unit_price.rb +1 -1
  92. data/lib/orb/models/new_plan_unit_with_percent_price.rb +1 -3
  93. data/lib/orb/models/new_plan_unit_with_proration_price.rb +1 -3
  94. data/lib/orb/models/new_subscription_bulk_price.rb +1 -3
  95. data/lib/orb/models/new_subscription_bulk_with_proration_price.rb +1 -3
  96. data/lib/orb/models/new_subscription_cumulative_grouped_bulk_price.rb +1 -3
  97. data/lib/orb/models/new_subscription_grouped_allocation_price.rb +1 -3
  98. data/lib/orb/models/new_subscription_grouped_tiered_package_price.rb +1 -3
  99. data/lib/orb/models/new_subscription_grouped_tiered_price.rb +1 -3
  100. data/lib/orb/models/new_subscription_grouped_with_metered_minimum_price.rb +1 -3
  101. data/lib/orb/models/new_subscription_grouped_with_prorated_minimum_price.rb +1 -3
  102. data/lib/orb/models/new_subscription_matrix_price.rb +1 -3
  103. data/lib/orb/models/new_subscription_matrix_with_allocation_price.rb +1 -3
  104. data/lib/orb/models/new_subscription_matrix_with_display_name_price.rb +1 -3
  105. data/lib/orb/models/new_subscription_max_group_tiered_package_price.rb +1 -3
  106. data/lib/orb/models/new_subscription_minimum_composite_price.rb +1 -3
  107. data/lib/orb/models/new_subscription_package_price.rb +1 -3
  108. data/lib/orb/models/new_subscription_package_with_allocation_price.rb +1 -3
  109. data/lib/orb/models/new_subscription_scalable_matrix_with_tiered_pricing_price.rb +1 -3
  110. data/lib/orb/models/new_subscription_scalable_matrix_with_unit_pricing_price.rb +1 -3
  111. data/lib/orb/models/new_subscription_threshold_total_amount_price.rb +1 -3
  112. data/lib/orb/models/new_subscription_tiered_package_price.rb +1 -3
  113. data/lib/orb/models/new_subscription_tiered_package_with_minimum_price.rb +1 -3
  114. data/lib/orb/models/new_subscription_tiered_price.rb +1 -3
  115. data/lib/orb/models/new_subscription_tiered_with_minimum_price.rb +1 -3
  116. data/lib/orb/models/new_subscription_unit_price.rb +1 -3
  117. data/lib/orb/models/new_subscription_unit_with_percent_price.rb +1 -3
  118. data/lib/orb/models/new_subscription_unit_with_proration_price.rb +1 -3
  119. data/lib/orb/models/per_price_cost.rb +2 -2
  120. data/lib/orb/models/plan.rb +189 -9
  121. data/lib/orb/models/plan_create_params.rb +1047 -8228
  122. data/lib/orb/models/plan_update_params.rb +9 -1
  123. data/lib/orb/models/plan_version.rb +186 -5
  124. data/lib/orb/models/plans/external_plan_id_update_params.rb +9 -1
  125. data/lib/orb/models/plans/migration_cancel_response.rb +22 -4
  126. data/lib/orb/models/plans/migration_list_response.rb +22 -4
  127. data/lib/orb/models/plans/migration_retrieve_response.rb +22 -4
  128. data/lib/orb/models/price.rb +2614 -1268
  129. data/lib/orb/models/price_create_params.rb +866 -49
  130. data/lib/orb/models/price_evaluate_multiple_params.rb +889 -54
  131. data/lib/orb/models/price_evaluate_preview_events_params.rb +881 -46
  132. data/lib/orb/models/price_interval.rb +2 -2
  133. data/lib/orb/models/subscription.rb +168 -4
  134. data/lib/orb/models/subscription_create_params.rb +2818 -674
  135. data/lib/orb/models/subscription_price_intervals_params.rb +1098 -57
  136. data/lib/orb/models/subscription_schedule_plan_change_params.rb +2834 -687
  137. data/lib/orb/models/subscription_update_params.rb +12 -1
  138. data/lib/orb/models.rb +2 -0
  139. data/lib/orb/resources/alerts.rb +14 -3
  140. data/lib/orb/resources/customers/credits/ledger.rb +28 -14
  141. data/lib/orb/resources/customers.rb +6 -2
  142. data/lib/orb/resources/events.rb +7 -34
  143. data/lib/orb/resources/invoices.rb +6 -2
  144. data/lib/orb/resources/licenses/external_licenses.rb +1 -1
  145. data/lib/orb/resources/licenses/usage.rb +2 -2
  146. data/lib/orb/resources/metrics.rb +5 -5
  147. data/lib/orb/resources/plans/external_plan_id.rb +5 -3
  148. data/lib/orb/resources/plans.rb +9 -5
  149. data/lib/orb/resources/prices/external_price_id.rb +2 -2
  150. data/lib/orb/resources/prices.rb +5 -5
  151. data/lib/orb/resources/subscriptions.rb +20 -3
  152. data/lib/orb/version.rb +1 -1
  153. data/lib/orb.rb +1 -0
  154. data/rbi/orb/models/accounting_provider_config.rbi +38 -5
  155. data/rbi/orb/models/adjustment_interval.rbi +336 -0
  156. data/rbi/orb/models/alert.rbi +172 -3
  157. data/rbi/orb/models/alert_create_for_subscription_params.rbi +268 -9
  158. data/rbi/orb/models/alert_update_params.rbi +208 -0
  159. data/rbi/orb/models/beta/external_plan_id_create_plan_version_params.rbi +3833 -28395
  160. data/rbi/orb/models/beta_create_plan_version_params.rbi +3833 -28363
  161. data/rbi/orb/models/billable_metric.rbi +10 -0
  162. data/rbi/orb/models/changed_subscription_resources.rbi +360 -5
  163. data/rbi/orb/models/conversion_rate_config.rbi +18 -0
  164. data/rbi/orb/models/credit_block_list_invoices_response.rbi +425 -3
  165. data/rbi/orb/models/credit_block_retrieve_response.rbi +421 -3
  166. data/rbi/orb/models/customer.rbi +190 -10
  167. data/rbi/orb/models/customer_create_params.rbi +12 -2
  168. data/rbi/orb/models/customer_tax_id.rbi +15 -1
  169. data/rbi/orb/models/customer_update_by_external_id_params.rbi +22 -2
  170. data/rbi/orb/models/customer_update_params.rbi +22 -2
  171. data/rbi/orb/models/customers/credit_list_by_external_id_response.rbi +425 -3
  172. data/rbi/orb/models/customers/credit_list_response.rbi +426 -3
  173. data/rbi/orb/models/customers/credits/ledger_create_entry_by_external_id_params.rbi +6 -6
  174. data/rbi/orb/models/customers/credits/ledger_create_entry_params.rbi +6 -6
  175. data/rbi/orb/models/dimensional_price_group.rbi +1 -1
  176. data/rbi/orb/models/discount.rbi +269 -1
  177. data/rbi/orb/models/event_ingest_params.rbi +4 -2
  178. data/rbi/orb/models/invoice.rbi +360 -5
  179. data/rbi/orb/models/invoice_create_params.rbi +12 -7
  180. data/rbi/orb/models/invoice_fetch_upcoming_response.rbi +360 -5
  181. data/rbi/orb/models/invoice_issue_summary_response.rbi +19 -4
  182. data/rbi/orb/models/invoice_level_discount.rbi +298 -1
  183. data/rbi/orb/models/invoice_line_item_create_response.rbi +339 -0
  184. data/rbi/orb/models/invoice_list_summary_response.rbi +19 -4
  185. data/rbi/orb/models/licenses/external_license_get_usage_params.rbi +3 -3
  186. data/rbi/orb/models/licenses/usage_get_all_usage_params.rbi +3 -3
  187. data/rbi/orb/models/licenses/usage_get_usage_params.rbi +3 -3
  188. data/rbi/orb/models/mutated_subscription.rbi +324 -2
  189. data/rbi/orb/models/new_allocation_price.rbi +12 -0
  190. data/rbi/orb/models/per_price_cost.rbi +3 -0
  191. data/rbi/orb/models/plan.rbi +339 -2
  192. data/rbi/orb/models/plan_create_params.rbi +1877 -14138
  193. data/rbi/orb/models/plan_update_params.rbi +8 -0
  194. data/rbi/orb/models/plan_version.rbi +339 -0
  195. data/rbi/orb/models/plans/external_plan_id_update_params.rbi +8 -0
  196. data/rbi/orb/models/plans/migration_cancel_response.rbi +22 -1
  197. data/rbi/orb/models/plans/migration_list_response.rbi +22 -1
  198. data/rbi/orb/models/plans/migration_retrieve_response.rbi +22 -1
  199. data/rbi/orb/models/price.rbi +4552 -2285
  200. data/rbi/orb/models/price_create_params.rbi +1540 -114
  201. data/rbi/orb/models/price_evaluate_multiple_params.rbi +1540 -114
  202. data/rbi/orb/models/price_evaluate_preview_events_params.rbi +1540 -114
  203. data/rbi/orb/models/price_interval.rbi +3 -0
  204. data/rbi/orb/models/subscription.rbi +324 -2
  205. data/rbi/orb/models/subscription_create_params.rbi +4998 -1186
  206. data/rbi/orb/models/subscription_price_intervals_params.rbi +2127 -264
  207. data/rbi/orb/models/subscription_schedule_plan_change_params.rbi +4997 -1185
  208. data/rbi/orb/models/subscription_update_params.rbi +14 -0
  209. data/rbi/orb/models.rbi +2 -0
  210. data/rbi/orb/resources/alerts.rbi +39 -4
  211. data/rbi/orb/resources/customers/credits/ledger.rbi +28 -14
  212. data/rbi/orb/resources/customers.rbi +23 -0
  213. data/rbi/orb/resources/events.rbi +8 -35
  214. data/rbi/orb/resources/invoices.rbi +9 -3
  215. data/rbi/orb/resources/licenses/external_licenses.rbi +1 -1
  216. data/rbi/orb/resources/licenses/usage.rbi +2 -2
  217. data/rbi/orb/resources/metrics.rbi +5 -5
  218. data/rbi/orb/resources/plans/external_plan_id.rbi +5 -2
  219. data/rbi/orb/resources/plans.rbi +9 -3
  220. data/rbi/orb/resources/prices.rbi +3 -0
  221. data/rbi/orb/resources/subscriptions.rbi +29 -0
  222. data/sig/orb/models/accounting_provider_config.rbs +21 -4
  223. data/sig/orb/models/adjustment_interval.rbs +134 -0
  224. data/sig/orb/models/alert.rbs +85 -3
  225. data/sig/orb/models/alert_create_for_subscription_params.rbs +86 -4
  226. data/sig/orb/models/alert_update_params.rbs +86 -1
  227. data/sig/orb/models/beta/external_plan_id_create_plan_version_params.rbs +1803 -11601
  228. data/sig/orb/models/beta_create_plan_version_params.rbs +1747 -11541
  229. data/sig/orb/models/billable_metric.rbs +5 -0
  230. data/sig/orb/models/changed_subscription_resources.rbs +140 -1
  231. data/sig/orb/models/conversion_rate_config.rbs +12 -0
  232. data/sig/orb/models/credit_block_list_invoices_response.rbs +142 -3
  233. data/sig/orb/models/credit_block_retrieve_response.rbs +142 -3
  234. data/sig/orb/models/customer.rbs +70 -4
  235. data/sig/orb/models/customer_create_params.rbs +2 -2
  236. data/sig/orb/models/customer_tax_id.rbs +20 -2
  237. data/sig/orb/models/customer_update_by_external_id_params.rbs +7 -2
  238. data/sig/orb/models/customer_update_params.rbs +7 -2
  239. data/sig/orb/models/customers/credit_list_by_external_id_response.rbs +142 -3
  240. data/sig/orb/models/customers/credit_list_response.rbs +142 -3
  241. data/sig/orb/models/discount.rbs +114 -0
  242. data/sig/orb/models/invoice.rbs +140 -1
  243. data/sig/orb/models/invoice_fetch_upcoming_response.rbs +140 -1
  244. data/sig/orb/models/invoice_issue_summary_response.rbs +2 -1
  245. data/sig/orb/models/invoice_level_discount.rbs +117 -1
  246. data/sig/orb/models/invoice_line_item_create_response.rbs +134 -0
  247. data/sig/orb/models/invoice_list_summary_response.rbs +2 -1
  248. data/sig/orb/models/licenses/external_license_get_usage_params.rbs +4 -4
  249. data/sig/orb/models/licenses/usage_get_all_usage_params.rbs +4 -4
  250. data/sig/orb/models/licenses/usage_get_usage_params.rbs +4 -4
  251. data/sig/orb/models/mutated_subscription.rbs +124 -0
  252. data/sig/orb/models/new_allocation_price.rbs +5 -0
  253. data/sig/orb/models/new_floating_bulk_price.rbs +4 -4
  254. data/sig/orb/models/new_floating_bulk_with_proration_price.rbs +4 -4
  255. data/sig/orb/models/new_floating_cumulative_grouped_bulk_price.rbs +4 -4
  256. data/sig/orb/models/new_floating_grouped_allocation_price.rbs +4 -4
  257. data/sig/orb/models/new_floating_grouped_tiered_package_price.rbs +4 -4
  258. data/sig/orb/models/new_floating_grouped_tiered_price.rbs +4 -4
  259. data/sig/orb/models/new_floating_grouped_with_metered_minimum_price.rbs +4 -4
  260. data/sig/orb/models/new_floating_grouped_with_prorated_minimum_price.rbs +4 -4
  261. data/sig/orb/models/new_floating_matrix_price.rbs +4 -4
  262. data/sig/orb/models/new_floating_matrix_with_allocation_price.rbs +4 -4
  263. data/sig/orb/models/new_floating_matrix_with_display_name_price.rbs +4 -4
  264. data/sig/orb/models/new_floating_max_group_tiered_package_price.rbs +4 -4
  265. data/sig/orb/models/new_floating_minimum_composite_price.rbs +4 -4
  266. data/sig/orb/models/new_floating_package_price.rbs +4 -4
  267. data/sig/orb/models/new_floating_package_with_allocation_price.rbs +4 -4
  268. data/sig/orb/models/new_floating_scalable_matrix_with_tiered_pricing_price.rbs +4 -4
  269. data/sig/orb/models/new_floating_scalable_matrix_with_unit_pricing_price.rbs +4 -4
  270. data/sig/orb/models/new_floating_threshold_total_amount_price.rbs +4 -4
  271. data/sig/orb/models/new_floating_tiered_package_price.rbs +4 -4
  272. data/sig/orb/models/new_floating_tiered_package_with_minimum_price.rbs +4 -4
  273. data/sig/orb/models/new_floating_tiered_price.rbs +4 -4
  274. data/sig/orb/models/new_floating_tiered_with_minimum_price.rbs +4 -4
  275. data/sig/orb/models/new_floating_tiered_with_proration_price.rbs +4 -4
  276. data/sig/orb/models/new_floating_unit_price.rbs +4 -4
  277. data/sig/orb/models/new_floating_unit_with_percent_price.rbs +4 -4
  278. data/sig/orb/models/new_floating_unit_with_proration_price.rbs +4 -4
  279. data/sig/orb/models/new_plan_bulk_price.rbs +4 -4
  280. data/sig/orb/models/new_plan_bulk_with_proration_price.rbs +4 -4
  281. data/sig/orb/models/new_plan_cumulative_grouped_bulk_price.rbs +4 -4
  282. data/sig/orb/models/new_plan_grouped_allocation_price.rbs +4 -4
  283. data/sig/orb/models/new_plan_grouped_tiered_package_price.rbs +4 -4
  284. data/sig/orb/models/new_plan_grouped_tiered_price.rbs +4 -4
  285. data/sig/orb/models/new_plan_grouped_with_metered_minimum_price.rbs +4 -4
  286. data/sig/orb/models/new_plan_grouped_with_prorated_minimum_price.rbs +4 -4
  287. data/sig/orb/models/new_plan_matrix_price.rbs +4 -4
  288. data/sig/orb/models/new_plan_matrix_with_allocation_price.rbs +4 -4
  289. data/sig/orb/models/new_plan_matrix_with_display_name_price.rbs +4 -4
  290. data/sig/orb/models/new_plan_max_group_tiered_package_price.rbs +4 -4
  291. data/sig/orb/models/new_plan_minimum_composite_price.rbs +4 -4
  292. data/sig/orb/models/new_plan_package_price.rbs +4 -4
  293. data/sig/orb/models/new_plan_package_with_allocation_price.rbs +4 -4
  294. data/sig/orb/models/new_plan_scalable_matrix_with_tiered_pricing_price.rbs +4 -4
  295. data/sig/orb/models/new_plan_scalable_matrix_with_unit_pricing_price.rbs +4 -4
  296. data/sig/orb/models/new_plan_threshold_total_amount_price.rbs +4 -4
  297. data/sig/orb/models/new_plan_tiered_package_price.rbs +4 -4
  298. data/sig/orb/models/new_plan_tiered_package_with_minimum_price.rbs +4 -4
  299. data/sig/orb/models/new_plan_tiered_price.rbs +4 -4
  300. data/sig/orb/models/new_plan_tiered_with_minimum_price.rbs +4 -4
  301. data/sig/orb/models/new_plan_unit_price.rbs +4 -4
  302. data/sig/orb/models/new_plan_unit_with_percent_price.rbs +4 -4
  303. data/sig/orb/models/new_plan_unit_with_proration_price.rbs +4 -4
  304. data/sig/orb/models/new_subscription_bulk_price.rbs +4 -4
  305. data/sig/orb/models/new_subscription_bulk_with_proration_price.rbs +4 -4
  306. data/sig/orb/models/new_subscription_cumulative_grouped_bulk_price.rbs +4 -4
  307. data/sig/orb/models/new_subscription_grouped_allocation_price.rbs +4 -4
  308. data/sig/orb/models/new_subscription_grouped_tiered_package_price.rbs +4 -4
  309. data/sig/orb/models/new_subscription_grouped_tiered_price.rbs +4 -4
  310. data/sig/orb/models/new_subscription_grouped_with_metered_minimum_price.rbs +4 -4
  311. data/sig/orb/models/new_subscription_grouped_with_prorated_minimum_price.rbs +4 -4
  312. data/sig/orb/models/new_subscription_matrix_price.rbs +4 -4
  313. data/sig/orb/models/new_subscription_matrix_with_allocation_price.rbs +4 -4
  314. data/sig/orb/models/new_subscription_matrix_with_display_name_price.rbs +4 -4
  315. data/sig/orb/models/new_subscription_max_group_tiered_package_price.rbs +4 -4
  316. data/sig/orb/models/new_subscription_minimum_composite_price.rbs +4 -4
  317. data/sig/orb/models/new_subscription_package_price.rbs +4 -4
  318. data/sig/orb/models/new_subscription_package_with_allocation_price.rbs +4 -4
  319. data/sig/orb/models/new_subscription_scalable_matrix_with_tiered_pricing_price.rbs +4 -4
  320. data/sig/orb/models/new_subscription_scalable_matrix_with_unit_pricing_price.rbs +4 -4
  321. data/sig/orb/models/new_subscription_threshold_total_amount_price.rbs +4 -4
  322. data/sig/orb/models/new_subscription_tiered_package_price.rbs +4 -4
  323. data/sig/orb/models/new_subscription_tiered_package_with_minimum_price.rbs +4 -4
  324. data/sig/orb/models/new_subscription_tiered_price.rbs +4 -4
  325. data/sig/orb/models/new_subscription_tiered_with_minimum_price.rbs +4 -4
  326. data/sig/orb/models/new_subscription_unit_price.rbs +4 -4
  327. data/sig/orb/models/new_subscription_unit_with_percent_price.rbs +4 -4
  328. data/sig/orb/models/new_subscription_unit_with_proration_price.rbs +4 -4
  329. data/sig/orb/models/plan.rbs +134 -0
  330. data/sig/orb/models/plan_create_params.rbs +836 -5728
  331. data/sig/orb/models/plan_update_params.rbs +5 -0
  332. data/sig/orb/models/plan_version.rbs +134 -0
  333. data/sig/orb/models/plans/external_plan_id_update_params.rbs +5 -0
  334. data/sig/orb/models/price.rbs +2200 -1150
  335. data/sig/orb/models/price_create_params.rbs +611 -23
  336. data/sig/orb/models/price_evaluate_multiple_params.rbs +626 -23
  337. data/sig/orb/models/price_evaluate_preview_events_params.rbs +626 -23
  338. data/sig/orb/models/subscription.rbs +124 -0
  339. data/sig/orb/models/subscription_create_params.rbs +2009 -430
  340. data/sig/orb/models/subscription_price_intervals_params.rbs +795 -23
  341. data/sig/orb/models/subscription_schedule_plan_change_params.rbs +2009 -430
  342. data/sig/orb/models/subscription_update_params.rbs +5 -0
  343. data/sig/orb/models.rbs +2 -0
  344. data/sig/orb/resources/alerts.rbs +5 -1
  345. data/sig/orb/resources/customers.rbs +2 -0
  346. data/sig/orb/resources/licenses/external_licenses.rbs +1 -1
  347. data/sig/orb/resources/licenses/usage.rbs +2 -2
  348. data/sig/orb/resources/plans/external_plan_id.rbs +1 -0
  349. data/sig/orb/resources/plans.rbs +2 -0
  350. data/sig/orb/resources/subscriptions.rbs +3 -0
  351. metadata +6 -7
@@ -20,6 +20,13 @@ module Orb
20
20
  sig { returns(T.nilable(T::Boolean)) }
21
21
  attr_accessor :auto_collection
22
22
 
23
+ # Used to determine if invoices for this subscription will be automatically
24
+ # issued. If true, invoices will be automatically issued. If false, invoices will
25
+ # require manual approval. If `null` is specified, this defaults to the behavior
26
+ # configured for this customer.
27
+ sig { returns(T.nilable(T::Boolean)) }
28
+ attr_accessor :auto_issuance
29
+
23
30
  # Determines the default memo on this subscription's invoices. Note that if this
24
31
  # is not provided, it is determined by the plan configuration.
25
32
  sig { returns(T.nilable(String)) }
@@ -48,6 +55,7 @@ module Orb
48
55
  params(
49
56
  subscription_id: String,
50
57
  auto_collection: T.nilable(T::Boolean),
58
+ auto_issuance: T.nilable(T::Boolean),
51
59
  default_invoice_memo: T.nilable(String),
52
60
  invoicing_threshold: T.nilable(String),
53
61
  metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]),
@@ -61,6 +69,11 @@ module Orb
61
69
  # charged with the saved payment method on the due date. This property defaults to
62
70
  # the plan's behavior.
63
71
  auto_collection: nil,
72
+ # Used to determine if invoices for this subscription will be automatically
73
+ # issued. If true, invoices will be automatically issued. If false, invoices will
74
+ # require manual approval. If `null` is specified, this defaults to the behavior
75
+ # configured for this customer.
76
+ auto_issuance: nil,
64
77
  # Determines the default memo on this subscription's invoices. Note that if this
65
78
  # is not provided, it is determined by the plan configuration.
66
79
  default_invoice_memo: nil,
@@ -86,6 +99,7 @@ module Orb
86
99
  {
87
100
  subscription_id: String,
88
101
  auto_collection: T.nilable(T::Boolean),
102
+ auto_issuance: T.nilable(T::Boolean),
89
103
  default_invoice_memo: T.nilable(String),
90
104
  invoicing_threshold: T.nilable(String),
91
105
  metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]),
data/rbi/orb/models.rbi CHANGED
@@ -61,6 +61,8 @@ module Orb
61
61
 
62
62
  ChangedSubscriptionResources = Orb::Models::ChangedSubscriptionResources
63
63
 
64
+ ConversionRateConfig = Orb::Models::ConversionRateConfig
65
+
64
66
  ConversionRateTier = Orb::Models::ConversionRateTier
65
67
 
66
68
  ConversionRateTieredConfig = Orb::Models::ConversionRateTieredConfig
@@ -23,6 +23,12 @@ module Orb
23
23
  params(
24
24
  alert_configuration_id: String,
25
25
  thresholds: T::Array[Orb::Threshold::OrHash],
26
+ price_filters:
27
+ T.nilable(T::Array[Orb::AlertUpdateParams::PriceFilter::OrHash]),
28
+ threshold_overrides:
29
+ T.nilable(
30
+ T::Array[Orb::AlertUpdateParams::ThresholdOverride::OrHash]
31
+ ),
26
32
  request_options: Orb::RequestOptions::OrHash
27
33
  ).returns(Orb::Alert)
28
34
  end
@@ -30,6 +36,13 @@ module Orb
30
36
  alert_configuration_id,
31
37
  # The thresholds that define the values at which the alert will be triggered.
32
38
  thresholds:,
39
+ # Replaces the price filters on a grouped cost alert; an empty list clears them.
40
+ # Only applicable to cost alerts with grouping_keys. Omit to leave unchanged.
41
+ price_filters: nil,
42
+ # Replaces the per-group threshold overrides on a grouped cost alert; an empty
43
+ # list clears them. Only applicable to cost alerts with grouping_keys. Omit to
44
+ # leave unchanged.
45
+ threshold_overrides: nil,
33
46
  request_options: {}
34
47
  )
35
48
  end
@@ -153,9 +166,21 @@ module Orb
153
166
  subscription_id: String,
154
167
  thresholds: T::Array[Orb::Threshold::OrHash],
155
168
  type: Orb::AlertCreateForSubscriptionParams::Type::OrSymbol,
169
+ currency: T.nilable(String),
156
170
  grouping_keys: T.nilable(T::Array[String]),
157
171
  metric_id: T.nilable(String),
158
- pricing_unit_id: T.nilable(String),
172
+ price_filters:
173
+ T.nilable(
174
+ T::Array[
175
+ Orb::AlertCreateForSubscriptionParams::PriceFilter::OrHash
176
+ ]
177
+ ),
178
+ threshold_overrides:
179
+ T.nilable(
180
+ T::Array[
181
+ Orb::AlertCreateForSubscriptionParams::ThresholdOverride::OrHash
182
+ ]
183
+ ),
159
184
  request_options: Orb::RequestOptions::OrHash
160
185
  ).returns(Orb::Alert)
161
186
  end
@@ -165,14 +190,24 @@ module Orb
165
190
  thresholds:,
166
191
  # The type of alert to create. This must be a valid alert type.
167
192
  type:,
193
+ # The case sensitive currency or custom pricing unit to use for grouped cost
194
+ # alerts. Required when grouping_keys is set.
195
+ currency: nil,
168
196
  # The property keys to group cost alerts by. Only applicable for cost_exceeded
169
197
  # alerts.
170
198
  grouping_keys: nil,
171
199
  # The metric to track usage for.
172
200
  metric_id: nil,
173
- # The pricing unit to use for grouped cost alerts. Required when grouping_keys is
174
- # set.
175
- pricing_unit_id: nil,
201
+ # Filters to scope which prices are included in grouped cost alert evaluation.
202
+ # Supports filtering by price_id, item_id, or price_type with includes/excludes
203
+ # operators. Only applicable when grouping_keys is set.
204
+ price_filters: nil,
205
+ # Per-group threshold overrides. Each override maps a specific combination of
206
+ # grouping_keys values to a list of thresholds that fully replaces the default
207
+ # thresholds for that group. An empty thresholds list silences the group. Groups
208
+ # without an override use the default thresholds. Only applicable when
209
+ # grouping_keys is set.
210
+ threshold_overrides: nil,
176
211
  request_options: {}
177
212
  )
178
213
  end
@@ -172,8 +172,9 @@ module Orb
172
172
  # }
173
173
  # ```
174
174
  #
175
- # Note that by default, Orb will always first increment any _negative_ balance in
176
- # existing blocks before adding the remaining amount to the desired credit block.
175
+ # Note that an `increment` entry always creates a new credit block (defined by the
176
+ # optional `effective_date` and `expiry_date`); it never modifies an existing
177
+ # block.
177
178
  #
178
179
  # ### Invoicing for credits
179
180
  #
@@ -194,11 +195,17 @@ module Orb
194
195
  # ## Deducting Credits
195
196
  #
196
197
  # Orb allows you to deduct credits from a customer by creating an entry of type
197
- # `decrement`. Orb matches the algorithm for automatic deductions for determining
198
- # which credit blocks to decrement from. In the case that the deduction leads to
199
- # multiple ledger entries, the response from this endpoint will be the final
200
- # deduction. Orb also optionally allows specifying a description to assist with
201
- # auditing.
198
+ # `decrement`. A `decrement` entry records credits as usage and immediately
199
+ # recognizes revenue at the block's `per_unit_cost_basis`.
200
+ #
201
+ # For most credit removals, use `void` (no revenue impact) or `expiration_change`
202
+ # (revenue recognized on expiration) instead. Only use `decrement` when credits
203
+ # were genuinely consumed outside of normal event ingestion.
204
+ #
205
+ # Orb matches the algorithm for automatic deductions for determining which credit
206
+ # blocks to decrement from. In the case that the deduction leads to multiple
207
+ # ledger entries, the response from this endpoint will be the final deduction. Orb
208
+ # also optionally allows specifying a description to assist with auditing.
202
209
  #
203
210
  # The following snippet illustrates a sample request body to decrement credits.
204
211
  #
@@ -308,8 +315,9 @@ module Orb
308
315
  # }
309
316
  # ```
310
317
  #
311
- # Note that by default, Orb will always first increment any _negative_ balance in
312
- # existing blocks before adding the remaining amount to the desired credit block.
318
+ # Note that an `increment` entry always creates a new credit block (defined by the
319
+ # optional `effective_date` and `expiry_date`); it never modifies an existing
320
+ # block.
313
321
  #
314
322
  # ### Invoicing for credits
315
323
  #
@@ -330,11 +338,17 @@ module Orb
330
338
  # ## Deducting Credits
331
339
  #
332
340
  # Orb allows you to deduct credits from a customer by creating an entry of type
333
- # `decrement`. Orb matches the algorithm for automatic deductions for determining
334
- # which credit blocks to decrement from. In the case that the deduction leads to
335
- # multiple ledger entries, the response from this endpoint will be the final
336
- # deduction. Orb also optionally allows specifying a description to assist with
337
- # auditing.
341
+ # `decrement`. A `decrement` entry records credits as usage and immediately
342
+ # recognizes revenue at the block's `per_unit_cost_basis`.
343
+ #
344
+ # For most credit removals, use `void` (no revenue impact) or `expiration_change`
345
+ # (revenue recognized on expiration) instead. Only use `decrement` when credits
346
+ # were genuinely consumed outside of normal event ingestion.
347
+ #
348
+ # Orb matches the algorithm for automatic deductions for determining which credit
349
+ # blocks to decrement from. In the case that the deduction leads to multiple
350
+ # ledger entries, the response from this endpoint will be the final deduction. Orb
351
+ # also optionally allows specifying a description to assist with auditing.
338
352
  #
339
353
  # The following snippet illustrates a sample request body to decrement credits.
340
354
  #
@@ -225,11 +225,13 @@ module Orb
225
225
  # | Estonia | `eu_vat` | European VAT Number |
226
226
  # | Ethiopia | `et_tin` | Ethiopia Tax Identification Number |
227
227
  # | European Union | `eu_oss_vat` | European One Stop Shop VAT Number for non-Union scheme |
228
+ # | Faroe Islands | `fo_vat` | Faroe Islands VAT Number |
228
229
  # | Finland | `eu_vat` | European VAT Number |
229
230
  # | France | `eu_vat` | European VAT Number |
230
231
  # | Georgia | `ge_vat` | Georgian VAT |
231
232
  # | Germany | `de_stn` | German Tax Number (Steuernummer) |
232
233
  # | Germany | `eu_vat` | European VAT Number |
234
+ # | Gibraltar | `gi_tin` | Gibraltar Tax Identification Number |
233
235
  # | Greece | `eu_vat` | European VAT Number |
234
236
  # | Guinea | `gn_nif` | Guinea Tax Identification Number (Número de Identificação Fiscal) |
235
237
  # | Hong Kong | `hk_br` | Hong Kong BR Number |
@@ -241,6 +243,7 @@ module Orb
241
243
  # | Ireland | `eu_vat` | European VAT Number |
242
244
  # | Israel | `il_vat` | Israel VAT |
243
245
  # | Italy | `eu_vat` | European VAT Number |
246
+ # | Italy | `it_cf` | Italian Codice Fiscale Number |
244
247
  # | Japan | `jp_cn` | Japanese Corporate Number (_Hōjin Bangō_) |
245
248
  # | Japan | `jp_rn` | Japanese Registered Foreign Businesses' Registration Number (_Tōroku Kokugai Jigyōsha no Tōroku Bangō_) |
246
249
  # | Japan | `jp_trn` | Japanese Tax Registration Number (_Tōroku Bangō_) |
@@ -271,6 +274,7 @@ module Orb
271
274
  # | Norway | `no_vat` | Norwegian VAT Number |
272
275
  # | Norway | `no_voec` | Norwegian VAT on e-commerce Number |
273
276
  # | Oman | `om_vat` | Omani VAT Number |
277
+ # | Paraguay | `py_ruc` | Paraguayan RUC Number |
274
278
  # | Peru | `pe_ruc` | Peruvian RUC Number |
275
279
  # | Philippines | `ph_tin` | Philippines Tax Identification Number |
276
280
  # | Poland | `eu_vat` | European VAT Number |
@@ -292,6 +296,7 @@ module Orb
292
296
  # | South Korea | `kr_brn` | Korean BRN |
293
297
  # | Spain | `es_cif` | Spanish NIF Number (previously Spanish CIF Number) |
294
298
  # | Spain | `eu_vat` | European VAT Number |
299
+ # | Sri Lanka | `lk_vat` | Sri Lanka VAT Number |
295
300
  # | Suriname | `sr_fin` | Suriname FIN Number |
296
301
  # | Sweden | `eu_vat` | European VAT Number |
297
302
  # | Switzerland | `ch_uid` | Switzerland UID Number |
@@ -338,6 +343,7 @@ module Orb
338
343
  auto_issuance: T.nilable(T::Boolean),
339
344
  billing_address: T.nilable(Orb::AddressInput::OrHash),
340
345
  currency: T.nilable(String),
346
+ default_payment_method_id: T.nilable(String),
341
347
  email: T.nilable(String),
342
348
  email_delivery: T.nilable(T::Boolean),
343
349
  external_customer_id: T.nilable(String),
@@ -389,6 +395,9 @@ module Orb
389
395
  # not set at creation or update time, it will be set at subscription creation
390
396
  # time.
391
397
  currency: nil,
398
+ # The Orb ID of the payment method to set as this customer's default. Pass `null`
399
+ # to clear the customer's default payment method.
400
+ default_payment_method_id: nil,
392
401
  # A valid customer email, to be used for invoicing and notifications.
393
402
  email: nil,
394
403
  email_delivery: nil,
@@ -480,11 +489,13 @@ module Orb
480
489
  # | Estonia | `eu_vat` | European VAT Number |
481
490
  # | Ethiopia | `et_tin` | Ethiopia Tax Identification Number |
482
491
  # | European Union | `eu_oss_vat` | European One Stop Shop VAT Number for non-Union scheme |
492
+ # | Faroe Islands | `fo_vat` | Faroe Islands VAT Number |
483
493
  # | Finland | `eu_vat` | European VAT Number |
484
494
  # | France | `eu_vat` | European VAT Number |
485
495
  # | Georgia | `ge_vat` | Georgian VAT |
486
496
  # | Germany | `de_stn` | German Tax Number (Steuernummer) |
487
497
  # | Germany | `eu_vat` | European VAT Number |
498
+ # | Gibraltar | `gi_tin` | Gibraltar Tax Identification Number |
488
499
  # | Greece | `eu_vat` | European VAT Number |
489
500
  # | Guinea | `gn_nif` | Guinea Tax Identification Number (Número de Identificação Fiscal) |
490
501
  # | Hong Kong | `hk_br` | Hong Kong BR Number |
@@ -496,6 +507,7 @@ module Orb
496
507
  # | Ireland | `eu_vat` | European VAT Number |
497
508
  # | Israel | `il_vat` | Israel VAT |
498
509
  # | Italy | `eu_vat` | European VAT Number |
510
+ # | Italy | `it_cf` | Italian Codice Fiscale Number |
499
511
  # | Japan | `jp_cn` | Japanese Corporate Number (_Hōjin Bangō_) |
500
512
  # | Japan | `jp_rn` | Japanese Registered Foreign Businesses' Registration Number (_Tōroku Kokugai Jigyōsha no Tōroku Bangō_) |
501
513
  # | Japan | `jp_trn` | Japanese Tax Registration Number (_Tōroku Bangō_) |
@@ -526,6 +538,7 @@ module Orb
526
538
  # | Norway | `no_vat` | Norwegian VAT Number |
527
539
  # | Norway | `no_voec` | Norwegian VAT on e-commerce Number |
528
540
  # | Oman | `om_vat` | Omani VAT Number |
541
+ # | Paraguay | `py_ruc` | Paraguayan RUC Number |
529
542
  # | Peru | `pe_ruc` | Peruvian RUC Number |
530
543
  # | Philippines | `ph_tin` | Philippines Tax Identification Number |
531
544
  # | Poland | `eu_vat` | European VAT Number |
@@ -547,6 +560,7 @@ module Orb
547
560
  # | South Korea | `kr_brn` | Korean BRN |
548
561
  # | Spain | `es_cif` | Spanish NIF Number (previously Spanish CIF Number) |
549
562
  # | Spain | `eu_vat` | European VAT Number |
563
+ # | Sri Lanka | `lk_vat` | Sri Lanka VAT Number |
550
564
  # | Suriname | `sr_fin` | Suriname FIN Number |
551
565
  # | Sweden | `eu_vat` | European VAT Number |
552
566
  # | Switzerland | `ch_uid` | Switzerland UID Number |
@@ -701,6 +715,7 @@ module Orb
701
715
  auto_issuance: T.nilable(T::Boolean),
702
716
  billing_address: T.nilable(Orb::AddressInput::OrHash),
703
717
  currency: T.nilable(String),
718
+ default_payment_method_id: T.nilable(String),
704
719
  email: T.nilable(String),
705
720
  email_delivery: T.nilable(T::Boolean),
706
721
  external_customer_id: T.nilable(String),
@@ -756,6 +771,9 @@ module Orb
756
771
  # not set at creation or update time, it will be set at subscription creation
757
772
  # time.
758
773
  currency: nil,
774
+ # The Orb ID of the payment method to set as this customer's default. Pass `null`
775
+ # to clear the customer's default payment method.
776
+ default_payment_method_id: nil,
759
777
  # A valid customer email, to be used for invoicing and notifications.
760
778
  email: nil,
761
779
  email_delivery: nil,
@@ -847,11 +865,13 @@ module Orb
847
865
  # | Estonia | `eu_vat` | European VAT Number |
848
866
  # | Ethiopia | `et_tin` | Ethiopia Tax Identification Number |
849
867
  # | European Union | `eu_oss_vat` | European One Stop Shop VAT Number for non-Union scheme |
868
+ # | Faroe Islands | `fo_vat` | Faroe Islands VAT Number |
850
869
  # | Finland | `eu_vat` | European VAT Number |
851
870
  # | France | `eu_vat` | European VAT Number |
852
871
  # | Georgia | `ge_vat` | Georgian VAT |
853
872
  # | Germany | `de_stn` | German Tax Number (Steuernummer) |
854
873
  # | Germany | `eu_vat` | European VAT Number |
874
+ # | Gibraltar | `gi_tin` | Gibraltar Tax Identification Number |
855
875
  # | Greece | `eu_vat` | European VAT Number |
856
876
  # | Guinea | `gn_nif` | Guinea Tax Identification Number (Número de Identificação Fiscal) |
857
877
  # | Hong Kong | `hk_br` | Hong Kong BR Number |
@@ -863,6 +883,7 @@ module Orb
863
883
  # | Ireland | `eu_vat` | European VAT Number |
864
884
  # | Israel | `il_vat` | Israel VAT |
865
885
  # | Italy | `eu_vat` | European VAT Number |
886
+ # | Italy | `it_cf` | Italian Codice Fiscale Number |
866
887
  # | Japan | `jp_cn` | Japanese Corporate Number (_Hōjin Bangō_) |
867
888
  # | Japan | `jp_rn` | Japanese Registered Foreign Businesses' Registration Number (_Tōroku Kokugai Jigyōsha no Tōroku Bangō_) |
868
889
  # | Japan | `jp_trn` | Japanese Tax Registration Number (_Tōroku Bangō_) |
@@ -893,6 +914,7 @@ module Orb
893
914
  # | Norway | `no_vat` | Norwegian VAT Number |
894
915
  # | Norway | `no_voec` | Norwegian VAT on e-commerce Number |
895
916
  # | Oman | `om_vat` | Omani VAT Number |
917
+ # | Paraguay | `py_ruc` | Paraguayan RUC Number |
896
918
  # | Peru | `pe_ruc` | Peruvian RUC Number |
897
919
  # | Philippines | `ph_tin` | Philippines Tax Identification Number |
898
920
  # | Poland | `eu_vat` | European VAT Number |
@@ -914,6 +936,7 @@ module Orb
914
936
  # | South Korea | `kr_brn` | Korean BRN |
915
937
  # | Spain | `es_cif` | Spanish NIF Number (previously Spanish CIF Number) |
916
938
  # | Spain | `eu_vat` | European VAT Number |
939
+ # | Sri Lanka | `lk_vat` | Sri Lanka VAT Number |
917
940
  # | Suriname | `sr_fin` | Suriname FIN Number |
918
941
  # | Sweden | `eu_vat` | European VAT Number |
919
942
  # | Switzerland | `ch_uid` | Switzerland UID Number |
@@ -258,8 +258,8 @@ module Orb
258
258
  # billed for in the corresponding billing period.
259
259
  #
260
260
  # In general, Orb does not expect events with future dated timestamps. In cases
261
- # where the timestamp is at least 24 hours ahead of the current time, the event
262
- # will not be accepted as a valid event, and will throw validation errors.
261
+ # where the timestamp is 5 minutes ahead of the current time, the event will not
262
+ # be accepted as a valid event, and will throw validation errors.
263
263
  #
264
264
  # ## Event validation
265
265
  #
@@ -274,9 +274,9 @@ module Orb
274
274
  # - If the `external_customer_id` is specified, the customer in Orb does not need
275
275
  # to exist. Events will be attributed to any future customers with the
276
276
  # `external_customer_id` on subscription creation.
277
- # - `timestamp` must conform to ISO 8601 and represent a timestamp at most 1 hour
278
- # in the future. This timestamp should be sent in UTC timezone (no timezone
279
- # offset).
277
+ # - `timestamp` must conform to ISO 8601 and represent a timestamp at most 5
278
+ # minutes in the future. This timestamp should be sent in UTC timezone (no
279
+ # timezone offset).
280
280
  #
281
281
  # ## Idempotency and retry semantics
282
282
  #
@@ -313,34 +313,7 @@ module Orb
313
313
  # request payload size, but please give us a heads up if you’re changing either of
314
314
  # these factors by an order of magnitude from initial setup.
315
315
  #
316
- # ## Testing in debug mode
317
- #
318
- # The ingestion API supports a debug mode, which returns additional verbose output
319
- # to indicate which event idempotency keys were newly ingested or duplicates from
320
- # previous requests. To enable this mode, mark `debug=true` as a query parameter.
321
- #
322
- # If `debug=true` is not specified, the response will only contain
323
- # `validation_failed`. Orb will still honor the idempotency guarantees set
324
- # [here](/events-and-metrics/event-ingestion#event-volume-and-concurrency) in all
325
- # cases.
326
- #
327
- # We strongly recommend that you only use debug mode as part of testing your
328
- # initial Orb integration. Once you're ready to switch to production, disable
329
- # debug mode to take advantage of improved performance and maximal throughput.
330
- #
331
- # #### Example: ingestion response with `debug=true`
332
- #
333
- # ```json
334
- # {
335
- # "debug": {
336
- # "duplicate": [],
337
- # "ingested": ["B7E83HDMfJPAunXW", "SJs5DQJ3TnwSqEZE", "8SivfDsNKwCeAXim"]
338
- # },
339
- # "validation_failed": []
340
- # }
341
- # ```
342
- #
343
- # #### Example: ingestion response with `debug=false`
316
+ # #### Example: ingestion response
344
317
  #
345
318
  # ```json
346
319
  # {
@@ -361,8 +334,8 @@ module Orb
361
334
  # Query param: If this ingestion request is part of a backfill, this parameter
362
335
  # ties the ingested events to the backfill
363
336
  backfill_id: nil,
364
- # Query param: Flag to enable additional debug information in the endpoint
365
- # response
337
+ # Query param: Pending Deprecation: Flag to enable additional debug information in
338
+ # the endpoint response
366
339
  debug: nil,
367
340
  request_options: {}
368
341
  )
@@ -22,7 +22,8 @@ module Orb
22
22
  Orb::PercentageDiscount::OrHash,
23
23
  Orb::TrialDiscount::OrHash,
24
24
  Orb::UsageDiscount::OrHash,
25
- Orb::AmountDiscount::OrHash
25
+ Orb::AmountDiscount::OrHash,
26
+ Orb::Discount::TieredPercentage::OrHash
26
27
  )
27
28
  ),
28
29
  due_date: T.nilable(Orb::InvoiceCreateParams::DueDate::Variants),
@@ -38,8 +39,9 @@ module Orb
38
39
  # An ISO 4217 currency string. Must be the same as the customer's currency if it
39
40
  # is set.
40
41
  currency:,
41
- # Optional invoice date to set. Must be in the past, if not set, `invoice_date` is
42
- # set to the current time in the customer's timezone.
42
+ # An ISO 8601 date or timestamp, interpreted in the customer's timezone. Must be
43
+ # in the past. If a date is set without a time, `invoice_date` is set to midnight
44
+ # on the chosen date in the customer's timezone.
43
45
  invoice_date:,
44
46
  line_items:,
45
47
  # Determines whether this invoice will automatically attempt to charge a saved
@@ -136,6 +138,10 @@ module Orb
136
138
  # When fetching any `draft` invoices, this returns the last-computed invoice
137
139
  # values for each draft invoice, which may not always be up-to-date since Orb
138
140
  # regularly refreshes invoices asynchronously.
141
+ #
142
+ # If you don't need line item details, minimums, maximums, or discounts, prefer
143
+ # the [list invoices summary](/api-reference/invoice/list-invoices-summary)
144
+ # endpoint for better performance.
139
145
  sig do
140
146
  params(
141
147
  amount: T.nilable(String),
@@ -15,7 +15,7 @@ module Orb
15
15
  subscription_id: String,
16
16
  cursor: T.nilable(String),
17
17
  end_date: T.nilable(Date),
18
- group_by: T.nilable(T::Array[String]),
18
+ group_by: T.nilable(String),
19
19
  limit: Integer,
20
20
  start_date: T.nilable(Date),
21
21
  request_options: Orb::RequestOptions::OrHash
@@ -14,7 +14,7 @@ module Orb
14
14
  subscription_id: String,
15
15
  cursor: T.nilable(String),
16
16
  end_date: T.nilable(Date),
17
- group_by: T.nilable(T::Array[String]),
17
+ group_by: T.nilable(String),
18
18
  limit: Integer,
19
19
  start_date: T.nilable(Date),
20
20
  request_options: Orb::RequestOptions::OrHash
@@ -50,7 +50,7 @@ module Orb
50
50
  license_id: String,
51
51
  cursor: T.nilable(String),
52
52
  end_date: T.nilable(Date),
53
- group_by: T.nilable(T::Array[String]),
53
+ group_by: T.nilable(String),
54
54
  limit: Integer,
55
55
  start_date: T.nilable(Date),
56
56
  request_options: Orb::RequestOptions::OrHash
@@ -56,9 +56,8 @@ module Orb
56
56
  )
57
57
  end
58
58
 
59
- # This endpoint is used to fetch [metric](/core-concepts##metric) details given a
60
- # metric identifier. It returns information about the metrics including its name,
61
- # description, and item.
59
+ # This endpoint is used to list [metrics](/core-concepts#metric). It returns
60
+ # information about the metrics including its name, description, and item.
62
61
  sig do
63
62
  params(
64
63
  created_at_gt: T.nilable(Time),
@@ -84,8 +83,9 @@ module Orb
84
83
  )
85
84
  end
86
85
 
87
- # This endpoint is used to list [metrics](/core-concepts#metric). It returns
88
- # information about the metrics including its name, description, and item.
86
+ # This endpoint is used to fetch [metric](/core-concepts#metric) details given a
87
+ # metric identifier. It returns information about the metrics including its name,
88
+ # description, and item.
89
89
  sig do
90
90
  params(
91
91
  metric_id: String,
@@ -8,13 +8,14 @@ module Orb
8
8
  # subscription. You can see more about how to configure prices in the
9
9
  # [Price resource](/reference/price).
10
10
  class ExternalPlanID
11
- # This endpoint can be used to update the `external_plan_id`, and `metadata` of an
12
- # existing plan.
11
+ # This endpoint can be used to update the `external_plan_id`, `description`, and
12
+ # `metadata` of an existing plan.
13
13
  #
14
14
  # Other fields on a plan are currently immutable.
15
15
  sig do
16
16
  params(
17
17
  other_external_plan_id: String,
18
+ description: T.nilable(String),
18
19
  external_plan_id: T.nilable(String),
19
20
  metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]),
20
21
  request_options: Orb::RequestOptions::OrHash
@@ -22,6 +23,8 @@ module Orb
22
23
  end
23
24
  def update(
24
25
  other_external_plan_id,
26
+ # An optional user-defined description of the plan.
27
+ description: nil,
25
28
  # An optional user-defined ID for this plan resource, used throughout the system
26
29
  # as an alias for this Plan. Use this field to identify a plan by an existing
27
30
  # identifier in your system.
@@ -30,6 +30,7 @@ module Orb
30
30
  adjustments:
31
31
  T.nilable(T::Array[Orb::PlanCreateParams::Adjustment::OrHash]),
32
32
  default_invoice_memo: T.nilable(String),
33
+ description: T.nilable(String),
33
34
  external_plan_id: T.nilable(String),
34
35
  metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]),
35
36
  net_terms: T.nilable(Integer),
@@ -52,6 +53,8 @@ module Orb
52
53
  adjustments: nil,
53
54
  # Free-form text which is available on the invoice PDF and the Orb invoice portal.
54
55
  default_invoice_memo: nil,
56
+ # An optional user-defined description of the plan.
57
+ description: nil,
55
58
  external_plan_id: nil,
56
59
  # User-specified key/value pairs for the resource. Individual keys can be removed
57
60
  # by setting the value to `null`, and the entire metadata mapping can be cleared
@@ -71,13 +74,14 @@ module Orb
71
74
  )
72
75
  end
73
76
 
74
- # This endpoint can be used to update the `external_plan_id`, and `metadata` of an
75
- # existing plan.
77
+ # This endpoint can be used to update the `external_plan_id`, `description`, and
78
+ # `metadata` of an existing plan.
76
79
  #
77
80
  # Other fields on a plan are currently immutable.
78
81
  sig do
79
82
  params(
80
83
  plan_id: String,
84
+ description: T.nilable(String),
81
85
  external_plan_id: T.nilable(String),
82
86
  metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]),
83
87
  request_options: Orb::RequestOptions::OrHash
@@ -85,6 +89,8 @@ module Orb
85
89
  end
86
90
  def update(
87
91
  plan_id,
92
+ # An optional user-defined description of the plan.
93
+ description: nil,
88
94
  # An optional user-defined ID for this plan resource, used throughout the system
89
95
  # as an alias for this Plan. Use this field to identify a plan by an existing
90
96
  # identifier in your system.
@@ -100,7 +106,7 @@ module Orb
100
106
  # This endpoint returns a list of all [plans](/core-concepts#plan-and-price) for
101
107
  # an account in a list format. The list of plans is ordered starting from the most
102
108
  # recently created plan. The response also includes
103
- # [`pagination_metadata`](/api-reference/pagination), which lets the caller
109
+ # [`pagination_metadata`](/api-reference/pagination) which lets the caller
104
110
  # retrieve the next page of results if they exist.
105
111
  sig do
106
112
  params(
@@ -54,6 +54,7 @@ module Orb
54
54
  Orb::NewFloatingPackageWithAllocationPrice::OrHash,
55
55
  Orb::NewFloatingUnitWithPercentPrice::OrHash,
56
56
  Orb::NewFloatingMatrixWithAllocationPrice::OrHash,
57
+ Orb::PriceCreateParams::Body::MatrixWithThresholdDiscounts::OrHash,
57
58
  Orb::NewFloatingTieredWithProrationPrice::OrHash,
58
59
  Orb::NewFloatingUnitWithProrationPrice::OrHash,
59
60
  Orb::NewFloatingGroupedAllocationPrice::OrHash,
@@ -68,6 +69,8 @@ module Orb
68
69
  Orb::NewFloatingScalableMatrixWithTieredPricingPrice::OrHash,
69
70
  Orb::NewFloatingCumulativeGroupedBulkPrice::OrHash,
70
71
  Orb::PriceCreateParams::Body::CumulativeGroupedAllocation::OrHash,
72
+ Orb::PriceCreateParams::Body::DailyCreditAllowance::OrHash,
73
+ Orb::PriceCreateParams::Body::MeteredAllowance::OrHash,
71
74
  Orb::NewFloatingMinimumCompositePrice::OrHash,
72
75
  Orb::PriceCreateParams::Body::Percent::OrHash,
73
76
  Orb::PriceCreateParams::Body::EventOutput::OrHash