orb-billing 0.5.4 → 0.6.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 (211) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +26 -0
  3. data/README.md +1 -1
  4. data/lib/orb/internal/type/base_model.rb +2 -2
  5. data/lib/orb/internal/type/union.rb +6 -6
  6. data/lib/orb/internal/util.rb +5 -1
  7. data/lib/orb/models/alert.rb +33 -1
  8. data/lib/orb/models/amount_discount.rb +10 -10
  9. data/lib/orb/models/credit_note_create_params.rb +9 -9
  10. data/lib/orb/models/customer_create_params.rb +21 -3
  11. data/lib/orb/models/customer_update_by_external_id_params.rb +21 -3
  12. data/lib/orb/models/customer_update_params.rb +21 -3
  13. data/lib/orb/models/customers/credits/ledger_create_entry_by_external_id_response.rb +9 -1
  14. data/lib/orb/models/customers/credits/ledger_create_entry_response.rb +9 -1
  15. data/lib/orb/models/customers/credits/ledger_list_by_external_id_response.rb +9 -1
  16. data/lib/orb/models/customers/credits/ledger_list_response.rb +9 -1
  17. data/lib/orb/models/customers/credits/top_up_create_by_external_id_params.rb +1 -1
  18. data/lib/orb/models/customers/credits/top_up_create_params.rb +1 -1
  19. data/lib/orb/models/invoice.rb +626 -9
  20. data/lib/orb/models/invoice_fetch_upcoming_response.rb +624 -9
  21. data/lib/orb/models/invoice_line_item_create_response.rb +486 -7
  22. data/lib/orb/models/item.rb +18 -1
  23. data/lib/orb/models/item_archive_params.rb +14 -0
  24. data/lib/orb/models/item_create_params.rb +14 -1
  25. data/lib/orb/models/item_update_params.rb +16 -1
  26. data/lib/orb/models/percentage_discount.rb +10 -10
  27. data/lib/orb/models/plan.rb +618 -9
  28. data/lib/orb/models/plan_create_params.rb +2066 -30
  29. data/lib/orb/models/plan_set_default_version_params.rb +22 -0
  30. data/lib/orb/models/plans/external_plan_id/version_create_params.rb +17948 -0
  31. data/lib/orb/models/plans/external_plan_id/version_create_response.rb +819 -0
  32. data/lib/orb/models/plans/external_plan_id/version_retrieve_params.rb +24 -0
  33. data/lib/orb/models/plans/external_plan_id/version_retrieve_response.rb +819 -0
  34. data/lib/orb/models/plans/external_plan_id_set_default_version_params.rb +24 -0
  35. data/lib/orb/models/plans/version_create_params.rb +17794 -0
  36. data/lib/orb/models/plans/version_create_response.rb +814 -0
  37. data/lib/orb/models/plans/version_retrieve_params.rb +22 -0
  38. data/lib/orb/models/plans/version_retrieve_response.rb +814 -0
  39. data/lib/orb/models/price.rb +4124 -70
  40. data/lib/orb/models/price_create_params.rb +45 -1
  41. data/lib/orb/models/price_evaluate_params.rb +8529 -21
  42. data/lib/orb/models/price_evaluate_response.rb +38 -3
  43. data/lib/orb/models/subscription.rb +730 -54
  44. data/lib/orb/models/subscription_cancel_response.rb +706 -54
  45. data/lib/orb/models/subscription_change_apply_response.rb +728 -54
  46. data/lib/orb/models/subscription_change_cancel_response.rb +728 -54
  47. data/lib/orb/models/subscription_change_retrieve_response.rb +728 -54
  48. data/lib/orb/models/subscription_create_params.rb +5992 -1698
  49. data/lib/orb/models/subscription_create_response.rb +706 -54
  50. data/lib/orb/models/subscription_fetch_schedule_response.rb +3 -3
  51. data/lib/orb/models/subscription_price_intervals_params.rb +1392 -76
  52. data/lib/orb/models/subscription_price_intervals_response.rb +712 -54
  53. data/lib/orb/models/subscription_schedule_plan_change_params.rb +6005 -1723
  54. data/lib/orb/models/subscription_schedule_plan_change_response.rb +716 -54
  55. data/lib/orb/models/subscription_trigger_phase_response.rb +708 -54
  56. data/lib/orb/models/subscription_unschedule_cancellation_response.rb +720 -54
  57. data/lib/orb/models/subscription_unschedule_fixed_fee_quantity_updates_response.rb +728 -54
  58. data/lib/orb/models/subscription_unschedule_pending_plan_changes_response.rb +728 -54
  59. data/lib/orb/models/subscription_update_fixed_fee_quantity_params.rb +1 -1
  60. data/lib/orb/models/subscription_update_fixed_fee_quantity_response.rb +720 -54
  61. data/lib/orb/models/subscription_update_trial_response.rb +706 -54
  62. data/lib/orb/models/trial_discount.rb +10 -10
  63. data/lib/orb/models/usage_discount.rb +10 -10
  64. data/lib/orb/models.rb +4 -0
  65. data/lib/orb/resources/credit_notes.rb +3 -3
  66. data/lib/orb/resources/customers/balance_transactions.rb +0 -7
  67. data/lib/orb/resources/customers.rb +4 -7
  68. data/lib/orb/resources/dimensional_price_groups.rb +1 -1
  69. data/lib/orb/resources/items.rb +34 -2
  70. data/lib/orb/resources/plans/external_plan_id/versions.rb +88 -0
  71. data/lib/orb/resources/plans/external_plan_id.rb +32 -1
  72. data/lib/orb/resources/plans/versions.rb +86 -0
  73. data/lib/orb/resources/plans.rb +33 -2
  74. data/lib/orb/resources/prices.rb +23 -17
  75. data/lib/orb/resources/subscriptions.rb +5 -1
  76. data/lib/orb/version.rb +1 -1
  77. data/lib/orb.rb +16 -1
  78. data/rbi/orb/models/alert.rbi +50 -3
  79. data/rbi/orb/models/amount_discount.rbi +8 -8
  80. data/rbi/orb/models/credit_note_create_params.rbi +8 -8
  81. data/rbi/orb/models/customer_create_params.rbi +38 -4
  82. data/rbi/orb/models/customer_update_by_external_id_params.rbi +38 -4
  83. data/rbi/orb/models/customer_update_params.rbi +38 -4
  84. data/rbi/orb/models/customers/credits/ledger_create_entry_by_external_id_response.rbi +9 -1
  85. data/rbi/orb/models/customers/credits/ledger_create_entry_response.rbi +9 -1
  86. data/rbi/orb/models/customers/credits/ledger_list_by_external_id_response.rbi +9 -1
  87. data/rbi/orb/models/customers/credits/ledger_list_response.rbi +9 -1
  88. data/rbi/orb/models/customers/credits/top_up_create_by_external_id_params.rbi +2 -2
  89. data/rbi/orb/models/customers/credits/top_up_create_params.rbi +2 -2
  90. data/rbi/orb/models/invoice.rbi +1451 -35
  91. data/rbi/orb/models/invoice_fetch_upcoming_response.rbi +1524 -4
  92. data/rbi/orb/models/invoice_line_item_create_response.rbi +1184 -2
  93. data/rbi/orb/models/item.rbi +20 -1
  94. data/rbi/orb/models/item_archive_params.rbi +25 -0
  95. data/rbi/orb/models/item_create_params.rbi +18 -1
  96. data/rbi/orb/models/item_update_params.rbi +17 -1
  97. data/rbi/orb/models/percentage_discount.rbi +10 -10
  98. data/rbi/orb/models/plan.rbi +1339 -4
  99. data/rbi/orb/models/plan_create_params.rbi +3833 -29
  100. data/rbi/orb/models/plan_set_default_version_params.rbi +40 -0
  101. data/rbi/orb/models/plans/external_plan_id/version_create_params.rbi +32668 -0
  102. data/rbi/orb/models/plans/external_plan_id/version_create_response.rbi +1562 -0
  103. data/rbi/orb/models/plans/external_plan_id/version_retrieve_params.rbi +42 -0
  104. data/rbi/orb/models/plans/external_plan_id/version_retrieve_response.rbi +1562 -0
  105. data/rbi/orb/models/plans/external_plan_id_set_default_version_params.rbi +45 -0
  106. data/rbi/orb/models/plans/version_create_params.rbi +32607 -0
  107. data/rbi/orb/models/plans/version_create_response.rbi +1556 -0
  108. data/rbi/orb/models/plans/version_retrieve_params.rbi +37 -0
  109. data/rbi/orb/models/plans/version_retrieve_response.rbi +1558 -0
  110. data/rbi/orb/models/price.rbi +9447 -441
  111. data/rbi/orb/models/price_create_params.rbi +80 -0
  112. data/rbi/orb/models/price_evaluate_params.rbi +15684 -25
  113. data/rbi/orb/models/price_evaluate_response.rbi +68 -5
  114. data/rbi/orb/models/subscription.rbi +1654 -44
  115. data/rbi/orb/models/subscription_cancel_response.rbi +1692 -44
  116. data/rbi/orb/models/subscription_change_apply_response.rbi +1692 -44
  117. data/rbi/orb/models/subscription_change_cancel_response.rbi +1692 -44
  118. data/rbi/orb/models/subscription_change_retrieve_response.rbi +1692 -44
  119. data/rbi/orb/models/subscription_create_params.rbi +10400 -2710
  120. data/rbi/orb/models/subscription_create_response.rbi +1692 -44
  121. data/rbi/orb/models/subscription_fetch_schedule_response.rbi +13 -4
  122. data/rbi/orb/models/subscription_price_intervals_params.rbi +2401 -49
  123. data/rbi/orb/models/subscription_price_intervals_response.rbi +1692 -44
  124. data/rbi/orb/models/subscription_schedule_plan_change_params.rbi +10423 -2753
  125. data/rbi/orb/models/subscription_schedule_plan_change_response.rbi +1692 -44
  126. data/rbi/orb/models/subscription_trigger_phase_response.rbi +1692 -44
  127. data/rbi/orb/models/subscription_unschedule_cancellation_response.rbi +1692 -44
  128. data/rbi/orb/models/subscription_unschedule_fixed_fee_quantity_updates_response.rbi +1692 -44
  129. data/rbi/orb/models/subscription_unschedule_pending_plan_changes_response.rbi +1692 -44
  130. data/rbi/orb/models/subscription_update_fixed_fee_quantity_params.rbi +2 -2
  131. data/rbi/orb/models/subscription_update_fixed_fee_quantity_response.rbi +1692 -44
  132. data/rbi/orb/models/subscription_update_trial_response.rbi +1692 -44
  133. data/rbi/orb/models/trial_discount.rbi +8 -8
  134. data/rbi/orb/models/usage_discount.rbi +10 -10
  135. data/rbi/orb/models.rbi +4 -0
  136. data/rbi/orb/resources/credit_notes.rbi +3 -3
  137. data/rbi/orb/resources/customers/balance_transactions.rbi +0 -7
  138. data/rbi/orb/resources/customers/credits/top_ups.rbi +2 -2
  139. data/rbi/orb/resources/customers.rbi +7 -7
  140. data/rbi/orb/resources/dimensional_price_groups.rbi +1 -1
  141. data/rbi/orb/resources/items.rbi +20 -0
  142. data/rbi/orb/resources/plans/external_plan_id/versions.rbi +103 -0
  143. data/rbi/orb/resources/plans/external_plan_id.rbi +23 -1
  144. data/rbi/orb/resources/plans/versions.rbi +91 -0
  145. data/rbi/orb/resources/plans.rbi +27 -2
  146. data/rbi/orb/resources/prices.rbi +27 -17
  147. data/rbi/orb/resources/subscriptions.rbi +9 -1
  148. data/sig/orb/models/alert.rbs +20 -3
  149. data/sig/orb/models/amount_discount.rbs +5 -5
  150. data/sig/orb/models/credit_note_create_params.rbs +6 -6
  151. data/sig/orb/models/customer_create_params.rbs +13 -0
  152. data/sig/orb/models/customer_update_by_external_id_params.rbs +13 -0
  153. data/sig/orb/models/customer_update_params.rbs +13 -0
  154. data/sig/orb/models/customers/credits/ledger_create_entry_by_external_id_response.rbs +7 -2
  155. data/sig/orb/models/customers/credits/ledger_create_entry_response.rbs +7 -2
  156. data/sig/orb/models/customers/credits/ledger_list_by_external_id_response.rbs +7 -2
  157. data/sig/orb/models/customers/credits/ledger_list_response.rbs +7 -2
  158. data/sig/orb/models/invoice.rbs +558 -4
  159. data/sig/orb/models/invoice_fetch_upcoming_response.rbs +558 -4
  160. data/sig/orb/models/invoice_line_item_create_response.rbs +414 -2
  161. data/sig/orb/models/item.rbs +5 -0
  162. data/sig/orb/models/item_archive_params.rbs +14 -0
  163. data/sig/orb/models/item_create_params.rbs +10 -2
  164. data/sig/orb/models/item_update_params.rbs +5 -0
  165. data/sig/orb/models/percentage_discount.rbs +5 -5
  166. data/sig/orb/models/plan.rbs +538 -4
  167. data/sig/orb/models/plan_create_params.rbs +1460 -3
  168. data/sig/orb/models/plan_set_default_version_params.rbs +20 -0
  169. data/sig/orb/models/plans/external_plan_id/version_create_params.rbs +12923 -0
  170. data/sig/orb/models/plans/external_plan_id/version_create_response.rbs +664 -0
  171. data/sig/orb/models/plans/external_plan_id/version_retrieve_params.rbs +27 -0
  172. data/sig/orb/models/plans/external_plan_id/version_retrieve_response.rbs +664 -0
  173. data/sig/orb/models/plans/external_plan_id_set_default_version_params.rbs +25 -0
  174. data/sig/orb/models/plans/version_create_params.rbs +12898 -0
  175. data/sig/orb/models/plans/version_create_response.rbs +662 -0
  176. data/sig/orb/models/plans/version_retrieve_params.rbs +25 -0
  177. data/sig/orb/models/plans/version_retrieve_response.rbs +662 -0
  178. data/sig/orb/models/price.rbs +3512 -96
  179. data/sig/orb/models/price_create_params.rbs +32 -0
  180. data/sig/orb/models/price_evaluate_params.rbs +6187 -10
  181. data/sig/orb/models/price_evaluate_response.rbs +41 -4
  182. data/sig/orb/models/subscription.rbs +609 -29
  183. data/sig/orb/models/subscription_cancel_response.rbs +609 -29
  184. data/sig/orb/models/subscription_change_apply_response.rbs +621 -29
  185. data/sig/orb/models/subscription_change_cancel_response.rbs +621 -29
  186. data/sig/orb/models/subscription_change_retrieve_response.rbs +621 -29
  187. data/sig/orb/models/subscription_create_params.rbs +4450 -1466
  188. data/sig/orb/models/subscription_create_response.rbs +609 -29
  189. data/sig/orb/models/subscription_fetch_schedule_response.rbs +4 -4
  190. data/sig/orb/models/subscription_price_intervals_params.rbs +920 -24
  191. data/sig/orb/models/subscription_price_intervals_response.rbs +609 -29
  192. data/sig/orb/models/subscription_schedule_plan_change_params.rbs +4440 -1466
  193. data/sig/orb/models/subscription_schedule_plan_change_response.rbs +609 -29
  194. data/sig/orb/models/subscription_trigger_phase_response.rbs +609 -29
  195. data/sig/orb/models/subscription_unschedule_cancellation_response.rbs +609 -29
  196. data/sig/orb/models/subscription_unschedule_fixed_fee_quantity_updates_response.rbs +609 -29
  197. data/sig/orb/models/subscription_unschedule_pending_plan_changes_response.rbs +609 -29
  198. data/sig/orb/models/subscription_update_fixed_fee_quantity_response.rbs +609 -29
  199. data/sig/orb/models/subscription_update_trial_response.rbs +609 -29
  200. data/sig/orb/models/trial_discount.rbs +5 -5
  201. data/sig/orb/models/usage_discount.rbs +5 -5
  202. data/sig/orb/models.rbs +4 -0
  203. data/sig/orb/resources/credit_notes.rbs +1 -1
  204. data/sig/orb/resources/items.rbs +7 -0
  205. data/sig/orb/resources/plans/external_plan_id/versions.rbs +30 -0
  206. data/sig/orb/resources/plans/external_plan_id.rbs +8 -0
  207. data/sig/orb/resources/plans/versions.rbs +28 -0
  208. data/sig/orb/resources/plans.rbs +8 -0
  209. data/sig/orb/resources/prices.rbs +3 -3
  210. data/sig/orb/resources/subscriptions.rbs +2 -0
  211. metadata +41 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 53290586e1325effc936a864ffdca13f0365aeb720897b87581148b5a0dc1251
