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.
@@ -1128,9 +1128,29 @@ module Orb
1128
1128
  sig { returns(String) }
1129
1129
  attr_accessor :currency
1130
1130
 
1131
+ # The custom expiration for the allocation.
1132
+ sig do
1133
+ returns(
1134
+ T.nilable(
1135
+ Orb::SubscriptionCreateParams::AddPrice::AllocationPrice::CustomExpiration
1136
+ )
1137
+ )
1138
+ end
1139
+ attr_reader :custom_expiration
1140
+
1141
+ sig do
1142
+ params(
1143
+ custom_expiration:
1144
+ T.nilable(
1145
+ Orb::SubscriptionCreateParams::AddPrice::AllocationPrice::CustomExpiration::OrHash
1146
+ )
1147
+ ).void
1148
+ end
1149
+ attr_writer :custom_expiration
1150
+
1131
1151
  # Whether the allocated amount should expire at the end of the cadence or roll
1132
- # over to the next period.
1133
- sig { returns(T::Boolean) }
1152
+ # over to the next period. Set to null if using custom_expiration.
1153
+ sig { returns(T.nilable(T::Boolean)) }
1134
1154
  attr_accessor :expires_at_end_of_cadence
1135
1155
 
1136
1156
  # The definition of a new allocation price to create and add to the subscription.
@@ -1140,7 +1160,11 @@ module Orb
1140
1160
  cadence:
1141
1161
  Orb::SubscriptionCreateParams::AddPrice::AllocationPrice::Cadence::OrSymbol,
1142
1162
  currency: String,
1143
- expires_at_end_of_cadence: T::Boolean
1163
+ custom_expiration:
1164
+ T.nilable(
1165
+ Orb::SubscriptionCreateParams::AddPrice::AllocationPrice::CustomExpiration::OrHash
1166
+ ),
1167
+ expires_at_end_of_cadence: T.nilable(T::Boolean)
1144
1168
  ).returns(T.attached_class)
1145
1169
  end
1146
1170
  def self.new(
@@ -1151,9 +1175,11 @@ module Orb
1151
1175
  # An ISO 4217 currency string or a custom pricing unit identifier in which to bill
1152
1176
  # this price.
1153
1177
  currency:,
1178
+ # The custom expiration for the allocation.
1179
+ custom_expiration: nil,
1154
1180
  # Whether the allocated amount should expire at the end of the cadence or roll
1155
- # over to the next period.
1156
- expires_at_end_of_cadence:
1181
+ # over to the next period. Set to null if using custom_expiration.
1182
+ expires_at_end_of_cadence: nil
1157
1183
  )
1158
1184
  end
1159
1185
 
@@ -1164,7 +1190,11 @@ module Orb
1164
1190
  cadence:
1165
1191
  Orb::SubscriptionCreateParams::AddPrice::AllocationPrice::Cadence::OrSymbol,
1166
1192
  currency: String,
1167
- expires_at_end_of_cadence: T::Boolean
1193
+ custom_expiration:
1194
+ T.nilable(
1195
+ Orb::SubscriptionCreateParams::AddPrice::AllocationPrice::CustomExpiration
1196
+ ),
1197
+ expires_at_end_of_cadence: T.nilable(T::Boolean)
1168
1198
  }
1169
1199
  )
1170
1200
  end
@@ -1225,6 +1255,83 @@ module Orb
1225
1255
  def self.values
1226
1256
  end
1227
1257
  end
