orb-billing 0.7.0 → 0.8.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.
@@ -715,14 +715,22 @@ module Orb
715
715
  # @return [String]
716
716
  required :currency, String
717
717
 
718
+ # @!attribute custom_expiration
719
+ # The custom expiration for the allocation.
720
+ #
721
+ # @return [Orb::Models::SubscriptionCreateParams::AddPrice::AllocationPrice::CustomExpiration, nil]
722
+ optional :custom_expiration,
723
+ -> { Orb::SubscriptionCreateParams::AddPrice::AllocationPrice::CustomExpiration },
724
+ nil?: true
725
+
718
726
  # @!attribute expires_at_end_of_cadence
719
727
  # Whether the allocated amount should expire at the end of the cadence or roll
720
- # over to the next period.
728
+ # over to the next period. Set to null if using custom_expiration.
721
729
  #
722
- # @return [Boolean]
723
- required :expires_at_end_of_cadence, Orb::Internal::Type::Boolean
730
+ # @return [Boolean, nil]
731
+ optional :expires_at_end_of_cadence, Orb::Internal::Type::Boolean, nil?: true
724
732
 
725
- # @!method initialize(amount:, cadence:, currency:, expires_at_end_of_cadence:)
733
+ # @!method initialize(amount:, cadence:, currency:, custom_expiration: nil, expires_at_end_of_cadence: nil)
726
734
  # Some parameter documentations has been truncated, see
727
735
  # {Orb::Models::SubscriptionCreateParams::AddPrice::AllocationPrice} for more
728
736
  # details.
@@ -735,7 +743,9 @@ module Orb
735
743
  #
736
744
  # @param currency [String] An ISO 4217 currency string or a custom pricing unit identifier in which to bill
737
745
  #
738
- # @param expires_at_end_of_cadence [Boolean] Whether the allocated amount should expire at the end of the cadence or roll ove
746
+ # @param custom_expiration [Orb::Models::SubscriptionCreateParams::AddPrice::AllocationPrice::CustomExpiration, nil] The custom expiration for the allocation.
747
+ #
748
+ # @param expires_at_end_of_cadence [Boolean, nil] Whether the allocated amount should expire at the end of the cadence or roll ove
739
749
 
740
750
  # The cadence at which to allocate the amount to the customer.
741
751
  #
@@ -753,6 +763,39 @@ module Orb
753
763
  # @!method self.values
754
764
  # @return [Array<Symbol>]
755
765
  end
766
+
767
+ # @see Orb::Models::SubscriptionCreateParams::AddPrice::AllocationPrice#custom_expiration
768
+ class CustomExpiration < Orb::Internal::Type::BaseModel
769
+ # @!attribute duration
770
+ #
771
+ # @return [Integer]
772
+ required :duration, Integer
773
+
774
+ # @!attribute duration_unit
775
+ #
776
+ # @return [Symbol, Orb::Models::SubscriptionCreateParams::AddPrice::AllocationPrice::CustomExpiration::DurationUnit]
777
+ required :duration_unit,
778
+ enum: -> {
779
+ Orb::SubscriptionCreateParams::AddPrice::AllocationPrice::CustomExpiration::DurationUnit
780
+ }
781
+
782
+ # @!method initialize(duration:, duration_unit:)
783
+ # The custom expiration for the allocation.
784
+ #
785
+ # @param duration [Integer]
786
+ # @param duration_unit [Symbol, Orb::Models::SubscriptionCreateParams::AddPrice::AllocationPrice::CustomExpiration::DurationUnit]
787
+
788
+ # @see Orb::Models::SubscriptionCreateParams::AddPrice::AllocationPrice::CustomExpiration#duration_unit
789
+ module DurationUnit
790
+ extend Orb::Internal::Type::Enum
791
+
792
+ DAY = :day
793
+ MONTH = :month
794
+
795
+ # @!method self.values
796
+ # @return [Array<Symbol>]
797
+ end
798
+ end
756
799
  end
757
800
 
