orb-billing 0.9.0 → 0.10.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4ddc2fe30477278aa0f78ba2f81557d9a3042fa6631509584ef9f50e91e12654
4
- data.tar.gz: c4fee31316816a2c54e6cfeab8b2296f7212d29a7138f231477265836f8a0d10
3
+ metadata.gz: 0fc3d6747d0949471ff108070f8106061056ca686739bf9f382de763dec391de
4
+ data.tar.gz: ba5cf7901eede9bef59e785299c3327a33c947620fe0ee797dff8d3ca6dcca01
5
5
  SHA512:
6
- metadata.gz: a038b9c318e4774b80ea9963ca7f39a0985003653b3cce196ee950edf79e58a660c5e8fcf177ff1745a0c88b67fe059ab6b79c60091c7d6029b7cc040c624575
7
- data.tar.gz: 0cab84209367469b8585a0ee697631df19cba5dfd08565b96e4f1aa6072add3cb37fbfeee42ec4f1605d6b82891b31881e022362684e5a999e492da1203669c4
6
+ metadata.gz: 2b96875aef0246227c5ee01518dcf0221941f3993622ed30ee508359a7a1b6e4b61160817c26ed8c594362d2b83a2fcb4696e1f481164a74ff7cd16cbb4f0c64
7
+ data.tar.gz: fa5c5b729a07b91f6eea0f1f3aa20447f79797a0d3ee8ec92b501d5588a6c3e9630a20586fe5c6d76c31c62d5c9315877f46733be02aab9f7485ca1e57721cf1
data/CHANGELOG.md CHANGED
@@ -1,5 +1,31 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.10.0 (2025-06-02)
4
+
5
+ Full Changelog: [v0.9.1...v0.10.0](https://github.com/orbcorp/orb-ruby/compare/v0.9.1...v0.10.0)
6
+
7
+ ### Features
8
+
9
+ * **api:** api update ([38a8a32](https://github.com/orbcorp/orb-ruby/commit/38a8a32ad909bdad88f7085e40f01d7949058b79))
10
+
11
+
12
+ ### Chores
13
+
14
+ * **internal:** version bump ([7568907](https://github.com/orbcorp/orb-ruby/commit/7568907e515144a8e43e9646e0499036b7dcbda7))
15
+
16
+ ## 0.9.1 (2025-06-02)
17
+
18
+ Full Changelog: [v0.9.0...v0.9.1](https://github.com/orbcorp/orb-ruby/compare/v0.9.0...v0.9.1)
19
+
20
+ ### Bug Fixes
21
+
22
+ * `to_sorbet_type` should not return branded types ([14c7e56](https://github.com/orbcorp/orb-ruby/commit/14c7e5619ef77352b5f86d1c7fa70648c403849a))
23
+
24
+
25
+ ### Chores
26
+
27
+ * **internal:** version bump ([0369cd3](https://github.com/orbcorp/orb-ruby/commit/0369cd3adb7733d10c0fabf71ee4d211685d4c5a))
28
+
3
29
  ## 0.9.0 (2025-05-30)
4
30
 
5
31
  Full Changelog: [v0.8.0...v0.9.0](https://github.com/orbcorp/orb-ruby/compare/v0.8.0...v0.9.0)
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.9.0"
18
+ gem "orb-billing", "~> 0.10.0"
19
19
  ```
20
20
 
21
21
  <!-- x-release-please-end -->
@@ -112,11 +112,14 @@ module Orb
112
112
  #
113
113
  # @return [Object]
114
114
  def to_sorbet_type
115
- case values
115
+ types = values.map { Orb::Internal::Util::SorbetRuntimeSupport.to_sorbet_type(_1) }.uniq
116
+ case types
116
117
  in []
117
118
  T.noreturn
118
- in [value, *_]
119
- T.all(Orb::Internal::Util::SorbetRuntimeSupport.to_sorbet_type(value), self)
119
+ in [type]
120
+ type
121
+ else
122
+ T.any(*types)
120
123
  end
121
124
  end
122
125
 
@@ -235,11 +235,14 @@ module Orb
235
235
  #
236
236
  # @return [Object]
237
237
  def to_sorbet_type
238
- case (v = variants)
238
+ types = variants.map { Orb::Internal::Util::SorbetRuntimeSupport.to_sorbet_type(_1) }.uniq
239
+ case types
239
240
  in []
240
241
  T.noreturn
242
+ in [type]
243
+ type
241
244
  else
242
- T.any(*v.map { Orb::Internal::Util::SorbetRuntimeSupport.to_sorbet_type(_1) })
245
+ T.any(*types)
243
246
  end
244
247
  end
245
248
 
@@ -1181,8 +1181,8 @@ module Orb
1181
1181
  # For more on the types of prices, see
1182
1182
  # [the core concepts documentation](/core-concepts#plan-and-price)
1183
1183
  #
1184
- # @return [Orb::Models::Price::Unit, Orb::Models::Price::Package, Orb::Models::Price::Matrix, Orb::Models::Price::Tiered, Orb::Models::Price::TieredBps, Orb::Models::Price::Bps, Orb::Models::Price::BulkBps, Orb::Models::Price::Bulk, Orb::Models::Price::ThresholdTotalAmount, Orb::Models::Price::TieredPackage, Orb::Models::Price::GroupedTiered, Orb::Models::Price::TieredWithMinimum, Orb::Models::Price::TieredPackageWithMinimum, Orb::Models::Price::PackageWithAllocation, Orb::Models::Price::UnitWithPercent, Orb::Models::Price::MatrixWithAllocation, Orb::Models::Price::TieredWithProration, Orb::Models::Price::UnitWithProration, Orb::Models::Price::GroupedAllocation, Orb::Models::Price::GroupedWithProratedMinimum, Orb::Models::Price::GroupedWithMeteredMinimum, Orb::Models::Price::MatrixWithDisplayName, Orb::Models::Price::BulkWithProration, Orb::Models::Price::GroupedTieredPackage, Orb::Models::Price::MaxGroupTieredPackage, Orb::Models::Price::ScalableMatrixWithUnitPricing, Orb::Models::Price::ScalableMatrixWithTieredPricing, Orb::Models::Price::CumulativeGroupedBulk, nil]
1185
- required :price, union: -> { Orb::Price }, nil?: true
1184
+ # @return [Orb::Models::Price::Unit, Orb::Models::Price::Package, Orb::Models::Price::Matrix, Orb::Models::Price::Tiered, Orb::Models::Price::TieredBps, Orb::Models::Price::Bps, Orb::Models::Price::BulkBps, Orb::Models::Price::Bulk, Orb::Models::Price::ThresholdTotalAmount, Orb::Models::Price::TieredPackage, Orb::Models::Price::GroupedTiered, Orb::Models::Price::TieredWithMinimum, Orb::Models::Price::TieredPackageWithMinimum, Orb::Models::Price::PackageWithAllocation, Orb::Models::Price::UnitWithPercent, Orb::Models::Price::MatrixWithAllocation, Orb::Models::Price::TieredWithProration, Orb::Models::Price::UnitWithProration, Orb::Models::Price::GroupedAllocation, Orb::Models::Price::GroupedWithProratedMinimum, Orb::Models::Price::GroupedWithMeteredMinimum, Orb::Models::Price::MatrixWithDisplayName, Orb::Models::Price::BulkWithProration, Orb::Models::Price::GroupedTieredPackage, Orb::Models::Price::MaxGroupTieredPackage, Orb::Models::Price::ScalableMatrixWithUnitPricing, Orb::Models::Price::ScalableMatrixWithTieredPricing, Orb::Models::Price::CumulativeGroupedBulk]
1185
+ required :price, union: -> { Orb::Price }
1186
1186
 
1187
1187
  # @!attribute quantity
1188
1188
  # Either the fixed fee quantity or the usage during the service period.
@@ -1259,7 +1259,7 @@ module Orb
1259
1259
  #
1260
1260
  # @param partially_invoiced_amount [String] Any amount applied from a partial invoice
1261
1261
  #
1262
- # @param price [Orb::Models::Price::Unit, Orb::Models::Price::Package, Orb::Models::Price::Matrix, Orb::Models::Price::Tiered, Orb::Models::Price::TieredBps, Orb::Models::Price::Bps, Orb::Models::Price::BulkBps, Orb::Models::Price::Bulk, Orb::Models::Price::ThresholdTotalAmount, Orb::Models::Price::TieredPackage, Orb::Models::Price::GroupedTiered, Orb::Models::Price::TieredWithMinimum, Orb::Models::Price::TieredPackageWithMinimum, Orb::Models::Price::PackageWithAllocation, Orb::Models::Price::UnitWithPercent, Orb::Models::Price::MatrixWithAllocation, Orb::Models::Price::TieredWithProration, Orb::Models::Price::UnitWithProration, Orb::Models::Price::GroupedAllocation, Orb::Models::Price::GroupedWithProratedMinimum, Orb::Models::Price::GroupedWithMeteredMinimum, Orb::Models::Price::MatrixWithDisplayName, Orb::Models::Price::BulkWithProration, Orb::Models::Price::GroupedTieredPackage, Orb::Models::Price::MaxGroupTieredPackage, Orb::Models::Price::ScalableMatrixWithUnitPricing, Orb::Models::Price::ScalableMatrixWithTieredPricing, Orb::Models::Price::CumulativeGroupedBulk, nil] The Price resource represents a price that can be billed on a subscription, resu
1262
+ # @param price [Orb::Models::Price::Unit, Orb::Models::Price::Package, Orb::Models::Price::Matrix, Orb::Models::Price::Tiered, Orb::Models::Price::TieredBps, Orb::Models::Price::Bps, Orb::Models::Price::BulkBps, Orb::Models::Price::Bulk, Orb::Models::Price::ThresholdTotalAmount, Orb::Models::Price::TieredPackage, Orb::Models::Price::GroupedTiered, Orb::Models::Price::TieredWithMinimum, Orb::Models::Price::TieredPackageWithMinimum, Orb::Models::Price::PackageWithAllocation, Orb::Models::Price::UnitWithPercent, Orb::Models::Price::MatrixWithAllocation, Orb::Models::Price::TieredWithProration, Orb::Models::Price::UnitWithProration, Orb::Models::Price::GroupedAllocation, Orb::Models::Price::GroupedWithProratedMinimum, Orb::Models::Price::GroupedWithMeteredMinimum, Orb::Models::Price::MatrixWithDisplayName, Orb::Models::Price::BulkWithProration, Orb::Models::Price::GroupedTieredPackage, Orb::Models::Price::MaxGroupTieredPackage, Orb::Models::Price::ScalableMatrixWithUnitPricing, Orb::Models::Price::ScalableMatrixWithTieredPricing, Orb::Models::Price::CumulativeGroupedBulk] The Price resource represents a price that can be billed on a subscription, resu
1263
1263
  #
1264
1264
  # @param quantity [Float] Either the fixed fee quantity or the usage during the service period.
1265
1265
  #
@@ -1185,8 +1185,8 @@ module Orb
1185
1185
  # For more on the types of prices, see
1186
1186
  # [the core concepts documentation](/core-concepts#plan-and-price)
1187
1187
  #
1188
- # @return [Orb::Models::Price::Unit, Orb::Models::Price::Package, Orb::Models::Price::Matrix, Orb::Models::Price::Tiered, Orb::Models::Price::TieredBps, Orb::Models::Price::Bps, Orb::Models::Price::BulkBps, Orb::Models::Price::Bulk, Orb::Models::Price::ThresholdTotalAmount, Orb::Models::Price::TieredPackage, Orb::Models::Price::GroupedTiered, Orb::Models::Price::TieredWithMinimum, Orb::Models::Price::TieredPackageWithMinimum, Orb::Models::Price::PackageWithAllocation, Orb::Models::Price::UnitWithPercent, Orb::Models::Price::MatrixWithAllocation, Orb::Models::Price::TieredWithProration, Orb::Models::Price::UnitWithProration, Orb::Models::Price::GroupedAllocation, Orb::Models::Price::GroupedWithProratedMinimum, Orb::Models::Price::GroupedWithMeteredMinimum, Orb::Models::Price::MatrixWithDisplayName, Orb::Models::Price::BulkWithProration, Orb::Models::Price::GroupedTieredPackage, Orb::Models::Price::MaxGroupTieredPackage, Orb::Models::Price::ScalableMatrixWithUnitPricing, Orb::Models::Price::ScalableMatrixWithTieredPricing, Orb::Models::Price::CumulativeGroupedBulk, nil]
1189
- required :price, union: -> { Orb::Price }, nil?: true
1188
+ # @return [Orb::Models::Price::Unit, Orb::Models::Price::Package, Orb::Models::Price::Matrix, Orb::Models::Price::Tiered, Orb::Models::Price::TieredBps, Orb::Models::Price::Bps, Orb::Models::Price::BulkBps, Orb::Models::Price::Bulk, Orb::Models::Price::ThresholdTotalAmount, Orb::Models::Price::TieredPackage, Orb::Models::Price::GroupedTiered, Orb::Models::Price::TieredWithMinimum, Orb::Models::Price::TieredPackageWithMinimum, Orb::Models::Price::PackageWithAllocation, Orb::Models::Price::UnitWithPercent, Orb::Models::Price::MatrixWithAllocation, Orb::Models::Price::TieredWithProration, Orb::Models::Price::UnitWithProration, Orb::Models::Price::GroupedAllocation, Orb::Models::Price::GroupedWithProratedMinimum, Orb::Models::Price::GroupedWithMeteredMinimum, Orb::Models::Price::MatrixWithDisplayName, Orb::Models::Price::BulkWithProration, Orb::Models::Price::GroupedTieredPackage, Orb::Models::Price::MaxGroupTieredPackage, Orb::Models::Price::ScalableMatrixWithUnitPricing, Orb::Models::Price::ScalableMatrixWithTieredPricing, Orb::Models::Price::CumulativeGroupedBulk]
1189
+ required :price, union: -> { Orb::Price }
1190
1190
 
1191
1191
  # @!attribute quantity
1192
1192
  # Either the fixed fee quantity or the usage during the service period.
@@ -1262,7 +1262,7 @@ module Orb
1262
1262
  #
1263
1263
  # @param partially_invoiced_amount [String] Any amount applied from a partial invoice
1264
1264
  #
1265
- # @param price [Orb::Models::Price::Unit, Orb::Models::Price::Package, Orb::Models::Price::Matrix, Orb::Models::Price::Tiered, Orb::Models::Price::TieredBps, Orb::Models::Price::Bps, Orb::Models::Price::BulkBps, Orb::Models::Price::Bulk, Orb::Models::Price::ThresholdTotalAmount, Orb::Models::Price::TieredPackage, Orb::Models::Price::GroupedTiered, Orb::Models::Price::TieredWithMinimum, Orb::Models::Price::TieredPackageWithMinimum, Orb::Models::Price::PackageWithAllocation, Orb::Models::Price::UnitWithPercent, Orb::Models::Price::MatrixWithAllocation, Orb::Models::Price::TieredWithProration, Orb::Models::Price::UnitWithProration, Orb::Models::Price::GroupedAllocation, Orb::Models::Price::GroupedWithProratedMinimum, Orb::Models::Price::GroupedWithMeteredMinimum, Orb::Models::Price::MatrixWithDisplayName, Orb::Models::Price::BulkWithProration, Orb::Models::Price::GroupedTieredPackage, Orb::Models::Price::MaxGroupTieredPackage, Orb::Models::Price::ScalableMatrixWithUnitPricing, Orb::Models::Price::ScalableMatrixWithTieredPricing, Orb::Models::Price::CumulativeGroupedBulk, nil] The Price resource represents a price that can be billed on a subscription, resu
1265
+ # @param price [Orb::Models::Price::Unit, Orb::Models::Price::Package, Orb::Models::Price::Matrix, Orb::Models::Price::Tiered, Orb::Models::Price::TieredBps, Orb::Models::Price::Bps, Orb::Models::Price::BulkBps, Orb::Models::Price::Bulk, Orb::Models::Price::ThresholdTotalAmount, Orb::Models::Price::TieredPackage, Orb::Models::Price::GroupedTiered, Orb::Models::Price::TieredWithMinimum, Orb::Models::Price::TieredPackageWithMinimum, Orb::Models::Price::PackageWithAllocation, Orb::Models::Price::UnitWithPercent, Orb::Models::Price::MatrixWithAllocation, Orb::Models::Price::TieredWithProration, Orb::Models::Price::UnitWithProration, Orb::Models::Price::GroupedAllocation, Orb::Models::Price::GroupedWithProratedMinimum, Orb::Models::Price::GroupedWithMeteredMinimum, Orb::Models::Price::MatrixWithDisplayName, Orb::Models::Price::BulkWithProration, Orb::Models::Price::GroupedTieredPackage, Orb::Models::Price::MaxGroupTieredPackage, Orb::Models::Price::ScalableMatrixWithUnitPricing, Orb::Models::Price::ScalableMatrixWithTieredPricing, Orb::Models::Price::CumulativeGroupedBulk] The Price resource represents a price that can be billed on a subscription, resu
1266
1266
  #
1267
1267
  # @param quantity [Float] Either the fixed fee quantity or the usage during the service period.
1268
1268
  #
@@ -120,8 +120,8 @@ module Orb
120
120
  # For more on the types of prices, see
121
121
  # [the core concepts documentation](/core-concepts#plan-and-price)
122
122
  #
123
- # @return [Orb::Models::Price::Unit, Orb::Models::Price::Package, Orb::Models::Price::Matrix, Orb::Models::Price::Tiered, Orb::Models::Price::TieredBps, Orb::Models::Price::Bps, Orb::Models::Price::BulkBps, Orb::Models::Price::Bulk, Orb::Models::Price::ThresholdTotalAmount, Orb::Models::Price::TieredPackage, Orb::Models::Price::GroupedTiered, Orb::Models::Price::TieredWithMinimum, Orb::Models::Price::TieredPackageWithMinimum, Orb::Models::Price::PackageWithAllocation, Orb::Models::Price::UnitWithPercent, Orb::Models::Price::MatrixWithAllocation, Orb::Models::Price::TieredWithProration, Orb::Models::Price::UnitWithProration, Orb::Models::Price::GroupedAllocation, Orb::Models::Price::GroupedWithProratedMinimum, Orb::Models::Price::GroupedWithMeteredMinimum, Orb::Models::Price::MatrixWithDisplayName, Orb::Models::Price::BulkWithProration, Orb::Models::Price::GroupedTieredPackage, Orb::Models::Price::MaxGroupTieredPackage, Orb::Models::Price::ScalableMatrixWithUnitPricing, Orb::Models::Price::ScalableMatrixWithTieredPricing, Orb::Models::Price::CumulativeGroupedBulk, nil]
124
- required :price, union: -> { Orb::Price }, nil?: true
123
+ # @return [Orb::Models::Price::Unit, Orb::Models::Price::Package, Orb::Models::Price::Matrix, Orb::Models::Price::Tiered, Orb::Models::Price::TieredBps, Orb::Models::Price::Bps, Orb::Models::Price::BulkBps, Orb::Models::Price::Bulk, Orb::Models::Price::ThresholdTotalAmount, Orb::Models::Price::TieredPackage, Orb::Models::Price::GroupedTiered, Orb::Models::Price::TieredWithMinimum, Orb::Models::Price::TieredPackageWithMinimum, Orb::Models::Price::PackageWithAllocation, Orb::Models::Price::UnitWithPercent, Orb::Models::Price::MatrixWithAllocation, Orb::Models::Price::TieredWithProration, Orb::Models::Price::UnitWithProration, Orb::Models::Price::GroupedAllocation, Orb::Models::Price::GroupedWithProratedMinimum, Orb::Models::Price::GroupedWithMeteredMinimum, Orb::Models::Price::MatrixWithDisplayName, Orb::Models::Price::BulkWithProration, Orb::Models::Price::GroupedTieredPackage, Orb::Models::Price::MaxGroupTieredPackage, Orb::Models::Price::ScalableMatrixWithUnitPricing, Orb::Models::Price::ScalableMatrixWithTieredPricing, Orb::Models::Price::CumulativeGroupedBulk]
124
+ required :price, union: -> { Orb::Price }
125
125
 
126
126
  # @!attribute quantity
127
127
  # Either the fixed fee quantity or the usage during the service period.
@@ -197,7 +197,7 @@ module Orb
197
197
  #
198
198
  # @param partially_invoiced_amount [String] Any amount applied from a partial invoice
199
199
  #
200
- # @param price [Orb::Models::Price::Unit, Orb::Models::Price::Package, Orb::Models::Price::Matrix, Orb::Models::Price::Tiered, Orb::Models::Price::TieredBps, Orb::Models::Price::Bps, Orb::Models::Price::BulkBps, Orb::Models::Price::Bulk, Orb::Models::Price::ThresholdTotalAmount, Orb::Models::Price::TieredPackage, Orb::Models::Price::GroupedTiered, Orb::Models::Price::TieredWithMinimum, Orb::Models::Price::TieredPackageWithMinimum, Orb::Models::Price::PackageWithAllocation, Orb::Models::Price::UnitWithPercent, Orb::Models::Price::MatrixWithAllocation, Orb::Models::Price::TieredWithProration, Orb::Models::Price::UnitWithProration, Orb::Models::Price::GroupedAllocation, Orb::Models::Price::GroupedWithProratedMinimum, Orb::Models::Price::GroupedWithMeteredMinimum, Orb::Models::Price::MatrixWithDisplayName, Orb::Models::Price::BulkWithProration, Orb::Models::Price::GroupedTieredPackage, Orb::Models::Price::MaxGroupTieredPackage, Orb::Models::Price::ScalableMatrixWithUnitPricing, Orb::Models::Price::ScalableMatrixWithTieredPricing, Orb::Models::Price::CumulativeGroupedBulk, nil] The Price resource represents a price that can be billed on a subscription, resu
200
+ # @param price [Orb::Models::Price::Unit, Orb::Models::Price::Package, Orb::Models::Price::Matrix, Orb::Models::Price::Tiered, Orb::Models::Price::TieredBps, Orb::Models::Price::Bps, Orb::Models::Price::BulkBps, Orb::Models::Price::Bulk, Orb::Models::Price::ThresholdTotalAmount, Orb::Models::Price::TieredPackage, Orb::Models::Price::GroupedTiered, Orb::Models::Price::TieredWithMinimum, Orb::Models::Price::TieredPackageWithMinimum, Orb::Models::Price::PackageWithAllocation, Orb::Models::Price::UnitWithPercent, Orb::Models::Price::MatrixWithAllocation, Orb::Models::Price::TieredWithProration, Orb::Models::Price::UnitWithProration, Orb::Models::Price::GroupedAllocation, Orb::Models::Price::GroupedWithProratedMinimum, Orb::Models::Price::GroupedWithMeteredMinimum, Orb::Models::Price::MatrixWithDisplayName, Orb::Models::Price::BulkWithProration, Orb::Models::Price::GroupedTieredPackage, Orb::Models::Price::MaxGroupTieredPackage, Orb::Models::Price::ScalableMatrixWithUnitPricing, Orb::Models::Price::ScalableMatrixWithTieredPricing, Orb::Models::Price::CumulativeGroupedBulk] The Price resource represents a price that can be billed on a subscription, resu
201
201
  #
202
202
  # @param quantity [Float] Either the fixed fee quantity or the usage during the service period.
203
203
  #
@@ -0,0 +1,62 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Orb
4
+ module Models
5
+ # @see Orb::Resources::Subscriptions#redeem_coupon
6
+ class SubscriptionRedeemCouponParams < Orb::Internal::Type::BaseModel
7
+ extend Orb::Internal::Type::RequestParameters::Converter
8
+ include Orb::Internal::Type::RequestParameters
9
+
10
+ # @!attribute change_option
11
+ #
12
+ # @return [Symbol, Orb::Models::SubscriptionRedeemCouponParams::ChangeOption]
13
+ required :change_option, enum: -> { Orb::SubscriptionRedeemCouponParams::ChangeOption }
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
+ # @!attribute allow_invoice_credit_or_void
22
+ # If false, this request will fail if it would void an issued invoice or create a
23
+ # credit note. Consider using this as a safety mechanism if you do not expect
24
+ # existing invoices to be changed.
25
+ #
26
+ # @return [Boolean, nil]
27
+ optional :allow_invoice_credit_or_void, Orb::Internal::Type::Boolean, nil?: true
28
+
29
+ # @!attribute change_date
30
+ # The date that the coupon discount should take effect. This parameter can only be
31
+ # passed if the `change_option` is `requested_date`.
32
+ #
33
+ # @return [Time, nil]
34
+ optional :change_date, Time, nil?: true
35
+
36
+ # @!method initialize(change_option:, coupon_id:, allow_invoice_credit_or_void: nil, change_date: nil, request_options: {})
37
+ # Some parameter documentations has been truncated, see
38
+ # {Orb::Models::SubscriptionRedeemCouponParams} for more details.
39
+ #
40
+ # @param change_option [Symbol, Orb::Models::SubscriptionRedeemCouponParams::ChangeOption]
41
+ #
42
+ # @param coupon_id [String] Coupon ID to be redeemed for this subscription.
43
+ #
44
+ # @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
+ #
46
+ # @param change_date [Time, nil] The date that the coupon discount should take effect. This parameter can only be
47
+ #
48
+ # @param request_options [Orb::RequestOptions, Hash{Symbol=>Object}]
49
+
50
+ module ChangeOption
51
+ extend Orb::Internal::Type::Enum
52
+
53
+ REQUESTED_DATE = :requested_date
54
+ END_OF_SUBSCRIPTION_TERM = :end_of_subscription_term
55
+ IMMEDIATE = :immediate
56
+
57
+ # @!method self.values
58
+ # @return [Array<Symbol>]
59
+ end
60
+ end
61
+ end
62
+ end