1258
+
1259
+ class CustomExpiration < Orb::Internal::Type::BaseModel
1260
+ OrHash =
1261
+ T.type_alias do
1262
+ T.any(
1263
+ Orb::SubscriptionCreateParams::AddPrice::AllocationPrice::CustomExpiration,
1264
+ Orb::Internal::AnyHash
1265
+ )
1266
+ end
1267
+
1268
+ sig { returns(Integer) }
1269
+ attr_accessor :duration
1270
+
1271
+ sig do
1272
+ returns(
1273
+ Orb::SubscriptionCreateParams::AddPrice::AllocationPrice::CustomExpiration::DurationUnit::OrSymbol
1274
+ )
1275
+ end
1276
+ attr_accessor :duration_unit
1277
+
1278
+ # The custom expiration for the allocation.
1279
+ sig do
1280
+ params(
1281
+ duration: Integer,
1282
+ duration_unit:
1283
+ Orb::SubscriptionCreateParams::AddPrice::AllocationPrice::CustomExpiration::DurationUnit::OrSymbol
1284
+ ).returns(T.attached_class)
1285
+ end
1286
+ def self.new(duration:, duration_unit:)
1287
+ end
1288
+
1289
+ sig do
1290
+ override.returns(
1291
+ {
1292
+ duration: Integer,
1293
+ duration_unit:
1294
+ Orb::SubscriptionCreateParams::AddPrice::AllocationPrice::CustomExpiration::DurationUnit::OrSymbol
1295
+ }
1296
+ )
1297
+ end
1298
+ def to_hash
1299
+ end
1300
+
1301
+ module DurationUnit
1302
+ extend Orb::Internal::Type::Enum
1303
+
1304
+ TaggedSymbol =
1305
+ T.type_alias do
1306
+ T.all(
1307
+ Symbol,
1308
+ Orb::SubscriptionCreateParams::AddPrice::AllocationPrice::CustomExpiration::DurationUnit
1309
+ )
1310
+ end
1311
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
1312
+
1313
+ DAY =
1314
+ T.let(
1315
+ :day,
1316
+ Orb::SubscriptionCreateParams::AddPrice::AllocationPrice::CustomExpiration::DurationUnit::TaggedSymbol
1317
+ )
1318
+ MONTH =
1319
+ T.let(
1320
+ :month,
1321
+ Orb::SubscriptionCreateParams::AddPrice::AllocationPrice::CustomExpiration::DurationUnit::TaggedSymbol
1322
+ )
1323
+
1324
+ sig do
1325
+ override.returns(
1326
+ T::Array[
1327
+ Orb::SubscriptionCreateParams::AddPrice::AllocationPrice::CustomExpiration::DurationUnit::TaggedSymbol
1328
+ ]
1329
+ )
1330
+ end
1331
+ def self.values
1332
+ end
1333
+ end
1334
+ end
1228
1335
  end
1229
1336
 
1230
1337
  class Discount < Orb::Internal::Type::BaseModel
@@ -17917,9 +18024,29 @@ module Orb
17917
18024
  sig { returns(String) }
17918
18025
  attr_accessor :currency
17919
18026
 
18027
+ # The custom expiration for the allocation.
18028
+ sig do
18029
+ returns(
18030
+ T.nilable(
18031
+ Orb::SubscriptionCreateParams::ReplacePrice::AllocationPrice::CustomExpiration
18032
+ )
18033
+ )
18034
+ end
18035
+ attr_reader :custom_expiration
18036
+
18037
+ sig do
18038
+ params(
18039
+ custom_expiration:
18040
+ T.nilable(
18041
+ Orb::SubscriptionCreateParams::ReplacePrice::AllocationPrice::CustomExpiration::OrHash
18042
+ )
18043
+ ).void
18044
+ end
18045
+ attr_writer :custom_expiration
18046
+
17920
18047
  # Whether the allocated amount should expire at the end of the cadence or roll
17921
- # over to the next period.
17922
- sig { returns(T::Boolean) }
18048
+ # over to the next period. Set to null if using custom_expiration.
18049
+ sig { returns(T.nilable(T::Boolean)) }
17923
18050
  attr_accessor :expires_at_end_of_cadence
17924
18051
 
17925
18052
  # The definition of a new allocation price to create and add to the subscription.
@@ -17929,7 +18056,11 @@ module Orb
17929
18056
  cadence:
17930
18057
  Orb::SubscriptionCreateParams::ReplacePrice::AllocationPrice::Cadence::OrSymbol,
17931
18058
  currency: String,
17932
- expires_at_end_of_cadence: T::Boolean
18059
+ custom_expiration:
18060
+ T.nilable(
18061
+ Orb::SubscriptionCreateParams::ReplacePrice::AllocationPrice::CustomExpiration::OrHash
18062
+ ),
18063
+ expires_at_end_of_cadence: T.nilable(T::Boolean)
17933
18064
  ).returns(T.attached_class)
17934
18065
  end
17935
18066
  def self.new(
@@ -17940,9 +18071,11 @@ module Orb
17940
18071
  # An ISO 4217 currency string or a custom pricing unit identifier in which to bill
17941
18072
  # this price.
17942
18073
  currency:,
18074
+ # The custom expiration for the allocation.
18075
+ custom_expiration: nil,
17943
18076
  # Whether the allocated amount should expire at the end of the cadence or roll
17944
- # over to the next period.
17945
- expires_at_end_of_cadence:
18077
+ # over to the next period. Set to null if using custom_expiration.
18078
+ expires_at_end_of_cadence: nil
17946
18079
  )
17947
18080
  end
17948
18081
 
@@ -17953,7 +18086,11 @@ module Orb
17953
18086
  cadence:
17954
18087
  Orb::SubscriptionCreateParams::ReplacePrice::AllocationPrice::Cadence::OrSymbol,
17955
18088
  currency: String,