758
801
  class Discount < Orb::Internal::Type::BaseModel
@@ -9937,14 +9980,22 @@ module Orb
9937
9980
  # @return [String]
9938
9981
  required :currency, String
9939
9982
 
9983
+ # @!attribute custom_expiration
9984
+ # The custom expiration for the allocation.
9985
+ #
9986
+ # @return [Orb::Models::SubscriptionCreateParams::ReplacePrice::AllocationPrice::CustomExpiration, nil]
9987
+ optional :custom_expiration,
9988
+ -> { Orb::SubscriptionCreateParams::ReplacePrice::AllocationPrice::CustomExpiration },
9989
+ nil?: true
9990
+
9940
9991
  # @!attribute expires_at_end_of_cadence
9941
9992
  # Whether the allocated amount should expire at the end of the cadence or roll
9942
- # over to the next period.
9993
+ # over to the next period. Set to null if using custom_expiration.
9943
9994
  #
9944
- # @return [Boolean]
9945
- required :expires_at_end_of_cadence, Orb::Internal::Type::Boolean
9995
+ # @return [Boolean, nil]
9996
+ optional :expires_at_end_of_cadence, Orb::Internal::Type::Boolean, nil?: true
9946
9997
 
9947
- # @!method initialize(amount:, cadence:, currency:, expires_at_end_of_cadence:)
9998
+ # @!method initialize(amount:, cadence:, currency:, custom_expiration: nil, expires_at_end_of_cadence: nil)
9948
9999
  # Some parameter documentations has been truncated, see
9949
10000
  # {Orb::Models::SubscriptionCreateParams::ReplacePrice::AllocationPrice} for more
9950
10001
  # details.
@@ -9957,7 +10008,9 @@ module Orb
9957
10008
  #
9958
10009
  # @param currency [String] An ISO 4217 currency string or a custom pricing unit identifier in which to bill
9959
10010
  #
9960
- # @param expires_at_end_of_cadence [Boolean] Whether the allocated amount should expire at the end of the cadence or roll ove
10011
+ # @param custom_expiration [Orb::Models::SubscriptionCreateParams::ReplacePrice::AllocationPrice::CustomExpiration, nil] The custom expiration for the allocation.
10012
+ #
10013
+ # @param expires_at_end_of_cadence [Boolean, nil] Whether the allocated amount should expire at the end of the cadence or roll ove
9961
10014
 
9962
10015
  # The cadence at which to allocate the amount to the customer.
9963
10016
  #
@@ -9975,6 +10028,39 @@ module Orb
9975
10028
  # @!method self.values
9976
10029
  # @return [Array<Symbol>]
9977
10030
  end
10031
+
10032
+ # @see Orb::Models::SubscriptionCreateParams::ReplacePrice::AllocationPrice#custom_expiration
10033
+ class CustomExpiration < Orb::Internal::Type::BaseModel
10034
+ # @!attribute duration
10035
+ #
10036
+ # @return [Integer]
10037
+ required :duration, Integer
10038
+
10039
+ # @!attribute duration_unit
10040
+ #
10041
+ # @return [Symbol, Orb::Models::SubscriptionCreateParams::ReplacePrice::AllocationPrice::CustomExpiration::DurationUnit]
10042
+ required :duration_unit,
10043
+ enum: -> {
10044
+ Orb::SubscriptionCreateParams::ReplacePrice::AllocationPrice::CustomExpiration::DurationUnit
10045
+ }
10046
+
10047
+ # @!method initialize(duration:, duration_unit:)
10048
+ # The custom expiration for the allocation.
10049
+ #
10050
+ # @param duration [Integer]
10051
+ # @param duration_unit [Symbol, Orb::Models::SubscriptionCreateParams::ReplacePrice::AllocationPrice::CustomExpiration::DurationUnit]
10052
+
10053
+ # @see Orb::Models::SubscriptionCreateParams::ReplacePrice::AllocationPrice::CustomExpiration#duration_unit
10054
+ module DurationUnit
10055
+ extend Orb::Internal::Type::Enum
10056
+
10057
+ DAY = :day
10058
+ MONTH = :month
10059
+
10060
+ # @!method self.values
10061
+ # @return [Array<Symbol>]
10062
+ end
10063
+ end
9978
10064
  end
