orb-billing 0.11.0 → 0.12.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 (41) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +19 -0
  3. data/README.md +1 -1
  4. data/lib/orb/internal/type/union.rb +3 -8
  5. data/lib/orb/internal/util.rb +8 -9
  6. data/lib/orb/models/amount_discount.rb +65 -1
  7. data/lib/orb/models/beta/external_plan_id_create_plan_version_params.rb +1437 -15
  8. data/lib/orb/models/beta_create_plan_version_params.rb +1435 -15
  9. data/lib/orb/models/percentage_discount.rb +65 -1
  10. data/lib/orb/models/subscription_create_params.rb +1435 -15
  11. data/lib/orb/models/subscription_price_intervals_params.rb +715 -5
  12. data/lib/orb/models/subscription_redeem_coupon_params.rb +17 -9
  13. data/lib/orb/models/subscription_schedule_plan_change_params.rb +1435 -15
  14. data/lib/orb/models/trial_discount.rb +65 -1
  15. data/lib/orb/models/usage_discount.rb +65 -1
  16. data/lib/orb/resources/subscriptions.rb +5 -3
  17. data/lib/orb/version.rb +1 -1
  18. data/rbi/orb/internal/util.rbi +2 -0
  19. data/rbi/orb/models/amount_discount.rbi +117 -0
  20. data/rbi/orb/models/beta/external_plan_id_create_plan_version_params.rbi +6145 -3045
  21. data/rbi/orb/models/beta_create_plan_version_params.rbi +6096 -2996
  22. data/rbi/orb/models/percentage_discount.rbi +131 -0
  23. data/rbi/orb/models/subscription_create_params.rbi +6037 -2937
  24. data/rbi/orb/models/subscription_price_intervals_params.rbi +1633 -83
  25. data/rbi/orb/models/subscription_redeem_coupon_params.rbi +16 -8
  26. data/rbi/orb/models/subscription_schedule_plan_change_params.rbi +6948 -3848
  27. data/rbi/orb/models/trial_discount.rbi +109 -0
  28. data/rbi/orb/models/usage_discount.rbi +109 -0
  29. data/rbi/orb/resources/subscriptions.rbi +6 -3
  30. data/sig/orb/models/amount_discount.rbs +58 -0
  31. data/sig/orb/models/beta/external_plan_id_create_plan_version_params.rbs +1130 -20
  32. data/sig/orb/models/beta_create_plan_version_params.rbs +1130 -20
  33. data/sig/orb/models/percentage_discount.rbs +58 -0
  34. data/sig/orb/models/subscription_create_params.rbs +1130 -20
  35. data/sig/orb/models/subscription_price_intervals_params.rbs +565 -10
  36. data/sig/orb/models/subscription_redeem_coupon_params.rbs +11 -6
  37. data/sig/orb/models/subscription_schedule_plan_change_params.rbs +1130 -20
  38. data/sig/orb/models/trial_discount.rbs +58 -0
  39. data/sig/orb/models/usage_discount.rbs +58 -0
  40. data/sig/orb/resources/subscriptions.rbs +2 -1
  41. metadata +2 -2
@@ -12,12 +12,6 @@ module Orb
12
12
  # @return [Symbol, Orb::Models::SubscriptionRedeemCouponParams::ChangeOption]
13
13
  required :change_option, enum: -> { Orb::SubscriptionRedeemCouponParams::ChangeOption }
14
14
 
15
- # @!attribute coupon_id
16
- # Coupon ID to be redeemed for this subscription.
17
- #
18
- # @return [String]
19
- required :coupon_id, String
20
-
21
15
  # @!attribute allow_invoice_credit_or_void
22
16
  # If false, this request will fail if it would void an issued invoice or create a
23
17
  # credit note. Consider using this as a safety mechanism if you do not expect
@@ -33,18 +27,32 @@ module Orb
33
27
  # @return [Time, nil]
34
28
  optional :change_date, Time, nil?: true
35
29
 
36
- # @!method initialize(change_option:, coupon_id:, allow_invoice_credit_or_void: nil, change_date: nil, request_options: {})
30
+ # @!attribute coupon_id
31
+ # Coupon ID to be redeemed for this subscription.
32
+ #
33
+ # @return [String, nil]
34
+ optional :coupon_id, String, nil?: true
35
+
36
+ # @!attribute coupon_redemption_code
37
+ # Redemption code of the coupon to be redeemed for this subscription.
38
+ #
39
+ # @return [String, nil]
40
+ optional :coupon_redemption_code, String, nil?: true
41
+
42
+ # @!method initialize(change_option:, allow_invoice_credit_or_void: nil, change_date: nil, coupon_id: nil, coupon_redemption_code: nil, request_options: {})
37
43
  # Some parameter documentations has been truncated, see
38
44
  # {Orb::Models::SubscriptionRedeemCouponParams} for more details.
39
45
  #
40
46
  # @param change_option [Symbol, Orb::Models::SubscriptionRedeemCouponParams::ChangeOption]
41
47
  #
42
- # @param coupon_id [String] Coupon ID to be redeemed for this subscription.
43
- #
44
48
  # @param allow_invoice_credit_or_void [Boolean, nil] If false, this request will fail if it would void an issued invoice or create a
45
49
  #
46
50
  # @param change_date [Time, nil] The date that the coupon discount should take effect. This parameter can only be
47
51
  #
52
+ # @param coupon_id [String, nil] Coupon ID to be redeemed for this subscription.
53
+ #
54
+ # @param coupon_redemption_code [String, nil] Redemption code of the coupon to be redeemed for this subscription.
55
+ #
48
56
  # @param request_options [Orb::RequestOptions, Hash{Symbol=>Object}]
49
57
 
50
58
  module ChangeOption