17956
- expires_at_end_of_cadence: T::Boolean
18089
+ custom_expiration:
18090
+ T.nilable(
18091
+ Orb::SubscriptionCreateParams::ReplacePrice::AllocationPrice::CustomExpiration
18092
+ ),
18093
+ expires_at_end_of_cadence: T.nilable(T::Boolean)
17957
18094
  }
17958
18095
  )
17959
18096
  end
@@ -18014,6 +18151,83 @@ module Orb
18014
18151
  def self.values
18015
18152
  end
18016
18153
  end
18154
+
18155
+ class CustomExpiration < Orb::Internal::Type::BaseModel
18156
+ OrHash =
18157
+ T.type_alias do
18158
+ T.any(
18159
+ Orb::SubscriptionCreateParams::ReplacePrice::AllocationPrice::CustomExpiration,
18160
+ Orb::Internal::AnyHash
18161
+ )
18162
+ end
18163
+
18164
+ sig { returns(Integer) }
18165
+ attr_accessor :duration
18166
+
18167
+ sig do
18168
+ returns(
18169
+ Orb::SubscriptionCreateParams::ReplacePrice::AllocationPrice::CustomExpiration::DurationUnit::OrSymbol
18170
+ )
18171
+ end
18172
+ attr_accessor :duration_unit
18173
+
18174
+ # The custom expiration for the allocation.
18175
+ sig do
18176
+ params(
18177
+ duration: Integer,
18178
+ duration_unit:
18179
+ Orb::SubscriptionCreateParams::ReplacePrice::AllocationPrice::CustomExpiration::DurationUnit::OrSymbol
18180
+ ).returns(T.attached_class)
18181
+ end
18182
+ def self.new(duration:, duration_unit:)
18183
+ end
18184
+
18185
+ sig do
18186
+ override.returns(
18187
+ {
18188
+ duration: Integer,
18189
+ duration_unit:
18190
+ Orb::SubscriptionCreateParams::ReplacePrice::AllocationPrice::CustomExpiration::DurationUnit::OrSymbol
18191
+ }
18192
+ )
18193
+ end
18194
+ def to_hash
18195
+ end
18196
+
18197
+ module DurationUnit
18198
+ extend Orb::Internal::Type::Enum
18199
+
18200
+ TaggedSymbol =
18201
+ T.type_alias do
18202
+ T.all(
18203
+ Symbol,
18204
+ Orb::SubscriptionCreateParams::ReplacePrice::AllocationPrice::CustomExpiration::DurationUnit
18205
+ )
18206
+ end
18207
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
18208
+
18209
+ DAY =
18210
+ T.let(
18211
+ :day,
18212
+ Orb::SubscriptionCreateParams::ReplacePrice::AllocationPrice::CustomExpiration::DurationUnit::TaggedSymbol
18213
+ )
18214
+ MONTH =
18215
+ T.let(
18216
+ :month,
18217
+ Orb::SubscriptionCreateParams::ReplacePrice::AllocationPrice::CustomExpiration::DurationUnit::TaggedSymbol
18218
+ )
18219
+
18220
+ sig do
18221
+ override.returns(
18222
+ T::Array[
18223
+ Orb::SubscriptionCreateParams::ReplacePrice::AllocationPrice::CustomExpiration::DurationUnit::TaggedSymbol
18224
+ ]
18225
+ )
18226
+ end
18227
+ def self.values
18228
+ end
18229
+ end
18230
+ end
18017
18231
  end
18018
18232
 
18019
18233
  class Discount < Orb::Internal::Type::BaseModel
@@ -503,9 +503,29 @@ module Orb
503
503
  sig { returns(String) }
504
504
  attr_accessor :currency
505
505
 
506
+ # The custom expiration for the allocation.
507
+ sig do
508
+ returns(
509
+ T.nilable(
510
+ Orb::SubscriptionPriceIntervalsParams::Add::AllocationPrice::CustomExpiration
511
+ )
512
+ )
513
+ end
514
+ attr_reader :custom_expiration
515
+
516
+ sig do
517
+ params(
518
+ custom_expiration:
519
+ T.nilable(
520
+ Orb::SubscriptionPriceIntervalsParams::Add::AllocationPrice::CustomExpiration::OrHash
521
+ )
522
+ ).void
523
+ end
524
+ attr_writer :custom_expiration
525
+
506
526
  # Whether the allocated amount should expire at the end of the cadence or roll
507
- # over to the next period.
508
- sig { returns(T::Boolean) }
527
+ # over to the next period. Set to null if using custom_expiration.
528
+ sig { returns(T.nilable(T::Boolean)) }
509
529
  attr_accessor :expires_at_end_of_cadence
510
530
 
511
531
  # The definition of a new allocation price to create and add to the subscription.
