orb-billing 0.5.0 → 0.5.2
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 +4 -4
- data/CHANGELOG.md +23 -0
- data/README.md +1 -1
- data/lib/orb/internal/type/array_of.rb +8 -0
- data/lib/orb/internal/type/base_model.rb +7 -0
- data/lib/orb/internal/type/boolean.rb +8 -0
- data/lib/orb/internal/type/enum.rb +12 -0
- data/lib/orb/internal/type/file_input.rb +7 -0
- data/lib/orb/internal/type/hash_of.rb +8 -0
- data/lib/orb/internal/type/union.rb +12 -0
- data/lib/orb/internal/type/unknown.rb +8 -0
- data/lib/orb/internal/util.rb +45 -0
- data/lib/orb/models/coupon.rb +0 -4
- data/lib/orb/models/coupon_create_params.rb +0 -6
- data/lib/orb/models/customer_create_params.rb +0 -9
- data/lib/orb/models/customer_update_by_external_id_params.rb +0 -9
- data/lib/orb/models/customer_update_params.rb +0 -9
- data/lib/orb/models/customers/credits/ledger_create_entry_by_external_id_response.rb +0 -14
- data/lib/orb/models/customers/credits/ledger_create_entry_response.rb +0 -14
- data/lib/orb/models/customers/credits/ledger_list_by_external_id_response.rb +0 -14
- data/lib/orb/models/customers/credits/ledger_list_response.rb +0 -14
- data/lib/orb/models/discount.rb +0 -6
- data/lib/orb/models/evaluate_price_group.rb +0 -4
- data/lib/orb/models/invoice.rb +0 -22
- data/lib/orb/models/invoice_fetch_upcoming_response.rb +0 -22
- data/lib/orb/models/invoice_level_discount.rb +0 -4
- data/lib/orb/models/invoice_line_item_create_response.rb +0 -22
- data/lib/orb/models/plan.rb +0 -12
- data/lib/orb/models/plan_create_params.rb +0 -32
- data/lib/orb/models/price.rb +0 -35
- data/lib/orb/models/subscription.rb +0 -22
- data/lib/orb/models/subscription_cancel_response.rb +0 -22
- data/lib/orb/models/subscription_change_apply_response.rb +0 -22
- data/lib/orb/models/subscription_change_cancel_response.rb +0 -22
- data/lib/orb/models/subscription_change_retrieve_response.rb +0 -22
- data/lib/orb/models/subscription_create_params.rb +0 -88
- data/lib/orb/models/subscription_create_response.rb +0 -22
- data/lib/orb/models/subscription_price_intervals_params.rb +0 -89
- data/lib/orb/models/subscription_price_intervals_response.rb +0 -22
- data/lib/orb/models/subscription_schedule_plan_change_params.rb +0 -88
- data/lib/orb/models/subscription_schedule_plan_change_response.rb +0 -22
- data/lib/orb/models/subscription_trigger_phase_response.rb +0 -22
- data/lib/orb/models/subscription_unschedule_cancellation_response.rb +0 -22
- data/lib/orb/models/subscription_unschedule_fixed_fee_quantity_updates_response.rb +0 -22
- data/lib/orb/models/subscription_unschedule_pending_plan_changes_response.rb +0 -22
- data/lib/orb/models/subscription_update_fixed_fee_quantity_response.rb +0 -22
- data/lib/orb/models/subscription_update_trial_response.rb +0 -22
- data/lib/orb/models/subscription_usage.rb +0 -9
- data/lib/orb/models.rb +30 -16
- data/lib/orb/version.rb +1 -1
- data/rbi/orb/internal/type/array_of.rbi +6 -0
- data/rbi/orb/internal/type/base_model.rbi +5 -0
- data/rbi/orb/internal/type/boolean.rbi +6 -0
- data/rbi/orb/internal/type/enum.rbi +5 -0
- data/rbi/orb/internal/type/file_input.rbi +5 -0
- data/rbi/orb/internal/type/hash_of.rbi +6 -0
- data/rbi/orb/internal/type/union.rbi +5 -0
- data/rbi/orb/internal/type/unknown.rbi +6 -0
- data/rbi/orb/internal/util.rbi +30 -0
- data/rbi/orb/models/coupon.rbi +2 -2
- data/rbi/orb/models/customers/cost_list_by_external_id_response.rbi +2 -65
- data/rbi/orb/models/customers/cost_list_response.rbi +2 -65
- data/rbi/orb/models/evaluate_price_group.rbi +7 -3
- data/rbi/orb/models/invoice.rbi +10 -149
- data/rbi/orb/models/invoice_fetch_upcoming_response.rbi +10 -133
- data/rbi/orb/models/invoice_line_item_create_response.rbi +8 -114
- data/rbi/orb/models/plan.rbi +8 -134
- data/rbi/orb/models/price.rbi +56 -588
- data/rbi/orb/models/subscription.rbi +6 -99
- data/rbi/orb/models/subscription_cancel_response.rbi +6 -89
- data/rbi/orb/models/subscription_change_apply_response.rbi +6 -89
- data/rbi/orb/models/subscription_change_cancel_response.rbi +6 -89
- data/rbi/orb/models/subscription_change_retrieve_response.rbi +6 -89
- data/rbi/orb/models/subscription_create_response.rbi +6 -89
- data/rbi/orb/models/subscription_fetch_costs_response.rbi +2 -65
- data/rbi/orb/models/subscription_price_intervals_params.rbi +72 -26
- data/rbi/orb/models/subscription_price_intervals_response.rbi +6 -89
- data/rbi/orb/models/subscription_schedule_plan_change_response.rbi +6 -89
- data/rbi/orb/models/subscription_trigger_phase_response.rbi +6 -89
- data/rbi/orb/models/subscription_unschedule_cancellation_response.rbi +6 -89
- data/rbi/orb/models/subscription_unschedule_fixed_fee_quantity_updates_response.rbi +6 -89
- data/rbi/orb/models/subscription_unschedule_pending_plan_changes_response.rbi +6 -89
- data/rbi/orb/models/subscription_update_fixed_fee_quantity_response.rbi +6 -89
- data/rbi/orb/models/subscription_update_trial_params.rbi +3 -14
- data/rbi/orb/models/subscription_update_trial_response.rbi +6 -89
- data/rbi/orb/resources/customers/credits/ledger.rbi +4 -36
- data/rbi/orb/resources/prices/external_price_id.rbi +2 -64
- data/rbi/orb/resources/prices.rbi +4 -130
- data/rbi/orb/resources/subscriptions.rbi +2 -10
- data/sig/orb/internal/type/array_of.rbs +3 -0
- data/sig/orb/internal/type/base_model.rbs +2 -0
- data/sig/orb/internal/type/boolean.rbs +3 -0
- data/sig/orb/internal/type/enum.rbs +2 -0
- data/sig/orb/internal/type/file_input.rbs +2 -0
- data/sig/orb/internal/type/hash_of.rbs +3 -0
- data/sig/orb/internal/type/union.rbs +2 -0
- data/sig/orb/internal/type/unknown.rbs +3 -0
- data/sig/orb/internal/util.rbs +12 -0
- metadata +2 -2
data/rbi/orb/models/coupon.rbi
CHANGED
@@ -14,7 +14,7 @@ module Orb
|
|
14
14
|
sig { returns(T.nilable(Time)) }
|
15
15
|
attr_accessor :archived_at
|
16
16
|
|
17
|
-
sig { returns(
|
17
|
+
sig { returns(Orb::Coupon::Discount::Variants) }
|
18
18
|
attr_accessor :discount
|
19
19
|
|
20
20
|
# This allows for a coupon's discount to apply for a limited time (determined in
|
@@ -77,7 +77,7 @@ module Orb
|
|
77
77
|
{
|
78
78
|
id: String,
|
79
79
|
archived_at: T.nilable(Time),
|
80
|
-
discount:
|
80
|
+
discount: Orb::Coupon::Discount::Variants,
|
81
81
|
duration_in_months: T.nilable(Integer),
|
82
82
|
max_redemptions: T.nilable(Integer),
|
83
83
|
redemption_code: String,
|
@@ -125,40 +125,7 @@ module Orb
|
|
125
125
|
end
|
126
126
|
|
127
127
|
# The price object
|
128
|
-
sig
|
129
|
-
returns(
|
130
|
-
T.any(
|
131
|
-
Orb::Price::Unit,
|
132
|
-
Orb::Price::Package,
|
133
|
-
Orb::Price::Matrix,
|
134
|
-
Orb::Price::Tiered,
|
135
|
-
Orb::Price::TieredBps,
|
136
|
-
Orb::Price::Bps,
|
137
|
-
Orb::Price::BulkBps,
|
138
|
-
Orb::Price::Bulk,
|
139
|
-
Orb::Price::ThresholdTotalAmount,
|
140
|
-
Orb::Price::TieredPackage,
|
141
|
-
Orb::Price::GroupedTiered,
|
142
|
-
Orb::Price::TieredWithMinimum,
|
143
|
-
Orb::Price::TieredPackageWithMinimum,
|
144
|
-
Orb::Price::PackageWithAllocation,
|
145
|
-
Orb::Price::UnitWithPercent,
|
146
|
-
Orb::Price::MatrixWithAllocation,
|
147
|
-
Orb::Price::TieredWithProration,
|
148
|
-
Orb::Price::UnitWithProration,
|
149
|
-
Orb::Price::GroupedAllocation,
|
150
|
-
Orb::Price::GroupedWithProratedMinimum,
|
151
|
-
Orb::Price::GroupedWithMeteredMinimum,
|
152
|
-
Orb::Price::MatrixWithDisplayName,
|
153
|
-
Orb::Price::BulkWithProration,
|
154
|
-
Orb::Price::GroupedTieredPackage,
|
155
|
-
Orb::Price::MaxGroupTieredPackage,
|
156
|
-
Orb::Price::ScalableMatrixWithUnitPricing,
|
157
|
-
Orb::Price::ScalableMatrixWithTieredPricing,
|
158
|
-
Orb::Price::CumulativeGroupedBulk
|
159
|
-
)
|
160
|
-
)
|
161
|
-
end
|
128
|
+
sig { returns(Orb::Price::Variants) }
|
162
129
|
attr_accessor :price
|
163
130
|
|
164
131
|
# The price the cost is associated with
|
@@ -233,37 +200,7 @@ module Orb
|
|
233
200
|
sig do
|
234
201
|
override.returns(
|
235
202
|
{
|
236
|
-
price:
|
237
|
-
T.any(
|
238
|
-
Orb::Price::Unit,
|
239
|
-
Orb::Price::Package,
|
240
|
-
Orb::Price::Matrix,
|
241
|
-
Orb::Price::Tiered,
|
242
|
-
Orb::Price::TieredBps,
|
243
|
-
Orb::Price::Bps,
|
244
|
-
Orb::Price::BulkBps,
|
245
|
-
Orb::Price::Bulk,
|
246
|
-
Orb::Price::ThresholdTotalAmount,
|
247
|
-
Orb::Price::TieredPackage,
|
248
|
-
Orb::Price::GroupedTiered,
|
249
|
-
Orb::Price::TieredWithMinimum,
|
250
|
-
Orb::Price::TieredPackageWithMinimum,
|
251
|
-
Orb::Price::PackageWithAllocation,
|
252
|
-
Orb::Price::UnitWithPercent,
|
253
|
-
Orb::Price::MatrixWithAllocation,
|
254
|
-
Orb::Price::TieredWithProration,
|
255
|
-
Orb::Price::UnitWithProration,
|
256
|
-
Orb::Price::GroupedAllocation,
|
257
|
-
Orb::Price::GroupedWithProratedMinimum,
|
258
|
-
Orb::Price::GroupedWithMeteredMinimum,
|
259
|
-
Orb::Price::MatrixWithDisplayName,
|
260
|
-
Orb::Price::BulkWithProration,
|
261
|
-
Orb::Price::GroupedTieredPackage,
|
262
|
-
Orb::Price::MaxGroupTieredPackage,
|
263
|
-
Orb::Price::ScalableMatrixWithUnitPricing,
|
264
|
-
Orb::Price::ScalableMatrixWithTieredPricing,
|
265
|
-
Orb::Price::CumulativeGroupedBulk
|
266
|
-
),
|
203
|
+
price: Orb::Price::Variants,
|
267
204
|
price_id: String,
|
268
205
|
subtotal: String,
|
269
206
|
total: String,
|
@@ -116,40 +116,7 @@ module Orb
|
|
116
116
|
end
|
117
117
|
|
118
118
|
# The price object
|
119
|
-
sig
|
120
|
-
returns(
|
121
|
-
T.any(
|
122
|
-
Orb::Price::Unit,
|
123
|
-
Orb::Price::Package,
|
124
|
-
Orb::Price::Matrix,
|
125
|
-
Orb::Price::Tiered,
|
126
|
-
Orb::Price::TieredBps,
|
127
|
-
Orb::Price::Bps,
|
128
|
-
Orb::Price::BulkBps,
|
129
|
-
Orb::Price::Bulk,
|
130
|
-
Orb::Price::ThresholdTotalAmount,
|
131
|
-
Orb::Price::TieredPackage,
|
132
|
-
Orb::Price::GroupedTiered,
|
133
|
-
Orb::Price::TieredWithMinimum,
|
134
|
-
Orb::Price::TieredPackageWithMinimum,
|
135
|
-
Orb::Price::PackageWithAllocation,
|
136
|
-
Orb::Price::UnitWithPercent,
|
137
|
-
Orb::Price::MatrixWithAllocation,
|
138
|
-
Orb::Price::TieredWithProration,
|
139
|
-
Orb::Price::UnitWithProration,
|
140
|
-
Orb::Price::GroupedAllocation,
|
141
|
-
Orb::Price::GroupedWithProratedMinimum,
|
142
|
-
Orb::Price::GroupedWithMeteredMinimum,
|
143
|
-
Orb::Price::MatrixWithDisplayName,
|
144
|
-
Orb::Price::BulkWithProration,
|
145
|
-
Orb::Price::GroupedTieredPackage,
|
146
|
-
Orb::Price::MaxGroupTieredPackage,
|
147
|
-
Orb::Price::ScalableMatrixWithUnitPricing,
|
148
|
-
Orb::Price::ScalableMatrixWithTieredPricing,
|
149
|
-
Orb::Price::CumulativeGroupedBulk
|
150
|
-
)
|
151
|
-
)
|
152
|
-
end
|
119
|
+
sig { returns(Orb::Price::Variants) }
|
153
120
|
attr_accessor :price
|
154
121
|
|
155
122
|
# The price the cost is associated with
|
@@ -224,37 +191,7 @@ module Orb
|
|
224
191
|
sig do
|
225
192
|
override.returns(
|
226
193
|
{
|
227
|
-
price:
|
228
|
-
T.any(
|
229
|
-
Orb::Price::Unit,
|
230
|
-
Orb::Price::Package,
|
231
|
-
Orb::Price::Matrix,
|
232
|
-
Orb::Price::Tiered,
|
233
|
-
Orb::Price::TieredBps,
|
234
|
-
Orb::Price::Bps,
|
235
|
-
Orb::Price::BulkBps,
|
236
|
-
Orb::Price::Bulk,
|
237
|
-
Orb::Price::ThresholdTotalAmount,
|
238
|
-
Orb::Price::TieredPackage,
|
239
|
-
Orb::Price::GroupedTiered,
|
240
|
-
Orb::Price::TieredWithMinimum,
|
241
|
-
Orb::Price::TieredPackageWithMinimum,
|
242
|
-
Orb::Price::PackageWithAllocation,
|
243
|
-
Orb::Price::UnitWithPercent,
|
244
|
-
Orb::Price::MatrixWithAllocation,
|
245
|
-
Orb::Price::TieredWithProration,
|
246
|
-
Orb::Price::UnitWithProration,
|
247
|
-
Orb::Price::GroupedAllocation,
|
248
|
-
Orb::Price::GroupedWithProratedMinimum,
|
249
|
-
Orb::Price::GroupedWithMeteredMinimum,
|
250
|
-
Orb::Price::MatrixWithDisplayName,
|
251
|
-
Orb::Price::BulkWithProration,
|
252
|
-
Orb::Price::GroupedTieredPackage,
|
253
|
-
Orb::Price::MaxGroupTieredPackage,
|
254
|
-
Orb::Price::ScalableMatrixWithUnitPricing,
|
255
|
-
Orb::Price::ScalableMatrixWithTieredPricing,
|
256
|
-
Orb::Price::CumulativeGroupedBulk
|
257
|
-
),
|
194
|
+
price: Orb::Price::Variants,
|
258
195
|
price_id: String,
|
259
196
|
subtotal: String,
|
260
197
|
total: String,
|
@@ -11,7 +11,9 @@ module Orb
|
|
11
11
|
attr_accessor :amount
|
12
12
|
|
13
13
|
# The values for the group in the order specified by `grouping_keys`
|
14
|
-
sig
|
14
|
+
sig do
|
15
|
+
returns(T::Array[Orb::EvaluatePriceGroup::GroupingValue::Variants])
|
16
|
+
end
|
15
17
|
attr_accessor :grouping_values
|
16
18
|
|
17
19
|
# The price's usage quantity for the group
|
@@ -21,7 +23,8 @@ module Orb
|
|
21
23
|
sig do
|
22
24
|
params(
|
23
25
|
amount: String,
|
24
|
-
grouping_values:
|
26
|
+
grouping_values:
|
27
|
+
T::Array[Orb::EvaluatePriceGroup::GroupingValue::Variants],
|
25
28
|
quantity: Float
|
26
29
|
).returns(T.attached_class)
|
27
30
|
end
|
@@ -39,7 +42,8 @@ module Orb
|
|
39
42
|
override.returns(
|
40
43
|
{
|
41
44
|
amount: String,
|
42
|
-
grouping_values:
|
45
|
+
grouping_values:
|
46
|
+
T::Array[Orb::EvaluatePriceGroup::GroupingValue::Variants],
|
43
47
|
quantity: Float
|
44
48
|
}
|
45
49
|
)
|
data/rbi/orb/models/invoice.rbi
CHANGED
@@ -171,17 +171,7 @@ module Orb
|
|
171
171
|
sig { returns(T.anything) }
|
172
172
|
attr_accessor :discount
|
173
173
|
|
174
|
-
sig
|
175
|
-
returns(
|
176
|
-
T::Array[
|
177
|
-
T.any(
|
178
|
-
Orb::PercentageDiscount,
|
179
|
-
Orb::AmountDiscount,
|
180
|
-
Orb::TrialDiscount
|
181
|
-
)
|
182
|
-
]
|
183
|
-
)
|
184
|
-
end
|
174
|
+
sig { returns(T::Array[Orb::InvoiceLevelDiscount::Variants]) }
|
185
175
|
attr_accessor :discounts
|
186
176
|
|
187
177
|
# When the invoice payment is due. The due date is null if the invoice is not yet
|
@@ -602,14 +592,7 @@ module Orb
|
|
602
592
|
T::Array[Orb::Invoice::CustomerBalanceTransaction],
|
603
593
|
customer_tax_id: T.nilable(Orb::Invoice::CustomerTaxID),
|
604
594
|
discount: T.anything,
|
605
|
-
discounts:
|
606
|
-
T::Array[
|
607
|
-
T.any(
|
608
|
-
Orb::PercentageDiscount,
|
609
|
-
Orb::AmountDiscount,
|
610
|
-
Orb::TrialDiscount
|
611
|
-
)
|
612
|
-
],
|
595
|
+
discounts: T::Array[Orb::InvoiceLevelDiscount::Variants],
|
613
596
|
due_date: T.nilable(Time),
|
614
597
|
eligible_to_issue_at: T.nilable(Time),
|
615
598
|
hosted_invoice_url: T.nilable(String),
|
@@ -1586,19 +1569,7 @@ module Orb
|
|
1586
1569
|
# All adjustments applied to the line item in the order they were applied based on
|
1587
1570
|
# invoice calculations (ie. usage discounts -> amount discounts -> percentage
|
1588
1571
|
# discounts -> minimums -> maximums).
|
1589
|
-
sig
|
1590
|
-
returns(
|
1591
|
-
T::Array[
|
1592
|
-
T.any(
|
1593
|
-
Orb::Invoice::LineItem::Adjustment::UsageDiscount,
|
1594
|
-
Orb::Invoice::LineItem::Adjustment::AmountDiscount,
|
1595
|
-
Orb::Invoice::LineItem::Adjustment::PercentageDiscount,
|
1596
|
-
Orb::Invoice::LineItem::Adjustment::Minimum,
|
1597
|
-
Orb::Invoice::LineItem::Adjustment::Maximum
|
1598
|
-
)
|
1599
|
-
]
|
1600
|
-
)
|
1601
|
-
end
|
1572
|
+
sig { returns(T::Array[Orb::Invoice::LineItem::Adjustment::Variants]) }
|
1602
1573
|
attr_accessor :adjustments
|
1603
1574
|
|
1604
1575
|
# The final amount for a line item after all adjustments and pre paid credits have
|
@@ -1610,18 +1581,7 @@ module Orb
|
|
1610
1581
|
sig { returns(String) }
|
1611
1582
|
attr_accessor :credits_applied
|
1612
1583
|
|
1613
|
-
sig
|
1614
|
-
returns(
|
1615
|
-
T.nilable(
|
1616
|
-
T.any(
|
1617
|
-
Orb::PercentageDiscount,
|
1618
|
-
Orb::TrialDiscount,
|
1619
|
-
Orb::UsageDiscount,
|
1620
|
-
Orb::AmountDiscount
|
1621
|
-
)
|
1622
|
-
)
|
1623
|
-
)
|
1624
|
-
end
|
1584
|
+
sig { returns(T.nilable(Orb::Discount::Variants)) }
|
1625
1585
|
attr_accessor :discount
|
1626
1586
|
|
1627
1587
|
# The end date of the range of time applied for this line item's price.
|
@@ -1686,42 +1646,7 @@ module Orb
|
|
1686
1646
|
#
|
1687
1647
|
# For more on the types of prices, see
|
1688
1648
|
# [the core concepts documentation](/core-concepts#plan-and-price)
|
1689
|
-
sig
|
1690
|
-
returns(
|
1691
|
-
T.nilable(
|
1692
|
-
T.any(
|
1693
|
-
Orb::Price::Unit,
|
1694
|
-
Orb::Price::Package,
|
1695
|
-
Orb::Price::Matrix,
|
1696
|
-
Orb::Price::Tiered,
|
1697
|
-
Orb::Price::TieredBps,
|
1698
|
-
Orb::Price::Bps,
|
1699
|
-
Orb::Price::BulkBps,
|
1700
|
-
Orb::Price::Bulk,
|
1701
|
-
Orb::Price::ThresholdTotalAmount,
|
1702
|
-
Orb::Price::TieredPackage,
|
1703
|
-
Orb::Price::GroupedTiered,
|
1704
|
-
Orb::Price::TieredWithMinimum,
|
1705
|
-
Orb::Price::TieredPackageWithMinimum,
|
1706
|
-
Orb::Price::PackageWithAllocation,
|
1707
|
-
Orb::Price::UnitWithPercent,
|
1708
|
-
Orb::Price::MatrixWithAllocation,
|
1709
|
-
Orb::Price::TieredWithProration,
|
1710
|
-
Orb::Price::UnitWithProration,
|
1711
|
-
Orb::Price::GroupedAllocation,
|
1712
|
-
Orb::Price::GroupedWithProratedMinimum,
|
1713
|
-
Orb::Price::GroupedWithMeteredMinimum,
|
1714
|
-
Orb::Price::MatrixWithDisplayName,
|
1715
|
-
Orb::Price::BulkWithProration,
|
1716
|
-
Orb::Price::GroupedTieredPackage,
|
1717
|
-
Orb::Price::MaxGroupTieredPackage,
|
1718
|
-
Orb::Price::ScalableMatrixWithUnitPricing,
|
1719
|
-
Orb::Price::ScalableMatrixWithTieredPricing,
|
1720
|
-
Orb::Price::CumulativeGroupedBulk
|
1721
|
-
)
|
1722
|
-
)
|
1723
|
-
)
|
1724
|
-
end
|
1649
|
+
sig { returns(T.nilable(Orb::Price::Variants)) }
|
1725
1650
|
attr_accessor :price
|
1726
1651
|
|
1727
1652
|
# Either the fixed fee quantity or the usage during the service period.
|
@@ -1734,17 +1659,7 @@ module Orb
|
|
1734
1659
|
|
1735
1660
|
# For complex pricing structures, the line item can be broken down further in
|
1736
1661
|
# `sub_line_items`.
|
1737
|
-
sig
|
1738
|
-
returns(
|
1739
|
-
T::Array[
|
1740
|
-
T.any(
|
1741
|
-
Orb::Invoice::LineItem::SubLineItem::Matrix,
|
1742
|
-
Orb::Invoice::LineItem::SubLineItem::Tier,
|
1743
|
-
Orb::Invoice::LineItem::SubLineItem::Null
|
1744
|
-
)
|
1745
|
-
]
|
1746
|
-
)
|
1747
|
-
end
|
1662
|
+
sig { returns(T::Array[Orb::Invoice::LineItem::SubLineItem::Variants]) }
|
1748
1663
|
attr_accessor :sub_line_items
|
1749
1664
|
|
1750
1665
|
# The line amount before before any adjustments.
|
@@ -1912,26 +1827,10 @@ module Orb
|
|
1912
1827
|
id: String,
|
1913
1828
|
adjusted_subtotal: String,
|
1914
1829
|
adjustments:
|
1915
|
-
T::Array[
|
1916
|
-
T.any(
|
1917
|
-
Orb::Invoice::LineItem::Adjustment::UsageDiscount,
|
1918
|
-
Orb::Invoice::LineItem::Adjustment::AmountDiscount,
|
1919
|
-
Orb::Invoice::LineItem::Adjustment::PercentageDiscount,
|
1920
|
-
Orb::Invoice::LineItem::Adjustment::Minimum,
|
1921
|
-
Orb::Invoice::LineItem::Adjustment::Maximum
|
1922
|
-
)
|
1923
|
-
],
|
1830
|
+
T::Array[Orb::Invoice::LineItem::Adjustment::Variants],
|
1924
1831
|
amount: String,
|
1925
1832
|
credits_applied: String,
|
1926
|
-
discount:
|
1927
|
-
T.nilable(
|
1928
|
-
T.any(
|
1929
|
-
Orb::PercentageDiscount,
|
1930
|
-
Orb::TrialDiscount,
|
1931
|
-
Orb::UsageDiscount,
|
1932
|
-
Orb::AmountDiscount
|
1933
|
-
)
|
1934
|
-
),
|
1833
|
+
discount: T.nilable(Orb::Discount::Variants),
|
1935
1834
|
end_date: Time,
|
1936
1835
|
filter: T.nilable(String),
|
1937
1836
|
grouping: T.nilable(String),
|
@@ -1941,49 +1840,11 @@ module Orb
|
|
1941
1840
|
minimum_amount: T.nilable(String),
|
1942
1841
|
name: String,
|
1943
1842
|
partially_invoiced_amount: String,
|
1944
|
-
price:
|
1945
|
-
T.nilable(
|
1946
|
-
T.any(
|
1947
|
-
Orb::Price::Unit,
|
1948
|
-
Orb::Price::Package,
|
1949
|
-
Orb::Price::Matrix,
|
1950
|
-
Orb::Price::Tiered,
|
1951
|
-
Orb::Price::TieredBps,
|
1952
|
-
Orb::Price::Bps,
|
1953
|
-
Orb::Price::BulkBps,
|
1954
|
-
Orb::Price::Bulk,
|
1955
|
-
Orb::Price::ThresholdTotalAmount,
|
1956
|
-
Orb::Price::TieredPackage,
|
1957
|
-
Orb::Price::GroupedTiered,
|
1958
|
-
Orb::Price::TieredWithMinimum,
|
1959
|
-
Orb::Price::TieredPackageWithMinimum,
|
1960
|
-
Orb::Price::PackageWithAllocation,
|
1961
|
-
Orb::Price::UnitWithPercent,
|
1962
|
-
Orb::Price::MatrixWithAllocation,
|
1963
|
-
Orb::Price::TieredWithProration,
|
1964
|
-
Orb::Price::UnitWithProration,
|
1965
|
-
Orb::Price::GroupedAllocation,
|
1966
|
-
Orb::Price::GroupedWithProratedMinimum,
|
1967
|
-
Orb::Price::GroupedWithMeteredMinimum,
|
1968
|
-
Orb::Price::MatrixWithDisplayName,
|
1969
|
-
Orb::Price::BulkWithProration,
|
1970
|
-
Orb::Price::GroupedTieredPackage,
|
1971
|
-
Orb::Price::MaxGroupTieredPackage,
|
1972
|
-
Orb::Price::ScalableMatrixWithUnitPricing,
|
1973
|
-
Orb::Price::ScalableMatrixWithTieredPricing,
|
1974
|
-
Orb::Price::CumulativeGroupedBulk
|
1975
|
-
)
|
1976
|
-
),
|
1843
|
+
price: T.nilable(Orb::Price::Variants),
|
1977
1844
|
quantity: Float,
|
1978
1845
|
start_date: Time,
|
1979
1846
|
sub_line_items:
|
1980
|
-
T::Array[
|
1981
|
-
T.any(
|
1982
|
-
Orb::Invoice::LineItem::SubLineItem::Matrix,
|
1983
|
-
Orb::Invoice::LineItem::SubLineItem::Tier,
|
1984
|
-
Orb::Invoice::LineItem::SubLineItem::Null
|
1985
|
-
)
|
1986
|
-
],
|
1847
|
+
T::Array[Orb::Invoice::LineItem::SubLineItem::Variants],
|
1987
1848
|
subtotal: String,
|
1988
1849
|
tax_amounts: T::Array[Orb::Invoice::LineItem::TaxAmount],
|
1989
1850
|
usage_customer_ids: T.nilable(T::Array[String])
|
@@ -208,17 +208,7 @@ module Orb
|
|
208
208
|
sig { returns(T.anything) }
|
209
209
|
attr_accessor :discount
|
210
210
|
|
211
|
-
sig
|
212
|
-
returns(
|
213
|
-
T::Array[
|
214
|
-
T.any(
|
215
|
-
Orb::PercentageDiscount,
|
216
|
-
Orb::AmountDiscount,
|
217
|
-
Orb::TrialDiscount
|
218
|
-
)
|
219
|
-
]
|
220
|
-
)
|
221
|
-
end
|
211
|
+
sig { returns(T::Array[Orb::InvoiceLevelDiscount::Variants]) }
|
222
212
|
attr_accessor :discounts
|
223
213
|
|
224
214
|
# When the invoice payment is due. The due date is null if the invoice is not yet
|
@@ -721,14 +711,7 @@ module Orb
|
|
721
711
|
Orb::Models::InvoiceFetchUpcomingResponse::CustomerTaxID
|
722
712
|
),
|
723
713
|
discount: T.anything,
|
724
|
-
discounts:
|
725
|
-
T::Array[
|
726
|
-
T.any(
|
727
|
-
Orb::PercentageDiscount,
|
728
|
-
Orb::AmountDiscount,
|
729
|
-
Orb::TrialDiscount
|
730
|
-
)
|
731
|
-
],
|
714
|
+
discounts: T::Array[Orb::InvoiceLevelDiscount::Variants],
|
732
715
|
due_date: T.nilable(Time),
|
733
716
|
eligible_to_issue_at: T.nilable(Time),
|
734
717
|
hosted_invoice_url: T.nilable(String),
|
@@ -2340,13 +2323,7 @@ module Orb
|
|
2340
2323
|
sig do
|
2341
2324
|
returns(
|
2342
2325
|
T::Array[
|
2343
|
-
|
2344
|
-
Orb::Models::InvoiceFetchUpcomingResponse::LineItem::Adjustment::UsageDiscount,
|
2345
|
-
Orb::Models::InvoiceFetchUpcomingResponse::LineItem::Adjustment::AmountDiscount,
|
2346
|
-
Orb::Models::InvoiceFetchUpcomingResponse::LineItem::Adjustment::PercentageDiscount,
|
2347
|
-
Orb::Models::InvoiceFetchUpcomingResponse::LineItem::Adjustment::Minimum,
|
2348
|
-
Orb::Models::InvoiceFetchUpcomingResponse::LineItem::Adjustment::Maximum
|
2349
|
-
)
|
2326
|
+
Orb::Models::InvoiceFetchUpcomingResponse::LineItem::Adjustment::Variants
|
2350
2327
|
]
|
2351
2328
|
)
|
2352
2329
|
end
|
@@ -2361,18 +2338,7 @@ module Orb
|
|
2361
2338
|
sig { returns(String) }
|
2362
2339
|
attr_accessor :credits_applied
|
2363
2340
|
|
2364
|
-
sig
|
2365
|
-
returns(
|
2366
|
-
T.nilable(
|
2367
|
-
T.any(
|
2368
|
-
Orb::PercentageDiscount,
|
2369
|
-
Orb::TrialDiscount,
|
2370
|
-
Orb::UsageDiscount,
|
2371
|
-
Orb::AmountDiscount
|
2372
|
-
)
|
2373
|
-
)
|
2374
|
-
)
|
2375
|
-
end
|
2341
|
+
sig { returns(T.nilable(Orb::Discount::Variants)) }
|
2376
2342
|
attr_accessor :discount
|
2377
2343
|
|
2378
2344
|
# The end date of the range of time applied for this line item's price.
|
@@ -2455,42 +2421,7 @@ module Orb
|
|
2455
2421
|
#
|
2456
2422
|
# For more on the types of prices, see
|
2457
2423
|
# [the core concepts documentation](/core-concepts#plan-and-price)
|
2458
|
-
sig
|
2459
|
-
returns(
|
2460
|
-
T.nilable(
|
2461
|
-
T.any(
|
2462
|
-
Orb::Price::Unit,
|
2463
|
-
Orb::Price::Package,
|
2464
|
-
Orb::Price::Matrix,
|
2465
|
-
Orb::Price::Tiered,
|
2466
|
-
Orb::Price::TieredBps,
|
2467
|
-
Orb::Price::Bps,
|
2468
|
-
Orb::Price::BulkBps,
|
2469
|
-
Orb::Price::Bulk,
|
2470
|
-
Orb::Price::ThresholdTotalAmount,
|
2471
|
-
Orb::Price::TieredPackage,
|
2472
|
-
Orb::Price::GroupedTiered,
|
2473
|
-
Orb::Price::TieredWithMinimum,
|
2474
|
-
Orb::Price::TieredPackageWithMinimum,
|
2475
|
-
Orb::Price::PackageWithAllocation,
|
2476
|
-
Orb::Price::UnitWithPercent,
|
2477
|
-
Orb::Price::MatrixWithAllocation,
|
2478
|
-
Orb::Price::TieredWithProration,
|
2479
|
-
Orb::Price::UnitWithProration,
|
2480
|
-
Orb::Price::GroupedAllocation,
|
2481
|
-
Orb::Price::GroupedWithProratedMinimum,
|
2482
|
-
Orb::Price::GroupedWithMeteredMinimum,
|
2483
|
-
Orb::Price::MatrixWithDisplayName,
|
2484
|
-
Orb::Price::BulkWithProration,
|
2485
|
-
Orb::Price::GroupedTieredPackage,
|
2486
|
-
Orb::Price::MaxGroupTieredPackage,
|
2487
|
-
Orb::Price::ScalableMatrixWithUnitPricing,
|
2488
|
-
Orb::Price::ScalableMatrixWithTieredPricing,
|
2489
|
-
Orb::Price::CumulativeGroupedBulk
|
2490
|
-
)
|
2491
|
-
)
|
2492
|
-
)
|
2493
|
-
end
|
2424
|
+
sig { returns(T.nilable(Orb::Price::Variants)) }
|
2494
2425
|
attr_accessor :price
|
2495
2426
|
|
2496
2427
|
# Either the fixed fee quantity or the usage during the service period.
|
@@ -2506,11 +2437,7 @@ module Orb
|
|
2506
2437
|
sig do
|
2507
2438
|
returns(
|
2508
2439
|
T::Array[
|
2509
|
-
|
2510
|
-
Orb::Models::InvoiceFetchUpcomingResponse::LineItem::SubLineItem::Matrix,
|
2511
|
-
Orb::Models::InvoiceFetchUpcomingResponse::LineItem::SubLineItem::Tier,
|
2512
|
-
Orb::Models::InvoiceFetchUpcomingResponse::LineItem::SubLineItem::Null
|
2513
|
-
)
|
2440
|
+
Orb::Models::InvoiceFetchUpcomingResponse::LineItem::SubLineItem::Variants
|
2514
2441
|
]
|
2515
2442
|
)
|
2516
2443
|
end
|
@@ -2697,25 +2624,11 @@ module Orb
|
|
2697
2624
|
adjusted_subtotal: String,
|
2698
2625
|
adjustments:
|
2699
2626
|
T::Array[
|
2700
|
-
|
2701
|
-
Orb::Models::InvoiceFetchUpcomingResponse::LineItem::Adjustment::UsageDiscount,
|
2702
|
-
Orb::Models::InvoiceFetchUpcomingResponse::LineItem::Adjustment::AmountDiscount,
|
2703
|
-
Orb::Models::InvoiceFetchUpcomingResponse::LineItem::Adjustment::PercentageDiscount,
|
2704
|
-
Orb::Models::InvoiceFetchUpcomingResponse::LineItem::Adjustment::Minimum,
|
2705
|
-
Orb::Models::InvoiceFetchUpcomingResponse::LineItem::Adjustment::Maximum
|
2706
|
-
)
|
2627
|
+
Orb::Models::InvoiceFetchUpcomingResponse::LineItem::Adjustment::Variants
|
2707
2628
|
],
|
2708
2629
|
amount: String,
|
2709
2630
|
credits_applied: String,
|
2710
|
-
discount:
|
2711
|
-
T.nilable(
|
2712
|
-
T.any(
|
2713
|
-
Orb::PercentageDiscount,
|
2714
|
-
Orb::TrialDiscount,
|
2715
|
-
Orb::UsageDiscount,
|
2716
|
-
Orb::AmountDiscount
|
2717
|
-
)
|
2718
|
-
),
|
2631
|
+
discount: T.nilable(Orb::Discount::Variants),
|
2719
2632
|
end_date: Time,
|
2720
2633
|
filter: T.nilable(String),
|
2721
2634
|
grouping: T.nilable(String),
|
@@ -2731,48 +2644,12 @@ module Orb
|
|
2731
2644
|
minimum_amount: T.nilable(String),
|
2732
2645
|
name: String,
|
2733
2646
|
partially_invoiced_amount: String,
|
2734
|
-
price:
|
2735
|
-
T.nilable(
|
2736
|
-
T.any(
|
2737
|
-
Orb::Price::Unit,
|
2738
|
-
Orb::Price::Package,
|
2739
|
-
Orb::Price::Matrix,
|
2740
|
-
Orb::Price::Tiered,
|
2741
|
-
Orb::Price::TieredBps,
|
2742
|
-
Orb::Price::Bps,
|
2743
|
-
Orb::Price::BulkBps,
|
2744
|
-
Orb::Price::Bulk,
|
2745
|
-
Orb::Price::ThresholdTotalAmount,
|
2746
|
-
Orb::Price::TieredPackage,
|
2747
|
-
Orb::Price::GroupedTiered,
|
2748
|
-
Orb::Price::TieredWithMinimum,
|
2749
|
-
Orb::Price::TieredPackageWithMinimum,
|
2750
|
-
Orb::Price::PackageWithAllocation,
|
2751
|
-
Orb::Price::UnitWithPercent,
|
2752
|
-
Orb::Price::MatrixWithAllocation,
|
2753
|
-
Orb::Price::TieredWithProration,
|
2754
|
-
Orb::Price::UnitWithProration,
|
2755
|
-
Orb::Price::GroupedAllocation,
|
2756
|
-
Orb::Price::GroupedWithProratedMinimum,
|
2757
|
-
Orb::Price::GroupedWithMeteredMinimum,
|
2758
|
-
Orb::Price::MatrixWithDisplayName,
|
2759
|
-
Orb::Price::BulkWithProration,
|
2760
|
-
Orb::Price::GroupedTieredPackage,
|
2761
|
-
Orb::Price::MaxGroupTieredPackage,
|
2762
|
-
Orb::Price::ScalableMatrixWithUnitPricing,
|
2763
|
-
Orb::Price::ScalableMatrixWithTieredPricing,
|
2764
|
-
Orb::Price::CumulativeGroupedBulk
|
2765
|
-
)
|
2766
|
-
),
|
2647
|
+
price: T.nilable(Orb::Price::Variants),
|
2767
2648
|
quantity: Float,
|
2768
2649
|
start_date: Time,
|
2769
2650
|
sub_line_items:
|
2770
2651
|
T::Array[
|
2771
|
-
|
2772
|
-
Orb::Models::InvoiceFetchUpcomingResponse::LineItem::SubLineItem::Matrix,
|
2773
|
-
Orb::Models::InvoiceFetchUpcomingResponse::LineItem::SubLineItem::Tier,
|
2774
|
-
Orb::Models::InvoiceFetchUpcomingResponse::LineItem::SubLineItem::Null
|
2775
|
-
)
|
2652
|
+
Orb::Models::InvoiceFetchUpcomingResponse::LineItem::SubLineItem::Variants
|
2776
2653
|
],
|
2777
2654
|
subtotal: String,
|
2778
2655
|
tax_amounts:
|