orb-billing 0.10.0 → 0.12.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 +32 -0
- data/README.md +1 -1
- data/lib/orb/internal/type/union.rb +3 -8
- data/lib/orb/internal/util.rb +8 -9
- data/lib/orb/models/amount_discount.rb +65 -1
- data/lib/orb/models/beta/external_plan_id_create_plan_version_params.rb +1437 -15
- data/lib/orb/models/beta_create_plan_version_params.rb +1435 -15
- data/lib/orb/models/percentage_discount.rb +65 -1
- data/lib/orb/models/subscription_create_params.rb +1435 -15
- data/lib/orb/models/subscription_price_intervals_params.rb +715 -5
- data/lib/orb/models/subscription_redeem_coupon_params.rb +17 -9
- data/lib/orb/models/subscription_schedule_plan_change_params.rb +1435 -15
- data/lib/orb/models/trial_discount.rb +65 -1
- data/lib/orb/models/usage_discount.rb +65 -1
- data/lib/orb/resources/subscriptions.rb +6 -4
- data/lib/orb/version.rb +1 -1
- data/rbi/orb/internal/util.rbi +2 -0
- data/rbi/orb/models/amount_discount.rbi +117 -0
- data/rbi/orb/models/beta/external_plan_id_create_plan_version_params.rbi +6145 -3045
- data/rbi/orb/models/beta_create_plan_version_params.rbi +6096 -2996
- data/rbi/orb/models/percentage_discount.rbi +131 -0
- data/rbi/orb/models/subscription_create_params.rbi +6037 -2937
- data/rbi/orb/models/subscription_price_intervals_params.rbi +1633 -83
- data/rbi/orb/models/subscription_redeem_coupon_params.rbi +16 -8
- data/rbi/orb/models/subscription_schedule_plan_change_params.rbi +6948 -3848
- data/rbi/orb/models/trial_discount.rbi +109 -0
- data/rbi/orb/models/usage_discount.rbi +109 -0
- data/rbi/orb/resources/subscriptions.rbi +7 -4
- data/sig/orb/models/amount_discount.rbs +58 -0
- data/sig/orb/models/beta/external_plan_id_create_plan_version_params.rbs +1130 -20
- data/sig/orb/models/beta_create_plan_version_params.rbs +1130 -20
- data/sig/orb/models/percentage_discount.rbs +58 -0
- data/sig/orb/models/subscription_create_params.rbs +1130 -20
- data/sig/orb/models/subscription_price_intervals_params.rbs +565 -10
- data/sig/orb/models/subscription_redeem_coupon_params.rbs +11 -6
- data/sig/orb/models/subscription_schedule_plan_change_params.rbs +1130 -20
- data/sig/orb/models/trial_discount.rbs +58 -0
- data/sig/orb/models/usage_discount.rbs +58 -0
- data/sig/orb/resources/subscriptions.rbs +2 -1
- metadata +2 -2
@@ -5,6 +5,7 @@ module Orb
|
|
5
5
|
discount_type: Orb::Models::PercentageDiscount::discount_type,
|
6
6
|
percentage_discount: Float,
|
7
7
|
applies_to_price_ids: ::Array[String]?,
|
8
|
+
filters: ::Array[Orb::PercentageDiscount::Filter]?,
|
8
9
|
reason: String?
|
9
10
|
}
|
10
11
|
|
@@ -15,12 +16,15 @@ module Orb
|
|
15
16
|
|
16
17
|
attr_accessor applies_to_price_ids: ::Array[String]?
|
17
18
|
|
19
|
+
attr_accessor filters: ::Array[Orb::PercentageDiscount::Filter]?
|
20
|
+
|
18
21
|
attr_accessor reason: String?
|
19
22
|
|
20
23
|
def initialize: (
|
21
24
|
discount_type: Orb::Models::PercentageDiscount::discount_type,
|
22
25
|
percentage_discount: Float,
|
23
26
|
?applies_to_price_ids: ::Array[String]?,
|
27
|
+
?filters: ::Array[Orb::PercentageDiscount::Filter]?,
|
24
28
|
?reason: String?
|
25
29
|
) -> void
|
26
30
|
|
@@ -28,6 +32,7 @@ module Orb
|
|
28
32
|
discount_type: Orb::Models::PercentageDiscount::discount_type,
|
29
33
|
percentage_discount: Float,
|
30
34
|
applies_to_price_ids: ::Array[String]?,
|
35
|
+
filters: ::Array[Orb::PercentageDiscount::Filter]?,
|
31
36
|
reason: String?
|
32
37
|
}
|
33
38
|
|
@@ -40,6 +45,59 @@ module Orb
|
|
40
45
|
|
41
46
|
def self?.values: -> ::Array[Orb::Models::PercentageDiscount::discount_type]
|
42
47
|
end
|
48
|
+
|
49
|
+
type filter =
|
50
|
+
{
|
51
|
+
field: Orb::Models::PercentageDiscount::Filter::field,
|
52
|
+
operator: Orb::Models::PercentageDiscount::Filter::operator,
|
53
|
+
values: ::Array[String]
|
54
|
+
}
|
55
|
+
|
56
|
+
class Filter < Orb::Internal::Type::BaseModel
|
57
|
+
attr_accessor field: Orb::Models::PercentageDiscount::Filter::field
|
58
|
+
|
59
|
+
attr_accessor operator: Orb::Models::PercentageDiscount::Filter::operator
|
60
|
+
|
61
|
+
attr_accessor values: ::Array[String]
|
62
|
+
|
63
|
+
def initialize: (
|
64
|
+
field: Orb::Models::PercentageDiscount::Filter::field,
|
65
|
+
operator: Orb::Models::PercentageDiscount::Filter::operator,
|
66
|
+
values: ::Array[String]
|
67
|
+
) -> void
|
68
|
+
|
69
|
+
def to_hash: -> {
|
70
|
+
field: Orb::Models::PercentageDiscount::Filter::field,
|
71
|
+
operator: Orb::Models::PercentageDiscount::Filter::operator,
|
72
|
+
values: ::Array[String]
|
73
|
+
}
|
74
|
+
|
75
|
+
type field =
|
76
|
+
:price_id | :item_id | :price_type | :currency | :pricing_unit_id
|
77
|
+
|
78
|
+
module Field
|
79
|
+
extend Orb::Internal::Type::Enum
|
80
|
+
|
81
|
+
PRICE_ID: :price_id
|
82
|
+
ITEM_ID: :item_id
|
83
|
+
PRICE_TYPE: :price_type
|
84
|
+
CURRENCY: :currency
|
85
|
+
PRICING_UNIT_ID: :pricing_unit_id
|
86
|
+
|
87
|
+
def self?.values: -> ::Array[Orb::Models::PercentageDiscount::Filter::field]
|
88
|
+
end
|
89
|
+
|
90
|
+
type operator = :includes | :excludes
|
91
|
+
|
92
|
+
module Operator
|
93
|
+
extend Orb::Internal::Type::Enum
|
94
|
+
|
95
|
+
INCLUDES: :includes
|
96
|
+
EXCLUDES: :excludes
|
97
|
+
|
98
|
+
def self?.values: -> ::Array[Orb::Models::PercentageDiscount::Filter::operator]
|
99
|
+
end
|
100
|
+
end
|
43
101
|
end
|
44
102
|
end
|
45
103
|
end
|