9979
10065
 
9980
10066
  class Discount < Orb::Internal::Type::BaseModel
@@ -218,14 +218,22 @@ module Orb
218
218
  # @return [String]
219
219
  required :currency, String
220
220
 
221
+ # @!attribute custom_expiration
222
+ # The custom expiration for the allocation.
223
+ #
224
+ # @return [Orb::Models::SubscriptionPriceIntervalsParams::Add::AllocationPrice::CustomExpiration, nil]
225
+ optional :custom_expiration,
226
+ -> { Orb::SubscriptionPriceIntervalsParams::Add::AllocationPrice::CustomExpiration },
227
+ nil?: true
228
+
221
229
  # @!attribute expires_at_end_of_cadence
222
230
  # Whether the allocated amount should expire at the end of the cadence or roll
223
- # over to the next period.
231
+ # over to the next period. Set to null if using custom_expiration.
224
232
  #
225
- # @return [Boolean]
226
- required :expires_at_end_of_cadence, Orb::Internal::Type::Boolean
233
+ # @return [Boolean, nil]
234
+ optional :expires_at_end_of_cadence, Orb::Internal::Type::Boolean, nil?: true
227
235
 
228
- # @!method initialize(amount:, cadence:, currency:, expires_at_end_of_cadence:)
236
+ # @!method initialize(amount:, cadence:, currency:, custom_expiration: nil, expires_at_end_of_cadence: nil)
229
237
  # Some parameter documentations has been truncated, see
230
238
  # {Orb::Models::SubscriptionPriceIntervalsParams::Add::AllocationPrice} for more
231
239
  # details.
@@ -238,7 +246,9 @@ module Orb
238
246
  #
239
247
  # @param currency [String] An ISO 4217 currency string or a custom pricing unit identifier in which to bill
240
248
  #
241
- # @param expires_at_end_of_cadence [Boolean] Whether the allocated amount should expire at the end of the cadence or roll ove
249
+ # @param custom_expiration [Orb::Models::SubscriptionPriceIntervalsParams::Add::AllocationPrice::CustomExpiration, nil] The custom expiration for the allocation.
250
+ #
251
+ # @param expires_at_end_of_cadence [Boolean, nil] Whether the allocated amount should expire at the end of the cadence or roll ove
242
252
 
243
253
  # The cadence at which to allocate the amount to the customer.
244
254
  #
@@ -256,6 +266,39 @@ module Orb
256
266
  # @!method self.values
257
267
  # @return [Array<Symbol>]
258
268
  end
269
+
270
+ # @see Orb::Models::SubscriptionPriceIntervalsParams::Add::AllocationPrice#custom_expiration
271
+ class CustomExpiration < Orb::Internal::Type::BaseModel
272
+ # @!attribute duration
273
+ #
274
+ # @return [Integer]
275
+ required :duration, Integer
276
+
277
+ # @!attribute duration_unit
278
+ #
279
+ # @return [Symbol, Orb::Models::SubscriptionPriceIntervalsParams::Add::AllocationPrice::CustomExpiration::DurationUnit]
280
+ required :duration_unit,
281
+ enum: -> {
282
+ Orb::SubscriptionPriceIntervalsParams::Add::AllocationPrice::CustomExpiration::DurationUnit
283
+ }
284
+
285
+ # @!method initialize(duration:, duration_unit:)
286
+ # The custom expiration for the allocation.
287
+ #
288
+ # @param duration [Integer]
289
+ # @param duration_unit [Symbol, Orb::Models::SubscriptionPriceIntervalsParams::Add::AllocationPrice::CustomExpiration::DurationUnit]
290
+
291
+ # @see Orb::Models::SubscriptionPriceIntervalsParams::Add::AllocationPrice::CustomExpiration#duration_unit
292
+ module DurationUnit
293
+ extend Orb::Internal::Type::Enum
294
+
295
+ DAY = :day
296
+ MONTH = :month
297
+
298
+ # @!method self.values
299
+ # @return [Array<Symbol>]
300
+ end
301
+ end
259
302
  end