@@ -515,7 +535,11 @@ module Orb
515
535
  cadence:
516
536
  Orb::SubscriptionPriceIntervalsParams::Add::AllocationPrice::Cadence::OrSymbol,
517
537
  currency: String,
518
- expires_at_end_of_cadence: T::Boolean
538
+ custom_expiration:
539
+ T.nilable(
540
+ Orb::SubscriptionPriceIntervalsParams::Add::AllocationPrice::CustomExpiration::OrHash
541
+ ),
542
+ expires_at_end_of_cadence: T.nilable(T::Boolean)
519
543
  ).returns(T.attached_class)
520
544
  end
521
545
  def self.new(
@@ -526,9 +550,11 @@ module Orb
526
550
  # An ISO 4217 currency string or a custom pricing unit identifier in which to bill
527
551
  # this price.
528
552
  currency:,
553
+ # The custom expiration for the allocation.
554
+ custom_expiration: nil,
529
555
  # Whether the allocated amount should expire at the end of the cadence or roll
530
- # over to the next period.
531
- expires_at_end_of_cadence:
556
+ # over to the next period. Set to null if using custom_expiration.
557
+ expires_at_end_of_cadence: nil
532
558
  )
533
559
  end
534
560
 
@@ -539,7 +565,11 @@ module Orb
539
565
  cadence:
540
566
  Orb::SubscriptionPriceIntervalsParams::Add::AllocationPrice::Cadence::OrSymbol,
541
567
  currency: String,
542
- expires_at_end_of_cadence: T::Boolean
568
+ custom_expiration:
569
+ T.nilable(
570
+ Orb::SubscriptionPriceIntervalsParams::Add::AllocationPrice::CustomExpiration
571
+ ),
572
+ expires_at_end_of_cadence: T.nilable(T::Boolean)
543
573
  }
544
574
  )
545
575
  end
@@ -600,6 +630,83 @@ module Orb
600
630
  def self.values
601
631
  end
602
632
  end
633
+
634
+ class CustomExpiration < Orb::Internal::Type::BaseModel
635
+ OrHash =
636
+ T.type_alias do
637
+ T.any(
638
+ Orb::SubscriptionPriceIntervalsParams::Add::AllocationPrice::CustomExpiration,
639
+ Orb::Internal::AnyHash
640
+ )
641
+ end
642
+
643
+ sig { returns(Integer) }
644
+ attr_accessor :duration
645
+
646
+ sig do
647
+ returns(
648
+ Orb::SubscriptionPriceIntervalsParams::Add::AllocationPrice::CustomExpiration::DurationUnit::OrSymbol
649
+ )
650
+ end
651
+ attr_accessor :duration_unit
652
+
653
+ # The custom expiration for the allocation.
654
+ sig do
655
+ params(
656
+ duration: Integer,
657
+ duration_unit:
658
+ Orb::SubscriptionPriceIntervalsParams::Add::AllocationPrice::CustomExpiration::DurationUnit::OrSymbol
659
+ ).returns(T.attached_class)
660
+ end
661
+ def self.new(duration:, duration_unit:)
662
+ end
663
+
664
+ sig do
665
+ override.returns(
666
+ {
667
+ duration: Integer,
668
+ duration_unit:
669
+ Orb::SubscriptionPriceIntervalsParams::Add::AllocationPrice::CustomExpiration::DurationUnit::OrSymbol
670
+ }
671
+ )
672
+ end
673
+ def to_hash
674
+ end
675
+
676
+ module DurationUnit
677
+ extend Orb::Internal::Type::Enum
678
+
679
+ TaggedSymbol =
680
+ T.type_alias do
681
+ T.all(
682
+ Symbol,
683
+ Orb::SubscriptionPriceIntervalsParams::Add::AllocationPrice::CustomExpiration::DurationUnit
684
+ )
685
+ end
686
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
687
+
688
+ DAY =
689
+ T.let(
690
+ :day,
691
+ Orb::SubscriptionPriceIntervalsParams::Add::AllocationPrice::CustomExpiration::DurationUnit::TaggedSymbol
692
+ )
693
+ MONTH =
694
+ T.let(
695
+ :month,
696
+ Orb::SubscriptionPriceIntervalsParams::Add::AllocationPrice::CustomExpiration::DurationUnit::TaggedSymbol
697
+ )
698
+
699
+ sig do
700
+ override.returns(
701
+ T::Array[
702
+ Orb::SubscriptionPriceIntervalsParams::Add::AllocationPrice::CustomExpiration::DurationUnit::TaggedSymbol
703
+ ]
704
+ )
705
+ end
706
+ def self.values
707
+ end
708
+ end
709
+ end
603
710
  end
604
711
 
605
712
  module Discount