orb-billing 1.57.0 → 1.59.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 +16 -0
- data/README.md +1 -1
- data/lib/orb/client.rb +0 -8
- data/lib/orb/models/invoice_list_params.rb +12 -11
- data/lib/orb/models/invoice_list_summary_params.rb +12 -11
- data/lib/orb/models/invoice_status_filter.rb +18 -0
- data/lib/orb/models/migration_create_params.rb +10 -1
- data/lib/orb/models/{beta_create_plan_version_params.rb → plan_create_plan_version_params.rb} +430 -430
- data/lib/orb/models/{beta_fetch_plan_version_params.rb → plan_fetch_plan_version_params.rb} +2 -2
- data/lib/orb/models/{beta_set_default_plan_version_params.rb → plan_set_default_plan_version_params.rb} +2 -2
- data/lib/orb/models/plan_version.rb +1 -1
- data/lib/orb/models/plans/draft_discard_params.rb +22 -0
- data/lib/orb/models/plans/draft_fetch_params.rb +22 -0
- data/lib/orb/models/plans/draft_publish_params.rb +31 -0
- data/lib/orb/models/plans/draft_save_params.rb +7522 -0
- data/lib/orb/models/plans/external_plan_id/draft_discard_params.rb +24 -0
- data/lib/orb/models/plans/external_plan_id/draft_fetch_params.rb +24 -0
- data/lib/orb/models/plans/external_plan_id/draft_publish_params.rb +33 -0
- data/lib/orb/models/plans/external_plan_id/draft_save_params.rb +7595 -0
- data/lib/orb/models/{beta → plans}/external_plan_id_create_plan_version_params.rb +430 -430
- data/lib/orb/models/{beta → plans}/external_plan_id_fetch_plan_version_params.rb +2 -2
- data/lib/orb/models/{beta → plans}/external_plan_id_set_default_plan_version_params.rb +2 -2
- data/lib/orb/models/plans/plan_version_draft.rb +279 -0
- data/lib/orb/models/subscription_list_params.rb +52 -15
- data/lib/orb/models/subscription_list_summary_params.rb +50 -15
- data/lib/orb/models/subscription_status_filter.rb +16 -0
- data/lib/orb/models.rb +10 -8
- data/lib/orb/resources/customers/credits/ledger.rb +56 -0
- data/lib/orb/resources/invoices.rb +16 -2
- data/lib/orb/resources/migrations.rb +3 -1
- data/lib/orb/resources/plans/draft.rb +124 -0
- data/lib/orb/resources/plans/external_plan_id/draft.rb +126 -0
- data/lib/orb/resources/plans/external_plan_id.rb +96 -0
- data/lib/orb/resources/plans.rb +96 -0
- data/lib/orb/resources/subscriptions.rb +6 -6
- data/lib/orb/version.rb +1 -1
- data/lib/orb.rb +19 -8
- data/rbi/orb/client.rbi +0 -7
- data/rbi/orb/models/invoice_list_params.rbi +37 -17
- data/rbi/orb/models/invoice_list_summary_params.rbi +38 -18
- data/rbi/orb/models/invoice_status_filter.rbi +22 -0
- data/rbi/orb/models/migration_create_params.rbi +13 -0
- data/rbi/orb/models/{beta_create_plan_version_params.rbi → plan_create_plan_version_params.rbi} +744 -744
- data/rbi/orb/models/{beta_fetch_plan_version_params.rbi → plan_fetch_plan_version_params.rbi} +2 -2
- data/rbi/orb/models/{beta_set_default_plan_version_params.rbi → plan_set_default_plan_version_params.rbi} +2 -2
- data/rbi/orb/models/plans/draft_discard_params.rbi +37 -0
- data/rbi/orb/models/plans/draft_fetch_params.rbi +37 -0
- data/rbi/orb/models/plans/draft_publish_params.rbi +54 -0
- data/rbi/orb/models/plans/draft_save_params.rbi +13143 -0
- data/rbi/orb/models/plans/external_plan_id/draft_discard_params.rbi +42 -0
- data/rbi/orb/models/plans/external_plan_id/draft_fetch_params.rbi +42 -0
- data/rbi/orb/models/plans/external_plan_id/draft_publish_params.rbi +59 -0
- data/rbi/orb/models/plans/external_plan_id/draft_save_params.rbi +13256 -0
- data/rbi/orb/models/{beta → plans}/external_plan_id_create_plan_version_params.rbi +744 -744
- data/rbi/orb/models/{beta → plans}/external_plan_id_fetch_plan_version_params.rbi +2 -2
- data/rbi/orb/models/{beta → plans}/external_plan_id_set_default_plan_version_params.rbi +2 -2
- data/rbi/orb/models/plans/plan_version_draft.rbi +502 -0
- data/rbi/orb/models/subscription_list_params.rbi +100 -21
- data/rbi/orb/models/subscription_list_summary_params.rbi +99 -28
- data/rbi/orb/models/subscription_status_filter.rbi +23 -0
- data/rbi/orb/models.rbi +10 -8
- data/rbi/orb/resources/customers/credits/ledger.rbi +56 -0
- data/rbi/orb/resources/invoices.rbi +28 -2
- data/rbi/orb/resources/migrations.rbi +4 -0
- data/rbi/orb/resources/{beta/external_plan_id.rbi → plans/draft.rbi} +58 -59
- data/rbi/orb/resources/plans/external_plan_id/draft.rbi +126 -0
- data/rbi/orb/resources/plans/external_plan_id.rbi +102 -0
- data/rbi/orb/resources/plans.rbi +94 -0
- data/rbi/orb/resources/subscriptions.rbi +25 -6
- data/sig/orb/client.rbs +0 -2
- data/sig/orb/models/invoice_list_params.rbs +10 -12
- data/sig/orb/models/invoice_list_summary_params.rbs +6 -8
- data/sig/orb/models/invoice_status_filter.rbs +17 -0
- data/sig/orb/models/migration_create_params.rbs +7 -0
- data/sig/orb/models/{beta_create_plan_version_params.rbs → plan_create_plan_version_params.rbs} +448 -448
- data/sig/orb/models/{beta_fetch_plan_version_params.rbs → plan_fetch_plan_version_params.rbs} +2 -2
- data/sig/orb/models/{beta_set_default_plan_version_params.rbs → plan_set_default_plan_version_params.rbs} +2 -2
- data/sig/orb/models/plans/draft_discard_params.rbs +25 -0
- data/sig/orb/models/plans/draft_fetch_params.rbs +25 -0
- data/sig/orb/models/plans/draft_publish_params.rbs +32 -0
- data/sig/orb/models/plans/draft_save_params.rbs +5210 -0
- data/sig/orb/models/plans/external_plan_id/draft_discard_params.rbs +27 -0
- data/sig/orb/models/plans/external_plan_id/draft_fetch_params.rbs +27 -0
- data/sig/orb/models/plans/external_plan_id/draft_publish_params.rbs +34 -0
- data/sig/orb/models/plans/external_plan_id/draft_save_params.rbs +5215 -0
- data/sig/orb/models/{beta → plans}/external_plan_id_create_plan_version_params.rbs +447 -447
- data/sig/orb/models/{beta → plans}/external_plan_id_fetch_plan_version_params.rbs +1 -1
- data/sig/orb/models/{beta → plans}/external_plan_id_set_default_plan_version_params.rbs +1 -1
- data/sig/orb/models/plans/plan_version_draft.rbs +205 -0
- data/sig/orb/models/subscription_list_params.rbs +34 -14
- data/sig/orb/models/subscription_list_summary_params.rbs +34 -14
- data/sig/orb/models/subscription_status_filter.rbs +15 -0
- data/sig/orb/models.rbs +10 -8
- data/sig/orb/resources/invoices.rbs +1 -1
- data/sig/orb/resources/migrations.rbs +1 -0
- data/sig/orb/resources/plans/draft.rbs +37 -0
- data/sig/orb/resources/plans/external_plan_id/draft.rbs +39 -0
- data/sig/orb/resources/plans/external_plan_id.rbs +27 -0
- data/sig/orb/resources/plans.rbs +27 -0
- data/sig/orb/resources/subscriptions.rbs +4 -4
- metadata +2044 -2005
- data/lib/orb/resources/beta/external_plan_id.rb +0 -108
- data/lib/orb/resources/beta.rb +0 -114
- data/rbi/orb/resources/beta.rbi +0 -110
- data/sig/orb/resources/beta/external_plan_id.rbs +0 -34
- data/sig/orb/resources/beta.rbs +0 -34
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: be523d90a6c8534cc76e0d782fc89afc7027285acd222ea20fc2f4f47b60fad2
|
|
4
|
+
data.tar.gz: ebef81e42f4e03646fca774c4466f5424c8fad29972eb6853754e6c01c156fc8
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 4edb010b3f75ab155d805b5abf22fc49b681efc7e19dce5b095d879a382351dcb4f79b6bff5d6c2a14766d7ccf167c8ae29d64b0edac310fcd41a485a5948894
|
|
7
|
+
data.tar.gz: 0ebefe242aa2d52d5e5d4497724fb7a8632431ef6b76fadc7cf696a0d8a6ca308bf7ce550d298d28eec3631b1527c63f71c4e4f943f480b79603972c15b61898
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [1.59.0](https://github.com/orbcorp/orb-ruby/compare/v1.58.0...v1.59.0) (2026-11-18)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Features
|
|
7
|
+
|
|
8
|
+
* **api:** api update ([ce159e7](https://github.com/orbcorp/orb-ruby/commit/ce159e709eefe069a41c52a4b834668423070944))
|
|
9
|
+
* **api:** document currency handling and void examples for ledger entries ([99715ca](https://github.com/orbcorp/orb-ruby/commit/99715ca90a6f21c3e1af85e255cbc50cf1f7484b))
|
|
10
|
+
|
|
11
|
+
## [1.58.0](https://github.com/orbcorp/orb-ruby/compare/v1.57.0...v1.58.0) (2026-11-17)
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
### Features
|
|
15
|
+
|
|
16
|
+
* **api:** add plan.migration_scheduled webhook when a plan migration is created ([5bda9b3](https://github.com/orbcorp/orb-ruby/commit/5bda9b3b6e9e4d868ebbd529a8ba4601cb5d76b7))
|
|
17
|
+
* **api:** add skip_grace_period option to plan version migrations ([5bda9b3](https://github.com/orbcorp/orb-ruby/commit/5bda9b3b6e9e4d868ebbd529a8ba4601cb5d76b7))
|
|
18
|
+
|
|
3
19
|
## [1.57.0](https://github.com/orbcorp/orb-ruby/compare/v1.56.0...v1.57.0) (2026-11-14)
|
|
4
20
|
|
|
5
21
|
|
data/README.md
CHANGED
data/lib/orb/client.rb
CHANGED
|
@@ -27,13 +27,6 @@ module Orb
|
|
|
27
27
|
# @return [Orb::Resources::TopLevel]
|
|
28
28
|
attr_reader :top_level
|
|
29
29
|
|
|
30
|
-
# The [Plan](/core-concepts#plan-and-price) resource represents a plan that can be
|
|
31
|
-
# subscribed to by a customer. Plans define the billing behavior of the
|
|
32
|
-
# subscription. You can see more about how to configure prices in the
|
|
33
|
-
# [Price resource](/reference/price).
|
|
34
|
-
# @return [Orb::Resources::Beta]
|
|
35
|
-
attr_reader :beta
|
|
36
|
-
|
|
37
30
|
# A coupon represents a reusable discount configuration that can be applied either
|
|
38
31
|
# as a fixed or percentage amount to an invoice or subscription. Coupons are
|
|
39
32
|
# activated using a redemption code, which applies the discount to a subscription
|
|
@@ -235,7 +228,6 @@ module Orb
|
|
|
235
228
|
|
|
236
229
|
@webhooks = Orb::Resources::Webhooks.new(client: self)
|
|
237
230
|
@top_level = Orb::Resources::TopLevel.new(client: self)
|
|
238
|
-
@beta = Orb::Resources::Beta.new(client: self)
|
|
239
231
|
@coupons = Orb::Resources::Coupons.new(client: self)
|
|
240
232
|
@credit_notes = Orb::Resources::CreditNotes.new(client: self)
|
|
241
233
|
@customers = Orb::Resources::Customers.new(client: self)
|
|
@@ -109,8 +109,8 @@ module Orb
|
|
|
109
109
|
|
|
110
110
|
# @!attribute status
|
|
111
111
|
#
|
|
112
|
-
# @return [Array<Symbol, Orb::Models::
|
|
113
|
-
optional :status, -> { Orb::
|
|
112
|
+
# @return [Symbol, Orb::Models::InvoiceStatusFilter, Array<Symbol, Orb::Models::InvoiceStatusFilter>, nil]
|
|
113
|
+
optional :status, union: -> { Orb::InvoiceListParams::Status }, nil?: true
|
|
114
114
|
|
|
115
115
|
# @!attribute subscription_id
|
|
116
116
|
#
|
|
@@ -157,7 +157,7 @@ module Orb
|
|
|
157
157
|
#
|
|
158
158
|
# @param limit [Integer] The number of items to fetch. Defaults to 20.
|
|
159
159
|
#
|
|
160
|
-
# @param status [Array<Symbol, Orb::Models::
|
|
160
|
+
# @param status [Symbol, Orb::Models::InvoiceStatusFilter, Array<Symbol, Orb::Models::InvoiceStatusFilter>, nil]
|
|
161
161
|
#
|
|
162
162
|
# @param subscription_id [String, nil]
|
|
163
163
|
#
|
|
@@ -174,16 +174,17 @@ module Orb
|
|
|
174
174
|
end
|
|
175
175
|
|
|
176
176
|
module Status
|
|
177
|
-
extend Orb::Internal::Type::
|
|
177
|
+
extend Orb::Internal::Type::Union
|
|
178
178
|
|
|
179
|
-
|
|
180
|
-
ISSUED = :issued
|
|
181
|
-
PAID = :paid
|
|
182
|
-
SYNCED = :synced
|
|
183
|
-
VOID = :void
|
|
179
|
+
variant enum: -> { Orb::InvoiceStatusFilter }
|
|
184
180
|
|
|
185
|
-
|
|
186
|
-
|
|
181
|
+
variant -> { Orb::Models::InvoiceListParams::Status::InvoiceStatusFilterArray }
|
|
182
|
+
|
|
183
|
+
# @!method self.variants
|
|
184
|
+
# @return [Array(Symbol, Orb::Models::InvoiceStatusFilter, Array<Symbol, Orb::Models::InvoiceStatusFilter>)]
|
|
185
|
+
|
|
186
|
+
# @type [Orb::Internal::Type::Converter]
|
|
187
|
+
InvoiceStatusFilterArray = Orb::Internal::Type::ArrayOf[enum: -> { Orb::InvoiceStatusFilter }]
|
|
187
188
|
end
|
|
188
189
|
end
|
|
189
190
|
end
|
|
@@ -101,8 +101,8 @@ module Orb
|
|
|
101
101
|
|
|
102
102
|
# @!attribute status
|
|
103
103
|
#
|
|
104
|
-
# @return [Symbol, Orb::Models::
|
|
105
|
-
optional :status,
|
|
104
|
+
# @return [Symbol, Orb::Models::InvoiceStatusFilter, Array<Symbol, Orb::Models::InvoiceStatusFilter>, nil]
|
|
105
|
+
optional :status, union: -> { Orb::InvoiceListSummaryParams::Status }, nil?: true
|
|
106
106
|
|
|
107
107
|
# @!attribute subscription_id
|
|
108
108
|
#
|
|
@@ -147,7 +147,7 @@ module Orb
|
|
|
147
147
|
#
|
|
148
148
|
# @param limit [Integer] The number of items to fetch. Defaults to 20.
|
|
149
149
|
#
|
|
150
|
-
# @param status [Symbol, Orb::Models::
|
|
150
|
+
# @param status [Symbol, Orb::Models::InvoiceStatusFilter, Array<Symbol, Orb::Models::InvoiceStatusFilter>, nil]
|
|
151
151
|
#
|
|
152
152
|
# @param subscription_id [String, nil]
|
|
153
153
|
#
|
|
@@ -164,16 +164,17 @@ module Orb
|
|
|
164
164
|
end
|
|
165
165
|
|
|
166
166
|
module Status
|
|
167
|
-
extend Orb::Internal::Type::
|
|
167
|
+
extend Orb::Internal::Type::Union
|
|
168
168
|
|
|
169
|
-
|
|
170
|
-
ISSUED = :issued
|
|
171
|
-
PAID = :paid
|
|
172
|
-
SYNCED = :synced
|
|
173
|
-
VOID = :void
|
|
169
|
+
variant enum: -> { Orb::InvoiceStatusFilter }
|
|
174
170
|
|
|
175
|
-
|
|
176
|
-
|
|
171
|
+
variant -> { Orb::Models::InvoiceListSummaryParams::Status::InvoiceStatusFilterArray }
|
|
172
|
+
|
|
173
|
+
# @!method self.variants
|
|
174
|
+
# @return [Array(Symbol, Orb::Models::InvoiceStatusFilter, Array<Symbol, Orb::Models::InvoiceStatusFilter>)]
|
|
175
|
+
|
|
176
|
+
# @type [Orb::Internal::Type::Converter]
|
|
177
|
+
InvoiceStatusFilterArray = Orb::Internal::Type::ArrayOf[enum: -> { Orb::InvoiceStatusFilter }]
|
|
177
178
|
end
|
|
178
179
|
end
|
|
179
180
|
end
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Orb
|
|
4
|
+
module Models
|
|
5
|
+
module InvoiceStatusFilter
|
|
6
|
+
extend Orb::Internal::Type::Enum
|
|
7
|
+
|
|
8
|
+
DRAFT = :draft
|
|
9
|
+
ISSUED = :issued
|
|
10
|
+
PAID = :paid
|
|
11
|
+
SYNCED = :synced
|
|
12
|
+
VOID = :void
|
|
13
|
+
|
|
14
|
+
# @!method self.values
|
|
15
|
+
# @return [Array<Symbol>]
|
|
16
|
+
end
|
|
17
|
+
end
|
|
18
|
+
end
|
|
@@ -88,13 +88,20 @@ module Orb
|
|
|
88
88
|
# @return [String, nil]
|
|
89
89
|
optional :reason, String, nil?: true
|
|
90
90
|
|
|
91
|
+
# @!attribute skip_grace_period
|
|
92
|
+
# A new migration waits 5 minutes before it changes any subscriptions, so it can
|
|
93
|
+
# be canceled. When true, it starts right away instead.
|
|
94
|
+
#
|
|
95
|
+
# @return [Boolean, nil]
|
|
96
|
+
optional :skip_grace_period, Orb::Internal::Type::Boolean
|
|
97
|
+
|
|
91
98
|
# @!attribute statuses
|
|
92
99
|
# Migrate subscriptions with these statuses. Defaults to active subscriptions.
|
|
93
100
|
#
|
|
94
101
|
# @return [Array<Symbol, Orb::Models::MigrationCreateParams::Status>, nil]
|
|
95
102
|
optional :statuses, -> { Orb::Internal::Type::ArrayOf[enum: Orb::MigrationCreateParams::Status] }
|
|
96
103
|
|
|
97
|
-
# @!method initialize(effective_time:, target_plan_version_number:, allow_invoice_credit_or_void: nil, can_defer_billing: nil, effective_date: nil, excluded_subscription_ids: nil, external_plan_id: nil, in_trial: nil, included_subscription_ids: nil, plan_id: nil, plan_version_numbers: nil, reason: nil, statuses: nil, request_options: {})
|
|
104
|
+
# @!method initialize(effective_time:, target_plan_version_number:, allow_invoice_credit_or_void: nil, can_defer_billing: nil, effective_date: nil, excluded_subscription_ids: nil, external_plan_id: nil, in_trial: nil, included_subscription_ids: nil, plan_id: nil, plan_version_numbers: nil, reason: nil, skip_grace_period: nil, statuses: nil, request_options: {})
|
|
98
105
|
# Some parameter documentations has been truncated, see
|
|
99
106
|
# {Orb::Models::MigrationCreateParams} for more details.
|
|
100
107
|
#
|
|
@@ -123,6 +130,8 @@ module Orb
|
|
|
123
130
|
#
|
|
124
131
|
# @param reason [String, nil] Why the migration was created.
|
|
125
132
|
#
|
|
133
|
+
# @param skip_grace_period [Boolean] A new migration waits 5 minutes before it changes any subscriptions, so it can b
|
|
134
|
+
#
|
|
126
135
|
# @param statuses [Array<Symbol, Orb::Models::MigrationCreateParams::Status>] Migrate subscriptions with these statuses. Defaults to active subscriptions.
|
|
127
136
|
#
|
|
128
137
|
# @param request_options [Orb::RequestOptions, Hash{Symbol=>Object}]
|