260
303
 
261
304
  module Discount
@@ -688,14 +688,24 @@ module Orb
688
688
  # @return [String]
689
689
  required :currency, String
690
690
 
691
+ # @!attribute custom_expiration
692
+ # The custom expiration for the allocation.
693
+ #
694
+ # @return [Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::AllocationPrice::CustomExpiration, nil]
695
+ optional :custom_expiration,
696
+ -> {
697
+ Orb::SubscriptionSchedulePlanChangeParams::AddPrice::AllocationPrice::CustomExpiration
698
+ },
699
+ nil?: true
700
+
691
701
  # @!attribute expires_at_end_of_cadence
692
702
  # Whether the allocated amount should expire at the end of the cadence or roll
693
- # over to the next period.
703
+ # over to the next period. Set to null if using custom_expiration.
694
704
  #
695
- # @return [Boolean]
696
- required :expires_at_end_of_cadence, Orb::Internal::Type::Boolean
705
+ # @return [Boolean, nil]
706
+ optional :expires_at_end_of_cadence, Orb::Internal::Type::Boolean, nil?: true
697
707
 
698
- # @!method initialize(amount:, cadence:, currency:, expires_at_end_of_cadence:)
708
+ # @!method initialize(amount:, cadence:, currency:, custom_expiration: nil, expires_at_end_of_cadence: nil)
699
709
  # Some parameter documentations has been truncated, see
700
710
  # {Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::AllocationPrice}
701
711
  # for more details.
@@ -708,7 +718,9 @@ module Orb
708
718
  #
709
719
  # @param currency [String] An ISO 4217 currency string or a custom pricing unit identifier in which to bill
710
720
  #
711
- # @param expires_at_end_of_cadence [Boolean] Whether the allocated amount should expire at the end of the cadence or roll ove
721
+ # @param custom_expiration [Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::AllocationPrice::CustomExpiration, nil] The custom expiration for the allocation.
722
+ #
723
+ # @param expires_at_end_of_cadence [Boolean, nil] Whether the allocated amount should expire at the end of the cadence or roll ove
712
724
 
713
725
  # The cadence at which to allocate the amount to the customer.
714
726
  #
@@ -726,6 +738,39 @@ module Orb
726
738
  # @!method self.values
727
739
  # @return [Array<Symbol>]
728
740
  end
741
+
742
+ # @see Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::AllocationPrice#custom_expiration
743
+ class CustomExpiration < Orb::Internal::Type::BaseModel
744
+ # @!attribute duration
745
+ #
746
+ # @return [Integer]
747
+ required :duration, Integer
748
+
749
+ # @!attribute duration_unit
750
+ #
751
+ # @return [Symbol, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::AllocationPrice::CustomExpiration::DurationUnit]
752
+ required :duration_unit,
753
+ enum: -> {
754
+ Orb::SubscriptionSchedulePlanChangeParams::AddPrice::AllocationPrice::CustomExpiration::DurationUnit
755
+ }
756
+
757
+ # @!method initialize(duration:, duration_unit:)
758
+ # The custom expiration for the allocation.
759
+ #
760
+ # @param duration [Integer]
761
+ # @param duration_unit [Symbol, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::AllocationPrice::CustomExpiration::DurationUnit]
762
+
763
+ # @see Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::AllocationPrice::CustomExpiration#duration_unit
764
+ module DurationUnit
765
+ extend Orb::Internal::Type::Enum
766
+
767
+ DAY = :day
768
+ MONTH = :month
769
+
770
+ # @!method self.values
771
+ # @return [Array<Symbol>]
772
+ end
773
+ end
729
774
  end
730
775
 
731
776
  class Discount < Orb::Internal::Type::BaseModel
