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
@@ -3,18 +3,18 @@
|
|
3
3
|
module Orb
|
4
4
|
module Models
|
5
5
|
class TrialDiscount < Orb::Internal::Type::BaseModel
|
6
|
-
# @!attribute applies_to_price_ids
|
7
|
-
# List of price_ids that this discount applies to. For plan/plan phase discounts,
|
8
|
-
# this can be a subset of prices.
|
9
|
-
#
|
10
|
-
# @return [Array<String>]
|
11
|
-
required :applies_to_price_ids, Orb::Internal::Type::ArrayOf[String]
|
12
|
-
|
13
6
|
# @!attribute discount_type
|
14
7
|
#
|
15
8
|
# @return [Symbol, Orb::Models::TrialDiscount::DiscountType]
|
16
9
|
required :discount_type, enum: -> { Orb::TrialDiscount::DiscountType }
|
17
10
|
|
11
|
+
# @!attribute applies_to_price_ids
|
12
|
+
# List of price_ids that this discount applies to. For plan/plan phase discounts,
|
13
|
+
# this can be a subset of prices.
|
14
|
+
#
|
15
|
+
# @return [Array<String>, nil]
|
16
|
+
optional :applies_to_price_ids, Orb::Internal::Type::ArrayOf[String], nil?: true
|
17
|
+
|
18
18
|
# @!attribute reason
|
19
19
|
#
|
20
20
|
# @return [String, nil]
|
@@ -32,14 +32,14 @@ module Orb
|
|
32
32
|
# @return [Float, nil]
|
33
33
|
optional :trial_percentage_discount, Float, nil?: true
|
34
34
|
|
35
|
-
# @!method initialize(
|
35
|
+
# @!method initialize(discount_type:, applies_to_price_ids: nil, reason: nil, trial_amount_discount: nil, trial_percentage_discount: nil)
|
36
36
|
# Some parameter documentations has been truncated, see
|
37
37
|
# {Orb::Models::TrialDiscount} for more details.
|
38
38
|
#
|
39
|
-
# @param applies_to_price_ids [Array<String>] List of price_ids that this discount applies to. For plan/plan phase discounts,
|
40
|
-
#
|
41
39
|
# @param discount_type [Symbol, Orb::Models::TrialDiscount::DiscountType]
|
42
40
|
#
|
41
|
+
# @param applies_to_price_ids [Array<String>, nil] List of price_ids that this discount applies to. For plan/plan phase discounts,
|
42
|
+
#
|
43
43
|
# @param reason [String, nil]
|
44
44
|
#
|
45
45
|
# @param trial_amount_discount [String, nil] Only available if discount_type is `trial`
|
@@ -3,13 +3,6 @@
|
|
3
3
|
module Orb
|
4
4
|
module Models
|
5
5
|
class UsageDiscount < Orb::Internal::Type::BaseModel
|
6
|
-
# @!attribute applies_to_price_ids
|
7
|
-
# List of price_ids that this discount applies to. For plan/plan phase discounts,
|
8
|
-
# this can be a subset of prices.
|
9
|
-
#
|
10
|
-
# @return [Array<String>]
|
11
|
-
required :applies_to_price_ids, Orb::Internal::Type::ArrayOf[String]
|
12
|
-
|
13
6
|
# @!attribute discount_type
|
14
7
|
#
|
15
8
|
# @return [Symbol, Orb::Models::UsageDiscount::DiscountType]
|
@@ -22,21 +15,28 @@ module Orb
|
|
22
15
|
# @return [Float]
|
23
16
|
required :usage_discount, Float
|
24
17
|
|
18
|
+
# @!attribute applies_to_price_ids
|
19
|
+
# List of price_ids that this discount applies to. For plan/plan phase discounts,
|
20
|
+
# this can be a subset of prices.
|
21
|
+
#
|
22
|
+
# @return [Array<String>, nil]
|
23
|
+
optional :applies_to_price_ids, Orb::Internal::Type::ArrayOf[String], nil?: true
|
24
|
+
|
25
25
|
# @!attribute reason
|
26
26
|
#
|
27
27
|
# @return [String, nil]
|
28
28
|
optional :reason, String, nil?: true
|
29
29
|
|
30
|
-
# @!method initialize(
|
30
|
+
# @!method initialize(discount_type:, usage_discount:, applies_to_price_ids: nil, reason: nil)
|
31
31
|
# Some parameter documentations has been truncated, see
|
32
32
|
# {Orb::Models::UsageDiscount} for more details.
|
33
33
|
#
|
34
|
-
# @param applies_to_price_ids [Array<String>] List of price_ids that this discount applies to. For plan/plan phase discounts,
|
35
|
-
#
|
36
34
|
# @param discount_type [Symbol, Orb::Models::UsageDiscount::DiscountType]
|
37
35
|
#
|
38
36
|
# @param usage_discount [Float] Only available if discount_type is `usage`. Number of usage units that this disc
|
39
37
|
#
|
38
|
+
# @param applies_to_price_ids [Array<String>, nil] List of price_ids that this discount applies to. For plan/plan phase discounts,
|
39
|
+
#
|
40
40
|
# @param reason [String, nil]
|
41
41
|
|
42
42
|
# @see Orb::Models::UsageDiscount#discount_type
|
data/lib/orb/models.rb
CHANGED
@@ -158,6 +158,8 @@ module Orb
|
|
158
158
|
|
159
159
|
Item = Orb::Models::Item
|
160
160
|
|
161
|
+
ItemArchiveParams = Orb::Models::ItemArchiveParams
|
162
|
+
|
161
163
|
ItemCreateParams = Orb::Models::ItemCreateParams
|
162
164
|
|
163
165
|
ItemFetchParams = Orb::Models::ItemFetchParams
|
@@ -188,6 +190,8 @@ module Orb
|
|
188
190
|
|
189
191
|
Plans = Orb::Models::Plans
|
190
192
|
|
193
|
+
PlanSetDefaultVersionParams = Orb::Models::PlanSetDefaultVersionParams
|
194
|
+
|
191
195
|
PlanUpdateParams = Orb::Models::PlanUpdateParams
|
192
196
|
|
193
197
|
Price = Orb::Models::Price
|
@@ -6,13 +6,13 @@ module Orb
|
|
6
6
|
# This endpoint is used to create a single
|
7
7
|
# [`Credit Note`](/invoicing/credit-notes).
|
8
8
|
#
|
9
|
-
# @overload create(line_items:, memo: nil,
|
9
|
+
# @overload create(line_items:, reason:, memo: nil, request_options: {})
|
10
10
|
#
|
11
11
|
# @param line_items [Array<Orb::Models::CreditNoteCreateParams::LineItem>]
|
12
12
|
#
|
13
|
-
# @param
|
13
|
+
# @param reason [Symbol, Orb::Models::CreditNoteCreateParams::Reason] An optional reason for the credit note.
|
14
14
|
#
|
15
|
-
# @param
|
15
|
+
# @param memo [String, nil] An optional memo to attach to the credit note.
|
16
16
|
#
|
17
17
|
# @param request_options [Orb::RequestOptions, Hash{Symbol=>Object}, nil]
|
18
18
|
#
|
@@ -58,13 +58,6 @@ module Orb
|
|
58
58
|
# chronological order for a single customer, providing a complete audit trail of
|
59
59
|
# all adjustments and invoice applications.
|
60
60
|
#
|
61
|
-
# ## Eligibility
|
62
|
-
#
|
63
|
-
# The customer balance can only be applied to invoices or adjusted manually if
|
64
|
-
# invoices are not synced to a separate invoicing provider. If a payment gateway
|
65
|
-
# such as Stripe is used, the balance will be applied to the invoice before
|
66
|
-
# forwarding payment to the gateway.
|
67
|
-
#
|
68
61
|
# @overload list(customer_id, cursor: nil, limit: nil, operation_time_gt: nil, operation_time_gte: nil, operation_time_lt: nil, operation_time_lte: nil, request_options: {})
|
69
62
|
#
|
70
63
|
# @param customer_id [String]
|
@@ -60,7 +60,7 @@ module Orb
|
|
60
60
|
#
|
61
61
|
# @param shipping_address [Orb::Models::CustomerCreateParams::ShippingAddress, nil]
|
62
62
|
#
|
63
|
-
# @param tax_configuration [Orb::Models::CustomerCreateParams::TaxConfiguration::Avalara, Orb::Models::CustomerCreateParams::TaxConfiguration::Taxjar, nil]
|
63
|
+
# @param tax_configuration [Orb::Models::CustomerCreateParams::TaxConfiguration::Avalara, Orb::Models::CustomerCreateParams::TaxConfiguration::Taxjar, Orb::Models::CustomerCreateParams::TaxConfiguration::Sphere, nil]
|
64
64
|
#
|
65
65
|
# @param tax_id [Orb::Models::CustomerCreateParams::TaxID, nil] Tax IDs are commonly required to be displayed on customer invoices, which are ad
|
66
66
|
#
|
@@ -125,7 +125,7 @@ module Orb
|
|
125
125
|
#
|
126
126
|
# @param shipping_address [Orb::Models::CustomerUpdateParams::ShippingAddress, nil]
|
127
127
|
#
|
128
|
-
# @param tax_configuration [Orb::Models::CustomerUpdateParams::TaxConfiguration::Avalara, Orb::Models::CustomerUpdateParams::TaxConfiguration::Taxjar, nil]
|
128
|
+
# @param tax_configuration [Orb::Models::CustomerUpdateParams::TaxConfiguration::Avalara, Orb::Models::CustomerUpdateParams::TaxConfiguration::Taxjar, Orb::Models::CustomerUpdateParams::TaxConfiguration::Sphere, nil]
|
129
129
|
#
|
130
130
|
# @param tax_id [Orb::Models::CustomerUpdateParams::TaxID, nil] Tax IDs are commonly required to be displayed on customer invoices, which are ad
|
131
131
|
#
|
@@ -202,10 +202,7 @@ module Orb
|
|
202
202
|
# **Note**: This operation happens asynchronously and can be expected to take a
|
203
203
|
# few minutes to propagate to related resources. However, querying for the
|
204
204
|
# customer on subsequent GET requests while deletion is in process will reflect
|
205
|
-
# its deletion
|
206
|
-
# been fully processed, the customer will not be returned in the API.
|
207
|
-
#
|
208
|
-
# On successful processing, this returns an empty dictionary (`{}`) in the API.
|
205
|
+
# its deletion.
|
209
206
|
#
|
210
207
|
# @overload delete(customer_id, request_options: {})
|
211
208
|
#
|
@@ -364,7 +361,7 @@ module Orb
|
|
364
361
|
#
|
365
362
|
# @param shipping_address [Orb::Models::CustomerUpdateByExternalIDParams::ShippingAddress, nil]
|
366
363
|
#
|
367
|
-
# @param tax_configuration [Orb::Models::CustomerUpdateByExternalIDParams::TaxConfiguration::Avalara, Orb::Models::CustomerUpdateByExternalIDParams::TaxConfiguration::Taxjar, nil]
|
364
|
+
# @param tax_configuration [Orb::Models::CustomerUpdateByExternalIDParams::TaxConfiguration::Avalara, Orb::Models::CustomerUpdateByExternalIDParams::TaxConfiguration::Taxjar, Orb::Models::CustomerUpdateByExternalIDParams::TaxConfiguration::Sphere, nil]
|
368
365
|
#
|
369
366
|
# @param tax_id [Orb::Models::CustomerUpdateByExternalIDParams::TaxID, nil] Tax IDs are commonly required to be displayed on customer invoices, which are ad
|
370
367
|
#
|
@@ -16,7 +16,7 @@ module Orb
|
|
16
16
|
# For example, suppose we have a billable metric that measures the number of
|
17
17
|
# widgets used and we want to charge differently depending on the color of the
|
18
18
|
# widget. We can create a price group with a dimension "color" and two prices: one
|
19
|
-
# that charges
|
19
|
+
# that charges \$10 per red widget and one that charges \$20 per blue widget.
|
20
20
|
#
|
21
21
|
# @overload create(billable_metric_id:, dimensions:, name:, external_dimensional_price_group_id: nil, metadata: nil, request_options: {})
|
22
22
|
#
|
data/lib/orb/resources/items.rb
CHANGED
@@ -3,12 +3,17 @@
|
|
3
3
|
module Orb
|
4
4
|
module Resources
|
5
5
|
class Items
|
6
|
+
# Some parameter documentations has been truncated, see
|
7
|
+
# {Orb::Models::ItemCreateParams} for more details.
|
8
|
+
#
|
6
9
|
# This endpoint is used to create an [Item](/core-concepts#item).
|
7
10
|
#
|
8
|
-
# @overload create(name:, request_options: {})
|
11
|
+
# @overload create(name:, metadata: nil, request_options: {})
|
9
12
|
#
|
10
13
|
# @param name [String] The name of the item.
|
11
14
|
#
|
15
|
+
# @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed
|
16
|
+
#
|
12
17
|
# @param request_options [Orb::RequestOptions, Hash{Symbol=>Object}, nil]
|
13
18
|
#
|
14
19
|
# @return [Orb::Models::Item]
|
@@ -19,13 +24,21 @@ module Orb
|
|
19
24
|
@client.request(method: :post, path: "items", body: parsed, model: Orb::Item, options: options)
|
20
25
|
end
|
21
26
|
|
27
|
+
# Some parameter documentations has been truncated, see
|
28
|
+
# {Orb::Models::ItemUpdateParams} for more details.
|
29
|
+
#
|
22
30
|
# This endpoint can be used to update properties on the Item.
|
23
31
|
#
|
24
|
-
# @overload update(item_id, external_connections: nil, name: nil, request_options: {})
|
32
|
+
# @overload update(item_id, external_connections: nil, metadata: nil, name: nil, request_options: {})
|
25
33
|
#
|
26
34
|
# @param item_id [String]
|
35
|
+
#
|
27
36
|
# @param external_connections [Array<Orb::Models::ItemUpdateParams::ExternalConnection>, nil]
|
37
|
+
#
|
38
|
+
# @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed
|
39
|
+
#
|
28
40
|
# @param name [String, nil]
|
41
|
+
#
|
29
42
|
# @param request_options [Orb::RequestOptions, Hash{Symbol=>Object}, nil]
|
30
43
|
#
|
31
44
|
# @return [Orb::Models::Item]
|
@@ -71,6 +84,25 @@ module Orb
|
|
71
84
|
)
|
72
85
|
end
|
73
86
|
|
87
|
+
# Archive item
|
88
|
+
#
|
89
|
+
# @overload archive(item_id, request_options: {})
|
90
|
+
#
|
91
|
+
# @param item_id [String]
|
92
|
+
# @param request_options [Orb::RequestOptions, Hash{Symbol=>Object}, nil]
|
93
|
+
#
|
94
|
+
# @return [Orb::Models::Item]
|
95
|
+
#
|
96
|
+
# @see Orb::Models::ItemArchiveParams
|
97
|
+
def archive(item_id, params = {})
|
98
|
+
@client.request(
|
99
|
+
method: :post,
|
100
|
+
path: ["items/%1$s/archive", item_id],
|
101
|
+
model: Orb::Item,
|
102
|
+
options: params[:request_options]
|
103
|
+
)
|
104
|
+
end
|
105
|
+
|
74
106
|
# This endpoint returns an item identified by its item_id.
|
75
107
|
#
|
76
108
|
# @overload fetch(item_id, request_options: {})
|
@@ -0,0 +1,88 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Orb
|
4
|
+
module Resources
|
5
|
+
class Plans
|
6
|
+
class ExternalPlanID
|
7
|
+
class Versions
|
8
|
+
# This API endpoint is in beta and its interface may change. It is recommended for
|
9
|
+
# use only in test mode.
|
10
|
+
#
|
11
|
+
# This endpoint allows the creation of a new plan version for an existing plan.
|
12
|
+
#
|
13
|
+
# @overload create(external_plan_id, version:, add_adjustments: nil, add_prices: nil, remove_adjustments: nil, remove_prices: nil, replace_adjustments: nil, replace_prices: nil, set_as_default: nil, request_options: {})
|
14
|
+
#
|
15
|
+
# @param external_plan_id [String]
|
16
|
+
#
|
17
|
+
# @param version [Integer] New version number.
|
18
|
+
#
|
19
|
+
# @param add_adjustments [Array<Orb::Models::Plans::ExternalPlanID::VersionCreateParams::AddAdjustment>, nil] Additional adjustments to be added to the plan.
|
20
|
+
#
|
21
|
+
# @param add_prices [Array<Orb::Models::Plans::ExternalPlanID::VersionCreateParams::AddPrice>, nil] Additional prices to be added to the plan.
|
22
|
+
#
|
23
|
+
# @param remove_adjustments [Array<Orb::Models::Plans::ExternalPlanID::VersionCreateParams::RemoveAdjustment>, nil] Adjustments to be removed from the plan.
|
24
|
+
#
|
25
|
+
# @param remove_prices [Array<Orb::Models::Plans::ExternalPlanID::VersionCreateParams::RemovePrice>, nil] Prices to be removed from the plan.
|
26
|
+
#
|
27
|
+
# @param replace_adjustments [Array<Orb::Models::Plans::ExternalPlanID::VersionCreateParams::ReplaceAdjustment>, nil] Adjustments to be replaced with additional adjustments on the plan.
|
28
|
+
#
|
29
|
+
# @param replace_prices [Array<Orb::Models::Plans::ExternalPlanID::VersionCreateParams::ReplacePrice>, nil] Prices to be replaced with additional prices on the plan.
|
30
|
+
#
|
31
|
+
# @param set_as_default [Boolean, nil] Set this new plan version as the default
|
32
|
+
#
|
33
|
+
# @param request_options [Orb::RequestOptions, Hash{Symbol=>Object}, nil]
|
34
|
+
#
|
35
|
+
# @return [Orb::Models::Plans::ExternalPlanID::VersionCreateResponse]
|
36
|
+
#
|
37
|
+
# @see Orb::Models::Plans::ExternalPlanID::VersionCreateParams
|
38
|
+
def create(external_plan_id, params)
|
39
|
+
parsed, options = Orb::Plans::ExternalPlanID::VersionCreateParams.dump_request(params)
|
40
|
+
@client.request(
|
41
|
+
method: :post,
|
42
|
+
path: ["plans/external_plan_id/%1$s/versions", external_plan_id],
|
43
|
+
body: parsed,
|
44
|
+
model: Orb::Models::Plans::ExternalPlanID::VersionCreateResponse,
|
45
|
+
options: options
|
46
|
+
)
|
47
|
+
end
|
48
|
+
|
49
|
+
# This API endpoint is in beta and its interface may change. It is recommended for
|
50
|
+
# use only in test mode.
|
51
|
+
#
|
52
|
+
# This endpoint is used to fetch a plan version. It returns the phases, prices,
|
53
|
+
# and adjustments present on this version of the plan.
|
54
|
+
#
|
55
|
+
# @overload retrieve(version, external_plan_id:, request_options: {})
|
56
|
+
#
|
57
|
+
# @param version [String]
|
58
|
+
# @param external_plan_id [String]
|
59
|
+
# @param request_options [Orb::RequestOptions, Hash{Symbol=>Object}, nil]
|
60
|
+
#
|
61
|
+
# @return [Orb::Models::Plans::ExternalPlanID::VersionRetrieveResponse]
|
62
|
+
#
|
63
|
+
# @see Orb::Models::Plans::ExternalPlanID::VersionRetrieveParams
|
64
|
+
def retrieve(version, params)
|
65
|
+
parsed, options = Orb::Plans::ExternalPlanID::VersionRetrieveParams.dump_request(params)
|
66
|
+
external_plan_id =
|
67
|
+
parsed.delete(:external_plan_id) do
|
68
|
+
raise ArgumentError.new("missing required path argument #{_1}")
|
69
|
+
end
|
70
|
+
@client.request(
|
71
|
+
method: :get,
|
72
|
+
path: ["plans/external_plan_id/%1$s/versions/%2$s", external_plan_id, version],
|
73
|
+
model: Orb::Models::Plans::ExternalPlanID::VersionRetrieveResponse,
|
74
|
+
options: options
|
75
|
+
)
|
76
|
+
end
|
77
|
+
|
78
|
+
# @api private
|
79
|
+
#
|
80
|
+
# @param client [Orb::Client]
|
81
|
+
def initialize(client:)
|
82
|
+
@client = client
|
83
|
+
end
|
84
|
+
end
|
85
|
+
end
|
86
|
+
end
|
87
|
+
end
|
88
|
+
end
|
@@ -4,13 +4,16 @@ module Orb
|
|
4
4
|
module Resources
|
5
5
|
class Plans
|
6
6
|
class ExternalPlanID
|
7
|
+
# @return [Orb::Resources::Plans::ExternalPlanID::Versions]
|
8
|
+
attr_reader :versions
|
9
|
+
|
7
10
|
# Some parameter documentations has been truncated, see
|
8
11
|
# {Orb::Models::Plans::ExternalPlanIDUpdateParams} for more details.
|
9
12
|
#
|
10
13
|
# This endpoint can be used to update the `external_plan_id`, and `metadata` of an
|
11
14
|
# existing plan.
|
12
15
|
#
|
13
|
-
# Other fields on a
|
16
|
+
# Other fields on a plan are currently immutable.
|
14
17
|
#
|
15
18
|
# @overload update(other_external_plan_id, external_plan_id: nil, metadata: nil, request_options: {})
|
16
19
|
#
|
@@ -70,11 +73,39 @@ module Orb
|
|
70
73
|
)
|
71
74
|
end
|
72
75
|
|
76
|
+
# This API endpoint is in beta and its interface may change. It is recommended for
|
77
|
+
# use only in test mode.
|
78
|
+
#
|
79
|
+
# This endpoint allows setting the default version of a plan.
|
80
|
+
#
|
81
|
+
# @overload set_default_version(external_plan_id, version:, request_options: {})
|
82
|
+
#
|
83
|
+
# @param external_plan_id [String]
|
84
|
+
#
|
85
|
+
# @param version [Integer] Plan version to set as the default.
|
86
|
+
#
|
87
|
+
# @param request_options [Orb::RequestOptions, Hash{Symbol=>Object}, nil]
|
88
|
+
#
|
89
|
+
# @return [Orb::Models::Plan]
|
90
|
+
#
|
91
|
+
# @see Orb::Models::Plans::ExternalPlanIDSetDefaultVersionParams
|
92
|
+
def set_default_version(external_plan_id, params)
|
93
|
+
parsed, options = Orb::Plans::ExternalPlanIDSetDefaultVersionParams.dump_request(params)
|
94
|
+
@client.request(
|
95
|
+
method: :post,
|
96
|
+
path: ["plans/external_plan_id/%1$s/set_default_version", external_plan_id],
|
97
|
+
body: parsed,
|
98
|
+
model: Orb::Plan,
|
99
|
+
options: options
|
100
|
+
)
|
101
|
+
end
|
102
|
+
|
73
103
|
# @api private
|
74
104
|
#
|
75
105
|
# @param client [Orb::Client]
|
76
106
|
def initialize(client:)
|
77
107
|
@client = client
|
108
|
+
@versions = Orb::Resources::Plans::ExternalPlanID::Versions.new(client: client)
|
78
109
|
end
|
79
110
|
end
|
80
111
|
end
|
@@ -0,0 +1,86 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Orb
|
4
|
+
module Resources
|
5
|
+
class Plans
|
6
|
+
class Versions
|
7
|
+
# This API endpoint is in beta and its interface may change. It is recommended for
|
8
|
+
# use only in test mode.
|
9
|
+
#
|
10
|
+
# This endpoint allows the creation of a new plan version for an existing plan.
|
11
|
+
#
|
12
|
+
# @overload create(plan_id, version:, add_adjustments: nil, add_prices: nil, remove_adjustments: nil, remove_prices: nil, replace_adjustments: nil, replace_prices: nil, set_as_default: nil, request_options: {})
|
13
|
+
#
|
14
|
+
# @param plan_id [String]
|
15
|
+
#
|
16
|
+
# @param version [Integer] New version number.
|
17
|
+
#
|
18
|
+
# @param add_adjustments [Array<Orb::Models::Plans::VersionCreateParams::AddAdjustment>, nil] Additional adjustments to be added to the plan.
|
19
|
+
#
|
20
|
+
# @param add_prices [Array<Orb::Models::Plans::VersionCreateParams::AddPrice>, nil] Additional prices to be added to the plan.
|
21
|
+
#
|
22
|
+
# @param remove_adjustments [Array<Orb::Models::Plans::VersionCreateParams::RemoveAdjustment>, nil] Adjustments to be removed from the plan.
|
23
|
+
#
|
24
|
+
# @param remove_prices [Array<Orb::Models::Plans::VersionCreateParams::RemovePrice>, nil] Prices to be removed from the plan.
|
25
|
+
#
|
26
|
+
# @param replace_adjustments [Array<Orb::Models::Plans::VersionCreateParams::ReplaceAdjustment>, nil] Adjustments to be replaced with additional adjustments on the plan.
|
27
|
+
#
|
28
|
+
# @param replace_prices [Array<Orb::Models::Plans::VersionCreateParams::ReplacePrice>, nil] Prices to be replaced with additional prices on the plan.
|
29
|
+
#
|
30
|
+
# @param set_as_default [Boolean, nil] Set this new plan version as the default
|
31
|
+
#
|
32
|
+
# @param request_options [Orb::RequestOptions, Hash{Symbol=>Object}, nil]
|
33
|
+
#
|
34
|
+
# @return [Orb::Models::Plans::VersionCreateResponse]
|
35
|
+
#
|
36
|
+
# @see Orb::Models::Plans::VersionCreateParams
|
37
|
+
def create(plan_id, params)
|
38
|
+
parsed, options = Orb::Plans::VersionCreateParams.dump_request(params)
|
39
|
+
@client.request(
|
40
|
+
method: :post,
|
41
|
+
path: ["plans/%1$s/versions", plan_id],
|
42
|
+
body: parsed,
|
43
|
+
model: Orb::Models::Plans::VersionCreateResponse,
|
44
|
+
options: options
|
45
|
+
)
|
46
|
+
end
|
47
|
+
|
48
|
+
# This API endpoint is in beta and its interface may change. It is recommended for
|
49
|
+
# use only in test mode.
|
50
|
+
#
|
51
|
+
# This endpoint is used to fetch a plan version. It returns the phases, prices,
|
52
|
+
# and adjustments present on this version of the plan.
|
53
|
+
#
|
54
|
+
# @overload retrieve(version, plan_id:, request_options: {})
|
55
|
+
#
|
56
|
+
# @param version [String]
|
57
|
+
# @param plan_id [String]
|
58
|
+
# @param request_options [Orb::RequestOptions, Hash{Symbol=>Object}, nil]
|
59
|
+
#
|
60
|
+
# @return [Orb::Models::Plans::VersionRetrieveResponse]
|
61
|
+
#
|
62
|
+
# @see Orb::Models::Plans::VersionRetrieveParams
|
63
|
+
def retrieve(version, params)
|
64
|
+
parsed, options = Orb::Plans::VersionRetrieveParams.dump_request(params)
|
65
|
+
plan_id =
|
66
|
+
parsed.delete(:plan_id) do
|
67
|
+
raise ArgumentError.new("missing required path argument #{_1}")
|
68
|
+
end
|
69
|
+
@client.request(
|
70
|
+
method: :get,
|
71
|
+
path: ["plans/%1$s/versions/%2$s", plan_id, version],
|
72
|
+
model: Orb::Models::Plans::VersionRetrieveResponse,
|
73
|
+
options: options
|
74
|
+
)
|
75
|
+
end
|
76
|
+
|
77
|
+
# @api private
|
78
|
+
#
|
79
|
+
# @param client [Orb::Client]
|
80
|
+
def initialize(client:)
|
81
|
+
@client = client
|
82
|
+
end
|
83
|
+
end
|
84
|
+
end
|
85
|
+
end
|
86
|
+
end
|
data/lib/orb/resources/plans.rb
CHANGED
@@ -6,6 +6,9 @@ module Orb
|
|
6
6
|
# @return [Orb::Resources::Plans::ExternalPlanID]
|
7
7
|
attr_reader :external_plan_id
|
8
8
|
|
9
|
+
# @return [Orb::Resources::Plans::Versions]
|
10
|
+
attr_reader :versions
|
11
|
+
|
9
12
|
# Some parameter documentations has been truncated, see
|
10
13
|
# {Orb::Models::PlanCreateParams} for more details.
|
11
14
|
#
|
@@ -17,7 +20,7 @@ module Orb
|
|
17
20
|
#
|
18
21
|
# @param name [String]
|
19
22
|
#
|
20
|
-
# @param prices [Array<Orb::Models::PlanCreateParams::Price::Unit, Orb::Models::PlanCreateParams::Price::Package, Orb::Models::PlanCreateParams::Price::Matrix, Orb::Models::PlanCreateParams::Price::Tiered, Orb::Models::PlanCreateParams::Price::TieredBps, Orb::Models::PlanCreateParams::Price::Bps, Orb::Models::PlanCreateParams::Price::BulkBps, Orb::Models::PlanCreateParams::Price::Bulk, Orb::Models::PlanCreateParams::Price::ThresholdTotalAmount, Orb::Models::PlanCreateParams::Price::TieredPackage, Orb::Models::PlanCreateParams::Price::TieredWithMinimum, Orb::Models::PlanCreateParams::Price::UnitWithPercent, Orb::Models::PlanCreateParams::Price::PackageWithAllocation, Orb::Models::PlanCreateParams::Price::TieredWithProration, Orb::Models::PlanCreateParams::Price::UnitWithProration, Orb::Models::PlanCreateParams::Price::GroupedAllocation, Orb::Models::PlanCreateParams::Price::GroupedWithProratedMinimum, Orb::Models::PlanCreateParams::Price::GroupedWithMeteredMinimum, Orb::Models::PlanCreateParams::Price::MatrixWithDisplayName, Orb::Models::PlanCreateParams::Price::BulkWithProration, Orb::Models::PlanCreateParams::Price::GroupedTieredPackage, Orb::Models::PlanCreateParams::Price::MaxGroupTieredPackage, Orb::Models::PlanCreateParams::Price::ScalableMatrixWithUnitPricing, Orb::Models::PlanCreateParams::Price::ScalableMatrixWithTieredPricing, Orb::Models::PlanCreateParams::Price::CumulativeGroupedBulk>] Prices for this plan. If the plan has phases, this includes prices across all ph
|
23
|
+
# @param prices [Array<Orb::Models::PlanCreateParams::Price::Unit, Orb::Models::PlanCreateParams::Price::Package, Orb::Models::PlanCreateParams::Price::Matrix, Orb::Models::PlanCreateParams::Price::Tiered, Orb::Models::PlanCreateParams::Price::TieredBps, Orb::Models::PlanCreateParams::Price::Bps, Orb::Models::PlanCreateParams::Price::BulkBps, Orb::Models::PlanCreateParams::Price::Bulk, Orb::Models::PlanCreateParams::Price::ThresholdTotalAmount, Orb::Models::PlanCreateParams::Price::TieredPackage, Orb::Models::PlanCreateParams::Price::TieredWithMinimum, Orb::Models::PlanCreateParams::Price::UnitWithPercent, Orb::Models::PlanCreateParams::Price::PackageWithAllocation, Orb::Models::PlanCreateParams::Price::TieredWithProration, Orb::Models::PlanCreateParams::Price::UnitWithProration, Orb::Models::PlanCreateParams::Price::GroupedAllocation, Orb::Models::PlanCreateParams::Price::GroupedWithProratedMinimum, Orb::Models::PlanCreateParams::Price::GroupedWithMeteredMinimum, Orb::Models::PlanCreateParams::Price::MatrixWithDisplayName, Orb::Models::PlanCreateParams::Price::BulkWithProration, Orb::Models::PlanCreateParams::Price::GroupedTieredPackage, Orb::Models::PlanCreateParams::Price::MaxGroupTieredPackage, Orb::Models::PlanCreateParams::Price::ScalableMatrixWithUnitPricing, Orb::Models::PlanCreateParams::Price::ScalableMatrixWithTieredPricing, Orb::Models::PlanCreateParams::Price::CumulativeGroupedBulk, Orb::Models::PlanCreateParams::Price::TieredPackageWithMinimum, Orb::Models::PlanCreateParams::Price::MatrixWithAllocation, Orb::Models::PlanCreateParams::Price::GroupedTiered>] Prices for this plan. If the plan has phases, this includes prices across all ph
|
21
24
|
#
|
22
25
|
# @param default_invoice_memo [String, nil] Free-form text which is available on the invoice PDF and the Orb invoice portal.
|
23
26
|
#
|
@@ -45,7 +48,7 @@ module Orb
|
|
45
48
|
# This endpoint can be used to update the `external_plan_id`, and `metadata` of an
|
46
49
|
# existing plan.
|
47
50
|
#
|
48
|
-
# Other fields on a
|
51
|
+
# Other fields on a plan are currently immutable.
|
49
52
|
#
|
50
53
|
# @overload update(plan_id, external_plan_id: nil, metadata: nil, request_options: {})
|
51
54
|
#
|
@@ -153,12 +156,40 @@ module Orb
|
|
153
156
|
)
|
154
157
|
end
|
155
158
|
|
159
|
+
# This API endpoint is in beta and its interface may change. It is recommended for
|
160
|
+
# use only in test mode.
|
161
|
+
#
|
162
|
+
# This endpoint allows setting the default version of a plan.
|
163
|
+
#
|
164
|
+
# @overload set_default_version(plan_id, version:, request_options: {})
|
165
|
+
#
|
166
|
+
# @param plan_id [String]
|
167
|
+
#
|
168
|
+
# @param version [Integer] Plan version to set as the default.
|
169
|
+
#
|
170
|
+
# @param request_options [Orb::RequestOptions, Hash{Symbol=>Object}, nil]
|
171
|
+
#
|
172
|
+
# @return [Orb::Models::Plan]
|
173
|
+
#
|
174
|
+
# @see Orb::Models::PlanSetDefaultVersionParams
|
175
|
+
def set_default_version(plan_id, params)
|
176
|
+
parsed, options = Orb::PlanSetDefaultVersionParams.dump_request(params)
|
177
|
+
@client.request(
|
178
|
+
method: :post,
|
179
|
+
path: ["plans/%1$s/set_default_version", plan_id],
|
180
|
+
body: parsed,
|
181
|
+
model: Orb::Plan,
|
182
|
+
options: options
|
183
|
+
)
|
184
|
+
end
|
185
|
+
|
156
186
|
# @api private
|
157
187
|
#
|
158
188
|
# @param client [Orb::Client]
|
159
189
|
def initialize(client:)
|
160
190
|
@client = client
|
161
191
|
@external_plan_id = Orb::Resources::Plans::ExternalPlanID.new(client: client)
|
192
|
+
@versions = Orb::Resources::Plans::Versions.new(client: client)
|
162
193
|
end
|
163
194
|
end
|
164
195
|
end
|