orb-billing 1.55.0 → 1.56.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 +9 -0
- data/README.md +1 -1
- data/lib/orb/client.rb +7 -0
- data/lib/orb/models/metric_update_params.rb +4 -3
- data/lib/orb/models/migration_cancel_params.rb +20 -0
- data/lib/orb/models/migration_cancel_response.rb +133 -0
- data/lib/orb/models/migration_create_params.rb +159 -0
- data/lib/orb/models/migration_create_response.rb +133 -0
- data/lib/orb/models/migration_list_params.rb +48 -0
- data/lib/orb/models/migration_list_response.rb +133 -0
- data/lib/orb/models/migration_retrieve_params.rb +20 -0
- data/lib/orb/models/migration_retrieve_response.rb +133 -0
- data/lib/orb/models/migration_subscription.rb +75 -0
- data/lib/orb/models/migrations/subscription_list_params.rb +74 -0
- data/lib/orb/models/plans/migration_cancel_response.rb +28 -8
- data/lib/orb/models/plans/migration_list_response.rb +28 -8
- data/lib/orb/models/plans/migration_retrieve_response.rb +28 -8
- data/lib/orb/models.rb +12 -0
- data/lib/orb/resources/metrics.rb +11 -10
- data/lib/orb/resources/migrations/subscriptions.rb +60 -0
- data/lib/orb/resources/migrations.rb +153 -0
- data/lib/orb/version.rb +1 -1
- data/lib/orb.rb +12 -0
- data/rbi/orb/client.rbi +6 -0
- data/rbi/orb/models/metric_update_params.rbi +6 -4
- data/rbi/orb/models/migration_cancel_params.rbi +35 -0
- data/rbi/orb/models/migration_cancel_response.rbi +218 -0
- data/rbi/orb/models/migration_create_params.rbi +248 -0
- data/rbi/orb/models/migration_create_response.rbi +218 -0
- data/rbi/orb/models/migration_list_params.rbi +66 -0
- data/rbi/orb/models/migration_list_response.rbi +214 -0
- data/rbi/orb/models/migration_retrieve_params.rbi +35 -0
- data/rbi/orb/models/migration_retrieve_response.rbi +221 -0
- data/rbi/orb/models/migration_subscription.rbi +112 -0
- data/rbi/orb/models/migrations/subscription_list_params.rbi +147 -0
- data/rbi/orb/models/plans/migration_cancel_response.rbi +36 -12
- data/rbi/orb/models/plans/migration_list_response.rbi +36 -12
- data/rbi/orb/models/plans/migration_retrieve_response.rbi +36 -12
- data/rbi/orb/models.rbi +12 -0
- data/rbi/orb/resources/metrics.rbi +13 -11
- data/rbi/orb/resources/migrations/subscriptions.rbi +54 -0
- data/rbi/orb/resources/migrations.rbi +130 -0
- data/sig/orb/client.rbs +2 -0
- data/sig/orb/models/migration_cancel_params.rbs +23 -0
- data/sig/orb/models/migration_cancel_response.rbs +84 -0
- data/sig/orb/models/migration_create_params.rbs +126 -0
- data/sig/orb/models/migration_create_response.rbs +84 -0
- data/sig/orb/models/migration_list_params.rbs +43 -0
- data/sig/orb/models/migration_list_response.rbs +84 -0
- data/sig/orb/models/migration_retrieve_params.rbs +23 -0
- data/sig/orb/models/migration_retrieve_response.rbs +84 -0
- data/sig/orb/models/migration_subscription.rbs +54 -0
- data/sig/orb/models/migrations/subscription_list_params.rbs +64 -0
- data/sig/orb/models/plans/migration_cancel_response.rbs +17 -4
- data/sig/orb/models/plans/migration_list_response.rbs +17 -4
- data/sig/orb/models/plans/migration_retrieve_response.rbs +17 -4
- data/sig/orb/models.rbs +12 -0
- data/sig/orb/resources/migrations/subscriptions.rbs +18 -0
- data/sig/orb/resources/migrations.rbs +44 -0
- metadata +37 -1
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Orb
|
|
4
|
+
module Resources
|
|
5
|
+
# A migration moves a plan's subscriptions onto one of the plan's versions. Each
|
|
6
|
+
# subscription is migrated asynchronously, either immediately or at a scheduled
|
|
7
|
+
# time, and the migration reports its overall status as it progresses.
|
|
8
|
+
class Migrations
|
|
9
|
+
# A migration moves a plan's subscriptions onto one of the plan's versions. Each
|
|
10
|
+
# subscription is migrated asynchronously, either immediately or at a scheduled
|
|
11
|
+
# time, and the migration reports its overall status as it progresses.
|
|
12
|
+
sig { returns(Orb::Resources::Migrations::Subscriptions) }
|
|
13
|
+
attr_reader :subscriptions
|
|
14
|
+
|
|
15
|
+
# This endpoint creates a migration of a plan's subscriptions to one of its
|
|
16
|
+
# versions. With `included_subscription_ids` it migrates exactly those
|
|
17
|
+
# subscriptions; otherwise it migrates the plan's subscriptions that match the
|
|
18
|
+
# filters. Each subscription is migrated asynchronously; fetch the migration to
|
|
19
|
+
# follow its status.
|
|
20
|
+
sig do
|
|
21
|
+
params(
|
|
22
|
+
effective_time: Orb::MigrationCreateParams::EffectiveTime::OrSymbol,
|
|
23
|
+
target_plan_version_number: Integer,
|
|
24
|
+
allow_invoice_credit_or_void: T::Boolean,
|
|
25
|
+
can_defer_billing: T::Boolean,
|
|
26
|
+
effective_date: T.nilable(Date),
|
|
27
|
+
excluded_subscription_ids: T.nilable(T::Array[String]),
|
|
28
|
+
external_plan_id: T.nilable(String),
|
|
29
|
+
in_trial: T.nilable(T::Boolean),
|
|
30
|
+
included_subscription_ids: T.nilable(T::Array[String]),
|
|
31
|
+
plan_id: T.nilable(String),
|
|
32
|
+
plan_version_numbers: T.nilable(T::Array[Integer]),
|
|
33
|
+
reason: T.nilable(String),
|
|
34
|
+
statuses: T::Array[Orb::MigrationCreateParams::Status::OrSymbol],
|
|
35
|
+
request_options: Orb::RequestOptions::OrHash
|
|
36
|
+
).returns(Orb::Models::MigrationCreateResponse)
|
|
37
|
+
end
|
|
38
|
+
def create(
|
|
39
|
+
# When the migration takes effect: 'immediately', 'requested_date' on
|
|
40
|
+
# `effective_date`, 'start_of_term' or 'end_of_term' for the start or end of each
|
|
41
|
+
# subscription's current billing period, or 'start_of_invoice' or 'end_of_invoice'
|
|
42
|
+
# for the start of its current or next invoice.
|
|
43
|
+
effective_time:,
|
|
44
|
+
# The plan version to migrate subscriptions to. It can't be a draft version.
|
|
45
|
+
target_plan_version_number:,
|
|
46
|
+
# When false, a subscription whose migration would void an issued invoice or
|
|
47
|
+
# create a credit note fails instead.
|
|
48
|
+
allow_invoice_credit_or_void: nil,
|
|
49
|
+
# When true, an in-arrears price the migration ends mid-cycle bills its final line
|
|
50
|
+
# item on the next scheduled invoice instead of on its end date.
|
|
51
|
+
can_defer_billing: nil,
|
|
52
|
+
# The date the migration takes effect, at midnight in each customer's timezone.
|
|
53
|
+
# Required when `effective_time` is `requested_date`, and not allowed otherwise.
|
|
54
|
+
effective_date: nil,
|
|
55
|
+
# Leave these subscriptions out. Can't be combined with
|
|
56
|
+
# `included_subscription_ids`.
|
|
57
|
+
excluded_subscription_ids: nil,
|
|
58
|
+
# The external ID of the plan whose subscriptions to migrate.
|
|
59
|
+
external_plan_id: nil,
|
|
60
|
+
# `true` migrates only subscriptions in a trial, `false` only subscriptions not in
|
|
61
|
+
# a trial.
|
|
62
|
+
in_trial: nil,
|
|
63
|
+
# Migrate only these subscriptions. When set, the filters below are ignored.
|
|
64
|
+
included_subscription_ids: nil,
|
|
65
|
+
# The plan whose subscriptions to migrate. Exactly one of `plan_id` and
|
|
66
|
+
# `external_plan_id` is required.
|
|
67
|
+
plan_id: nil,
|
|
68
|
+
# Migrate only subscriptions currently on these plan versions.
|
|
69
|
+
plan_version_numbers: nil,
|
|
70
|
+
# Why the migration was created.
|
|
71
|
+
reason: nil,
|
|
72
|
+
# Migrate subscriptions with these statuses. Defaults to active subscriptions.
|
|
73
|
+
statuses: nil,
|
|
74
|
+
request_options: {}
|
|
75
|
+
)
|
|
76
|
+
end
|
|
77
|
+
|
|
78
|
+
# This endpoint returns a migration identified by its ID.
|
|
79
|
+
sig do
|
|
80
|
+
params(
|
|
81
|
+
migration_id: String,
|
|
82
|
+
request_options: Orb::RequestOptions::OrHash
|
|
83
|
+
).returns(Orb::Models::MigrationRetrieveResponse)
|
|
84
|
+
end
|
|
85
|
+
def retrieve(migration_id, request_options: {})
|
|
86
|
+
end
|
|
87
|
+
|
|
88
|
+
# This endpoint returns a list of migrations across all plans in the account,
|
|
89
|
+
# optionally filtered by plan (`plan_id` or `external_plan_id`). The list of
|
|
90
|
+
# migrations is ordered starting from the most recently created migration. The
|
|
91
|
+
# response also includes pagination_metadata, which lets the caller retrieve the
|
|
92
|
+
# next page of results if they exist.
|
|
93
|
+
sig do
|
|
94
|
+
params(
|
|
95
|
+
cursor: T.nilable(String),
|
|
96
|
+
external_plan_id: T.nilable(String),
|
|
97
|
+
limit: Integer,
|
|
98
|
+
plan_id: T.nilable(String),
|
|
99
|
+
request_options: Orb::RequestOptions::OrHash
|
|
100
|
+
).returns(Orb::Internal::Page[Orb::Models::MigrationListResponse])
|
|
101
|
+
end
|
|
102
|
+
def list(
|
|
103
|
+
# Cursor for pagination. This can be populated by the `next_cursor` value returned
|
|
104
|
+
# from the initial request.
|
|
105
|
+
cursor: nil,
|
|
106
|
+
external_plan_id: nil,
|
|
107
|
+
# The number of items to fetch. Defaults to 20.
|
|
108
|
+
limit: nil,
|
|
109
|
+
plan_id: nil,
|
|
110
|
+
request_options: {}
|
|
111
|
+
)
|
|
112
|
+
end
|
|
113
|
+
|
|
114
|
+
# This endpoint cancels a migration identified by its ID.
|
|
115
|
+
sig do
|
|
116
|
+
params(
|
|
117
|
+
migration_id: String,
|
|
118
|
+
request_options: Orb::RequestOptions::OrHash
|
|
119
|
+
).returns(Orb::Models::MigrationCancelResponse)
|
|
120
|
+
end
|
|
121
|
+
def cancel(migration_id, request_options: {})
|
|
122
|
+
end
|
|
123
|
+
|
|
124
|
+
# @api private
|
|
125
|
+
sig { params(client: Orb::Client).returns(T.attached_class) }
|
|
126
|
+
def self.new(client:)
|
|
127
|
+
end
|
|
128
|
+
end
|
|
129
|
+
end
|
|
130
|
+
end
|
data/sig/orb/client.rbs
CHANGED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
module Orb
|
|
2
|
+
module Models
|
|
3
|
+
type migration_cancel_params =
|
|
4
|
+
{ migration_id: String } & Orb::Internal::Type::request_parameters
|
|
5
|
+
|
|
6
|
+
class MigrationCancelParams < Orb::Internal::Type::BaseModel
|
|
7
|
+
extend Orb::Internal::Type::RequestParameters::Converter
|
|
8
|
+
include Orb::Internal::Type::RequestParameters
|
|
9
|
+
|
|
10
|
+
attr_accessor migration_id: String
|
|
11
|
+
|
|
12
|
+
def initialize: (
|
|
13
|
+
migration_id: String,
|
|
14
|
+
?request_options: Orb::request_opts
|
|
15
|
+
) -> void
|
|
16
|
+
|
|
17
|
+
def to_hash: -> {
|
|
18
|
+
migration_id: String,
|
|
19
|
+
request_options: Orb::RequestOptions
|
|
20
|
+
}
|
|
21
|
+
end
|
|
22
|
+
end
|
|
23
|
+
end
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
module Orb
|
|
2
|
+
module Models
|
|
3
|
+
type migration_cancel_response =
|
|
4
|
+
{
|
|
5
|
+
id: String,
|
|
6
|
+
effective_time: Orb::Models::MigrationCancelResponse::effective_time?,
|
|
7
|
+
ended_at: Time?,
|
|
8
|
+
plan_id: String,
|
|
9
|
+
started_at: Time?,
|
|
10
|
+
status: Orb::Models::MigrationCancelResponse::status,
|
|
11
|
+
target_plan_version_number: Integer
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
class MigrationCancelResponse < Orb::Internal::Type::BaseModel
|
|
15
|
+
attr_accessor id: String
|
|
16
|
+
|
|
17
|
+
attr_accessor effective_time: Orb::Models::MigrationCancelResponse::effective_time?
|
|
18
|
+
|
|
19
|
+
attr_accessor ended_at: Time?
|
|
20
|
+
|
|
21
|
+
attr_accessor plan_id: String
|
|
22
|
+
|
|
23
|
+
attr_accessor started_at: Time?
|
|
24
|
+
|
|
25
|
+
attr_accessor status: Orb::Models::MigrationCancelResponse::status
|
|
26
|
+
|
|
27
|
+
attr_accessor target_plan_version_number: Integer
|
|
28
|
+
|
|
29
|
+
def initialize: (
|
|
30
|
+
id: String,
|
|
31
|
+
effective_time: Orb::Models::MigrationCancelResponse::effective_time?,
|
|
32
|
+
ended_at: Time?,
|
|
33
|
+
plan_id: String,
|
|
34
|
+
started_at: Time?,
|
|
35
|
+
status: Orb::Models::MigrationCancelResponse::status,
|
|
36
|
+
target_plan_version_number: Integer
|
|
37
|
+
) -> void
|
|
38
|
+
|
|
39
|
+
def to_hash: -> {
|
|
40
|
+
id: String,
|
|
41
|
+
effective_time: Orb::Models::MigrationCancelResponse::effective_time?,
|
|
42
|
+
ended_at: Time?,
|
|
43
|
+
plan_id: String,
|
|
44
|
+
started_at: Time?,
|
|
45
|
+
status: Orb::Models::MigrationCancelResponse::status,
|
|
46
|
+
target_plan_version_number: Integer
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
type effective_time =
|
|
50
|
+
Date
|
|
51
|
+
| Time
|
|
52
|
+
| :start_of_term
|
|
53
|
+
| :end_of_term
|
|
54
|
+
| :start_of_invoice
|
|
55
|
+
| :end_of_invoice
|
|
56
|
+
|
|
57
|
+
module EffectiveTime
|
|
58
|
+
extend Orb::Internal::Type::Union
|
|
59
|
+
|
|
60
|
+
def self?.variants: -> ::Array[Orb::Models::MigrationCancelResponse::effective_time]
|
|
61
|
+
|
|
62
|
+
START_OF_TERM: :start_of_term
|
|
63
|
+
END_OF_TERM: :end_of_term
|
|
64
|
+
START_OF_INVOICE: :start_of_invoice
|
|
65
|
+
END_OF_INVOICE: :end_of_invoice
|
|
66
|
+
end
|
|
67
|
+
|
|
68
|
+
type status =
|
|
69
|
+
:not_started | :in_progress | :completed | :action_needed | :canceled
|
|
70
|
+
|
|
71
|
+
module Status
|
|
72
|
+
extend Orb::Internal::Type::Enum
|
|
73
|
+
|
|
74
|
+
NOT_STARTED: :not_started
|
|
75
|
+
IN_PROGRESS: :in_progress
|
|
76
|
+
COMPLETED: :completed
|
|
77
|
+
ACTION_NEEDED: :action_needed
|
|
78
|
+
CANCELED: :canceled
|
|
79
|
+
|
|
80
|
+
def self?.values: -> ::Array[Orb::Models::MigrationCancelResponse::status]
|
|
81
|
+
end
|
|
82
|
+
end
|
|
83
|
+
end
|
|
84
|
+
end
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
module Orb
|
|
2
|
+
module Models
|
|
3
|
+
type migration_create_params =
|
|
4
|
+
{
|
|
5
|
+
effective_time: Orb::Models::MigrationCreateParams::effective_time,
|
|
6
|
+
target_plan_version_number: Integer,
|
|
7
|
+
allow_invoice_credit_or_void: bool,
|
|
8
|
+
can_defer_billing: bool,
|
|
9
|
+
effective_date: Date?,
|
|
10
|
+
excluded_subscription_ids: ::Array[String]?,
|
|
11
|
+
external_plan_id: String?,
|
|
12
|
+
in_trial: bool?,
|
|
13
|
+
included_subscription_ids: ::Array[String]?,
|
|
14
|
+
plan_id: String?,
|
|
15
|
+
plan_version_numbers: ::Array[Integer]?,
|
|
16
|
+
reason: String?,
|
|
17
|
+
statuses: ::Array[Orb::Models::MigrationCreateParams::status]
|
|
18
|
+
}
|
|
19
|
+
& Orb::Internal::Type::request_parameters
|
|
20
|
+
|
|
21
|
+
class MigrationCreateParams < Orb::Internal::Type::BaseModel
|
|
22
|
+
extend Orb::Internal::Type::RequestParameters::Converter
|
|
23
|
+
include Orb::Internal::Type::RequestParameters
|
|
24
|
+
|
|
25
|
+
attr_accessor effective_time: Orb::Models::MigrationCreateParams::effective_time
|
|
26
|
+
|
|
27
|
+
attr_accessor target_plan_version_number: Integer
|
|
28
|
+
|
|
29
|
+
attr_reader allow_invoice_credit_or_void: bool?
|
|
30
|
+
|
|
31
|
+
def allow_invoice_credit_or_void=: (bool) -> bool
|
|
32
|
+
|
|
33
|
+
attr_reader can_defer_billing: bool?
|
|
34
|
+
|
|
35
|
+
def can_defer_billing=: (bool) -> bool
|
|
36
|
+
|
|
37
|
+
attr_accessor effective_date: Date?
|
|
38
|
+
|
|
39
|
+
attr_accessor excluded_subscription_ids: ::Array[String]?
|
|
40
|
+
|
|
41
|
+
attr_accessor external_plan_id: String?
|
|
42
|
+
|
|
43
|
+
attr_accessor in_trial: bool?
|
|
44
|
+
|
|
45
|
+
attr_accessor included_subscription_ids: ::Array[String]?
|
|
46
|
+
|
|
47
|
+
attr_accessor plan_id: String?
|
|
48
|
+
|
|
49
|
+
attr_accessor plan_version_numbers: ::Array[Integer]?
|
|
50
|
+
|
|
51
|
+
attr_accessor reason: String?
|
|
52
|
+
|
|
53
|
+
attr_reader statuses: ::Array[Orb::Models::MigrationCreateParams::status]?
|
|
54
|
+
|
|
55
|
+
def statuses=: (
|
|
56
|
+
::Array[Orb::Models::MigrationCreateParams::status]
|
|
57
|
+
) -> ::Array[Orb::Models::MigrationCreateParams::status]
|
|
58
|
+
|
|
59
|
+
def initialize: (
|
|
60
|
+
effective_time: Orb::Models::MigrationCreateParams::effective_time,
|
|
61
|
+
target_plan_version_number: Integer,
|
|
62
|
+
?allow_invoice_credit_or_void: bool,
|
|
63
|
+
?can_defer_billing: bool,
|
|
64
|
+
?effective_date: Date?,
|
|
65
|
+
?excluded_subscription_ids: ::Array[String]?,
|
|
66
|
+
?external_plan_id: String?,
|
|
67
|
+
?in_trial: bool?,
|
|
68
|
+
?included_subscription_ids: ::Array[String]?,
|
|
69
|
+
?plan_id: String?,
|
|
70
|
+
?plan_version_numbers: ::Array[Integer]?,
|
|
71
|
+
?reason: String?,
|
|
72
|
+
?statuses: ::Array[Orb::Models::MigrationCreateParams::status],
|
|
73
|
+
?request_options: Orb::request_opts
|
|
74
|
+
) -> void
|
|
75
|
+
|
|
76
|
+
def to_hash: -> {
|
|
77
|
+
effective_time: Orb::Models::MigrationCreateParams::effective_time,
|
|
78
|
+
target_plan_version_number: Integer,
|
|
79
|
+
allow_invoice_credit_or_void: bool,
|
|
80
|
+
can_defer_billing: bool,
|
|
81
|
+
effective_date: Date?,
|
|
82
|
+
excluded_subscription_ids: ::Array[String]?,
|
|
83
|
+
external_plan_id: String?,
|
|
84
|
+
in_trial: bool?,
|
|
85
|
+
included_subscription_ids: ::Array[String]?,
|
|
86
|
+
plan_id: String?,
|
|
87
|
+
plan_version_numbers: ::Array[Integer]?,
|
|
88
|
+
reason: String?,
|
|
89
|
+
statuses: ::Array[Orb::Models::MigrationCreateParams::status],
|
|
90
|
+
request_options: Orb::RequestOptions
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
type effective_time =
|
|
94
|
+
:immediately
|
|
95
|
+
| :requested_date
|
|
96
|
+
| :start_of_term
|
|
97
|
+
| :end_of_term
|
|
98
|
+
| :start_of_invoice
|
|
99
|
+
| :end_of_invoice
|
|
100
|
+
|
|
101
|
+
module EffectiveTime
|
|
102
|
+
extend Orb::Internal::Type::Enum
|
|
103
|
+
|
|
104
|
+
IMMEDIATELY: :immediately
|
|
105
|
+
REQUESTED_DATE: :requested_date
|
|
106
|
+
START_OF_TERM: :start_of_term
|
|
107
|
+
END_OF_TERM: :end_of_term
|
|
108
|
+
START_OF_INVOICE: :start_of_invoice
|
|
109
|
+
END_OF_INVOICE: :end_of_invoice
|
|
110
|
+
|
|
111
|
+
def self?.values: -> ::Array[Orb::Models::MigrationCreateParams::effective_time]
|
|
112
|
+
end
|
|
113
|
+
|
|
114
|
+
type status = :active | :upcoming
|
|
115
|
+
|
|
116
|
+
module Status
|
|
117
|
+
extend Orb::Internal::Type::Enum
|
|
118
|
+
|
|
119
|
+
ACTIVE: :active
|
|
120
|
+
UPCOMING: :upcoming
|
|
121
|
+
|
|
122
|
+
def self?.values: -> ::Array[Orb::Models::MigrationCreateParams::status]
|
|
123
|
+
end
|
|
124
|
+
end
|
|
125
|
+
end
|
|
126
|
+
end
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
module Orb
|
|
2
|
+
module Models
|
|
3
|
+
type migration_create_response =
|
|
4
|
+
{
|
|
5
|
+
id: String,
|
|
6
|
+
effective_time: Orb::Models::MigrationCreateResponse::effective_time?,
|
|
7
|
+
ended_at: Time?,
|
|
8
|
+
plan_id: String,
|
|
9
|
+
started_at: Time?,
|
|
10
|
+
status: Orb::Models::MigrationCreateResponse::status,
|
|
11
|
+
target_plan_version_number: Integer
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
class MigrationCreateResponse < Orb::Internal::Type::BaseModel
|
|
15
|
+
attr_accessor id: String
|
|
16
|
+
|
|
17
|
+
attr_accessor effective_time: Orb::Models::MigrationCreateResponse::effective_time?
|
|
18
|
+
|
|
19
|
+
attr_accessor ended_at: Time?
|
|
20
|
+
|
|
21
|
+
attr_accessor plan_id: String
|
|
22
|
+
|
|
23
|
+
attr_accessor started_at: Time?
|
|
24
|
+
|
|
25
|
+
attr_accessor status: Orb::Models::MigrationCreateResponse::status
|
|
26
|
+
|
|
27
|
+
attr_accessor target_plan_version_number: Integer
|
|
28
|
+
|
|
29
|
+
def initialize: (
|
|
30
|
+
id: String,
|
|
31
|
+
effective_time: Orb::Models::MigrationCreateResponse::effective_time?,
|
|
32
|
+
ended_at: Time?,
|
|
33
|
+
plan_id: String,
|
|
34
|
+
started_at: Time?,
|
|
35
|
+
status: Orb::Models::MigrationCreateResponse::status,
|
|
36
|
+
target_plan_version_number: Integer
|
|
37
|
+
) -> void
|
|
38
|
+
|
|
39
|
+
def to_hash: -> {
|
|
40
|
+
id: String,
|
|
41
|
+
effective_time: Orb::Models::MigrationCreateResponse::effective_time?,
|
|
42
|
+
ended_at: Time?,
|
|
43
|
+
plan_id: String,
|
|
44
|
+
started_at: Time?,
|
|
45
|
+
status: Orb::Models::MigrationCreateResponse::status,
|
|
46
|
+
target_plan_version_number: Integer
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
type effective_time =
|
|
50
|
+
Date
|
|
51
|
+
| Time
|
|
52
|
+
| :start_of_term
|
|
53
|
+
| :end_of_term
|
|
54
|
+
| :start_of_invoice
|
|
55
|
+
| :end_of_invoice
|
|
56
|
+
|
|
57
|
+
module EffectiveTime
|
|
58
|
+
extend Orb::Internal::Type::Union
|
|
59
|
+
|
|
60
|
+
def self?.variants: -> ::Array[Orb::Models::MigrationCreateResponse::effective_time]
|
|
61
|
+
|
|
62
|
+
START_OF_TERM: :start_of_term
|
|
63
|
+
END_OF_TERM: :end_of_term
|
|
64
|
+
START_OF_INVOICE: :start_of_invoice
|
|
65
|
+
END_OF_INVOICE: :end_of_invoice
|
|
66
|
+
end
|
|
67
|
+
|
|
68
|
+
type status =
|
|
69
|
+
:not_started | :in_progress | :completed | :action_needed | :canceled
|
|
70
|
+
|
|
71
|
+
module Status
|
|
72
|
+
extend Orb::Internal::Type::Enum
|
|
73
|
+
|
|
74
|
+
NOT_STARTED: :not_started
|
|
75
|
+
IN_PROGRESS: :in_progress
|
|
76
|
+
COMPLETED: :completed
|
|
77
|
+
ACTION_NEEDED: :action_needed
|
|
78
|
+
CANCELED: :canceled
|
|
79
|
+
|
|
80
|
+
def self?.values: -> ::Array[Orb::Models::MigrationCreateResponse::status]
|
|
81
|
+
end
|
|
82
|
+
end
|
|
83
|
+
end
|
|
84
|
+
end
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
module Orb
|
|
2
|
+
module Models
|
|
3
|
+
type migration_list_params =
|
|
4
|
+
{
|
|
5
|
+
cursor: String?,
|
|
6
|
+
external_plan_id: String?,
|
|
7
|
+
limit: Integer,
|
|
8
|
+
plan_id: String?
|
|
9
|
+
}
|
|
10
|
+
& Orb::Internal::Type::request_parameters
|
|
11
|
+
|
|
12
|
+
class MigrationListParams < Orb::Internal::Type::BaseModel
|
|
13
|
+
extend Orb::Internal::Type::RequestParameters::Converter
|
|
14
|
+
include Orb::Internal::Type::RequestParameters
|
|
15
|
+
|
|
16
|
+
attr_accessor cursor: String?
|
|
17
|
+
|
|
18
|
+
attr_accessor external_plan_id: String?
|
|
19
|
+
|
|
20
|
+
attr_reader limit: Integer?
|
|
21
|
+
|
|
22
|
+
def limit=: (Integer) -> Integer
|
|
23
|
+
|
|
24
|
+
attr_accessor plan_id: String?
|
|
25
|
+
|
|
26
|
+
def initialize: (
|
|
27
|
+
?cursor: String?,
|
|
28
|
+
?external_plan_id: String?,
|
|
29
|
+
?limit: Integer,
|
|
30
|
+
?plan_id: String?,
|
|
31
|
+
?request_options: Orb::request_opts
|
|
32
|
+
) -> void
|
|
33
|
+
|
|
34
|
+
def to_hash: -> {
|
|
35
|
+
cursor: String?,
|
|
36
|
+
external_plan_id: String?,
|
|
37
|
+
limit: Integer,
|
|
38
|
+
plan_id: String?,
|
|
39
|
+
request_options: Orb::RequestOptions
|
|
40
|
+
}
|
|
41
|
+
end
|
|
42
|
+
end
|
|
43
|
+
end
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
module Orb
|
|
2
|
+
module Models
|
|
3
|
+
type migration_list_response =
|
|
4
|
+
{
|
|
5
|
+
id: String,
|
|
6
|
+
effective_time: Orb::Models::MigrationListResponse::effective_time?,
|
|
7
|
+
ended_at: Time?,
|
|
8
|
+
plan_id: String,
|
|
9
|
+
started_at: Time?,
|
|
10
|
+
status: Orb::Models::MigrationListResponse::status,
|
|
11
|
+
target_plan_version_number: Integer
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
class MigrationListResponse < Orb::Internal::Type::BaseModel
|
|
15
|
+
attr_accessor id: String
|
|
16
|
+
|
|
17
|
+
attr_accessor effective_time: Orb::Models::MigrationListResponse::effective_time?
|
|
18
|
+
|
|
19
|
+
attr_accessor ended_at: Time?
|
|
20
|
+
|
|
21
|
+
attr_accessor plan_id: String
|
|
22
|
+
|
|
23
|
+
attr_accessor started_at: Time?
|
|
24
|
+
|
|
25
|
+
attr_accessor status: Orb::Models::MigrationListResponse::status
|
|
26
|
+
|
|
27
|
+
attr_accessor target_plan_version_number: Integer
|
|
28
|
+
|
|
29
|
+
def initialize: (
|
|
30
|
+
id: String,
|
|
31
|
+
effective_time: Orb::Models::MigrationListResponse::effective_time?,
|
|
32
|
+
ended_at: Time?,
|
|
33
|
+
plan_id: String,
|
|
34
|
+
started_at: Time?,
|
|
35
|
+
status: Orb::Models::MigrationListResponse::status,
|
|
36
|
+
target_plan_version_number: Integer
|
|
37
|
+
) -> void
|
|
38
|
+
|
|
39
|
+
def to_hash: -> {
|
|
40
|
+
id: String,
|
|
41
|
+
effective_time: Orb::Models::MigrationListResponse::effective_time?,
|
|
42
|
+
ended_at: Time?,
|
|
43
|
+
plan_id: String,
|
|
44
|
+
started_at: Time?,
|
|
45
|
+
status: Orb::Models::MigrationListResponse::status,
|
|
46
|
+
target_plan_version_number: Integer
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
type effective_time =
|
|
50
|
+
Date
|
|
51
|
+
| Time
|
|
52
|
+
| :start_of_term
|
|
53
|
+
| :end_of_term
|
|
54
|
+
| :start_of_invoice
|
|
55
|
+
| :end_of_invoice
|
|
56
|
+
|
|
57
|
+
module EffectiveTime
|
|
58
|
+
extend Orb::Internal::Type::Union
|
|
59
|
+
|
|
60
|
+
def self?.variants: -> ::Array[Orb::Models::MigrationListResponse::effective_time]
|
|
61
|
+
|
|
62
|
+
START_OF_TERM: :start_of_term
|
|
63
|
+
END_OF_TERM: :end_of_term
|
|
64
|
+
START_OF_INVOICE: :start_of_invoice
|
|
65
|
+
END_OF_INVOICE: :end_of_invoice
|
|
66
|
+
end
|
|
67
|
+
|
|
68
|
+
type status =
|
|
69
|
+
:not_started | :in_progress | :completed | :action_needed | :canceled
|
|
70
|
+
|
|
71
|
+
module Status
|
|
72
|
+
extend Orb::Internal::Type::Enum
|
|
73
|
+
|
|
74
|
+
NOT_STARTED: :not_started
|
|
75
|
+
IN_PROGRESS: :in_progress
|
|
76
|
+
COMPLETED: :completed
|
|
77
|
+
ACTION_NEEDED: :action_needed
|
|
78
|
+
CANCELED: :canceled
|
|
79
|
+
|
|
80
|
+
def self?.values: -> ::Array[Orb::Models::MigrationListResponse::status]
|
|
81
|
+
end
|
|
82
|
+
end
|
|
83
|
+
end
|
|
84
|
+
end
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
module Orb
|
|
2
|
+
module Models
|
|
3
|
+
type migration_retrieve_params =
|
|
4
|
+
{ migration_id: String } & Orb::Internal::Type::request_parameters
|
|
5
|
+
|
|
6
|
+
class MigrationRetrieveParams < Orb::Internal::Type::BaseModel
|
|
7
|
+
extend Orb::Internal::Type::RequestParameters::Converter
|
|
8
|
+
include Orb::Internal::Type::RequestParameters
|
|
9
|
+
|
|
10
|
+
attr_accessor migration_id: String
|
|
11
|
+
|
|
12
|
+
def initialize: (
|
|
13
|
+
migration_id: String,
|
|
14
|
+
?request_options: Orb::request_opts
|
|
15
|
+
) -> void
|
|
16
|
+
|
|
17
|
+
def to_hash: -> {
|
|
18
|
+
migration_id: String,
|
|
19
|
+
request_options: Orb::RequestOptions
|
|
20
|
+
}
|
|
21
|
+
end
|
|
22
|
+
end
|
|
23
|
+
end
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
module Orb
|
|
2
|
+
module Models
|
|
3
|
+
type migration_retrieve_response =
|
|
4
|
+
{
|
|
5
|
+
id: String,
|
|
6
|
+
effective_time: Orb::Models::MigrationRetrieveResponse::effective_time?,
|
|
7
|
+
ended_at: Time?,
|
|
8
|
+
plan_id: String,
|
|
9
|
+
started_at: Time?,
|
|
10
|
+
status: Orb::Models::MigrationRetrieveResponse::status,
|
|
11
|
+
target_plan_version_number: Integer
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
class MigrationRetrieveResponse < Orb::Internal::Type::BaseModel
|
|
15
|
+
attr_accessor id: String
|
|
16
|
+
|
|
17
|
+
attr_accessor effective_time: Orb::Models::MigrationRetrieveResponse::effective_time?
|
|
18
|
+
|
|
19
|
+
attr_accessor ended_at: Time?
|
|
20
|
+
|
|
21
|
+
attr_accessor plan_id: String
|
|
22
|
+
|
|
23
|
+
attr_accessor started_at: Time?
|
|
24
|
+
|
|
25
|
+
attr_accessor status: Orb::Models::MigrationRetrieveResponse::status
|
|
26
|
+
|
|
27
|
+
attr_accessor target_plan_version_number: Integer
|
|
28
|
+
|
|
29
|
+
def initialize: (
|
|
30
|
+
id: String,
|
|
31
|
+
effective_time: Orb::Models::MigrationRetrieveResponse::effective_time?,
|
|
32
|
+
ended_at: Time?,
|
|
33
|
+
plan_id: String,
|
|
34
|
+
started_at: Time?,
|
|
35
|
+
status: Orb::Models::MigrationRetrieveResponse::status,
|
|
36
|
+
target_plan_version_number: Integer
|
|
37
|
+
) -> void
|
|
38
|
+
|
|
39
|
+
def to_hash: -> {
|
|
40
|
+
id: String,
|
|
41
|
+
effective_time: Orb::Models::MigrationRetrieveResponse::effective_time?,
|
|
42
|
+
ended_at: Time?,
|
|
43
|
+
plan_id: String,
|
|
44
|
+
started_at: Time?,
|
|
45
|
+
status: Orb::Models::MigrationRetrieveResponse::status,
|
|
46
|
+
target_plan_version_number: Integer
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
type effective_time =
|
|
50
|
+
Date
|
|
51
|
+
| Time
|
|
52
|
+
| :start_of_term
|
|
53
|
+
| :end_of_term
|
|
54
|
+
| :start_of_invoice
|
|
55
|
+
| :end_of_invoice
|
|
56
|
+
|
|
57
|
+
module EffectiveTime
|
|
58
|
+
extend Orb::Internal::Type::Union
|
|
59
|
+
|
|
60
|
+
def self?.variants: -> ::Array[Orb::Models::MigrationRetrieveResponse::effective_time]
|
|
61
|
+
|
|
62
|
+
START_OF_TERM: :start_of_term
|
|
63
|
+
END_OF_TERM: :end_of_term
|
|
64
|
+
START_OF_INVOICE: :start_of_invoice
|
|
65
|
+
END_OF_INVOICE: :end_of_invoice
|
|
66
|
+
end
|
|
67
|
+
|
|
68
|
+
type status =
|
|
69
|
+
:not_started | :in_progress | :completed | :action_needed | :canceled
|
|
70
|
+
|
|
71
|
+
module Status
|
|
72
|
+
extend Orb::Internal::Type::Enum
|
|
73
|
+
|
|
74
|
+
NOT_STARTED: :not_started
|
|
75
|
+
IN_PROGRESS: :in_progress
|
|
76
|
+
COMPLETED: :completed
|
|
77
|
+
ACTION_NEEDED: :action_needed
|
|
78
|
+
CANCELED: :canceled
|
|
79
|
+
|
|
80
|
+
def self?.values: -> ::Array[Orb::Models::MigrationRetrieveResponse::status]
|
|
81
|
+
end
|
|
82
|
+
end
|
|
83
|
+
end
|
|
84
|
+
end
|