orb-billing 1.47.0 → 1.49.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 +14 -0
- data/README.md +1 -1
- data/lib/orb/models/credit_block_update_params.rb +34 -0
- data/lib/orb/models/credit_block_update_response.rb +332 -0
- data/lib/orb/models/metric_archive_params.rb +20 -0
- data/lib/orb/models/metric_unarchive_params.rb +20 -0
- data/lib/orb/models/subscription_list_summary_params.rb +108 -0
- data/lib/orb/models/subscription_list_summary_response.rb +130 -0
- data/lib/orb/models/webhooks/subscription_accounting_sync_failed_standard_webhook_event.rb +9 -7
- data/lib/orb/models/webhooks/subscription_accounting_sync_succeeded_standard_webhook_event.rb +9 -7
- data/lib/orb/models/webhooks/subscription_cancellation_scheduled_standard_webhook_event.rb +9 -7
- data/lib/orb/models/webhooks/subscription_cancellation_unscheduled_standard_webhook_event.rb +9 -7
- data/lib/orb/models/webhooks/subscription_cost_exceeded_standard_webhook_event.rb +9 -7
- data/lib/orb/models/webhooks/subscription_created_standard_webhook_event.rb +9 -7
- data/lib/orb/models/webhooks/subscription_edited_standard_webhook_event.rb +9 -7
- data/lib/orb/models/webhooks/subscription_ended_standard_webhook_event.rb +9 -7
- data/lib/orb/models/webhooks/subscription_fixed_fee_quantity_updated_standard_webhook_event.rb +9 -7
- data/lib/orb/models/webhooks/subscription_plan_change_scheduled_standard_webhook_event.rb +9 -7
- data/lib/orb/models/webhooks/subscription_plan_changed_standard_webhook_event.rb +9 -7
- data/lib/orb/models/webhooks/subscription_plan_version_change_scheduled_standard_webhook_event.rb +9 -7
- data/lib/orb/models/webhooks/subscription_plan_version_changed_standard_webhook_event.rb +9 -7
- data/lib/orb/models/webhooks/subscription_spend_exceeded_standard_webhook_event.rb +9 -7
- data/lib/orb/models/webhooks/subscription_started_standard_webhook_event.rb +9 -7
- data/lib/orb/models/webhooks/subscription_trial_ended_standard_webhook_event.rb +9 -7
- data/lib/orb/models/webhooks/subscription_usage_exceeded_standard_webhook_event.rb +9 -7
- data/lib/orb/models.rb +8 -0
- data/lib/orb/resources/alerts.rb +7 -4
- data/lib/orb/resources/credit_blocks.rb +35 -0
- data/lib/orb/resources/metrics.rb +46 -0
- data/lib/orb/resources/subscriptions.rb +60 -0
- data/lib/orb/version.rb +1 -1
- data/lib/orb.rb +6 -0
- data/rbi/orb/models/credit_block_update_params.rbi +53 -0
- data/rbi/orb/models/credit_block_update_response.rbi +693 -0
- data/rbi/orb/models/metric_archive_params.rbi +33 -0
- data/rbi/orb/models/metric_unarchive_params.rbi +35 -0
- data/rbi/orb/models/subscription_list_summary_params.rbi +148 -0
- data/rbi/orb/models/subscription_list_summary_response.rbi +214 -0
- data/rbi/orb/models/webhooks/subscription_accounting_sync_failed_standard_webhook_event.rbi +12 -9
- data/rbi/orb/models/webhooks/subscription_accounting_sync_succeeded_standard_webhook_event.rbi +12 -9
- data/rbi/orb/models/webhooks/subscription_cancellation_scheduled_standard_webhook_event.rbi +12 -9
- data/rbi/orb/models/webhooks/subscription_cancellation_unscheduled_standard_webhook_event.rbi +12 -9
- data/rbi/orb/models/webhooks/subscription_cost_exceeded_standard_webhook_event.rbi +12 -9
- data/rbi/orb/models/webhooks/subscription_created_standard_webhook_event.rbi +12 -9
- data/rbi/orb/models/webhooks/subscription_edited_standard_webhook_event.rbi +12 -9
- data/rbi/orb/models/webhooks/subscription_ended_standard_webhook_event.rbi +12 -9
- data/rbi/orb/models/webhooks/subscription_fixed_fee_quantity_updated_standard_webhook_event.rbi +12 -9
- data/rbi/orb/models/webhooks/subscription_plan_change_scheduled_standard_webhook_event.rbi +12 -9
- data/rbi/orb/models/webhooks/subscription_plan_changed_standard_webhook_event.rbi +12 -9
- data/rbi/orb/models/webhooks/subscription_plan_version_change_scheduled_standard_webhook_event.rbi +12 -9
- data/rbi/orb/models/webhooks/subscription_plan_version_changed_standard_webhook_event.rbi +12 -9
- data/rbi/orb/models/webhooks/subscription_spend_exceeded_standard_webhook_event.rbi +12 -9
- data/rbi/orb/models/webhooks/subscription_started_standard_webhook_event.rbi +12 -9
- data/rbi/orb/models/webhooks/subscription_trial_ended_standard_webhook_event.rbi +12 -9
- data/rbi/orb/models/webhooks/subscription_usage_exceeded_standard_webhook_event.rbi +12 -9
- data/rbi/orb/models.rbi +8 -0
- data/rbi/orb/resources/alerts.rbi +7 -4
- data/rbi/orb/resources/credit_blocks.rbi +26 -0
- data/rbi/orb/resources/metrics.rbi +28 -0
- data/rbi/orb/resources/subscriptions.rbi +47 -0
- data/sig/orb/models/credit_block_update_params.rbs +28 -0
- data/sig/orb/models/credit_block_update_response.rbs +263 -0
- data/sig/orb/models/metric_archive_params.rbs +23 -0
- data/sig/orb/models/metric_unarchive_params.rbs +23 -0
- data/sig/orb/models/subscription_list_summary_params.rbs +90 -0
- data/sig/orb/models/subscription_list_summary_response.rbs +94 -0
- data/sig/orb/models.rbs +8 -0
- data/sig/orb/resources/credit_blocks.rbs +6 -0
- data/sig/orb/resources/metrics.rbs +10 -0
- data/sig/orb/resources/subscriptions.rbs +15 -0
- metadata +19 -1
|
@@ -96,6 +96,22 @@ module Orb
|
|
|
96
96
|
)
|
|
97
97
|
end
|
|
98
98
|
|
|
99
|
+
# This endpoint archives a [metric](/core-concepts#metric). Archived metrics are
|
|
100
|
+
# left out of `GET /v1/metrics` when filtering with `status=active`, and can't be
|
|
101
|
+
# chosen when creating new plans in the Orb dashboard.
|
|
102
|
+
#
|
|
103
|
+
# Archiving does not change existing prices, plans, or subscriptions that use the
|
|
104
|
+
# metric, and usage on those prices continues to be billed. A metric that is
|
|
105
|
+
# already archived cannot be archived again.
|
|
106
|
+
sig do
|
|
107
|
+
params(
|
|
108
|
+
metric_id: String,
|
|
109
|
+
request_options: Orb::RequestOptions::OrHash
|
|
110
|
+
).returns(Orb::BillableMetric)
|
|
111
|
+
end
|
|
112
|
+
def archive(metric_id, request_options: {})
|
|
113
|
+
end
|
|
114
|
+
|
|
99
115
|
# This endpoint is used to fetch [metric](/core-concepts#metric) details given a
|
|
100
116
|
# metric identifier. It returns information about the metrics including its name,
|
|
101
117
|
# description, and item.
|
|
@@ -108,6 +124,18 @@ module Orb
|
|
|
108
124
|
def fetch(metric_id, request_options: {})
|
|
109
125
|
end
|
|
110
126
|
|
|
127
|
+
# This endpoint restores an archived [metric](/core-concepts#metric) to `active`,
|
|
128
|
+
# so it can be chosen for new plans again. Only archived metrics can be
|
|
129
|
+
# unarchived.
|
|
130
|
+
sig do
|
|
131
|
+
params(
|
|
132
|
+
metric_id: String,
|
|
133
|
+
request_options: Orb::RequestOptions::OrHash
|
|
134
|
+
).returns(Orb::BillableMetric)
|
|
135
|
+
end
|
|
136
|
+
def unarchive(metric_id, request_options: {})
|
|
137
|
+
end
|
|
138
|
+
|
|
111
139
|
# @api private
|
|
112
140
|
sig { params(client: Orb::Client).returns(T.attached_class) }
|
|
113
141
|
def self.new(client:)
|
|
@@ -923,6 +923,53 @@ module Orb
|
|
|
923
923
|
)
|
|
924
924
|
end
|
|
925
925
|
|
|
926
|
+
# This is a lighter-weight version of
|
|
927
|
+
# [List subscriptions](/api-reference/subscription/list-subscriptions), with the
|
|
928
|
+
# same filters, pagination and order. It returns each subscription's own fields,
|
|
929
|
+
# with its plan and customer as references, and leaves out price intervals,
|
|
930
|
+
# billing periods, plan phases and other derived fields, making it faster to
|
|
931
|
+
# respond. Fetch a subscription for those.
|
|
932
|
+
#
|
|
933
|
+
# This is the same summary of a subscription that standard
|
|
934
|
+
# [webhook payloads](/integrations-and-exports/webhook-payload-styles) carry.
|
|
935
|
+
sig do
|
|
936
|
+
params(
|
|
937
|
+
created_at_gt: T.nilable(Time),
|
|
938
|
+
created_at_gte: T.nilable(Time),
|
|
939
|
+
created_at_lt: T.nilable(Time),
|
|
940
|
+
created_at_lte: T.nilable(Time),
|
|
941
|
+
cursor: T.nilable(String),
|
|
942
|
+
customer_id: T.nilable(String),
|
|
943
|
+
external_customer_id: T.nilable(String),
|
|
944
|
+
external_plan_id: T.nilable(String),
|
|
945
|
+
limit: Integer,
|
|
946
|
+
plan_id: T.nilable(String),
|
|
947
|
+
status:
|
|
948
|
+
T.nilable(Orb::SubscriptionListSummaryParams::Status::OrSymbol),
|
|
949
|
+
request_options: Orb::RequestOptions::OrHash
|
|
950
|
+
).returns(
|
|
951
|
+
Orb::Internal::Page[Orb::Models::SubscriptionListSummaryResponse]
|
|
952
|
+
)
|
|
953
|
+
end
|
|
954
|
+
def list_summary(
|
|
955
|
+
created_at_gt: nil,
|
|
956
|
+
created_at_gte: nil,
|
|
957
|
+
created_at_lt: nil,
|
|
958
|
+
created_at_lte: nil,
|
|
959
|
+
# Cursor for pagination. This can be populated by the `next_cursor` value returned
|
|
960
|
+
# from the initial request.
|
|
961
|
+
cursor: nil,
|
|
962
|
+
customer_id: nil,
|
|
963
|
+
external_customer_id: nil,
|
|
964
|
+
external_plan_id: nil,
|
|
965
|
+
# The number of items to fetch. Defaults to 20.
|
|
966
|
+
limit: nil,
|
|
967
|
+
plan_id: nil,
|
|
968
|
+
status: nil,
|
|
969
|
+
request_options: {}
|
|
970
|
+
)
|
|
971
|
+
end
|
|
972
|
+
|
|
926
973
|
# This endpoint is used to add and edit subscription
|
|
927
974
|
# [price intervals](/api-reference/price-interval/add-or-edit-price-intervals). By
|
|
928
975
|
# making modifications to a subscription’s price intervals, you can
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
module Orb
|
|
2
|
+
module Models
|
|
3
|
+
type credit_block_update_params =
|
|
4
|
+
{ block_id: String, metadata: ::Hash[Symbol, String?]? }
|
|
5
|
+
& Orb::Internal::Type::request_parameters
|
|
6
|
+
|
|
7
|
+
class CreditBlockUpdateParams < Orb::Internal::Type::BaseModel
|
|
8
|
+
extend Orb::Internal::Type::RequestParameters::Converter
|
|
9
|
+
include Orb::Internal::Type::RequestParameters
|
|
10
|
+
|
|
11
|
+
attr_accessor block_id: String
|
|
12
|
+
|
|
13
|
+
attr_accessor metadata: ::Hash[Symbol, String?]?
|
|
14
|
+
|
|
15
|
+
def initialize: (
|
|
16
|
+
block_id: String,
|
|
17
|
+
?metadata: ::Hash[Symbol, String?]?,
|
|
18
|
+
?request_options: Orb::request_opts
|
|
19
|
+
) -> void
|
|
20
|
+
|
|
21
|
+
def to_hash: -> {
|
|
22
|
+
block_id: String,
|
|
23
|
+
metadata: ::Hash[Symbol, String?]?,
|
|
24
|
+
request_options: Orb::RequestOptions
|
|
25
|
+
}
|
|
26
|
+
end
|
|
27
|
+
end
|
|
28
|
+
end
|
|
@@ -0,0 +1,263 @@
|
|
|
1
|
+
module Orb
|
|
2
|
+
module Models
|
|
3
|
+
type credit_block_update_response =
|
|
4
|
+
{
|
|
5
|
+
id: String,
|
|
6
|
+
balance: Float,
|
|
7
|
+
credit_block_source: Orb::Models::CreditBlockUpdateResponse::credit_block_source,
|
|
8
|
+
effective_date: Time?,
|
|
9
|
+
expiry_date: Time?,
|
|
10
|
+
filters: ::Array[Orb::Models::CreditBlockUpdateResponse::Filter],
|
|
11
|
+
maximum_initial_balance: Float?,
|
|
12
|
+
metadata: ::Hash[Symbol, String],
|
|
13
|
+
per_unit_cost_basis: String?,
|
|
14
|
+
status: Orb::Models::CreditBlockUpdateResponse::status,
|
|
15
|
+
credit_allocation: Orb::Models::CreditBlockUpdateResponse::CreditAllocation?,
|
|
16
|
+
credit_commitment: Orb::Models::CreditBlockUpdateResponse::CreditCommitment?
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
class CreditBlockUpdateResponse < Orb::Internal::Type::BaseModel
|
|
20
|
+
attr_accessor id: String
|
|
21
|
+
|
|
22
|
+
attr_accessor balance: Float
|
|
23
|
+
|
|
24
|
+
attr_accessor credit_block_source: Orb::Models::CreditBlockUpdateResponse::credit_block_source
|
|
25
|
+
|
|
26
|
+
attr_accessor effective_date: Time?
|
|
27
|
+
|
|
28
|
+
attr_accessor expiry_date: Time?
|
|
29
|
+
|
|
30
|
+
attr_accessor filters: ::Array[Orb::Models::CreditBlockUpdateResponse::Filter]
|
|
31
|
+
|
|
32
|
+
attr_accessor maximum_initial_balance: Float?
|
|
33
|
+
|
|
34
|
+
attr_accessor metadata: ::Hash[Symbol, String]
|
|
35
|
+
|
|
36
|
+
attr_accessor per_unit_cost_basis: String?
|
|
37
|
+
|
|
38
|
+
attr_accessor status: Orb::Models::CreditBlockUpdateResponse::status
|
|
39
|
+
|
|
40
|
+
attr_accessor credit_allocation: Orb::Models::CreditBlockUpdateResponse::CreditAllocation?
|
|
41
|
+
|
|
42
|
+
attr_accessor credit_commitment: Orb::Models::CreditBlockUpdateResponse::CreditCommitment?
|
|
43
|
+
|
|
44
|
+
def initialize: (
|
|
45
|
+
id: String,
|
|
46
|
+
balance: Float,
|
|
47
|
+
credit_block_source: Orb::Models::CreditBlockUpdateResponse::credit_block_source,
|
|
48
|
+
effective_date: Time?,
|
|
49
|
+
expiry_date: Time?,
|
|
50
|
+
filters: ::Array[Orb::Models::CreditBlockUpdateResponse::Filter],
|
|
51
|
+
maximum_initial_balance: Float?,
|
|
52
|
+
metadata: ::Hash[Symbol, String],
|
|
53
|
+
per_unit_cost_basis: String?,
|
|
54
|
+
status: Orb::Models::CreditBlockUpdateResponse::status,
|
|
55
|
+
?credit_allocation: Orb::Models::CreditBlockUpdateResponse::CreditAllocation?,
|
|
56
|
+
?credit_commitment: Orb::Models::CreditBlockUpdateResponse::CreditCommitment?
|
|
57
|
+
) -> void
|
|
58
|
+
|
|
59
|
+
def to_hash: -> {
|
|
60
|
+
id: String,
|
|
61
|
+
balance: Float,
|
|
62
|
+
credit_block_source: Orb::Models::CreditBlockUpdateResponse::credit_block_source,
|
|
63
|
+
effective_date: Time?,
|
|
64
|
+
expiry_date: Time?,
|
|
65
|
+
filters: ::Array[Orb::Models::CreditBlockUpdateResponse::Filter],
|
|
66
|
+
maximum_initial_balance: Float?,
|
|
67
|
+
metadata: ::Hash[Symbol, String],
|
|
68
|
+
per_unit_cost_basis: String?,
|
|
69
|
+
status: Orb::Models::CreditBlockUpdateResponse::status,
|
|
70
|
+
credit_allocation: Orb::Models::CreditBlockUpdateResponse::CreditAllocation?,
|
|
71
|
+
credit_commitment: Orb::Models::CreditBlockUpdateResponse::CreditCommitment?
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
type credit_block_source = :allocation | :top_up | :commitment | :manual
|
|
75
|
+
|
|
76
|
+
module CreditBlockSource
|
|
77
|
+
extend Orb::Internal::Type::Enum
|
|
78
|
+
|
|
79
|
+
ALLOCATION: :allocation
|
|
80
|
+
TOP_UP: :top_up
|
|
81
|
+
COMMITMENT: :commitment
|
|
82
|
+
MANUAL: :manual
|
|
83
|
+
|
|
84
|
+
def self?.values: -> ::Array[Orb::Models::CreditBlockUpdateResponse::credit_block_source]
|
|
85
|
+
end
|
|
86
|
+
|
|
87
|
+
type filter =
|
|
88
|
+
{
|
|
89
|
+
field: Orb::Models::CreditBlockUpdateResponse::Filter::field,
|
|
90
|
+
operator: Orb::Models::CreditBlockUpdateResponse::Filter::operator,
|
|
91
|
+
values: ::Array[String]
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
class Filter < Orb::Internal::Type::BaseModel
|
|
95
|
+
attr_accessor field: Orb::Models::CreditBlockUpdateResponse::Filter::field
|
|
96
|
+
|
|
97
|
+
attr_accessor operator: Orb::Models::CreditBlockUpdateResponse::Filter::operator
|
|
98
|
+
|
|
99
|
+
attr_accessor values: ::Array[String]
|
|
100
|
+
|
|
101
|
+
def initialize: (
|
|
102
|
+
field: Orb::Models::CreditBlockUpdateResponse::Filter::field,
|
|
103
|
+
operator: Orb::Models::CreditBlockUpdateResponse::Filter::operator,
|
|
104
|
+
values: ::Array[String]
|
|
105
|
+
) -> void
|
|
106
|
+
|
|
107
|
+
def to_hash: -> {
|
|
108
|
+
field: Orb::Models::CreditBlockUpdateResponse::Filter::field,
|
|
109
|
+
operator: Orb::Models::CreditBlockUpdateResponse::Filter::operator,
|
|
110
|
+
values: ::Array[String]
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
type field =
|
|
114
|
+
:price_id | :item_id | :price_type | :currency | :pricing_unit_id
|
|
115
|
+
|
|
116
|
+
module Field
|
|
117
|
+
extend Orb::Internal::Type::Enum
|
|
118
|
+
|
|
119
|
+
PRICE_ID: :price_id
|
|
120
|
+
ITEM_ID: :item_id
|
|
121
|
+
PRICE_TYPE: :price_type
|
|
122
|
+
CURRENCY: :currency
|
|
123
|
+
PRICING_UNIT_ID: :pricing_unit_id
|
|
124
|
+
|
|
125
|
+
def self?.values: -> ::Array[Orb::Models::CreditBlockUpdateResponse::Filter::field]
|
|
126
|
+
end
|
|
127
|
+
|
|
128
|
+
type operator = :includes | :excludes
|
|
129
|
+
|
|
130
|
+
module Operator
|
|
131
|
+
extend Orb::Internal::Type::Enum
|
|
132
|
+
|
|
133
|
+
INCLUDES: :includes
|
|
134
|
+
EXCLUDES: :excludes
|
|
135
|
+
|
|
136
|
+
def self?.values: -> ::Array[Orb::Models::CreditBlockUpdateResponse::Filter::operator]
|
|
137
|
+
end
|
|
138
|
+
end
|
|
139
|
+
|
|
140
|
+
type status = :active | :pending_payment
|
|
141
|
+
|
|
142
|
+
module Status
|
|
143
|
+
extend Orb::Internal::Type::Enum
|
|
144
|
+
|
|
145
|
+
ACTIVE: :active
|
|
146
|
+
PENDING_PAYMENT: :pending_payment
|
|
147
|
+
|
|
148
|
+
def self?.values: -> ::Array[Orb::Models::CreditBlockUpdateResponse::status]
|
|
149
|
+
end
|
|
150
|
+
|
|
151
|
+
type credit_allocation =
|
|
152
|
+
{
|
|
153
|
+
allows_rollover: bool,
|
|
154
|
+
currency: String,
|
|
155
|
+
custom_expiration: Orb::CustomExpiration?,
|
|
156
|
+
item_id: String,
|
|
157
|
+
filters: ::Array[Orb::Models::CreditBlockUpdateResponse::CreditAllocation::Filter],
|
|
158
|
+
license_type_id: String?
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
class CreditAllocation < Orb::Internal::Type::BaseModel
|
|
162
|
+
attr_accessor allows_rollover: bool
|
|
163
|
+
|
|
164
|
+
attr_accessor currency: String
|
|
165
|
+
|
|
166
|
+
attr_accessor custom_expiration: Orb::CustomExpiration?
|
|
167
|
+
|
|
168
|
+
attr_accessor item_id: String
|
|
169
|
+
|
|
170
|
+
attr_reader filters: ::Array[Orb::Models::CreditBlockUpdateResponse::CreditAllocation::Filter]?
|
|
171
|
+
|
|
172
|
+
def filters=: (
|
|
173
|
+
::Array[Orb::Models::CreditBlockUpdateResponse::CreditAllocation::Filter]
|
|
174
|
+
) -> ::Array[Orb::Models::CreditBlockUpdateResponse::CreditAllocation::Filter]
|
|
175
|
+
|
|
176
|
+
attr_accessor license_type_id: String?
|
|
177
|
+
|
|
178
|
+
def initialize: (
|
|
179
|
+
allows_rollover: bool,
|
|
180
|
+
currency: String,
|
|
181
|
+
custom_expiration: Orb::CustomExpiration?,
|
|
182
|
+
item_id: String,
|
|
183
|
+
?filters: ::Array[Orb::Models::CreditBlockUpdateResponse::CreditAllocation::Filter],
|
|
184
|
+
?license_type_id: String?
|
|
185
|
+
) -> void
|
|
186
|
+
|
|
187
|
+
def to_hash: -> {
|
|
188
|
+
allows_rollover: bool,
|
|
189
|
+
currency: String,
|
|
190
|
+
custom_expiration: Orb::CustomExpiration?,
|
|
191
|
+
item_id: String,
|
|
192
|
+
filters: ::Array[Orb::Models::CreditBlockUpdateResponse::CreditAllocation::Filter],
|
|
193
|
+
license_type_id: String?
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
type filter =
|
|
197
|
+
{
|
|
198
|
+
field: Orb::Models::CreditBlockUpdateResponse::CreditAllocation::Filter::field,
|
|
199
|
+
operator: Orb::Models::CreditBlockUpdateResponse::CreditAllocation::Filter::operator,
|
|
200
|
+
values: ::Array[String]
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
class Filter < Orb::Internal::Type::BaseModel
|
|
204
|
+
attr_accessor field: Orb::Models::CreditBlockUpdateResponse::CreditAllocation::Filter::field
|
|
205
|
+
|
|
206
|
+
attr_accessor operator: Orb::Models::CreditBlockUpdateResponse::CreditAllocation::Filter::operator
|
|
207
|
+
|
|
208
|
+
attr_accessor values: ::Array[String]
|
|
209
|
+
|
|
210
|
+
def initialize: (
|
|
211
|
+
field: Orb::Models::CreditBlockUpdateResponse::CreditAllocation::Filter::field,
|
|
212
|
+
operator: Orb::Models::CreditBlockUpdateResponse::CreditAllocation::Filter::operator,
|
|
213
|
+
values: ::Array[String]
|
|
214
|
+
) -> void
|
|
215
|
+
|
|
216
|
+
def to_hash: -> {
|
|
217
|
+
field: Orb::Models::CreditBlockUpdateResponse::CreditAllocation::Filter::field,
|
|
218
|
+
operator: Orb::Models::CreditBlockUpdateResponse::CreditAllocation::Filter::operator,
|
|
219
|
+
values: ::Array[String]
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
type field =
|
|
223
|
+
:price_id | :item_id | :price_type | :currency | :pricing_unit_id
|
|
224
|
+
|
|
225
|
+
module Field
|
|
226
|
+
extend Orb::Internal::Type::Enum
|
|
227
|
+
|
|
228
|
+
PRICE_ID: :price_id
|
|
229
|
+
ITEM_ID: :item_id
|
|
230
|
+
PRICE_TYPE: :price_type
|
|
231
|
+
CURRENCY: :currency
|
|
232
|
+
PRICING_UNIT_ID: :pricing_unit_id
|
|
233
|
+
|
|
234
|
+
def self?.values: -> ::Array[Orb::Models::CreditBlockUpdateResponse::CreditAllocation::Filter::field]
|
|
235
|
+
end
|
|
236
|
+
|
|
237
|
+
type operator = :includes | :excludes
|
|
238
|
+
|
|
239
|
+
module Operator
|
|
240
|
+
extend Orb::Internal::Type::Enum
|
|
241
|
+
|
|
242
|
+
INCLUDES: :includes
|
|
243
|
+
EXCLUDES: :excludes
|
|
244
|
+
|
|
245
|
+
def self?.values: -> ::Array[Orb::Models::CreditBlockUpdateResponse::CreditAllocation::Filter::operator]
|
|
246
|
+
end
|
|
247
|
+
end
|
|
248
|
+
end
|
|
249
|
+
|
|
250
|
+
type credit_commitment = { id: String, subscription_id: String? }
|
|
251
|
+
|
|
252
|
+
class CreditCommitment < Orb::Internal::Type::BaseModel
|
|
253
|
+
attr_accessor id: String
|
|
254
|
+
|
|
255
|
+
attr_accessor subscription_id: String?
|
|
256
|
+
|
|
257
|
+
def initialize: (id: String, ?subscription_id: String?) -> void
|
|
258
|
+
|
|
259
|
+
def to_hash: -> { id: String, subscription_id: String? }
|
|
260
|
+
end
|
|
261
|
+
end
|
|
262
|
+
end
|
|
263
|
+
end
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
module Orb
|
|
2
|
+
module Models
|
|
3
|
+
type metric_archive_params =
|
|
4
|
+
{ metric_id: String } & Orb::Internal::Type::request_parameters
|
|
5
|
+
|
|
6
|
+
class MetricArchiveParams < Orb::Internal::Type::BaseModel
|
|
7
|
+
extend Orb::Internal::Type::RequestParameters::Converter
|
|
8
|
+
include Orb::Internal::Type::RequestParameters
|
|
9
|
+
|
|
10
|
+
attr_accessor metric_id: String
|
|
11
|
+
|
|
12
|
+
def initialize: (
|
|
13
|
+
metric_id: String,
|
|
14
|
+
?request_options: Orb::request_opts
|
|
15
|
+
) -> void
|
|
16
|
+
|
|
17
|
+
def to_hash: -> {
|
|
18
|
+
metric_id: String,
|
|
19
|
+
request_options: Orb::RequestOptions
|
|
20
|
+
}
|
|
21
|
+
end
|
|
22
|
+
end
|
|
23
|
+
end
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
module Orb
|
|
2
|
+
module Models
|
|
3
|
+
type metric_unarchive_params =
|
|
4
|
+
{ metric_id: String } & Orb::Internal::Type::request_parameters
|
|
5
|
+
|
|
6
|
+
class MetricUnarchiveParams < Orb::Internal::Type::BaseModel
|
|
7
|
+
extend Orb::Internal::Type::RequestParameters::Converter
|
|
8
|
+
include Orb::Internal::Type::RequestParameters
|
|
9
|
+
|
|
10
|
+
attr_accessor metric_id: String
|
|
11
|
+
|
|
12
|
+
def initialize: (
|
|
13
|
+
metric_id: String,
|
|
14
|
+
?request_options: Orb::request_opts
|
|
15
|
+
) -> void
|
|
16
|
+
|
|
17
|
+
def to_hash: -> {
|
|
18
|
+
metric_id: String,
|
|
19
|
+
request_options: Orb::RequestOptions
|
|
20
|
+
}
|
|
21
|
+
end
|
|
22
|
+
end
|
|
23
|
+
end
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
module Orb
|
|
2
|
+
module Models
|
|
3
|
+
type subscription_list_summary_params =
|
|
4
|
+
{
|
|
5
|
+
created_at_gt: Time?,
|
|
6
|
+
created_at_gte: Time?,
|
|
7
|
+
created_at_lt: Time?,
|
|
8
|
+
created_at_lte: Time?,
|
|
9
|
+
cursor: String?,
|
|
10
|
+
customer_id: String?,
|
|
11
|
+
external_customer_id: String?,
|
|
12
|
+
external_plan_id: String?,
|
|
13
|
+
limit: Integer,
|
|
14
|
+
plan_id: String?,
|
|
15
|
+
status: Orb::Models::SubscriptionListSummaryParams::status?
|
|
16
|
+
}
|
|
17
|
+
& Orb::Internal::Type::request_parameters
|
|
18
|
+
|
|
19
|
+
class SubscriptionListSummaryParams < Orb::Internal::Type::BaseModel
|
|
20
|
+
extend Orb::Internal::Type::RequestParameters::Converter
|
|
21
|
+
include Orb::Internal::Type::RequestParameters
|
|
22
|
+
|
|
23
|
+
attr_accessor created_at_gt: Time?
|
|
24
|
+
|
|
25
|
+
attr_accessor created_at_gte: Time?
|
|
26
|
+
|
|
27
|
+
attr_accessor created_at_lt: Time?
|
|
28
|
+
|
|
29
|
+
attr_accessor created_at_lte: Time?
|
|
30
|
+
|
|
31
|
+
attr_accessor cursor: String?
|
|
32
|
+
|
|
33
|
+
attr_accessor customer_id: String?
|
|
34
|
+
|
|
35
|
+
attr_accessor external_customer_id: String?
|
|
36
|
+
|
|
37
|
+
attr_accessor external_plan_id: String?
|
|
38
|
+
|
|
39
|
+
attr_reader limit: Integer?
|
|
40
|
+
|
|
41
|
+
def limit=: (Integer) -> Integer
|
|
42
|
+
|
|
43
|
+
attr_accessor plan_id: String?
|
|
44
|
+
|
|
45
|
+
attr_accessor status: Orb::Models::SubscriptionListSummaryParams::status?
|
|
46
|
+
|
|
47
|
+
def initialize: (
|
|
48
|
+
?created_at_gt: Time?,
|
|
49
|
+
?created_at_gte: Time?,
|
|
50
|
+
?created_at_lt: Time?,
|
|
51
|
+
?created_at_lte: Time?,
|
|
52
|
+
?cursor: String?,
|
|
53
|
+
?customer_id: String?,
|
|
54
|
+
?external_customer_id: String?,
|
|
55
|
+
?external_plan_id: String?,
|
|
56
|
+
?limit: Integer,
|
|
57
|
+
?plan_id: String?,
|
|
58
|
+
?status: Orb::Models::SubscriptionListSummaryParams::status?,
|
|
59
|
+
?request_options: Orb::request_opts
|
|
60
|
+
) -> void
|
|
61
|
+
|
|
62
|
+
def to_hash: -> {
|
|
63
|
+
created_at_gt: Time?,
|
|
64
|
+
created_at_gte: Time?,
|
|
65
|
+
created_at_lt: Time?,
|
|
66
|
+
created_at_lte: Time?,
|
|
67
|
+
cursor: String?,
|
|
68
|
+
customer_id: String?,
|
|
69
|
+
external_customer_id: String?,
|
|
70
|
+
external_plan_id: String?,
|
|
71
|
+
limit: Integer,
|
|
72
|
+
plan_id: String?,
|
|
73
|
+
status: Orb::Models::SubscriptionListSummaryParams::status?,
|
|
74
|
+
request_options: Orb::RequestOptions
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
type status = :active | :ended | :upcoming
|
|
78
|
+
|
|
79
|
+
module Status
|
|
80
|
+
extend Orb::Internal::Type::Enum
|
|
81
|
+
|
|
82
|
+
ACTIVE: :active
|
|
83
|
+
ENDED: :ended
|
|
84
|
+
UPCOMING: :upcoming
|
|
85
|
+
|
|
86
|
+
def self?.values: -> ::Array[Orb::Models::SubscriptionListSummaryParams::status]
|
|
87
|
+
end
|
|
88
|
+
end
|
|
89
|
+
end
|
|
90
|
+
end
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
module Orb
|
|
2
|
+
module Models
|
|
3
|
+
type subscription_list_summary_response =
|
|
4
|
+
{
|
|
5
|
+
id: String,
|
|
6
|
+
created_at: Time,
|
|
7
|
+
customer: Orb::CustomerMinified,
|
|
8
|
+
end_date: Time?,
|
|
9
|
+
metadata: ::Hash[Symbol, String],
|
|
10
|
+
name: String,
|
|
11
|
+
plan: Orb::Models::SubscriptionListSummaryResponse::Plan?,
|
|
12
|
+
start_date: Time,
|
|
13
|
+
status: Orb::Models::SubscriptionListSummaryResponse::status
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
class SubscriptionListSummaryResponse < Orb::Internal::Type::BaseModel
|
|
17
|
+
attr_accessor id: String
|
|
18
|
+
|
|
19
|
+
attr_accessor created_at: Time
|
|
20
|
+
|
|
21
|
+
attr_accessor customer: Orb::CustomerMinified
|
|
22
|
+
|
|
23
|
+
attr_accessor end_date: Time?
|
|
24
|
+
|
|
25
|
+
attr_accessor metadata: ::Hash[Symbol, String]
|
|
26
|
+
|
|
27
|
+
attr_accessor name: String
|
|
28
|
+
|
|
29
|
+
attr_accessor plan: Orb::Models::SubscriptionListSummaryResponse::Plan?
|
|
30
|
+
|
|
31
|
+
attr_accessor start_date: Time
|
|
32
|
+
|
|
33
|
+
attr_accessor status: Orb::Models::SubscriptionListSummaryResponse::status
|
|
34
|
+
|
|
35
|
+
def initialize: (
|
|
36
|
+
id: String,
|
|
37
|
+
created_at: Time,
|
|
38
|
+
customer: Orb::CustomerMinified,
|
|
39
|
+
end_date: Time?,
|
|
40
|
+
metadata: ::Hash[Symbol, String],
|
|
41
|
+
name: String,
|
|
42
|
+
plan: Orb::Models::SubscriptionListSummaryResponse::Plan?,
|
|
43
|
+
start_date: Time,
|
|
44
|
+
status: Orb::Models::SubscriptionListSummaryResponse::status
|
|
45
|
+
) -> void
|
|
46
|
+
|
|
47
|
+
def to_hash: -> {
|
|
48
|
+
id: String,
|
|
49
|
+
created_at: Time,
|
|
50
|
+
customer: Orb::CustomerMinified,
|
|
51
|
+
end_date: Time?,
|
|
52
|
+
metadata: ::Hash[Symbol, String],
|
|
53
|
+
name: String,
|
|
54
|
+
plan: Orb::Models::SubscriptionListSummaryResponse::Plan?,
|
|
55
|
+
start_date: Time,
|
|
56
|
+
status: Orb::Models::SubscriptionListSummaryResponse::status
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
type plan = { id: String?, external_plan_id: String?, name: String? }
|
|
60
|
+
|
|
61
|
+
class Plan < Orb::Internal::Type::BaseModel
|
|
62
|
+
attr_accessor id: String?
|
|
63
|
+
|
|
64
|
+
attr_accessor external_plan_id: String?
|
|
65
|
+
|
|
66
|
+
attr_accessor name: String?
|
|
67
|
+
|
|
68
|
+
def initialize: (
|
|
69
|
+
id: String?,
|
|
70
|
+
external_plan_id: String?,
|
|
71
|
+
name: String?
|
|
72
|
+
) -> void
|
|
73
|
+
|
|
74
|
+
def to_hash: -> {
|
|
75
|
+
id: String?,
|
|
76
|
+
external_plan_id: String?,
|
|
77
|
+
name: String?
|
|
78
|
+
}
|
|
79
|
+
end
|
|
80
|
+
|
|
81
|
+
type status = :active | :ended | :upcoming
|
|
82
|
+
|
|
83
|
+
module Status
|
|
84
|
+
extend Orb::Internal::Type::Enum
|
|
85
|
+
|
|
86
|
+
ACTIVE: :active
|
|
87
|
+
ENDED: :ended
|
|
88
|
+
UPCOMING: :upcoming
|
|
89
|
+
|
|
90
|
+
def self?.values: -> ::Array[Orb::Models::SubscriptionListSummaryResponse::status]
|
|
91
|
+
end
|
|
92
|
+
end
|
|
93
|
+
end
|
|
94
|
+
end
|
data/sig/orb/models.rbs
CHANGED
|
@@ -99,6 +99,8 @@ module Orb
|
|
|
99
99
|
|
|
100
100
|
class CreditBlockRetrieveParams = Orb::Models::CreditBlockRetrieveParams
|
|
101
101
|
|
|
102
|
+
class CreditBlockUpdateParams = Orb::Models::CreditBlockUpdateParams
|
|
103
|
+
|
|
102
104
|
class CreditNote = Orb::Models::CreditNote
|
|
103
105
|
|
|
104
106
|
class CreditNoteAccountingSyncFailedWebhookEvent = Orb::Models::CreditNoteAccountingSyncFailedWebhookEvent
|
|
@@ -341,6 +343,8 @@ module Orb
|
|
|
341
343
|
|
|
342
344
|
class MaximumInterval = Orb::Models::MaximumInterval
|
|
343
345
|
|
|
346
|
+
class MetricArchiveParams = Orb::Models::MetricArchiveParams
|
|
347
|
+
|
|
344
348
|
class MetricCreateParams = Orb::Models::MetricCreateParams
|
|
345
349
|
|
|
346
350
|
class MetricEventsDroppedByWatermarkWebhookEvent = Orb::Models::MetricEventsDroppedByWatermarkWebhookEvent
|
|
@@ -349,6 +353,8 @@ module Orb
|
|
|
349
353
|
|
|
350
354
|
class MetricListParams = Orb::Models::MetricListParams
|
|
351
355
|
|
|
356
|
+
class MetricUnarchiveParams = Orb::Models::MetricUnarchiveParams
|
|
357
|
+
|
|
352
358
|
class MetricUpdateParams = Orb::Models::MetricUpdateParams
|
|
353
359
|
|
|
354
360
|
class Minimum = Orb::Models::Minimum
|
|
@@ -681,6 +687,8 @@ module Orb
|
|
|
681
687
|
|
|
682
688
|
class SubscriptionListParams = Orb::Models::SubscriptionListParams
|
|
683
689
|
|
|
690
|
+
class SubscriptionListSummaryParams = Orb::Models::SubscriptionListSummaryParams
|
|
691
|
+
|
|
684
692
|
class SubscriptionMinified = Orb::Models::SubscriptionMinified
|
|
685
693
|
|
|
686
694
|
class SubscriptionPlanChangedWebhookEvent = Orb::Models::SubscriptionPlanChangedWebhookEvent
|
|
@@ -6,6 +6,12 @@ module Orb
|
|
|
6
6
|
?request_options: Orb::request_opts
|
|
7
7
|
) -> Orb::Models::CreditBlockRetrieveResponse
|
|
8
8
|
|
|
9
|
+
def update: (
|
|
10
|
+
String block_id,
|
|
11
|
+
?metadata: ::Hash[Symbol, String?]?,
|
|
12
|
+
?request_options: Orb::request_opts
|
|
13
|
+
) -> Orb::Models::CreditBlockUpdateResponse
|
|
14
|
+
|
|
9
15
|
def delete: (String block_id, ?request_options: Orb::request_opts) -> nil
|
|
10
16
|
|
|
11
17
|
def list_invoices: (
|
|
@@ -29,11 +29,21 @@ module Orb
|
|
|
29
29
|
?request_options: Orb::request_opts
|
|
30
30
|
) -> Orb::Internal::Page[Orb::BillableMetric]
|
|
31
31
|
|
|
32
|
+
def archive: (
|
|
33
|
+
String metric_id,
|
|
34
|
+
?request_options: Orb::request_opts
|
|
35
|
+
) -> Orb::BillableMetric
|
|
36
|
+
|
|
32
37
|
def fetch: (
|
|
33
38
|
String metric_id,
|
|
34
39
|
?request_options: Orb::request_opts
|
|
35
40
|
) -> Orb::BillableMetric
|
|
36
41
|
|
|
42
|
+
def unarchive: (
|
|
43
|
+
String metric_id,
|
|
44
|
+
?request_options: Orb::request_opts
|
|
45
|
+
) -> Orb::BillableMetric
|
|
46
|
+
|
|
37
47
|
def initialize: (client: Orb::Client) -> void
|
|
38
48
|
end
|
|
39
49
|
end
|