4
- data.tar.gz: a734cbfb59fe1527fbfc6187057d7c94ad491924f95dd80dbef792bd1dbd7841
3
+ metadata.gz: aa0810c3b54c8011698b16cad36ab3268fe2217ddbbe01de745ce8eae046a765
4
+ data.tar.gz: fcb95e19778c5b9a58956bc632232e66991a0b62534789de5b99f32eb647fab4
5
5
  SHA512:
6
- metadata.gz: e405f620ae6654e9ee44aadd9d47de94df790a8384fde15c35d07c31cbfe6f273cd90e3343e083b6a2a89dd8804ab9e126e87fae91f95dd60b10555f712b7cea
7
- data.tar.gz: '039505f54e061b96bf058f23bc3798314b634dd7d3c3f421752451d81f8c282d58b09657295b263b6eab1139f47f6e7adccae8173225f408c38add810528137f'
6
+ metadata.gz: 0217c9d7b3f1b1a327fa3ee47951e9858e332e8c1eb1d2a5077671706a6865005eb460f0011654a87bb97a78ff4cdf8b57224f39aad6dc2752c6964cef4d8d18
7
+ data.tar.gz: e0ec52b3ae24cd6385d80fddebfff5dc42ffd4d71b14d1def94383c8a8c054a4f999fc20de02861f0793021247babe52aedc38db4695346d1e5cf8946694ea53
data/CHANGELOG.md CHANGED
@@ -1,5 +1,31 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.6.0 (2025-05-28)
4
+
5
+ Full Changelog: [v0.5.5...v0.6.0](https://github.com/orbcorp/orb-ruby/compare/v0.5.5...v0.6.0)
6
+
7
+ ### Features
8
+
9
+ * **api:** api update ([cb1cc2c](https://github.com/orbcorp/orb-ruby/commit/cb1cc2c7a37d5f73c19b077316e20778da10f511))
10
+
11
+
12
+ ### Chores
13
+
14
+ * **internal:** version bump ([0b5d352](https://github.com/orbcorp/orb-ruby/commit/0b5d35296a75187866272653c9b70d3428d8e6f3))
15
+
16
+ ## 0.5.5 (2025-05-27)
17
+
18
+ Full Changelog: [v0.5.4...v0.5.5](https://github.com/orbcorp/orb-ruby/compare/v0.5.4...v0.5.5)
19
+
20
+ ### Bug Fixes
21
+
22
+ * sorbet types for enums, and make tapioca detection ignore `tapioca dsl` ([f3eec68](https://github.com/orbcorp/orb-ruby/commit/f3eec68e79230db42f9fe79145cec8bf8db41041))
23
+
24
+
25
+ ### Chores
26
+
27
+ * **internal:** version bump ([23ded61](https://github.com/orbcorp/orb-ruby/commit/23ded619f628e545090c27e83c591cafa26505b7))
28
+
3
29
  ## 0.5.4 (2025-05-23)
4
30
 
5
31
  Full Changelog: [v0.5.3...v0.5.4](https://github.com/orbcorp/orb-ruby/compare/v0.5.3...v0.5.4)
data/README.md CHANGED
@@ -15,7 +15,7 @@ To use this gem, install via Bundler by adding the following to your application
15
15
  <!-- x-release-please-start-version -->
16
16
 
17
17
  ```ruby
18
- gem "orb-billing", "~> 0.5.4"
18
+ gem "orb-billing", "~> 0.6.0"
19
19
  ```
20
20
 
21
21
  <!-- x-release-please-end -->
@@ -398,8 +398,8 @@ module Orb
398
398
  # # `amount_discount` is a `Orb::AmountDiscount`
399
399
  # amount_discount => {
400
400
  # amount_discount: amount_discount,
401
- # applies_to_price_ids: applies_to_price_ids,
402
- # discount_type: discount_type
401
+ # discount_type: discount_type,
402
+ # applies_to_price_ids: applies_to_price_ids
403
403
  # }
404
404
  def deconstruct_keys(keys)
405
405
  (keys || self.class.known_fields.keys)
@@ -9,9 +9,9 @@ module Orb
9
9
  # # `discount` is a `Orb::Discount`
10
10
  # case discount
11
11
  # when Orb::PercentageDiscount
12
- # puts(discount.applies_to_price_ids)
13
- # when Orb::TrialDiscount
14
12
  # puts(discount.discount_type)
13
+ # when Orb::TrialDiscount
14
+ # puts(discount.applies_to_price_ids)
15
15
  # when Orb::UsageDiscount
16
16
  # puts(discount.usage_discount)
17
17
  # else
@@ -22,22 +22,22 @@ module Orb
22
22
  # case discount
23
23
  # in {
24
24
  # discount_type: :percentage,
25
- # applies_to_price_ids: applies_to_price_ids,
26
25
  # percentage_discount: percentage_discount,
26
+ # applies_to_price_ids: applies_to_price_ids,
27
27
  # reason: reason
28
28
  # }
29
- # puts(applies_to_price_ids)
29
+ # puts(percentage_discount)
30
30
  # in {
31
31
  # discount_type: :trial,
32
32
  # applies_to_price_ids: applies_to_price_ids,
33
33
  # reason: reason,
34
34
  # trial_amount_discount: trial_amount_discount
35
35
  # }
36
- # puts(reason)
36
+ # puts(applies_to_price_ids)
37
37
  # in {
38
38
  # discount_type: :usage,
39
- # applies_to_price_ids: applies_to_price_ids,
40
39
  # usage_discount: usage_discount,
40
+ # applies_to_price_ids: applies_to_price_ids,
41
41
  # reason: reason
42
42
  # }
43
43
  # puts(usage_discount)
@@ -873,8 +873,12 @@ module Orb
873
873
  case type
874
874
  in Orb::Internal::Util::SorbetRuntimeSupport
875
875
  type.to_sorbet_type
876
- else
876
+ in Class | Module
877
877
  type
878
+ in true | false
879
+ T::Boolean
880
+ else
881
+ type.class
878
882
  end
879
883
  end
880
884
  end
@@ -65,7 +65,16 @@ module Orb
65
65
  # @return [Symbol, Orb::Models::Alert::Type]
66
66
  required :type, enum: -> { Orb::Alert::Type }
67
67
 
68
- # @!method initialize(id:, created_at:, currency:, customer:, enabled:, metric:, plan:, subscription:, thresholds:, type:)
68
+ # @!attribute balance_alert_status
69
+ # The current status of the alert. This field is only present for credit balance
70
+ # alerts.
71
+ #
72
+ # @return [Array<Orb::Models::Alert::BalanceAlertStatus>, nil]
73
+ optional :balance_alert_status,
74
+ -> { Orb::Internal::Type::ArrayOf[Orb::Alert::BalanceAlertStatus] },
75
+ nil?: true
76
+
77
+ # @!method initialize(id:, created_at:, currency:, customer:, enabled:, metric:, plan:, subscription:, thresholds:, type:, balance_alert_status: nil)
69
78
  # Some parameter documentations has been truncated, see {Orb::Models::Alert} for
70
79
  # more details.
71
80
  #
@@ -94,6 +103,8 @@ module Orb
94
103
  # @param thresholds [Array<Orb::Models::Alert::Threshold>, nil] The thresholds that define the conditions under which the alert will be triggere
95
104
  #
96
105
  # @param type [Symbol, Orb::Models::Alert::Type] The type of alert. This must be a valid alert type.
106
+ #
107
+ # @param balance_alert_status [Array<Orb::Models::Alert::BalanceAlertStatus>, nil] The current status of the alert. This field is only present for credit balance a
97
108
 
98
109
  # @see Orb::Models::Alert#customer
99
110
  class Customer < Orb::Internal::Type::BaseModel
@@ -214,6 +225,27 @@ module Orb
214
225
  # @!method self.values
215
226
  # @return [Array<Symbol>]
216
227
  end
228
+
229
+ class BalanceAlertStatus < Orb::Internal::Type::BaseModel
230
+ # @!attribute in_alert
231
+ # Whether the alert is currently in-alert or not.
232
+ #
233
+ # @return [Boolean]
234
+ required :in_alert, Orb::Internal::Type::Boolean
235
+
236
+ # @!attribute threshold_value
237
+ # The value of the threshold that defines the alert status.
238
+ #
239
+ # @return [Float]
240
+ required :threshold_value, Float
241
+
242
+ # @!method initialize(in_alert:, threshold_value:)
243
+ # Alert status is used to determine if an alert is currently in-alert or not.
244
+ #
245
+ # @param in_alert [Boolean] Whether the alert is currently in-alert or not.
246
+ #
247
+ # @param threshold_value [Float] The value of the threshold that defines the alert status.
248
+ end
217
249
  end
218
250
  end
219
251
  end
@@ -9,33 +9,33 @@ module Orb
9
9
  # @return [String]
10
10
  required :amount_discount, String
11
11
 
12
- # @!attribute applies_to_price_ids
13
- # List of price_ids that this discount applies to. For plan/plan phase discounts,
14
- # this can be a subset of prices.
15
- #
16
- # @return [Array<String>]
17
- required :applies_to_price_ids, Orb::Internal::Type::ArrayOf[String]
18
-
19
12
  # @!attribute discount_type
20
13
  #
21
14
  # @return [Symbol, Orb::Models::AmountDiscount::DiscountType]
22
15
  required :discount_type, enum: -> { Orb::AmountDiscount::DiscountType }
23
16
 
17
+ # @!attribute applies_to_price_ids
18
+ # List of price_ids that this discount applies to. For plan/plan phase discounts,
19
+ # this can be a subset of prices.
20
+ #
21
+ # @return [Array<String>, nil]
22
+ optional :applies_to_price_ids, Orb::Internal::Type::ArrayOf[String], nil?: true
23
+
24
24
  # @!attribute reason
25
25
  #
26
26
  # @return [String, nil]
27
27
  optional :reason, String, nil?: true
28
28
 
29
- # @!method initialize(amount_discount:, applies_to_price_ids:, discount_type:, reason: nil)
29
+ # @!method initialize(amount_discount:, discount_type:, applies_to_price_ids: nil, reason: nil)
30
30
  # Some parameter documentations has been truncated, see
31
31
  # {Orb::Models::AmountDiscount} for more details.
32
32
  #
33
33
  # @param amount_discount [String] Only available if discount_type is `amount`.
34
34
  #
35
- # @param applies_to_price_ids [Array<String>] List of price_ids that this discount applies to. For plan/plan phase discounts,
36
- #
37
35
  # @param discount_type [Symbol, Orb::Models::AmountDiscount::DiscountType]
38
36
  #
37
+ # @param applies_to_price_ids [Array<String>, nil] List of price_ids that this discount applies to. For plan/plan phase discounts,
38
+ #
39
39
  # @param reason [String, nil]
40
40
 
41
41
  # @see Orb::Models::AmountDiscount#discount_type
@@ -12,24 +12,24 @@ module Orb
12
12
  # @return [Array<Orb::Models::CreditNoteCreateParams::LineItem>]
13
13
  required :line_items, -> { Orb::Internal::Type::ArrayOf[Orb::CreditNoteCreateParams::LineItem] }
14
14
 
15
+ # @!attribute reason
16
+ # An optional reason for the credit note.
17
+ #
18
+ # @return [Symbol, Orb::Models::CreditNoteCreateParams::Reason]
19
+ required :reason, enum: -> { Orb::CreditNoteCreateParams::Reason }
20
+
15
21
  # @!attribute memo
16
22
  # An optional memo to attach to the credit note.
17
23
  #
18
24
  # @return [String, nil]
19
25
  optional :memo, String, nil?: true
20
26
 
21
- # @!attribute reason
22
- # An optional reason for the credit note.
23
- #
24
- # @return [Symbol, Orb::Models::CreditNoteCreateParams::Reason, nil]
25
- optional :reason, enum: -> { Orb::CreditNoteCreateParams::Reason }, nil?: true
26
-
27
- # @!method initialize(line_items:, memo: nil, reason: nil, request_options: {})
27
+ # @!method initialize(line_items:, reason:, memo: nil, request_options: {})
28
28
  # @param line_items [Array<Orb::Models::CreditNoteCreateParams::LineItem>]
29
29
  #
30
- # @param memo [String, nil] An optional memo to attach to the credit note.
30
+ # @param reason [Symbol, Orb::Models::CreditNoteCreateParams::Reason] An optional reason for the credit note.
31
31
  #
32
- # @param reason [Symbol, Orb::Models::CreditNoteCreateParams::Reason, nil] An optional reason for the credit note.
32
+ # @param memo [String, nil] An optional memo to attach to the credit note.
33
33
  #
34
34
  # @param request_options [Orb::RequestOptions, Hash{Symbol=>Object}]
35
35
 
@@ -109,7 +109,7 @@ module Orb
109
109
 
110
110
  # @!attribute tax_configuration
111
111
  #
112
- # @return [Orb::Models::CustomerCreateParams::TaxConfiguration::Avalara, Orb::Models::CustomerCreateParams::TaxConfiguration::Taxjar, nil]
112
+ # @return [Orb::Models::CustomerCreateParams::TaxConfiguration::Avalara, Orb::Models::CustomerCreateParams::TaxConfiguration::Taxjar, Orb::Models::CustomerCreateParams::TaxConfiguration::Sphere, nil]
113
113
  optional :tax_configuration, union: -> { Orb::CustomerCreateParams::TaxConfiguration }, nil?: true
114
114
 
115
115
  # @!attribute tax_id
@@ -264,7 +264,7 @@ module Orb
264
264
  #
265
265
  # @param shipping_address [Orb::Models::CustomerCreateParams::ShippingAddress, nil]
266
266
  #
267
- # @param tax_configuration [Orb::Models::CustomerCreateParams::TaxConfiguration::Avalara, Orb::Models::CustomerCreateParams::TaxConfiguration::Taxjar, nil]
267
+ # @param tax_configuration [Orb::Models::CustomerCreateParams::TaxConfiguration::Avalara, Orb::Models::CustomerCreateParams::TaxConfiguration::Taxjar, Orb::Models::CustomerCreateParams::TaxConfiguration::Sphere, nil]
268
268
  #
269
269
  # @param tax_id [Orb::Models::CustomerCreateParams::TaxID, nil] Tax IDs are commonly required to be displayed on customer invoices, which are ad
270
270
  #
@@ -449,6 +449,8 @@ module Orb
449
449
 
450
450
  variant :taxjar, -> { Orb::CustomerCreateParams::TaxConfiguration::Taxjar }
451
451
 
452
+ variant :sphere, -> { Orb::CustomerCreateParams::TaxConfiguration::Sphere }
453
+
452
454
  class Avalara < Orb::Internal::Type::BaseModel
453
455
  # @!attribute tax_exempt
454
456
  #
@@ -487,8 +489,24 @@ module Orb
487
489
  # @param tax_provider [Symbol, :taxjar]
488
490
  end
489
491
 
492
+ class Sphere < Orb::Internal::Type::BaseModel
493
+ # @!attribute tax_exempt
494
+ #
495
+ # @return [Boolean]
496
+ required :tax_exempt, Orb::Internal::Type::Boolean
497
+
498
+ # @!attribute tax_provider
499
+ #
500
+ # @return [Symbol, :sphere]
501
+ required :tax_provider, const: :sphere
502
+
503
+ # @!method initialize(tax_exempt:, tax_provider: :sphere)
504
+ # @param tax_exempt [Boolean]
505
+ # @param tax_provider [Symbol, :sphere]
506
+ end
507
+
490
508
  # @!method self.variants
491
- # @return [Array(Orb::Models::CustomerCreateParams::TaxConfiguration::Avalara, Orb::Models::CustomerCreateParams::TaxConfiguration::Taxjar)]
509
+ # @return [Array(Orb::Models::CustomerCreateParams::TaxConfiguration::Avalara, Orb::Models::CustomerCreateParams::TaxConfiguration::Taxjar, Orb::Models::CustomerCreateParams::TaxConfiguration::Sphere)]
492
510
  end
493
511
 
494
512
  class TaxID < Orb::Internal::Type::BaseModel
@@ -114,7 +114,7 @@ module Orb
114
114
 
115
115
  # @!attribute tax_configuration
116
116
  #
117
- # @return [Orb::Models::CustomerUpdateByExternalIDParams::TaxConfiguration::Avalara, Orb::Models::CustomerUpdateByExternalIDParams::TaxConfiguration::Taxjar, nil]
117
+ # @return [Orb::Models::CustomerUpdateByExternalIDParams::TaxConfiguration::Avalara, Orb::Models::CustomerUpdateByExternalIDParams::TaxConfiguration::Taxjar, Orb::Models::CustomerUpdateByExternalIDParams::TaxConfiguration::Sphere, nil]
118
118
  optional :tax_configuration,
119
119
  union: -> { Orb::CustomerUpdateByExternalIDParams::TaxConfiguration },
120
120
  nil?: true
@@ -263,7 +263,7 @@ module Orb
263
263
  #
264
264
  # @param shipping_address [Orb::Models::CustomerUpdateByExternalIDParams::ShippingAddress, nil]
265
265
  #
266
- # @param tax_configuration [Orb::Models::CustomerUpdateByExternalIDParams::TaxConfiguration::Avalara, Orb::Models::CustomerUpdateByExternalIDParams::TaxConfiguration::Taxjar, nil]
266
+ # @param tax_configuration [Orb::Models::CustomerUpdateByExternalIDParams::TaxConfiguration::Avalara, Orb::Models::CustomerUpdateByExternalIDParams::TaxConfiguration::Taxjar, Orb::Models::CustomerUpdateByExternalIDParams::TaxConfiguration::Sphere, nil]
267
267
  #
268
268
  # @param tax_id [Orb::Models::CustomerUpdateByExternalIDParams::TaxID, nil] Tax IDs are commonly required to be displayed on customer invoices, which are ad
269
269
  #
@@ -450,6 +450,8 @@ module Orb
450
450
 
451
451
  variant :taxjar, -> { Orb::CustomerUpdateByExternalIDParams::TaxConfiguration::Taxjar }
452
452
 
453
+ variant :sphere, -> { Orb::CustomerUpdateByExternalIDParams::TaxConfiguration::Sphere }
454
+
453
455
  class Avalara < Orb::Internal::Type::BaseModel
454
456
  # @!attribute tax_exempt
455
457
  #
@@ -488,8 +490,24 @@ module Orb
488
490
  # @param tax_provider [Symbol, :taxjar]
489
491
  end
490
492
 
493
+ class Sphere < Orb::Internal::Type::BaseModel
494
+ # @!attribute tax_exempt
495
+ #
496
+ # @return [Boolean]
497
+ required :tax_exempt, Orb::Internal::Type::Boolean
498
+
499
+ # @!attribute tax_provider
500
+ #
501
+ # @return [Symbol, :sphere]
502
+ required :tax_provider, const: :sphere
503
+
504
+ # @!method initialize(tax_exempt:, tax_provider: :sphere)
505
+ # @param tax_exempt [Boolean]
506
+ # @param tax_provider [Symbol, :sphere]
507
+ end
508
+
491
509
  # @!method self.variants
492
- # @return [Array(Orb::Models::CustomerUpdateByExternalIDParams::TaxConfiguration::Avalara, Orb::Models::CustomerUpdateByExternalIDParams::TaxConfiguration::Taxjar)]
510
+ # @return [Array(Orb::Models::CustomerUpdateByExternalIDParams::TaxConfiguration::Avalara, Orb::Models::CustomerUpdateByExternalIDParams::TaxConfiguration::Taxjar, Orb::Models::CustomerUpdateByExternalIDParams::TaxConfiguration::Sphere)]
493
511
  end
494
512
 
495
513
  class TaxID < Orb::Internal::Type::BaseModel
@@ -110,7 +110,7 @@ module Orb
110
110
 
111
111
  # @!attribute tax_configuration
112
112
  #
113
- # @return [Orb::Models::CustomerUpdateParams::TaxConfiguration::Avalara, Orb::Models::CustomerUpdateParams::TaxConfiguration::Taxjar, nil]
113
+ # @return [Orb::Models::CustomerUpdateParams::TaxConfiguration::Avalara, Orb::Models::CustomerUpdateParams::TaxConfiguration::Taxjar, Orb::Models::CustomerUpdateParams::TaxConfiguration::Sphere, nil]
114
114
  optional :tax_configuration, union: -> { Orb::CustomerUpdateParams::TaxConfiguration }, nil?: true
115
115
 
116
116
  # @!attribute tax_id
@@ -257,7 +257,7 @@ module Orb
257
257
  #
258
258
  # @param shipping_address [Orb::Models::CustomerUpdateParams::ShippingAddress, nil]
259
259
  #
260
- # @param tax_configuration [Orb::Models::CustomerUpdateParams::TaxConfiguration::Avalara, Orb::Models::CustomerUpdateParams::TaxConfiguration::Taxjar, nil]
260
+ # @param tax_configuration [Orb::Models::CustomerUpdateParams::TaxConfiguration::Avalara, Orb::Models::CustomerUpdateParams::TaxConfiguration::Taxjar, Orb::Models::CustomerUpdateParams::TaxConfiguration::Sphere, nil]
261
261
  #
262
262
  # @param tax_id [Orb::Models::CustomerUpdateParams::TaxID, nil] Tax IDs are commonly required to be displayed on customer invoices, which are ad
263
263
  #
@@ -444,6 +444,8 @@ module Orb
444
444
 
445
445
  variant :taxjar, -> { Orb::CustomerUpdateParams::TaxConfiguration::Taxjar }
446
446
 
447
+ variant :sphere, -> { Orb::CustomerUpdateParams::TaxConfiguration::Sphere }
448
+
447
449
  class Avalara < Orb::Internal::Type::BaseModel
448
450
  # @!attribute tax_exempt
449
451
  #
@@ -482,8 +484,24 @@ module Orb
482
484
  # @param tax_provider [Symbol, :taxjar]
483
485
  end
484
486
 
487
+ class Sphere < Orb::Internal::Type::BaseModel
488
+ # @!attribute tax_exempt
489
+ #
490
+ # @return [Boolean]
491
+ required :tax_exempt, Orb::Internal::Type::Boolean
492
+
493
+ # @!attribute tax_provider
494
+ #
495
+ # @return [Symbol, :sphere]
496
+ required :tax_provider, const: :sphere
497
+
498
+ # @!method initialize(tax_exempt:, tax_provider: :sphere)
499
+ # @param tax_exempt [Boolean]
500
+ # @param tax_provider [Symbol, :sphere]
501
+ end
502
+
485
503
  # @!method self.variants
486
- # @return [Array(Orb::Models::CustomerUpdateParams::TaxConfiguration::Avalara, Orb::Models::CustomerUpdateParams::TaxConfiguration::Taxjar)]
504
+ # @return [Array(Orb::Models::CustomerUpdateParams::TaxConfiguration::Avalara, Orb::Models::CustomerUpdateParams::TaxConfiguration::Taxjar, Orb::Models::CustomerUpdateParams::TaxConfiguration::Sphere)]
487
505
  end
488
506
 
489
507
  class TaxID < Orb::Internal::Type::BaseModel
@@ -106,7 +106,13 @@ module Orb
106
106
  # @return [Float]
107
107
  required :starting_balance, Float
108
108
 
109
- # @!method initialize(id:, amount:, created_at:, credit_block:, currency:, customer:, description:, ending_balance:, entry_status:, ledger_sequence_number:, metadata:, starting_balance:, entry_type: :increment)
109
+ # @!attribute created_invoices
110
+ # If the increment resulted in invoice creation, the list of created invoices
111
+ #
112
+ # @return [Array<Orb::Models::Invoice>, nil]
113
+ optional :created_invoices, -> { Orb::Internal::Type::ArrayOf[Orb::Invoice] }, nil?: true
114
+
115
+ # @!method initialize(id:, amount:, created_at:, credit_block:, currency:, customer:, description:, ending_balance:, entry_status:, ledger_sequence_number:, metadata:, starting_balance:, created_invoices: nil, entry_type: :increment)
110
116
  # Some parameter documentations has been truncated, see
111
117
  # {Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::Increment}
112
118
  # for more details.
@@ -135,6 +141,8 @@ module Orb
135
141
  #
136
142
  # @param starting_balance [Float]
137
143
  #
144
+ # @param created_invoices [Array<Orb::Models::Invoice>, nil] If the increment resulted in invoice creation, the list of created invoices
145
+ #
138
146
  # @param entry_type [Symbol, :increment]
139
147
 
140
148
  # @see Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::Increment#credit_block
@@ -101,7 +101,13 @@ module Orb
101
101
  # @return [Float]
102
102
  required :starting_balance, Float
103
103
 
104
- # @!method initialize(id:, amount:, created_at:, credit_block:, currency:, customer:, description:, ending_balance:, entry_status:, ledger_sequence_number:, metadata:, starting_balance:, entry_type: :increment)
104
+ # @!attribute created_invoices
105
+ # If the increment resulted in invoice creation, the list of created invoices
106
+ #
107
+ # @return [Array<Orb::Models::Invoice>, nil]
108
+ optional :created_invoices, -> { Orb::Internal::Type::ArrayOf[Orb::Invoice] }, nil?: true
109
+
110
+ # @!method initialize(id:, amount:, created_at:, credit_block:, currency:, customer:, description:, ending_balance:, entry_status:, ledger_sequence_number:, metadata:, starting_balance:, created_invoices: nil, entry_type: :increment)
105
111
  # Some parameter documentations has been truncated, see
106
112
  # {Orb::Models::Customers::Credits::LedgerCreateEntryResponse::Increment} for more
107
113
  # details.
@@ -130,6 +136,8 @@ module Orb
130
136
  #
131
137
  # @param starting_balance [Float]
132
138
  #
139
+ # @param created_invoices [Array<Orb::Models::Invoice>, nil] If the increment resulted in invoice creation, the list of created invoices
140
+ #
133
141
  # @param entry_type [Symbol, :increment]
134
142
 
135
143
  # @see Orb::Models::Customers::Credits::LedgerCreateEntryResponse::Increment#credit_block
@@ -103,7 +103,13 @@ module Orb
103
103
  # @return [Float]
104
104
  required :starting_balance, Float
105
105
 
106
- # @!method initialize(id:, amount:, created_at:, credit_block:, currency:, customer:, description:, ending_balance:, entry_status:, ledger_sequence_number:, metadata:, starting_balance:, entry_type: :increment)
106
+ # @!attribute created_invoices
107
+ # If the increment resulted in invoice creation, the list of created invoices
108
+ #
109
+ # @return [Array<Orb::Models::Invoice>, nil]
110
+ optional :created_invoices, -> { Orb::Internal::Type::ArrayOf[Orb::Invoice] }, nil?: true
111
+
112
+ # @!method initialize(id:, amount:, created_at:, credit_block:, currency:, customer:, description:, ending_balance:, entry_status:, ledger_sequence_number:, metadata:, starting_balance:, created_invoices: nil, entry_type: :increment)
107
113
  # Some parameter documentations has been truncated, see
108
114
  # {Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::Increment} for
109
115
  # more details.
@@ -132,6 +138,8 @@ module Orb
132
138
  #
133
139
  # @param starting_balance [Float]
134
140
  #
141
+ # @param created_invoices [Array<Orb::Models::Invoice>, nil] If the increment resulted in invoice creation, the list of created invoices
142
+ #
135
143
  # @param entry_type [Symbol, :increment]
136
144
 
137
145
  # @see Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::Increment#credit_block
@@ -99,7 +99,13 @@ module Orb
99
99
  # @return [Float]
100
100
  required :starting_balance, Float
101
101
 
102
- # @!method initialize(id:, amount:, created_at:, credit_block:, currency:, customer:, description:, ending_balance:, entry_status:, ledger_sequence_number:, metadata:, starting_balance:, entry_type: :increment)
102
+ # @!attribute created_invoices
103
+ # If the increment resulted in invoice creation, the list of created invoices
104
+ #
105
+ # @return [Array<Orb::Models::Invoice>, nil]
106
+ optional :created_invoices, -> { Orb::Internal::Type::ArrayOf[Orb::Invoice] }, nil?: true
107
+
108
+ # @!method initialize(id:, amount:, created_at:, credit_block:, currency:, customer:, description:, ending_balance:, entry_status:, ledger_sequence_number:, metadata:, starting_balance:, created_invoices: nil, entry_type: :increment)
103
109
  # Some parameter documentations has been truncated, see
104
110
  # {Orb::Models::Customers::Credits::LedgerListResponse::Increment} for more
105
111
  # details.
@@ -128,6 +134,8 @@ module Orb
128
134
  #
129
135
  # @param starting_balance [Float]
130
136
  #
137
+ # @param created_invoices [Array<Orb::Models::Invoice>, nil] If the increment resulted in invoice creation, the list of created invoices
138
+ #
131
139
  # @param entry_type [Symbol, :increment]
132
140
 
133
141
  # @see Orb::Models::Customers::Credits::LedgerListResponse::Increment#credit_block
@@ -46,7 +46,7 @@ module Orb
46
46
 
47
47
  # @!attribute active_from
48
48
  # The date from which the top-up is active. If unspecified, the top-up is active
49
- # immediately.
49
+ # immediately. This should not be more than 10 days in the past.
50
50
  #
51
51
  # @return [Time, nil]
52
52
  optional :active_from, Time, nil?: true
@@ -43,7 +43,7 @@ module Orb
43
43
 
44
44
  # @!attribute active_from
45
45
  # The date from which the top-up is active. If unspecified, the top-up is active
46
- # immediately.
46
+ # immediately. This should not be more than 10 days in the past.
47
47
  #
48
48
  # @return [Time, nil]
49
49
  optional :active_from, Time, nil?: true