@@ -9974,14 +10019,24 @@ module Orb
9974
10019
  # @return [String]
9975
10020
  required :currency, String
9976
10021
 
10022
+ # @!attribute custom_expiration
10023
+ # The custom expiration for the allocation.
10024
+ #
10025
+ # @return [Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::AllocationPrice::CustomExpiration, nil]
10026
+ optional :custom_expiration,
10027
+ -> {
10028
+ Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::AllocationPrice::CustomExpiration
10029
+ },
10030
+ nil?: true
10031
+
9977
10032
  # @!attribute expires_at_end_of_cadence
9978
10033
  # Whether the allocated amount should expire at the end of the cadence or roll
9979
- # over to the next period.
10034
+ # over to the next period. Set to null if using custom_expiration.
9980
10035
  #
9981
- # @return [Boolean]
9982
- required :expires_at_end_of_cadence, Orb::Internal::Type::Boolean
10036
+ # @return [Boolean, nil]
10037
+ optional :expires_at_end_of_cadence, Orb::Internal::Type::Boolean, nil?: true
9983
10038
 
9984
- # @!method initialize(amount:, cadence:, currency:, expires_at_end_of_cadence:)
10039
+ # @!method initialize(amount:, cadence:, currency:, custom_expiration: nil, expires_at_end_of_cadence: nil)
9985
10040
  # Some parameter documentations has been truncated, see
9986
10041
  # {Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::AllocationPrice}
9987
10042
  # for more details.
@@ -9994,7 +10049,9 @@ module Orb
9994
10049
  #
9995
10050
  # @param currency [String] An ISO 4217 currency string or a custom pricing unit identifier in which to bill
9996
10051
  #
9997
- # @param expires_at_end_of_cadence [Boolean] Whether the allocated amount should expire at the end of the cadence or roll ove
10052
+ # @param custom_expiration [Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::AllocationPrice::CustomExpiration, nil] The custom expiration for the allocation.
10053
+ #
10054
+ # @param expires_at_end_of_cadence [Boolean, nil] Whether the allocated amount should expire at the end of the cadence or roll ove
9998
10055
 
9999
10056
  # The cadence at which to allocate the amount to the customer.
10000
10057
  #
@@ -10012,6 +10069,39 @@ module Orb
10012
10069
  # @!method self.values
10013
10070
  # @return [Array<Symbol>]
10014
10071
  end
10072
+
10073
+ # @see Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::AllocationPrice#custom_expiration
10074
+ class CustomExpiration < Orb::Internal::Type::BaseModel
10075
+ # @!attribute duration
10076
+ #
10077
+ # @return [Integer]
10078
+ required :duration, Integer
10079
+
10080
+ # @!attribute duration_unit
10081
+ #
10082
+ # @return [Symbol, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::AllocationPrice::CustomExpiration::DurationUnit]
10083
+ required :duration_unit,
10084
+ enum: -> {
10085
+ Orb::SubscriptionSchedulePlanChangeParams::ReplacePrice::AllocationPrice::CustomExpiration::DurationUnit
10086
+ }
10087
+
10088
+ # @!method initialize(duration:, duration_unit:)
10089
+ # The custom expiration for the allocation.
10090
+ #
10091
+ # @param duration [Integer]
10092
+ # @param duration_unit [Symbol, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::AllocationPrice::CustomExpiration::DurationUnit]
10093
+
10094
+ # @see Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::AllocationPrice::CustomExpiration#duration_unit
10095
+ module DurationUnit
10096
+ extend Orb::Internal::Type::Enum
10097
+
10098
+ DAY = :day
10099
+ MONTH = :month
10100
+
10101
+ # @!method self.values
10102
+ # @return [Array<Symbol>]
10103
+ end
10104
+ end
10015
10105
  end
10016
10106
 
10017
10107
  class Discount < Orb::Internal::Type::BaseModel
data/lib/orb/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Orb
4
- VERSION = "0.7.0"
4
+ VERSION = "0.8.0"
5
5
  end