orb-billing 0.5.5 → 0.7.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/client.rb +4 -0
- data/lib/orb/internal/type/base_model.rb +2 -2
- data/lib/orb/internal/type/union.rb +6 -6
- data/lib/orb/models/alert.rb +33 -1
- data/lib/orb/models/amount_discount.rb +10 -10
- data/lib/orb/models/beta/external_plan_id_create_plan_version_params.rb +17940 -0
- data/lib/orb/models/beta/external_plan_id_fetch_plan_version_params.rb +22 -0
- data/lib/orb/models/beta/external_plan_id_set_default_plan_version_params.rb +24 -0
- data/lib/orb/models/beta_create_plan_version_params.rb +17758 -0
- data/lib/orb/models/beta_fetch_plan_version_params.rb +20 -0
- data/lib/orb/models/beta_set_default_plan_version_params.rb +22 -0
- 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_version.rb +735 -0
- data/lib/orb/models/plan_version_phase.rb +70 -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_multiple_params.rb +8620 -0
- data/lib/orb/models/price_evaluate_multiple_response.rb +51 -0
- 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 +16 -0
- data/lib/orb/resources/beta/external_plan_id.rb +113 -0
- data/lib/orb/resources/beta.rb +115 -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.rb +1 -1
- data/lib/orb/resources/plans.rb +2 -2
- data/lib/orb/resources/prices.rb +69 -2
- data/lib/orb/resources/subscriptions.rb +5 -1
- data/lib/orb/version.rb +1 -1
- data/lib/orb.rb +13 -0
- data/rbi/orb/client.rbi +3 -0
- data/rbi/orb/models/alert.rbi +50 -3
- data/rbi/orb/models/amount_discount.rbi +8 -8
- data/rbi/orb/models/beta/external_plan_id_create_plan_version_params.rbi +32652 -0
- data/rbi/orb/models/beta/external_plan_id_fetch_plan_version_params.rbi +40 -0
- data/rbi/orb/models/beta/external_plan_id_set_default_plan_version_params.rbi +45 -0
- data/rbi/orb/models/beta_create_plan_version_params.rbi +32595 -0
- data/rbi/orb/models/beta_fetch_plan_version_params.rbi +35 -0
- data/rbi/orb/models/beta_set_default_plan_version_params.rbi +40 -0
- 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_version.rbi +1367 -0
- data/rbi/orb/models/plan_version_phase.rbi +99 -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_multiple_params.rbi +15764 -0
- data/rbi/orb/models/price_evaluate_multiple_response.rbi +96 -0
- 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 +16 -0
- data/rbi/orb/resources/beta/external_plan_id.rbi +118 -0
- data/rbi/orb/resources/beta.rbi +111 -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.rbi +1 -1
- data/rbi/orb/resources/plans.rbi +5 -2
- data/rbi/orb/resources/prices.rbi +73 -1
- data/rbi/orb/resources/subscriptions.rbi +9 -1
- data/sig/orb/client.rbs +2 -0
- data/sig/orb/models/alert.rbs +20 -3
- data/sig/orb/models/amount_discount.rbs +5 -5
- data/sig/orb/models/beta/external_plan_id_create_plan_version_params.rbs +12898 -0
- data/sig/orb/models/beta/external_plan_id_fetch_plan_version_params.rbs +25 -0
- data/sig/orb/models/beta/external_plan_id_set_default_plan_version_params.rbs +25 -0
- data/sig/orb/models/beta_create_plan_version_params.rbs +12877 -0
- data/sig/orb/models/beta_fetch_plan_version_params.rbs +20 -0
- data/sig/orb/models/beta_set_default_plan_version_params.rbs +20 -0
- 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_version.rbs +583 -0
- data/sig/orb/models/plan_version_phase.rbs +60 -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_multiple_params.rbs +6230 -0
- data/sig/orb/models/price_evaluate_multiple_response.rbs +50 -0
- 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 +16 -0
- data/sig/orb/resources/beta/external_plan_id.rbs +34 -0
- data/sig/orb/resources/beta.rbs +34 -0
- data/sig/orb/resources/credit_notes.rbs +1 -1
- data/sig/orb/resources/items.rbs +7 -0
- data/sig/orb/resources/prices.rbs +11 -0
- data/sig/orb/resources/subscriptions.rbs +2 -0
- metadata +40 -1
@@ -0,0 +1,583 @@
|
|
1
|
+
module Orb
|
2
|
+
module Models
|
3
|
+
type plan_version =
|
4
|
+
{
|
5
|
+
adjustments: ::Array[Orb::Models::PlanVersion::adjustment],
|
6
|
+
created_at: Time,
|
7
|
+
plan_phases: ::Array[Orb::PlanVersionPhase]?,
|
8
|
+
prices: ::Array[Orb::Models::price],
|
9
|
+
version: Integer
|
10
|
+
}
|
11
|
+
|
12
|
+
class PlanVersion < Orb::Internal::Type::BaseModel
|
13
|
+
attr_accessor adjustments: ::Array[Orb::Models::PlanVersion::adjustment]
|
14
|
+
|
15
|
+
attr_accessor created_at: Time
|
16
|
+
|
17
|
+
attr_accessor plan_phases: ::Array[Orb::PlanVersionPhase]?
|
18
|
+
|
19
|
+
attr_accessor prices: ::Array[Orb::Models::price]
|
20
|
+
|
21
|
+
attr_accessor version: Integer
|
22
|
+
|
23
|
+
def initialize: (
|
24
|
+
adjustments: ::Array[Orb::Models::PlanVersion::adjustment],
|
25
|
+
created_at: Time,
|
26
|
+
plan_phases: ::Array[Orb::PlanVersionPhase]?,
|
27
|
+
prices: ::Array[Orb::Models::price],
|
28
|
+
version: Integer
|
29
|
+
) -> void
|
30
|
+
|
31
|
+
def to_hash: -> {
|
32
|
+
adjustments: ::Array[Orb::Models::PlanVersion::adjustment],
|
33
|
+
created_at: Time,
|
34
|
+
plan_phases: ::Array[Orb::PlanVersionPhase]?,
|
35
|
+
prices: ::Array[Orb::Models::price],
|
36
|
+
version: Integer
|
37
|
+
}
|
38
|
+
|
39
|
+
type adjustment =
|
40
|
+
Orb::PlanVersion::Adjustment::UsageDiscount
|
41
|
+
| Orb::PlanVersion::Adjustment::AmountDiscount
|
42
|
+
| Orb::PlanVersion::Adjustment::PercentageDiscount
|
43
|
+
| Orb::PlanVersion::Adjustment::Minimum
|
44
|
+
| Orb::PlanVersion::Adjustment::Maximum
|
45
|
+
|
46
|
+
module Adjustment
|
47
|
+
extend Orb::Internal::Type::Union
|
48
|
+
|
49
|
+
type usage_discount =
|
50
|
+
{
|
51
|
+
id: String,
|
52
|
+
adjustment_type: :usage_discount,
|
53
|
+
applies_to_price_ids: ::Array[String],
|
54
|
+
filters: ::Array[Orb::PlanVersion::Adjustment::UsageDiscount::Filter],
|
55
|
+
is_invoice_level: bool,
|
56
|
+
plan_phase_order: Integer?,
|
57
|
+
reason: String?,
|
58
|
+
usage_discount: Float
|
59
|
+
}
|
60
|
+
|
61
|
+
class UsageDiscount < Orb::Internal::Type::BaseModel
|
62
|
+
attr_accessor id: String
|
63
|
+
|
64
|
+
attr_accessor adjustment_type: :usage_discount
|
65
|
+
|
66
|
+
attr_accessor applies_to_price_ids: ::Array[String]
|
67
|
+
|
68
|
+
attr_accessor filters: ::Array[Orb::PlanVersion::Adjustment::UsageDiscount::Filter]
|
69
|
+
|
70
|
+
attr_accessor is_invoice_level: bool
|
71
|
+
|
72
|
+
attr_accessor plan_phase_order: Integer?
|
73
|
+
|
74
|
+
attr_accessor reason: String?
|
75
|
+
|
76
|
+
attr_accessor usage_discount: Float
|
77
|
+
|
78
|
+
def initialize: (
|
79
|
+
id: String,
|
80
|
+
applies_to_price_ids: ::Array[String],
|
81
|
+
filters: ::Array[Orb::PlanVersion::Adjustment::UsageDiscount::Filter],
|
82
|
+
is_invoice_level: bool,
|
83
|
+
plan_phase_order: Integer?,
|
84
|
+
reason: String?,
|
85
|
+
usage_discount: Float,
|
86
|
+
?adjustment_type: :usage_discount
|
87
|
+
) -> void
|
88
|
+
|
89
|
+
def to_hash: -> {
|
90
|
+
id: String,
|
91
|
+
adjustment_type: :usage_discount,
|
92
|
+
applies_to_price_ids: ::Array[String],
|
93
|
+
filters: ::Array[Orb::PlanVersion::Adjustment::UsageDiscount::Filter],
|
94
|
+
is_invoice_level: bool,
|
95
|
+
plan_phase_order: Integer?,
|
96
|
+
reason: String?,
|
97
|
+
usage_discount: Float
|
98
|
+
}
|
99
|
+
|
100
|
+
type filter =
|
101
|
+
{
|
102
|
+
field: Orb::Models::PlanVersion::Adjustment::UsageDiscount::Filter::field,
|
103
|
+
operator: Orb::Models::PlanVersion::Adjustment::UsageDiscount::Filter::operator,
|
104
|
+
values: ::Array[String]
|
105
|
+
}
|
106
|
+
|
107
|
+
class Filter < Orb::Internal::Type::BaseModel
|
108
|
+
attr_accessor field: Orb::Models::PlanVersion::Adjustment::UsageDiscount::Filter::field
|
109
|
+
|
110
|
+
attr_accessor operator: Orb::Models::PlanVersion::Adjustment::UsageDiscount::Filter::operator
|
111
|
+
|
112
|
+
attr_accessor values: ::Array[String]
|
113
|
+
|
114
|
+
def initialize: (
|
115
|
+
field: Orb::Models::PlanVersion::Adjustment::UsageDiscount::Filter::field,
|
116
|
+
operator: Orb::Models::PlanVersion::Adjustment::UsageDiscount::Filter::operator,
|
117
|
+
values: ::Array[String]
|
118
|
+
) -> void
|
119
|
+
|
120
|
+
def to_hash: -> {
|
121
|
+
field: Orb::Models::PlanVersion::Adjustment::UsageDiscount::Filter::field,
|
122
|
+
operator: Orb::Models::PlanVersion::Adjustment::UsageDiscount::Filter::operator,
|
123
|
+
values: ::Array[String]
|
124
|
+
}
|
125
|
+
|
126
|
+
type field =
|
127
|
+
:price_id | :item_id | :price_type | :currency | :pricing_unit_id
|
128
|
+
|
129
|
+
module Field
|
130
|
+
extend Orb::Internal::Type::Enum
|
131
|
+
|
132
|
+
PRICE_ID: :price_id
|
133
|
+
ITEM_ID: :item_id
|
134
|
+
PRICE_TYPE: :price_type
|
135
|
+
CURRENCY: :currency
|
136
|
+
PRICING_UNIT_ID: :pricing_unit_id
|
137
|
+
|
138
|
+
def self?.values: -> ::Array[Orb::Models::PlanVersion::Adjustment::UsageDiscount::Filter::field]
|
139
|
+
end
|
140
|
+
|
141
|
+
type operator = :includes | :excludes
|
142
|
+
|
143
|
+
module Operator
|
144
|
+
extend Orb::Internal::Type::Enum
|
145
|
+
|
146
|
+
INCLUDES: :includes
|
147
|
+
EXCLUDES: :excludes
|
148
|
+
|
149
|
+
def self?.values: -> ::Array[Orb::Models::PlanVersion::Adjustment::UsageDiscount::Filter::operator]
|
150
|
+
end
|
151
|
+
end
|
152
|
+
end
|
153
|
+
|
154
|
+
type amount_discount =
|
155
|
+
{
|
156
|
+
id: String,
|
157
|
+
adjustment_type: :amount_discount,
|
158
|
+
amount_discount: String,
|
159
|
+
applies_to_price_ids: ::Array[String],
|
160
|
+
filters: ::Array[Orb::PlanVersion::Adjustment::AmountDiscount::Filter],
|
161
|
+
is_invoice_level: bool,
|
162
|
+
plan_phase_order: Integer?,
|
163
|
+
reason: String?
|
164
|
+
}
|
165
|
+
|
166
|
+
class AmountDiscount < Orb::Internal::Type::BaseModel
|
167
|
+
attr_accessor id: String
|
168
|
+
|
169
|
+
attr_accessor adjustment_type: :amount_discount
|
170
|
+
|
171
|
+
attr_accessor amount_discount: String
|
172
|
+
|
173
|
+
attr_accessor applies_to_price_ids: ::Array[String]
|
174
|
+
|
175
|
+
attr_accessor filters: ::Array[Orb::PlanVersion::Adjustment::AmountDiscount::Filter]
|
176
|
+
|
177
|
+
attr_accessor is_invoice_level: bool
|
178
|
+
|
179
|
+
attr_accessor plan_phase_order: Integer?
|
180
|
+
|
181
|
+
attr_accessor reason: String?
|
182
|
+
|
183
|
+
def initialize: (
|
184
|
+
id: String,
|
185
|
+
amount_discount: String,
|
186
|
+
applies_to_price_ids: ::Array[String],
|
187
|
+
filters: ::Array[Orb::PlanVersion::Adjustment::AmountDiscount::Filter],
|
188
|
+
is_invoice_level: bool,
|
189
|
+
plan_phase_order: Integer?,
|
190
|
+
reason: String?,
|
191
|
+
?adjustment_type: :amount_discount
|
192
|
+
) -> void
|
193
|
+
|
194
|
+
def to_hash: -> {
|
195
|
+
id: String,
|
196
|
+
adjustment_type: :amount_discount,
|
197
|
+
amount_discount: String,
|
198
|
+
applies_to_price_ids: ::Array[String],
|
199
|
+
filters: ::Array[Orb::PlanVersion::Adjustment::AmountDiscount::Filter],
|
200
|
+
is_invoice_level: bool,
|
201
|
+
plan_phase_order: Integer?,
|
202
|
+
reason: String?
|
203
|
+
}
|
204
|
+
|
205
|
+
type filter =
|
206
|
+
{
|
207
|
+
field: Orb::Models::PlanVersion::Adjustment::AmountDiscount::Filter::field,
|
208
|
+
operator: Orb::Models::PlanVersion::Adjustment::AmountDiscount::Filter::operator,
|
209
|
+
values: ::Array[String]
|
210
|
+
}
|
211
|
+
|
212
|
+
class Filter < Orb::Internal::Type::BaseModel
|
213
|
+
attr_accessor field: Orb::Models::PlanVersion::Adjustment::AmountDiscount::Filter::field
|
214
|
+
|
215
|
+
attr_accessor operator: Orb::Models::PlanVersion::Adjustment::AmountDiscount::Filter::operator
|
216
|
+
|
217
|
+
attr_accessor values: ::Array[String]
|
218
|
+
|
219
|
+
def initialize: (
|
220
|
+
field: Orb::Models::PlanVersion::Adjustment::AmountDiscount::Filter::field,
|
221
|
+
operator: Orb::Models::PlanVersion::Adjustment::AmountDiscount::Filter::operator,
|
222
|
+
values: ::Array[String]
|
223
|
+
) -> void
|
224
|
+
|
225
|
+
def to_hash: -> {
|
226
|
+
field: Orb::Models::PlanVersion::Adjustment::AmountDiscount::Filter::field,
|
227
|
+
operator: Orb::Models::PlanVersion::Adjustment::AmountDiscount::Filter::operator,
|
228
|
+
values: ::Array[String]
|
229
|
+
}
|
230
|
+
|
231
|
+
type field =
|
232
|
+
:price_id | :item_id | :price_type | :currency | :pricing_unit_id
|
233
|
+
|
234
|
+
module Field
|
235
|
+
extend Orb::Internal::Type::Enum
|
236
|
+
|
237
|
+
PRICE_ID: :price_id
|
238
|
+
ITEM_ID: :item_id
|
239
|
+
PRICE_TYPE: :price_type
|
240
|
+
CURRENCY: :currency
|
241
|
+
PRICING_UNIT_ID: :pricing_unit_id
|
242
|
+
|
243
|
+
def self?.values: -> ::Array[Orb::Models::PlanVersion::Adjustment::AmountDiscount::Filter::field]
|
244
|
+
end
|
245
|
+
|
246
|
+
type operator = :includes | :excludes
|
247
|
+
|
248
|
+
module Operator
|
249
|
+
extend Orb::Internal::Type::Enum
|
250
|
+
|
251
|
+
INCLUDES: :includes
|
252
|
+
EXCLUDES: :excludes
|
253
|
+
|
254
|
+
def self?.values: -> ::Array[Orb::Models::PlanVersion::Adjustment::AmountDiscount::Filter::operator]
|
255
|
+
end
|
256
|
+
end
|
257
|
+
end
|
258
|
+
|
259
|
+
type percentage_discount =
|
260
|
+
{
|
261
|
+
id: String,
|
262
|
+
adjustment_type: :percentage_discount,
|
263
|
+
applies_to_price_ids: ::Array[String],
|
264
|
+
filters: ::Array[Orb::PlanVersion::Adjustment::PercentageDiscount::Filter],
|
265
|
+
is_invoice_level: bool,
|
266
|
+
percentage_discount: Float,
|
267
|
+
plan_phase_order: Integer?,
|
268
|
+
reason: String?
|
269
|
+
}
|
270
|
+
|
271
|
+
class PercentageDiscount < Orb::Internal::Type::BaseModel
|
272
|
+
attr_accessor id: String
|
273
|
+
|
274
|
+
attr_accessor adjustment_type: :percentage_discount
|
275
|
+
|
276
|
+
attr_accessor applies_to_price_ids: ::Array[String]
|
277
|
+
|
278
|
+
attr_accessor filters: ::Array[Orb::PlanVersion::Adjustment::PercentageDiscount::Filter]
|
279
|
+
|
280
|
+
attr_accessor is_invoice_level: bool
|
281
|
+
|
282
|
+
attr_accessor percentage_discount: Float
|
283
|
+
|
284
|
+
attr_accessor plan_phase_order: Integer?
|
285
|
+
|
286
|
+
attr_accessor reason: String?
|
287
|
+
|
288
|
+
def initialize: (
|
289
|
+
id: String,
|
290
|
+
applies_to_price_ids: ::Array[String],
|
291
|
+
filters: ::Array[Orb::PlanVersion::Adjustment::PercentageDiscount::Filter],
|
292
|
+
is_invoice_level: bool,
|
293
|
+
percentage_discount: Float,
|
294
|
+
plan_phase_order: Integer?,
|
295
|
+
reason: String?,
|
296
|
+
?adjustment_type: :percentage_discount
|
297
|
+
) -> void
|
298
|
+
|
299
|
+
def to_hash: -> {
|
300
|
+
id: String,
|
301
|
+
adjustment_type: :percentage_discount,
|
302
|
+
applies_to_price_ids: ::Array[String],
|
303
|
+
filters: ::Array[Orb::PlanVersion::Adjustment::PercentageDiscount::Filter],
|
304
|
+
is_invoice_level: bool,
|
305
|
+
percentage_discount: Float,
|
306
|
+
plan_phase_order: Integer?,
|
307
|
+
reason: String?
|
308
|
+
}
|
309
|
+
|
310
|
+
type filter =
|
311
|
+
{
|
312
|
+
field: Orb::Models::PlanVersion::Adjustment::PercentageDiscount::Filter::field,
|
313
|
+
operator: Orb::Models::PlanVersion::Adjustment::PercentageDiscount::Filter::operator,
|
314
|
+
values: ::Array[String]
|
315
|
+
}
|
316
|
+
|
317
|
+
class Filter < Orb::Internal::Type::BaseModel
|
318
|
+
attr_accessor field: Orb::Models::PlanVersion::Adjustment::PercentageDiscount::Filter::field
|
319
|
+
|
320
|
+
attr_accessor operator: Orb::Models::PlanVersion::Adjustment::PercentageDiscount::Filter::operator
|
321
|
+
|
322
|
+
attr_accessor values: ::Array[String]
|
323
|
+
|
324
|
+
def initialize: (
|
325
|
+
field: Orb::Models::PlanVersion::Adjustment::PercentageDiscount::Filter::field,
|
326
|
+
operator: Orb::Models::PlanVersion::Adjustment::PercentageDiscount::Filter::operator,
|
327
|
+
values: ::Array[String]
|
328
|
+
) -> void
|
329
|
+
|
330
|
+
def to_hash: -> {
|
331
|
+
field: Orb::Models::PlanVersion::Adjustment::PercentageDiscount::Filter::field,
|
332
|
+
operator: Orb::Models::PlanVersion::Adjustment::PercentageDiscount::Filter::operator,
|
333
|
+
values: ::Array[String]
|
334
|
+
}
|
335
|
+
|
336
|
+
type field =
|
337
|
+
:price_id | :item_id | :price_type | :currency | :pricing_unit_id
|
338
|
+
|
339
|
+
module Field
|
340
|
+
extend Orb::Internal::Type::Enum
|
341
|
+
|
342
|
+
PRICE_ID: :price_id
|
343
|
+
ITEM_ID: :item_id
|
344
|
+
PRICE_TYPE: :price_type
|
345
|
+
CURRENCY: :currency
|
346
|
+
PRICING_UNIT_ID: :pricing_unit_id
|
347
|
+
|
348
|
+
def self?.values: -> ::Array[Orb::Models::PlanVersion::Adjustment::PercentageDiscount::Filter::field]
|
349
|
+
end
|
350
|
+
|
351
|
+
type operator = :includes | :excludes
|
352
|
+
|
353
|
+
module Operator
|
354
|
+
extend Orb::Internal::Type::Enum
|
355
|
+
|
356
|
+
INCLUDES: :includes
|
357
|
+
EXCLUDES: :excludes
|
358
|
+
|
359
|
+
def self?.values: -> ::Array[Orb::Models::PlanVersion::Adjustment::PercentageDiscount::Filter::operator]
|
360
|
+
end
|
361
|
+
end
|
362
|
+
end
|
363
|
+
|
364
|
+
type minimum =
|
365
|
+
{
|
366
|
+
id: String,
|
367
|
+
adjustment_type: :minimum,
|
368
|
+
applies_to_price_ids: ::Array[String],
|
369
|
+
filters: ::Array[Orb::PlanVersion::Adjustment::Minimum::Filter],
|
370
|
+
is_invoice_level: bool,
|
371
|
+
item_id: String,
|
372
|
+
minimum_amount: String,
|
373
|
+
plan_phase_order: Integer?,
|
374
|
+
reason: String?
|
375
|
+
}
|
376
|
+
|
377
|
+
class Minimum < Orb::Internal::Type::BaseModel
|
378
|
+
attr_accessor id: String
|
379
|
+
|
380
|
+
attr_accessor adjustment_type: :minimum
|
381
|
+
|
382
|
+
attr_accessor applies_to_price_ids: ::Array[String]
|
383
|
+
|
384
|
+
attr_accessor filters: ::Array[Orb::PlanVersion::Adjustment::Minimum::Filter]
|
385
|
+
|
386
|
+
attr_accessor is_invoice_level: bool
|
387
|
+
|
388
|
+
attr_accessor item_id: String
|
389
|
+
|
390
|
+
attr_accessor minimum_amount: String
|
391
|
+
|
392
|
+
attr_accessor plan_phase_order: Integer?
|
393
|
+
|
394
|
+
attr_accessor reason: String?
|
395
|
+
|
396
|
+
def initialize: (
|
397
|
+
id: String,
|
398
|
+
applies_to_price_ids: ::Array[String],
|
399
|
+
filters: ::Array[Orb::PlanVersion::Adjustment::Minimum::Filter],
|
400
|
+
is_invoice_level: bool,
|
401
|
+
item_id: String,
|
402
|
+
minimum_amount: String,
|
403
|
+
plan_phase_order: Integer?,
|
404
|
+
reason: String?,
|
405
|
+
?adjustment_type: :minimum
|
406
|
+
) -> void
|
407
|
+
|
408
|
+
def to_hash: -> {
|
409
|
+
id: String,
|
410
|
+
adjustment_type: :minimum,
|
411
|
+
applies_to_price_ids: ::Array[String],
|
412
|
+
filters: ::Array[Orb::PlanVersion::Adjustment::Minimum::Filter],
|
413
|
+
is_invoice_level: bool,
|
414
|
+
item_id: String,
|
415
|
+
minimum_amount: String,
|
416
|
+
plan_phase_order: Integer?,
|
417
|
+
reason: String?
|
418
|
+
}
|
419
|
+
|
420
|
+
type filter =
|
421
|
+
{
|
422
|
+
field: Orb::Models::PlanVersion::Adjustment::Minimum::Filter::field,
|
423
|
+
operator: Orb::Models::PlanVersion::Adjustment::Minimum::Filter::operator,
|
424
|
+
values: ::Array[String]
|
425
|
+
}
|
426
|
+
|
427
|
+
class Filter < Orb::Internal::Type::BaseModel
|
428
|
+
attr_accessor field: Orb::Models::PlanVersion::Adjustment::Minimum::Filter::field
|
429
|
+
|
430
|
+
attr_accessor operator: Orb::Models::PlanVersion::Adjustment::Minimum::Filter::operator
|
431
|
+
|
432
|
+
attr_accessor values: ::Array[String]
|
433
|
+
|
434
|
+
def initialize: (
|
435
|
+
field: Orb::Models::PlanVersion::Adjustment::Minimum::Filter::field,
|
436
|
+
operator: Orb::Models::PlanVersion::Adjustment::Minimum::Filter::operator,
|
437
|
+
values: ::Array[String]
|
438
|
+
) -> void
|
439
|
+
|
440
|
+
def to_hash: -> {
|
441
|
+
field: Orb::Models::PlanVersion::Adjustment::Minimum::Filter::field,
|
442
|
+
operator: Orb::Models::PlanVersion::Adjustment::Minimum::Filter::operator,
|
443
|
+
values: ::Array[String]
|
444
|
+
}
|
445
|
+
|
446
|
+
type field =
|
447
|
+
:price_id | :item_id | :price_type | :currency | :pricing_unit_id
|
448
|
+
|
449
|
+
module Field
|
450
|
+
extend Orb::Internal::Type::Enum
|
451
|
+
|
452
|
+
PRICE_ID: :price_id
|
453
|
+
ITEM_ID: :item_id
|
454
|
+
PRICE_TYPE: :price_type
|
455
|
+
CURRENCY: :currency
|
456
|
+
PRICING_UNIT_ID: :pricing_unit_id
|
457
|
+
|
458
|
+
def self?.values: -> ::Array[Orb::Models::PlanVersion::Adjustment::Minimum::Filter::field]
|
459
|
+
end
|
460
|
+
|
461
|
+
type operator = :includes | :excludes
|
462
|
+
|
463
|
+
module Operator
|
464
|
+
extend Orb::Internal::Type::Enum
|
465
|
+
|
466
|
+
INCLUDES: :includes
|
467
|
+
EXCLUDES: :excludes
|
468
|
+
|
469
|
+
def self?.values: -> ::Array[Orb::Models::PlanVersion::Adjustment::Minimum::Filter::operator]
|
470
|
+
end
|
471
|
+
end
|
472
|
+
end
|
473
|
+
|
474
|
+
type maximum =
|
475
|
+
{
|
476
|
+
id: String,
|
477
|
+
adjustment_type: :maximum,
|
478
|
+
applies_to_price_ids: ::Array[String],
|
479
|
+
filters: ::Array[Orb::PlanVersion::Adjustment::Maximum::Filter],
|
480
|
+
is_invoice_level: bool,
|
481
|
+
maximum_amount: String,
|
482
|
+
plan_phase_order: Integer?,
|
483
|
+
reason: String?
|
484
|
+
}
|
485
|
+
|
486
|
+
class Maximum < Orb::Internal::Type::BaseModel
|
487
|
+
attr_accessor id: String
|
488
|
+
|
489
|
+
attr_accessor adjustment_type: :maximum
|
490
|
+
|
491
|
+
attr_accessor applies_to_price_ids: ::Array[String]
|
492
|
+
|
493
|
+
attr_accessor filters: ::Array[Orb::PlanVersion::Adjustment::Maximum::Filter]
|
494
|
+
|
495
|
+
attr_accessor is_invoice_level: bool
|
496
|
+
|
497
|
+
attr_accessor maximum_amount: String
|
498
|
+
|
499
|
+
attr_accessor plan_phase_order: Integer?
|
500
|
+
|
501
|
+
attr_accessor reason: String?
|
502
|
+
|
503
|
+
def initialize: (
|
504
|
+
id: String,
|
505
|
+
applies_to_price_ids: ::Array[String],
|
506
|
+
filters: ::Array[Orb::PlanVersion::Adjustment::Maximum::Filter],
|
507
|
+
is_invoice_level: bool,
|
508
|
+
maximum_amount: String,
|
509
|
+
plan_phase_order: Integer?,
|
510
|
+
reason: String?,
|
511
|
+
?adjustment_type: :maximum
|
512
|
+
) -> void
|
513
|
+
|
514
|
+
def to_hash: -> {
|
515
|
+
id: String,
|
516
|
+
adjustment_type: :maximum,
|
517
|
+
applies_to_price_ids: ::Array[String],
|
518
|
+
filters: ::Array[Orb::PlanVersion::Adjustment::Maximum::Filter],
|
519
|
+
is_invoice_level: bool,
|
520
|
+
maximum_amount: String,
|
521
|
+
plan_phase_order: Integer?,
|
522
|
+
reason: String?
|
523
|
+
}
|
524
|
+
|
525
|
+
type filter =
|
526
|
+
{
|
527
|
+
field: Orb::Models::PlanVersion::Adjustment::Maximum::Filter::field,
|
528
|
+
operator: Orb::Models::PlanVersion::Adjustment::Maximum::Filter::operator,
|
529
|
+
values: ::Array[String]
|
530
|
+
}
|
531
|
+
|
532
|
+
class Filter < Orb::Internal::Type::BaseModel
|
533
|
+
attr_accessor field: Orb::Models::PlanVersion::Adjustment::Maximum::Filter::field
|
534
|
+
|
535
|
+
attr_accessor operator: Orb::Models::PlanVersion::Adjustment::Maximum::Filter::operator
|
536
|
+
|
537
|
+
attr_accessor values: ::Array[String]
|
538
|
+
|
539
|
+
def initialize: (
|
540
|
+
field: Orb::Models::PlanVersion::Adjustment::Maximum::Filter::field,
|
541
|
+
operator: Orb::Models::PlanVersion::Adjustment::Maximum::Filter::operator,
|
542
|
+
values: ::Array[String]
|
543
|
+
) -> void
|
544
|
+
|
545
|
+
def to_hash: -> {
|
546
|
+
field: Orb::Models::PlanVersion::Adjustment::Maximum::Filter::field,
|
547
|
+
operator: Orb::Models::PlanVersion::Adjustment::Maximum::Filter::operator,
|
548
|
+
values: ::Array[String]
|
549
|
+
}
|
550
|
+
|
551
|
+
type field =
|
552
|
+
:price_id | :item_id | :price_type | :currency | :pricing_unit_id
|
553
|
+
|
554
|
+
module Field
|
555
|
+
extend Orb::Internal::Type::Enum
|
556
|
+
|
557
|
+
PRICE_ID: :price_id
|
558
|
+
ITEM_ID: :item_id
|
559
|
+
PRICE_TYPE: :price_type
|
560
|
+
CURRENCY: :currency
|
561
|
+
PRICING_UNIT_ID: :pricing_unit_id
|
562
|
+
|
563
|
+
def self?.values: -> ::Array[Orb::Models::PlanVersion::Adjustment::Maximum::Filter::field]
|
564
|
+
end
|
565
|
+
|
566
|
+
type operator = :includes | :excludes
|
567
|
+
|
568
|
+
module Operator
|
569
|
+
extend Orb::Internal::Type::Enum
|
570
|
+
|
571
|
+
INCLUDES: :includes
|
572
|
+
EXCLUDES: :excludes
|
573
|
+
|
574
|
+
def self?.values: -> ::Array[Orb::Models::PlanVersion::Adjustment::Maximum::Filter::operator]
|
575
|
+
end
|
576
|
+
end
|
577
|
+
end
|
578
|
+
|
579
|
+
def self?.variants: -> ::Array[Orb::Models::PlanVersion::adjustment]
|
580
|
+
end
|
581
|
+
end
|
582
|
+
end
|
583
|
+
end
|
@@ -0,0 +1,60 @@
|
|
1
|
+
module Orb
|
2
|
+
module Models
|
3
|
+
type plan_version_phase =
|
4
|
+
{
|
5
|
+
id: String,
|
6
|
+
description: String?,
|
7
|
+
duration: Integer?,
|
8
|
+
duration_unit: Orb::Models::PlanVersionPhase::duration_unit?,
|
9
|
+
name: String,
|
10
|
+
order: Integer
|
11
|
+
}
|
12
|
+
|
13
|
+
class PlanVersionPhase < Orb::Internal::Type::BaseModel
|
14
|
+
attr_accessor id: String
|
15
|
+
|
16
|
+
attr_accessor description: String?
|
17
|
+
|
18
|
+
attr_accessor duration: Integer?
|
19
|
+
|
20
|
+
attr_accessor duration_unit: Orb::Models::PlanVersionPhase::duration_unit?
|
21
|
+
|
22
|
+
attr_accessor name: String
|
23
|
+
|
24
|
+
attr_accessor order: Integer
|
25
|
+
|
26
|
+
def initialize: (
|
27
|
+
id: String,
|
28
|
+
description: String?,
|
29
|
+
duration: Integer?,
|
30
|
+
duration_unit: Orb::Models::PlanVersionPhase::duration_unit?,
|
31
|
+
name: String,
|
32
|
+
order: Integer
|
33
|
+
) -> void
|
34
|
+
|
35
|
+
def to_hash: -> {
|
36
|
+
id: String,
|
37
|
+
description: String?,
|
38
|
+
duration: Integer?,
|
39
|
+
duration_unit: Orb::Models::PlanVersionPhase::duration_unit?,
|
40
|
+
name: String,
|
41
|
+
order: Integer
|
42
|
+
}
|
43
|
+
|
44
|
+
type duration_unit =
|
45
|
+
:daily | :monthly | :quarterly | :semi_annual | :annual
|
46
|
+
|
47
|
+
module DurationUnit
|
48
|
+
extend Orb::Internal::Type::Enum
|
49
|
+
|
50
|
+
DAILY: :daily
|
51
|
+
MONTHLY: :monthly
|
52
|
+
QUARTERLY: :quarterly
|
53
|
+
SEMI_ANNUAL: :semi_annual
|
54
|
+
ANNUAL: :annual
|
55
|
+
|
56
|
+
def self?.values: -> ::Array[Orb::Models::PlanVersionPhase::duration_unit]
|
57
|
+
end
|
58
|
+
end
|
59
|
+
end
|
60
|
+
end
|