orb-billing 0.5.4 → 0.6.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 +4 -4
- data/CHANGELOG.md +26 -0
- data/README.md +1 -1
- data/lib/orb/internal/type/base_model.rb +2 -2
- data/lib/orb/internal/type/union.rb +6 -6
- data/lib/orb/internal/util.rb +5 -1
- data/lib/orb/models/alert.rb +33 -1
- data/lib/orb/models/amount_discount.rb +10 -10
- data/lib/orb/models/credit_note_create_params.rb +9 -9
- data/lib/orb/models/customer_create_params.rb +21 -3
- data/lib/orb/models/customer_update_by_external_id_params.rb +21 -3
- data/lib/orb/models/customer_update_params.rb +21 -3
- data/lib/orb/models/customers/credits/ledger_create_entry_by_external_id_response.rb +9 -1
- data/lib/orb/models/customers/credits/ledger_create_entry_response.rb +9 -1
- data/lib/orb/models/customers/credits/ledger_list_by_external_id_response.rb +9 -1
- data/lib/orb/models/customers/credits/ledger_list_response.rb +9 -1
- data/lib/orb/models/customers/credits/top_up_create_by_external_id_params.rb +1 -1
- data/lib/orb/models/customers/credits/top_up_create_params.rb +1 -1
- data/lib/orb/models/invoice.rb +626 -9
- data/lib/orb/models/invoice_fetch_upcoming_response.rb +624 -9
- data/lib/orb/models/invoice_line_item_create_response.rb +486 -7
- data/lib/orb/models/item.rb +18 -1
- data/lib/orb/models/item_archive_params.rb +14 -0
- data/lib/orb/models/item_create_params.rb +14 -1
- data/lib/orb/models/item_update_params.rb +16 -1
- data/lib/orb/models/percentage_discount.rb +10 -10
- data/lib/orb/models/plan.rb +618 -9
- data/lib/orb/models/plan_create_params.rb +2066 -30
- data/lib/orb/models/plan_set_default_version_params.rb +22 -0
- data/lib/orb/models/plans/external_plan_id/version_create_params.rb +17948 -0
- data/lib/orb/models/plans/external_plan_id/version_create_response.rb +819 -0
- data/lib/orb/models/plans/external_plan_id/version_retrieve_params.rb +24 -0
- data/lib/orb/models/plans/external_plan_id/version_retrieve_response.rb +819 -0
- data/lib/orb/models/plans/external_plan_id_set_default_version_params.rb +24 -0
- data/lib/orb/models/plans/version_create_params.rb +17794 -0
- data/lib/orb/models/plans/version_create_response.rb +814 -0
- data/lib/orb/models/plans/version_retrieve_params.rb +22 -0
- data/lib/orb/models/plans/version_retrieve_response.rb +814 -0
- data/lib/orb/models/price.rb +4124 -70
- data/lib/orb/models/price_create_params.rb +45 -1
- data/lib/orb/models/price_evaluate_params.rb +8529 -21
- data/lib/orb/models/price_evaluate_response.rb +38 -3
- data/lib/orb/models/subscription.rb +730 -54
- data/lib/orb/models/subscription_cancel_response.rb +706 -54
- data/lib/orb/models/subscription_change_apply_response.rb +728 -54
- data/lib/orb/models/subscription_change_cancel_response.rb +728 -54
- data/lib/orb/models/subscription_change_retrieve_response.rb +728 -54
- data/lib/orb/models/subscription_create_params.rb +5992 -1698
- data/lib/orb/models/subscription_create_response.rb +706 -54
- data/lib/orb/models/subscription_fetch_schedule_response.rb +3 -3
- data/lib/orb/models/subscription_price_intervals_params.rb +1392 -76
- data/lib/orb/models/subscription_price_intervals_response.rb +712 -54
- data/lib/orb/models/subscription_schedule_plan_change_params.rb +6005 -1723
- data/lib/orb/models/subscription_schedule_plan_change_response.rb +716 -54
- data/lib/orb/models/subscription_trigger_phase_response.rb +708 -54
- data/lib/orb/models/subscription_unschedule_cancellation_response.rb +720 -54
- data/lib/orb/models/subscription_unschedule_fixed_fee_quantity_updates_response.rb +728 -54
- data/lib/orb/models/subscription_unschedule_pending_plan_changes_response.rb +728 -54
- data/lib/orb/models/subscription_update_fixed_fee_quantity_params.rb +1 -1
- data/lib/orb/models/subscription_update_fixed_fee_quantity_response.rb +720 -54
- data/lib/orb/models/subscription_update_trial_response.rb +706 -54
- data/lib/orb/models/trial_discount.rb +10 -10
- data/lib/orb/models/usage_discount.rb +10 -10
- data/lib/orb/models.rb +4 -0
- data/lib/orb/resources/credit_notes.rb +3 -3
- data/lib/orb/resources/customers/balance_transactions.rb +0 -7
- data/lib/orb/resources/customers.rb +4 -7
- data/lib/orb/resources/dimensional_price_groups.rb +1 -1
- data/lib/orb/resources/items.rb +34 -2
- data/lib/orb/resources/plans/external_plan_id/versions.rb +88 -0
- data/lib/orb/resources/plans/external_plan_id.rb +32 -1
- data/lib/orb/resources/plans/versions.rb +86 -0
- data/lib/orb/resources/plans.rb +33 -2
- data/lib/orb/resources/prices.rb +23 -17
- data/lib/orb/resources/subscriptions.rb +5 -1
- data/lib/orb/version.rb +1 -1
- data/lib/orb.rb +16 -1
- data/rbi/orb/models/alert.rbi +50 -3
- data/rbi/orb/models/amount_discount.rbi +8 -8
- data/rbi/orb/models/credit_note_create_params.rbi +8 -8
- data/rbi/orb/models/customer_create_params.rbi +38 -4
- data/rbi/orb/models/customer_update_by_external_id_params.rbi +38 -4
- data/rbi/orb/models/customer_update_params.rbi +38 -4
- data/rbi/orb/models/customers/credits/ledger_create_entry_by_external_id_response.rbi +9 -1
- data/rbi/orb/models/customers/credits/ledger_create_entry_response.rbi +9 -1
- data/rbi/orb/models/customers/credits/ledger_list_by_external_id_response.rbi +9 -1
- data/rbi/orb/models/customers/credits/ledger_list_response.rbi +9 -1
- data/rbi/orb/models/customers/credits/top_up_create_by_external_id_params.rbi +2 -2
- data/rbi/orb/models/customers/credits/top_up_create_params.rbi +2 -2
- data/rbi/orb/models/invoice.rbi +1451 -35
- data/rbi/orb/models/invoice_fetch_upcoming_response.rbi +1524 -4
- data/rbi/orb/models/invoice_line_item_create_response.rbi +1184 -2
- data/rbi/orb/models/item.rbi +20 -1
- data/rbi/orb/models/item_archive_params.rbi +25 -0
- data/rbi/orb/models/item_create_params.rbi +18 -1
- data/rbi/orb/models/item_update_params.rbi +17 -1
- data/rbi/orb/models/percentage_discount.rbi +10 -10
- data/rbi/orb/models/plan.rbi +1339 -4
- data/rbi/orb/models/plan_create_params.rbi +3833 -29
- data/rbi/orb/models/plan_set_default_version_params.rbi +40 -0
- data/rbi/orb/models/plans/external_plan_id/version_create_params.rbi +32668 -0
- data/rbi/orb/models/plans/external_plan_id/version_create_response.rbi +1562 -0
- data/rbi/orb/models/plans/external_plan_id/version_retrieve_params.rbi +42 -0
- data/rbi/orb/models/plans/external_plan_id/version_retrieve_response.rbi +1562 -0
- data/rbi/orb/models/plans/external_plan_id_set_default_version_params.rbi +45 -0
- data/rbi/orb/models/plans/version_create_params.rbi +32607 -0
- data/rbi/orb/models/plans/version_create_response.rbi +1556 -0
- data/rbi/orb/models/plans/version_retrieve_params.rbi +37 -0
- data/rbi/orb/models/plans/version_retrieve_response.rbi +1558 -0
- data/rbi/orb/models/price.rbi +9447 -441
- data/rbi/orb/models/price_create_params.rbi +80 -0
- data/rbi/orb/models/price_evaluate_params.rbi +15684 -25
- data/rbi/orb/models/price_evaluate_response.rbi +68 -5
- data/rbi/orb/models/subscription.rbi +1654 -44
- data/rbi/orb/models/subscription_cancel_response.rbi +1692 -44
- data/rbi/orb/models/subscription_change_apply_response.rbi +1692 -44
- data/rbi/orb/models/subscription_change_cancel_response.rbi +1692 -44
- data/rbi/orb/models/subscription_change_retrieve_response.rbi +1692 -44
- data/rbi/orb/models/subscription_create_params.rbi +10400 -2710
- data/rbi/orb/models/subscription_create_response.rbi +1692 -44
- data/rbi/orb/models/subscription_fetch_schedule_response.rbi +13 -4
- data/rbi/orb/models/subscription_price_intervals_params.rbi +2401 -49
- data/rbi/orb/models/subscription_price_intervals_response.rbi +1692 -44
- data/rbi/orb/models/subscription_schedule_plan_change_params.rbi +10423 -2753
- data/rbi/orb/models/subscription_schedule_plan_change_response.rbi +1692 -44
- data/rbi/orb/models/subscription_trigger_phase_response.rbi +1692 -44
- data/rbi/orb/models/subscription_unschedule_cancellation_response.rbi +1692 -44
- data/rbi/orb/models/subscription_unschedule_fixed_fee_quantity_updates_response.rbi +1692 -44
- data/rbi/orb/models/subscription_unschedule_pending_plan_changes_response.rbi +1692 -44
- data/rbi/orb/models/subscription_update_fixed_fee_quantity_params.rbi +2 -2
- data/rbi/orb/models/subscription_update_fixed_fee_quantity_response.rbi +1692 -44
- data/rbi/orb/models/subscription_update_trial_response.rbi +1692 -44
- data/rbi/orb/models/trial_discount.rbi +8 -8
- data/rbi/orb/models/usage_discount.rbi +10 -10
- data/rbi/orb/models.rbi +4 -0
- data/rbi/orb/resources/credit_notes.rbi +3 -3
- data/rbi/orb/resources/customers/balance_transactions.rbi +0 -7
- data/rbi/orb/resources/customers/credits/top_ups.rbi +2 -2
- data/rbi/orb/resources/customers.rbi +7 -7
- data/rbi/orb/resources/dimensional_price_groups.rbi +1 -1
- data/rbi/orb/resources/items.rbi +20 -0
- data/rbi/orb/resources/plans/external_plan_id/versions.rbi +103 -0
- data/rbi/orb/resources/plans/external_plan_id.rbi +23 -1
- data/rbi/orb/resources/plans/versions.rbi +91 -0
- data/rbi/orb/resources/plans.rbi +27 -2
- data/rbi/orb/resources/prices.rbi +27 -17
- data/rbi/orb/resources/subscriptions.rbi +9 -1
- data/sig/orb/models/alert.rbs +20 -3
- data/sig/orb/models/amount_discount.rbs +5 -5
- data/sig/orb/models/credit_note_create_params.rbs +6 -6
- data/sig/orb/models/customer_create_params.rbs +13 -0
- data/sig/orb/models/customer_update_by_external_id_params.rbs +13 -0
- data/sig/orb/models/customer_update_params.rbs +13 -0
- data/sig/orb/models/customers/credits/ledger_create_entry_by_external_id_response.rbs +7 -2
- data/sig/orb/models/customers/credits/ledger_create_entry_response.rbs +7 -2
- data/sig/orb/models/customers/credits/ledger_list_by_external_id_response.rbs +7 -2
- data/sig/orb/models/customers/credits/ledger_list_response.rbs +7 -2
- data/sig/orb/models/invoice.rbs +558 -4
- data/sig/orb/models/invoice_fetch_upcoming_response.rbs +558 -4
- data/sig/orb/models/invoice_line_item_create_response.rbs +414 -2
- data/sig/orb/models/item.rbs +5 -0
- data/sig/orb/models/item_archive_params.rbs +14 -0
- data/sig/orb/models/item_create_params.rbs +10 -2
- data/sig/orb/models/item_update_params.rbs +5 -0
- data/sig/orb/models/percentage_discount.rbs +5 -5
- data/sig/orb/models/plan.rbs +538 -4
- data/sig/orb/models/plan_create_params.rbs +1460 -3
- data/sig/orb/models/plan_set_default_version_params.rbs +20 -0
- data/sig/orb/models/plans/external_plan_id/version_create_params.rbs +12923 -0
- data/sig/orb/models/plans/external_plan_id/version_create_response.rbs +664 -0
- data/sig/orb/models/plans/external_plan_id/version_retrieve_params.rbs +27 -0
- data/sig/orb/models/plans/external_plan_id/version_retrieve_response.rbs +664 -0
- data/sig/orb/models/plans/external_plan_id_set_default_version_params.rbs +25 -0
- data/sig/orb/models/plans/version_create_params.rbs +12898 -0
- data/sig/orb/models/plans/version_create_response.rbs +662 -0
- data/sig/orb/models/plans/version_retrieve_params.rbs +25 -0
- data/sig/orb/models/plans/version_retrieve_response.rbs +662 -0
- data/sig/orb/models/price.rbs +3512 -96
- data/sig/orb/models/price_create_params.rbs +32 -0
- data/sig/orb/models/price_evaluate_params.rbs +6187 -10
- data/sig/orb/models/price_evaluate_response.rbs +41 -4
- data/sig/orb/models/subscription.rbs +609 -29
- data/sig/orb/models/subscription_cancel_response.rbs +609 -29
- data/sig/orb/models/subscription_change_apply_response.rbs +621 -29
- data/sig/orb/models/subscription_change_cancel_response.rbs +621 -29
- data/sig/orb/models/subscription_change_retrieve_response.rbs +621 -29
- data/sig/orb/models/subscription_create_params.rbs +4450 -1466
- data/sig/orb/models/subscription_create_response.rbs +609 -29
- data/sig/orb/models/subscription_fetch_schedule_response.rbs +4 -4
- data/sig/orb/models/subscription_price_intervals_params.rbs +920 -24
- data/sig/orb/models/subscription_price_intervals_response.rbs +609 -29
- data/sig/orb/models/subscription_schedule_plan_change_params.rbs +4440 -1466
- data/sig/orb/models/subscription_schedule_plan_change_response.rbs +609 -29
- data/sig/orb/models/subscription_trigger_phase_response.rbs +609 -29
- data/sig/orb/models/subscription_unschedule_cancellation_response.rbs +609 -29
- data/sig/orb/models/subscription_unschedule_fixed_fee_quantity_updates_response.rbs +609 -29
- data/sig/orb/models/subscription_unschedule_pending_plan_changes_response.rbs +609 -29
- data/sig/orb/models/subscription_update_fixed_fee_quantity_response.rbs +609 -29
- data/sig/orb/models/subscription_update_trial_response.rbs +609 -29
- data/sig/orb/models/trial_discount.rbs +5 -5
- data/sig/orb/models/usage_discount.rbs +5 -5
- data/sig/orb/models.rbs +4 -0
- data/sig/orb/resources/credit_notes.rbs +1 -1
- data/sig/orb/resources/items.rbs +7 -0
- data/sig/orb/resources/plans/external_plan_id/versions.rbs +30 -0
- data/sig/orb/resources/plans/external_plan_id.rbs +8 -0
- data/sig/orb/resources/plans/versions.rbs +28 -0
- data/sig/orb/resources/plans.rbs +8 -0
- data/sig/orb/resources/prices.rbs +3 -3
- data/sig/orb/resources/subscriptions.rbs +2 -0
- metadata +41 -2
data/lib/orb/resources/prices.rb
CHANGED
@@ -10,7 +10,7 @@ module Orb
|
|
10
10
|
# {Orb::Models::PriceCreateParams} for more details.
|
11
11
|
#
|
12
12
|
# This endpoint is used to create a [price](/product-catalog/price-configuration).
|
13
|
-
# A price created using this endpoint is always an add-on, meaning that it
|
13
|
+
# A price created using this endpoint is always an add-on, meaning that it's not
|
14
14
|
# associated with a specific plan and can instead be individually added to
|
15
15
|
# subscriptions, including subscriptions on different plans.
|
16
16
|
#
|
@@ -20,7 +20,7 @@ module Orb
|
|
20
20
|
# See the [Price resource](/product-catalog/price-configuration) for the
|
21
21
|
# specification of different price model configurations possible in this endpoint.
|
22
22
|
#
|
23
|
-
# @overload create(cadence:, currency:, item_id:, model_type:, name:, unit_config:, package_config:, matrix_config:, matrix_with_allocation_config:, tiered_config:, tiered_bps_config:, bps_config:, bulk_bps_config:, bulk_config:, threshold_total_amount_config:, tiered_package_config:, grouped_tiered_config:, max_group_tiered_package_config:, tiered_with_minimum_config:, package_with_allocation_config:, tiered_package_with_minimum_config:, unit_with_percent_config:, tiered_with_proration_config:, unit_with_proration_config:, grouped_allocation_config:, grouped_with_prorated_minimum_config:, grouped_with_metered_minimum_config:, matrix_with_display_name_config:, bulk_with_proration_config:, grouped_tiered_package_config:, scalable_matrix_with_unit_pricing_config:, scalable_matrix_with_tiered_pricing_config:, cumulative_grouped_bulk_config:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, metadata: nil, request_options: {})
|
23
|
+
# @overload create(cadence:, currency:, item_id:, model_type:, name:, unit_config:, package_config:, matrix_config:, matrix_with_allocation_config:, tiered_config:, tiered_bps_config:, bps_config:, bulk_bps_config:, bulk_config:, threshold_total_amount_config:, tiered_package_config:, grouped_tiered_config:, max_group_tiered_package_config:, tiered_with_minimum_config:, package_with_allocation_config:, tiered_package_with_minimum_config:, unit_with_percent_config:, tiered_with_proration_config:, unit_with_proration_config:, grouped_allocation_config:, grouped_with_prorated_minimum_config:, grouped_with_metered_minimum_config:, matrix_with_display_name_config:, bulk_with_proration_config:, grouped_tiered_package_config:, scalable_matrix_with_unit_pricing_config:, scalable_matrix_with_tiered_pricing_config:, cumulative_grouped_bulk_config:, billable_metric_id: nil, billed_in_advance: nil, billing_cycle_configuration: nil, conversion_rate: nil, dimensional_price_configuration: nil, external_price_id: nil, fixed_price_quantity: nil, invoice_grouping_key: nil, invoicing_cycle_configuration: nil, metadata: nil, request_options: {})
|
24
24
|
#
|
25
25
|
# @param cadence [Symbol, Orb::Models::PriceCreateParams::Cadence] The cadence to bill for this price on.
|
26
26
|
#
|
@@ -96,6 +96,8 @@ module Orb
|
|
96
96
|
#
|
97
97
|
# @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency.
|
98
98
|
#
|
99
|
+
# @param dimensional_price_configuration [Orb::Models::PriceCreateParams::DimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values
|
100
|
+
#
|
99
101
|
# @param external_price_id [String, nil] An alias for the price.
|
100
102
|
#
|
101
103
|
# @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl
|
@@ -174,17 +176,24 @@ module Orb
|
|
174
176
|
)
|
175
177
|
end
|
176
178
|
|
177
|
-
#
|
178
|
-
#
|
179
|
-
#
|
180
|
-
# This endpoint is used to evaluate the output of a price for a given customer and
|
181
|
-
# time range. It enables filtering and grouping the output using
|
179
|
+
# This endpoint is used to evaluate the output of price(s) for a given customer
|
180
|
+
# and time range over either ingested events or preview events. It enables
|
181
|
+
# filtering and grouping the output using
|
182
182
|
# [computed properties](/extensibility/advanced-metrics#computed-properties),
|
183
183
|
# supporting the following workflows:
|
184
184
|
#
|
185
185
|
# 1. Showing detailed usage and costs to the end customer.
|
186
186
|
# 2. Auditing subtotals on invoice line items.
|
187
187
|
#
|
188
|
+
# Prices may either reference existing prices in your Orb account or be defined
|
189
|
+
# inline in the request body. Up to 100 prices can be evaluated in a single
|
190
|
+
# request.
|
191
|
+
#
|
192
|
+
# Price evaluation by default uses ingested events, but you can also provide a
|
193
|
+
# list of preview events to use instead. Up to 500 preview events can be provided
|
194
|
+
# in a single request. When using ingested events, the start of the time range
|
195
|
+
# must be no more than 100 days ago.
|
196
|
+
#
|
188
197
|
# For these workflows, the expressiveness of computed properties in both the
|
189
198
|
# filters and grouping is critical. For example, if you'd like to show your
|
190
199
|
# customer their usage grouped by hour and another property, you can do so with
|
@@ -194,14 +203,11 @@ module Orb
|
|
194
203
|
# with the following `filter`:
|
195
204
|
# `my_property = 'foo' AND my_other_property = 'bar'`.
|
196
205
|
#
|
197
|
-
#
|
198
|
-
# the length of the results must be no greater than 1000. Note that this is a POST
|
206
|
+
# The length of the results must be no greater than 1000. Note that this is a POST
|
199
207
|
# endpoint rather than a GET endpoint because it employs a JSON body rather than
|
200
208
|
# query parameters.
|
201
209
|
#
|
202
|
-
# @overload evaluate(
|
203
|
-
#
|
204
|
-
# @param price_id [String]
|
210
|
+
# @overload evaluate(timeframe_end:, timeframe_start:, customer_id: nil, events: nil, external_customer_id: nil, price_evaluations: nil, request_options: {})
|
205
211
|
#
|
206
212
|
# @param timeframe_end [Time] The exclusive upper bound for event timestamps
|
207
213
|
#
|
@@ -209,22 +215,22 @@ module Orb
|
|
209
215
|
#
|
210
216
|
# @param customer_id [String, nil] The ID of the customer to which this evaluation is scoped.
|
211
217
|
#
|
212
|
-
# @param
|
218
|
+
# @param events [Array<Orb::Models::PriceEvaluateParams::Event>, nil] Optional list of preview events to use instead of actual usage data (max 500)
|
213
219
|
#
|
214
|
-
# @param
|
220
|
+
# @param external_customer_id [String, nil] The external customer ID of the customer to which this evaluation is scoped.
|
215
221
|
#
|
216
|
-
# @param
|
222
|
+
# @param price_evaluations [Array<Orb::Models::PriceEvaluateParams::PriceEvaluation>] List of prices to evaluate (max 100)
|
217
223
|
#
|
218
224
|
# @param request_options [Orb::RequestOptions, Hash{Symbol=>Object}, nil]
|
219
225
|
#
|
220
226
|
# @return [Orb::Models::PriceEvaluateResponse]
|
221
227
|
#
|
222
228
|
# @see Orb::Models::PriceEvaluateParams
|
223
|
-
def evaluate(
|
229
|
+
def evaluate(params)
|
224
230
|
parsed, options = Orb::PriceEvaluateParams.dump_request(params)
|
225
231
|
@client.request(
|
226
232
|
method: :post,
|
227
|
-
path:
|
233
|
+
path: "prices/evaluate",
|
228
234
|
body: parsed,
|
229
235
|
model: Orb::Models::PriceEvaluateResponse,
|
230
236
|
options: options
|
@@ -263,7 +263,7 @@ module Orb
|
|
263
263
|
# subscription. E.g. pass in `10.00` to issue an invoice when usage amounts hit
|
264
264
|
# $10.00 for a subscription that invoices in USD.
|
265
265
|
#
|
266
|
-
# @overload create(add_adjustments: nil, add_prices: nil, align_billing_with_subscription_start_date: nil, auto_collection: nil, aws_region: nil, billing_cycle_anchor_configuration: nil, coupon_redemption_code: nil, credits_overage_rate: nil, customer_id: nil, default_invoice_memo: nil, end_date: nil, external_customer_id: nil, external_marketplace: nil, external_marketplace_reporting_id: nil, external_plan_id: nil, filter: nil, initial_phase_order: nil, invoicing_threshold: nil, metadata: nil, net_terms: nil, per_credit_overage_amount: nil, plan_id: nil, plan_version_number: nil, price_overrides: nil, remove_adjustments: nil, remove_prices: nil, replace_adjustments: nil, replace_prices: nil, start_date: nil, trial_duration_days: nil, usage_customer_ids: nil, request_options: {})
|
266
|
+
# @overload create(add_adjustments: nil, add_prices: nil, align_billing_with_subscription_start_date: nil, auto_collection: nil, aws_region: nil, billing_cycle_anchor_configuration: nil, coupon_redemption_code: nil, credits_overage_rate: nil, currency: nil, customer_id: nil, default_invoice_memo: nil, end_date: nil, external_customer_id: nil, external_marketplace: nil, external_marketplace_reporting_id: nil, external_plan_id: nil, filter: nil, initial_phase_order: nil, invoicing_threshold: nil, metadata: nil, name: nil, net_terms: nil, per_credit_overage_amount: nil, plan_id: nil, plan_version_number: nil, price_overrides: nil, remove_adjustments: nil, remove_prices: nil, replace_adjustments: nil, replace_prices: nil, start_date: nil, trial_duration_days: nil, usage_customer_ids: nil, request_options: {})
|
267
267
|
#
|
268
268
|
# @param add_adjustments [Array<Orb::Models::SubscriptionCreateParams::AddAdjustment>, nil] Additional adjustments to be added to the subscription. (Only available for acco
|
269
269
|
#
|
@@ -281,6 +281,8 @@ module Orb
|
|
281
281
|
#
|
282
282
|
# @param credits_overage_rate [Float, nil]
|
283
283
|
#
|
284
|
+
# @param currency [String, nil] The currency to use for the subscription. If not specified, the invoicing curren
|
285
|
+
#
|
284
286
|
# @param customer_id [String, nil]
|
285
287
|
#
|
286
288
|
# @param default_invoice_memo [String, nil] Determines the default memo on this subscription's invoices. Note that if this i
|
@@ -303,6 +305,8 @@ module Orb
|
|
303
305
|
#
|
304
306
|
# @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed
|
305
307
|
#
|
308
|
+
# @param name [String, nil] The name to use for the subscription. If not specified, the plan name will be us
|
309
|
+
#
|
306
310
|
# @param net_terms [Integer, nil] The net terms determines the difference between the invoice date and the issue d
|
307
311
|
#
|
308
312
|
# @param per_credit_overage_amount [Float, nil]
|
data/lib/orb/version.rb
CHANGED
data/lib/orb.rb
CHANGED
@@ -20,7 +20,9 @@ require "uri"
|
|
20
20
|
|
21
21
|
# We already ship the preferred sorbet manifests in the package itself.
|
22
22
|
# `tapioca` currently does not offer us a way to opt out of unnecessary compilation.
|
23
|
-
if Object.const_defined?(:Tapioca) &&
|
23
|
+
if Object.const_defined?(:Tapioca) &&
|
24
|
+
caller.chain([$PROGRAM_NAME]).chain(ARGV).any?(/tapioca/) &&
|
25
|
+
ARGV.none?(/dsl/)
|
24
26
|
return
|
25
27
|
end
|
26
28
|
|
@@ -154,6 +156,7 @@ require_relative "orb/models/invoice_pay_params"
|
|
154
156
|
require_relative "orb/models/invoice_update_params"
|
155
157
|
require_relative "orb/models/invoice_void_params"
|
156
158
|
require_relative "orb/models/item"
|
159
|
+
require_relative "orb/models/item_archive_params"
|
157
160
|
require_relative "orb/models/item_create_params"
|
158
161
|
require_relative "orb/models/item_fetch_params"
|
159
162
|
require_relative "orb/models/item_list_params"
|
@@ -168,8 +171,18 @@ require_relative "orb/models/plan"
|
|
168
171
|
require_relative "orb/models/plan_create_params"
|
169
172
|
require_relative "orb/models/plan_fetch_params"
|
170
173
|
require_relative "orb/models/plan_list_params"
|
174
|
+
require_relative "orb/models/plans/external_plan_id/version_create_params"
|
175
|
+
require_relative "orb/models/plans/external_plan_id/version_create_response"
|
176
|
+
require_relative "orb/models/plans/external_plan_id/version_retrieve_params"
|
177
|
+
require_relative "orb/models/plans/external_plan_id/version_retrieve_response"
|
171
178
|
require_relative "orb/models/plans/external_plan_id_fetch_params"
|
179
|
+
require_relative "orb/models/plans/external_plan_id_set_default_version_params"
|
172
180
|
require_relative "orb/models/plans/external_plan_id_update_params"
|
181
|
+
require_relative "orb/models/plans/version_create_params"
|
182
|
+
require_relative "orb/models/plans/version_create_response"
|
183
|
+
require_relative "orb/models/plans/version_retrieve_params"
|
184
|
+
require_relative "orb/models/plans/version_retrieve_response"
|
185
|
+
require_relative "orb/models/plan_set_default_version_params"
|
173
186
|
require_relative "orb/models/plan_update_params"
|
174
187
|
require_relative "orb/models/price"
|
175
188
|
require_relative "orb/models/price_create_params"
|
@@ -243,6 +256,8 @@ require_relative "orb/resources/items"
|
|
243
256
|
require_relative "orb/resources/metrics"
|
244
257
|
require_relative "orb/resources/plans"
|
245
258
|
require_relative "orb/resources/plans/external_plan_id"
|
259
|
+
require_relative "orb/resources/plans/external_plan_id/versions"
|
260
|
+
require_relative "orb/resources/plans/versions"
|
246
261
|
require_relative "orb/resources/prices"
|
247
262
|
require_relative "orb/resources/prices/external_price_id"
|
248
263
|
require_relative "orb/resources/subscription_changes"
|
data/rbi/orb/models/alert.rbi
CHANGED
@@ -60,6 +60,11 @@ module Orb
|
|
60
60
|
sig { returns(Orb::Alert::Type::TaggedSymbol) }
|
61
61
|
attr_accessor :type
|
62
62
|
|
63
|
+
# The current status of the alert. This field is only present for credit balance
|
64
|
+
# alerts.
|
65
|
+
sig { returns(T.nilable(T::Array[Orb::Alert::BalanceAlertStatus])) }
|
66
|
+
attr_accessor :balance_alert_status
|
67
|
+
|
63
68
|
# [Alerts within Orb](/product-catalog/configuring-alerts) monitor spending,
|
64
69
|
# usage, or credit balance and trigger webhooks when a threshold is exceeded.
|
65
70
|
#
|
@@ -76,7 +81,9 @@ module Orb
|
|
76
81
|
plan: T.nilable(Orb::Alert::Plan::OrHash),
|
77
82
|
subscription: T.nilable(Orb::Alert::Subscription::OrHash),
|
78
83
|
thresholds: T.nilable(T::Array[Orb::Alert::Threshold::OrHash]),
|
79
|
-
type: Orb::Alert::Type::OrSymbol
|
84
|
+
type: Orb::Alert::Type::OrSymbol,
|
85
|
+
balance_alert_status:
|
86
|
+
T.nilable(T::Array[Orb::Alert::BalanceAlertStatus::OrHash])
|
80
87
|
).returns(T.attached_class)
|
81
88
|
end
|
82
89
|
def self.new(
|
@@ -100,7 +107,10 @@ module Orb
|
|
100
107
|
# triggered.
|
101
108
|
thresholds:,
|
102
109
|
# The type of alert. This must be a valid alert type.
|
103
|
-
type
|
110
|
+
type:,
|
111
|
+
# The current status of the alert. This field is only present for credit balance
|
112
|
+
# alerts.
|
113
|
+
balance_alert_status: nil
|
104
114
|
)
|
105
115
|
end
|
106
116
|
|
@@ -116,7 +126,9 @@ module Orb
|
|
116
126
|
plan: T.nilable(Orb::Alert::Plan),
|
117
127
|
subscription: T.nilable(Orb::Alert::Subscription),
|
118
128
|
thresholds: T.nilable(T::Array[Orb::Alert::Threshold]),
|
119
|
-
type: Orb::Alert::Type::TaggedSymbol
|
129
|
+
type: Orb::Alert::Type::TaggedSymbol,
|
130
|
+
balance_alert_status:
|
131
|
+
T.nilable(T::Array[Orb::Alert::BalanceAlertStatus])
|
120
132
|
}
|
121
133
|
)
|
122
134
|
end
|
@@ -286,6 +298,41 @@ module Orb
|
|
286
298
|
def self.values
|
287
299
|
end
|
288
300
|
end
|
301
|
+
|
302
|
+
class BalanceAlertStatus < Orb::Internal::Type::BaseModel
|
303
|
+
OrHash =
|
304
|
+
T.type_alias do
|
305
|
+
T.any(Orb::Alert::BalanceAlertStatus, Orb::Internal::AnyHash)
|
306
|
+
end
|
307
|
+
|
308
|
+
# Whether the alert is currently in-alert or not.
|
309
|
+
sig { returns(T::Boolean) }
|
310
|
+
attr_accessor :in_alert
|
311
|
+
|
312
|
+
# The value of the threshold that defines the alert status.
|
313
|
+
sig { returns(Float) }
|
314
|
+
attr_accessor :threshold_value
|
315
|
+
|
316
|
+
# Alert status is used to determine if an alert is currently in-alert or not.
|
317
|
+
sig do
|
318
|
+
params(in_alert: T::Boolean, threshold_value: Float).returns(
|
319
|
+
T.attached_class
|
320
|
+
)
|
321
|
+
end
|
322
|
+
def self.new(
|
323
|
+
# Whether the alert is currently in-alert or not.
|
324
|
+
in_alert:,
|
325
|
+
# The value of the threshold that defines the alert status.
|
326
|
+
threshold_value:
|
327
|
+
)
|
328
|
+
end
|
329
|
+
|
330
|
+
sig do
|
331
|
+
override.returns({ in_alert: T::Boolean, threshold_value: Float })
|
332
|
+
end
|
333
|
+
def to_hash
|
334
|
+
end
|
335
|
+
end
|
289
336
|
end
|
290
337
|
end
|
291
338
|
end
|
@@ -10,32 +10,32 @@ module Orb
|
|
10
10
|
sig { returns(String) }
|
11
11
|
attr_accessor :amount_discount
|
12
12
|
|
13
|
+
sig { returns(Orb::AmountDiscount::DiscountType::OrSymbol) }
|
14
|
+
attr_accessor :discount_type
|
15
|
+
|
13
16
|
# List of price_ids that this discount applies to. For plan/plan phase discounts,
|
14
17
|
# this can be a subset of prices.
|
15
|
-
sig { returns(T::Array[String]) }
|
18
|
+
sig { returns(T.nilable(T::Array[String])) }
|
16
19
|
attr_accessor :applies_to_price_ids
|
17
20
|
|
18
|
-
sig { returns(Orb::AmountDiscount::DiscountType::OrSymbol) }
|
19
|
-
attr_accessor :discount_type
|
20
|
-
|
21
21
|
sig { returns(T.nilable(String)) }
|
22
22
|
attr_accessor :reason
|
23
23
|
|
24
24
|
sig do
|
25
25
|
params(
|
26
26
|
amount_discount: String,
|
27
|
-
applies_to_price_ids: T::Array[String],
|
28
27
|
discount_type: Orb::AmountDiscount::DiscountType::OrSymbol,
|
28
|
+
applies_to_price_ids: T.nilable(T::Array[String]),
|
29
29
|
reason: T.nilable(String)
|
30
30
|
).returns(T.attached_class)
|
31
31
|
end
|
32
32
|
def self.new(
|
33
33
|
# Only available if discount_type is `amount`.
|
34
34
|
amount_discount:,
|
35
|
+
discount_type:,
|
35
36
|
# List of price_ids that this discount applies to. For plan/plan phase discounts,
|
36
37
|
# this can be a subset of prices.
|
37
|
-
applies_to_price_ids
|
38
|
-
discount_type:,
|
38
|
+
applies_to_price_ids: nil,
|
39
39
|
reason: nil
|
40
40
|
)
|
41
41
|
end
|
@@ -44,8 +44,8 @@ module Orb
|
|
44
44
|
override.returns(
|
45
45
|
{
|
46
46
|
amount_discount: String,
|
47
|
-
applies_to_price_ids: T::Array[String],
|
48
47
|
discount_type: Orb::AmountDiscount::DiscountType::OrSymbol,
|
48
|
+
applies_to_price_ids: T.nilable(T::Array[String]),
|
49
49
|
reason: T.nilable(String)
|
50
50
|
}
|
51
51
|
)
|
@@ -14,28 +14,28 @@ module Orb
|
|
14
14
|
sig { returns(T::Array[Orb::CreditNoteCreateParams::LineItem]) }
|
15
15
|
attr_accessor :line_items
|
16
16
|
|
17
|
+
# An optional reason for the credit note.
|
18
|
+
sig { returns(Orb::CreditNoteCreateParams::Reason::OrSymbol) }
|
19
|
+
attr_accessor :reason
|
20
|
+
|
17
21
|
# An optional memo to attach to the credit note.
|
18
22
|
sig { returns(T.nilable(String)) }
|
19
23
|
attr_accessor :memo
|
20
24
|
|
21
|
-
# An optional reason for the credit note.
|
22
|
-
sig { returns(T.nilable(Orb::CreditNoteCreateParams::Reason::OrSymbol)) }
|
23
|
-
attr_accessor :reason
|
24
|
-
|
25
25
|
sig do
|
26
26
|
params(
|
27
27
|
line_items: T::Array[Orb::CreditNoteCreateParams::LineItem::OrHash],
|
28
|
+
reason: Orb::CreditNoteCreateParams::Reason::OrSymbol,
|
28
29
|
memo: T.nilable(String),
|
29
|
-
reason: T.nilable(Orb::CreditNoteCreateParams::Reason::OrSymbol),
|
30
30
|
request_options: Orb::RequestOptions::OrHash
|
31
31
|
).returns(T.attached_class)
|
32
32
|
end
|
33
33
|
def self.new(
|
34
34
|
line_items:,
|
35
|
+
# An optional reason for the credit note.
|
36
|
+
reason:,
|
35
37
|
# An optional memo to attach to the credit note.
|
36
38
|
memo: nil,
|
37
|
-
# An optional reason for the credit note.
|
38
|
-
reason: nil,
|
39
39
|
request_options: {}
|
40
40
|
)
|
41
41
|
end
|
@@ -44,8 +44,8 @@ module Orb
|
|
44
44
|
override.returns(
|
45
45
|
{
|
46
46
|
line_items: T::Array[Orb::CreditNoteCreateParams::LineItem],
|
47
|
+
reason: Orb::CreditNoteCreateParams::Reason::OrSymbol,
|
47
48
|
memo: T.nilable(String),
|
48
|
-
reason: T.nilable(Orb::CreditNoteCreateParams::Reason::OrSymbol),
|
49
49
|
request_options: Orb::RequestOptions
|
50
50
|
}
|
51
51
|
)
|
@@ -133,7 +133,8 @@ module Orb
|
|
133
133
|
T.nilable(
|
134
134
|
T.any(
|
135
135
|
Orb::CustomerCreateParams::TaxConfiguration::Avalara,
|
136
|
-
Orb::CustomerCreateParams::TaxConfiguration::Taxjar
|
136
|
+
Orb::CustomerCreateParams::TaxConfiguration::Taxjar,
|
137
|
+
Orb::CustomerCreateParams::TaxConfiguration::Sphere
|
137
138
|
)
|
138
139
|
)
|
139
140
|
)
|
@@ -289,7 +290,8 @@ module Orb
|
|
289
290
|
T.nilable(
|
290
291
|
T.any(
|
291
292
|
Orb::CustomerCreateParams::TaxConfiguration::Avalara::OrHash,
|
292
|
-
Orb::CustomerCreateParams::TaxConfiguration::Taxjar::OrHash
|
293
|
+
Orb::CustomerCreateParams::TaxConfiguration::Taxjar::OrHash,
|
294
|
+
Orb::CustomerCreateParams::TaxConfiguration::Sphere::OrHash
|
293
295
|
)
|
294
296
|
),
|
295
297
|
tax_id: T.nilable(Orb::CustomerCreateParams::TaxID::OrHash),
|
@@ -478,7 +480,8 @@ module Orb
|
|
478
480
|
T.nilable(
|
479
481
|
T.any(
|
480
482
|
Orb::CustomerCreateParams::TaxConfiguration::Avalara,
|
481
|
-
Orb::CustomerCreateParams::TaxConfiguration::Taxjar
|
483
|
+
Orb::CustomerCreateParams::TaxConfiguration::Taxjar,
|
484
|
+
Orb::CustomerCreateParams::TaxConfiguration::Sphere
|
482
485
|
)
|
483
486
|
),
|
484
487
|
tax_id: T.nilable(Orb::CustomerCreateParams::TaxID),
|
@@ -825,7 +828,8 @@ module Orb
|
|
825
828
|
T.type_alias do
|
826
829
|
T.any(
|
827
830
|
Orb::CustomerCreateParams::TaxConfiguration::Avalara,
|
828
|
-
Orb::CustomerCreateParams::TaxConfiguration::Taxjar
|
831
|
+
Orb::CustomerCreateParams::TaxConfiguration::Taxjar,
|
832
|
+
Orb::CustomerCreateParams::TaxConfiguration::Sphere
|
829
833
|
)
|
830
834
|
end
|
831
835
|
|
@@ -904,6 +908,36 @@ module Orb
|
|
904
908
|
end
|
905
909
|
end
|
906
910
|
|
911
|
+
class Sphere < Orb::Internal::Type::BaseModel
|
912
|
+
OrHash =
|
913
|
+
T.type_alias do
|
914
|
+
T.any(
|
915
|
+
Orb::CustomerCreateParams::TaxConfiguration::Sphere,
|
916
|
+
Orb::Internal::AnyHash
|
917
|
+
)
|
918
|
+
end
|
919
|
+
|
920
|
+
sig { returns(T::Boolean) }
|
921
|
+
attr_accessor :tax_exempt
|
922
|
+
|
923
|
+
sig { returns(Symbol) }
|
924
|
+
attr_accessor :tax_provider
|
925
|
+
|
926
|
+
sig do
|
927
|
+
params(tax_exempt: T::Boolean, tax_provider: Symbol).returns(
|
928
|
+
T.attached_class
|
929
|
+
)
|
930
|
+
end
|
931
|
+
def self.new(tax_exempt:, tax_provider: :sphere)
|
932
|
+
end
|
933
|
+
|
934
|
+
sig do
|
935
|
+
override.returns({ tax_exempt: T::Boolean, tax_provider: Symbol })
|
936
|
+
end
|
937
|
+
def to_hash
|
938
|
+
end
|
939
|
+
end
|
940
|
+
|
907
941
|
sig do
|
908
942
|
override.returns(
|
909
943
|
T::Array[Orb::CustomerCreateParams::TaxConfiguration::Variants]
|
@@ -161,7 +161,8 @@ module Orb
|
|
161
161
|
T.nilable(
|
162
162
|
T.any(
|
163
163
|
Orb::CustomerUpdateByExternalIDParams::TaxConfiguration::Avalara,
|
164
|
-
Orb::CustomerUpdateByExternalIDParams::TaxConfiguration::Taxjar
|
164
|
+
Orb::CustomerUpdateByExternalIDParams::TaxConfiguration::Taxjar,
|
165
|
+
Orb::CustomerUpdateByExternalIDParams::TaxConfiguration::Sphere
|
165
166
|
)
|
166
167
|
)
|
167
168
|
)
|
@@ -321,7 +322,8 @@ module Orb
|
|
321
322
|
T.nilable(
|
322
323
|
T.any(
|
323
324
|
Orb::CustomerUpdateByExternalIDParams::TaxConfiguration::Avalara::OrHash,
|
324
|
-
Orb::CustomerUpdateByExternalIDParams::TaxConfiguration::Taxjar::OrHash
|
325
|
+
Orb::CustomerUpdateByExternalIDParams::TaxConfiguration::Taxjar::OrHash,
|
326
|
+
Orb::CustomerUpdateByExternalIDParams::TaxConfiguration::Sphere::OrHash
|
325
327
|
)
|
326
328
|
),
|
327
329
|
tax_id:
|
@@ -514,7 +516,8 @@ module Orb
|
|
514
516
|
T.nilable(
|
515
517
|
T.any(
|
516
518
|
Orb::CustomerUpdateByExternalIDParams::TaxConfiguration::Avalara,
|
517
|
-
Orb::CustomerUpdateByExternalIDParams::TaxConfiguration::Taxjar
|
519
|
+
Orb::CustomerUpdateByExternalIDParams::TaxConfiguration::Taxjar,
|
520
|
+
Orb::CustomerUpdateByExternalIDParams::TaxConfiguration::Sphere
|
518
521
|
)
|
519
522
|
),
|
520
523
|
tax_id: T.nilable(Orb::CustomerUpdateByExternalIDParams::TaxID),
|
@@ -872,7 +875,8 @@ module Orb
|
|
872
875
|
T.type_alias do
|
873
876
|
T.any(
|
874
877
|
Orb::CustomerUpdateByExternalIDParams::TaxConfiguration::Avalara,
|
875
|
-
Orb::CustomerUpdateByExternalIDParams::TaxConfiguration::Taxjar
|
878
|
+
Orb::CustomerUpdateByExternalIDParams::TaxConfiguration::Taxjar,
|
879
|
+
Orb::CustomerUpdateByExternalIDParams::TaxConfiguration::Sphere
|
876
880
|
)
|
877
881
|
end
|
878
882
|
|
@@ -951,6 +955,36 @@ module Orb
|
|
951
955
|
end
|
952
956
|
end
|
953
957
|
|
958
|
+
class Sphere < Orb::Internal::Type::BaseModel
|
959
|
+
OrHash =
|
960
|
+
T.type_alias do
|
961
|
+
T.any(
|
962
|
+
Orb::CustomerUpdateByExternalIDParams::TaxConfiguration::Sphere,
|
963
|
+
Orb::Internal::AnyHash
|
964
|
+
)
|
965
|
+
end
|
966
|
+
|
967
|
+
sig { returns(T::Boolean) }
|
968
|
+
attr_accessor :tax_exempt
|
969
|
+
|
970
|
+
sig { returns(Symbol) }
|
971
|
+
attr_accessor :tax_provider
|
972
|
+
|
973
|
+
sig do
|
974
|
+
params(tax_exempt: T::Boolean, tax_provider: Symbol).returns(
|
975
|
+
T.attached_class
|
976
|
+
)
|
977
|
+
end
|
978
|
+
def self.new(tax_exempt:, tax_provider: :sphere)
|
979
|
+
end
|
980
|
+
|
981
|
+
sig do
|
982
|
+
override.returns({ tax_exempt: T::Boolean, tax_provider: Symbol })
|
983
|
+
end
|
984
|
+
def to_hash
|
985
|
+
end
|
986
|
+
end
|
987
|
+
|
954
988
|
sig do
|
955
989
|
override.returns(
|
956
990
|
T::Array[
|
@@ -134,7 +134,8 @@ module Orb
|
|
134
134
|
T.nilable(
|
135
135
|
T.any(
|
136
136
|
Orb::CustomerUpdateParams::TaxConfiguration::Avalara,
|
137
|
-
Orb::CustomerUpdateParams::TaxConfiguration::Taxjar
|
137
|
+
Orb::CustomerUpdateParams::TaxConfiguration::Taxjar,
|
138
|
+
Orb::CustomerUpdateParams::TaxConfiguration::Sphere
|
138
139
|
)
|
139
140
|
)
|
140
141
|
)
|
@@ -284,7 +285,8 @@ module Orb
|
|
284
285
|
T.nilable(
|
285
286
|
T.any(
|
286
287
|
Orb::CustomerUpdateParams::TaxConfiguration::Avalara::OrHash,
|
287
|
-
Orb::CustomerUpdateParams::TaxConfiguration::Taxjar::OrHash
|
288
|
+
Orb::CustomerUpdateParams::TaxConfiguration::Taxjar::OrHash,
|
289
|
+
Orb::CustomerUpdateParams::TaxConfiguration::Sphere::OrHash
|
288
290
|
)
|
289
291
|
),
|
290
292
|
tax_id: T.nilable(Orb::CustomerUpdateParams::TaxID::OrHash),
|
@@ -469,7 +471,8 @@ module Orb
|
|
469
471
|
T.nilable(
|
470
472
|
T.any(
|
471
473
|
Orb::CustomerUpdateParams::TaxConfiguration::Avalara,
|
472
|
-
Orb::CustomerUpdateParams::TaxConfiguration::Taxjar
|
474
|
+
Orb::CustomerUpdateParams::TaxConfiguration::Taxjar,
|
475
|
+
Orb::CustomerUpdateParams::TaxConfiguration::Sphere
|
473
476
|
)
|
474
477
|
),
|
475
478
|
tax_id: T.nilable(Orb::CustomerUpdateParams::TaxID),
|
@@ -819,7 +822,8 @@ module Orb
|
|
819
822
|
T.type_alias do
|
820
823
|
T.any(
|
821
824
|
Orb::CustomerUpdateParams::TaxConfiguration::Avalara,
|
822
|
-
Orb::CustomerUpdateParams::TaxConfiguration::Taxjar
|
825
|
+
Orb::CustomerUpdateParams::TaxConfiguration::Taxjar,
|
826
|
+
Orb::CustomerUpdateParams::TaxConfiguration::Sphere
|
823
827
|
)
|
824
828
|
end
|
825
829
|
|
@@ -898,6 +902,36 @@ module Orb
|
|
898
902
|
end
|
899
903
|
end
|
900
904
|
|
905
|
+
class Sphere < Orb::Internal::Type::BaseModel
|
906
|
+
OrHash =
|
907
|
+
T.type_alias do
|
908
|
+
T.any(
|
909
|
+
Orb::CustomerUpdateParams::TaxConfiguration::Sphere,
|
910
|
+
Orb::Internal::AnyHash
|
911
|
+
)
|
912
|
+
end
|
913
|
+
|
914
|
+
sig { returns(T::Boolean) }
|
915
|
+
attr_accessor :tax_exempt
|
916
|
+
|
917
|
+
sig { returns(Symbol) }
|
918
|
+
attr_accessor :tax_provider
|
919
|
+
|
920
|
+
sig do
|
921
|
+
params(tax_exempt: T::Boolean, tax_provider: Symbol).returns(
|
922
|
+
T.attached_class
|
923
|
+
)
|
924
|
+
end
|
925
|
+
def self.new(tax_exempt:, tax_provider: :sphere)
|
926
|
+
end
|
927
|
+
|
928
|
+
sig do
|
929
|
+
override.returns({ tax_exempt: T::Boolean, tax_provider: Symbol })
|
930
|
+
end
|
931
|
+
def to_hash
|
932
|
+
end
|
933
|
+
end
|
934
|
+
|
901
935
|
sig do
|
902
936
|
override.returns(
|
903
937
|
T::Array[Orb::CustomerUpdateParams::TaxConfiguration::Variants]
|
@@ -102,6 +102,10 @@ module Orb
|
|
102
102
|
sig { returns(Float) }
|
103
103
|
attr_accessor :starting_balance
|
104
104
|
|
105
|
+
# If the increment resulted in invoice creation, the list of created invoices
|
106
|
+
sig { returns(T.nilable(T::Array[Orb::Invoice])) }
|
107
|
+
attr_accessor :created_invoices
|
108
|
+
|
105
109
|
sig do
|
106
110
|
params(
|
107
111
|
id: String,
|
@@ -119,6 +123,7 @@ module Orb
|
|
119
123
|
ledger_sequence_number: Integer,
|
120
124
|
metadata: T::Hash[Symbol, String],
|
121
125
|
starting_balance: Float,
|
126
|
+
created_invoices: T.nilable(T::Array[Orb::Invoice::OrHash]),
|
122
127
|
entry_type: Symbol
|
123
128
|
).returns(T.attached_class)
|
124
129
|
end
|
@@ -139,6 +144,8 @@ module Orb
|
|
139
144
|
# `null`.
|
140
145
|
metadata:,
|
141
146
|
starting_balance:,
|
147
|
+
# If the increment resulted in invoice creation, the list of created invoices
|
148
|
+
created_invoices: nil,
|
142
149
|
entry_type: :increment
|
143
150
|
)
|
144
151
|
end
|
@@ -161,7 +168,8 @@ module Orb
|
|
161
168
|
entry_type: Symbol,
|
162
169
|
ledger_sequence_number: Integer,
|
163
170
|
metadata: T::Hash[Symbol, String],
|
164
|
-
starting_balance: Float
|
171
|
+
starting_balance: Float,
|
172
|
+
created_invoices: T.nilable(T::Array[Orb::Invoice])
|
165
173
|
}
|
166
174
|
)
|
167
175
|
end
|
@@ -102,6 +102,10 @@ module Orb
|
|
102
102
|
sig { returns(Float) }
|
103
103
|
attr_accessor :starting_balance
|
104
104
|
|
105
|
+
# If the increment resulted in invoice creation, the list of created invoices
|
106
|
+
sig { returns(T.nilable(T::Array[Orb::Invoice])) }
|
107
|
+
attr_accessor :created_invoices
|
108
|
+
|
105
109
|
sig do
|
106
110
|
params(
|
107
111
|
id: String,
|
@@ -119,6 +123,7 @@ module Orb
|
|
119
123
|
ledger_sequence_number: Integer,
|
120
124
|
metadata: T::Hash[Symbol, String],
|
121
125
|
starting_balance: Float,
|
126
|
+
created_invoices: T.nilable(T::Array[Orb::Invoice::OrHash]),
|
122
127
|
entry_type: Symbol
|
123
128
|
).returns(T.attached_class)
|
124
129
|
end
|
@@ -139,6 +144,8 @@ module Orb
|
|
139
144
|
# `null`.
|
140
145
|
metadata:,
|
141
146
|
starting_balance:,
|
147
|
+
# If the increment resulted in invoice creation, the list of created invoices
|
148
|
+
created_invoices: nil,
|
142
149
|
entry_type: :increment
|
143
150
|
)
|
144
151
|
end
|
@@ -161,7 +168,8 @@ module Orb
|
|
161
168
|
entry_type: Symbol,
|
162
169
|
ledger_sequence_number: Integer,
|
163
170
|
metadata: T::Hash[Symbol, String],
|
164
|
-
starting_balance: Float
|
171
|
+
starting_balance: Float,
|
172
|
+
created_invoices: T.nilable(T::Array[Orb::Invoice])
|
165
173
|
}
|
166
174
|
)
|
167
175
|
end
|