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,133 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Orb
|
|
4
|
+
module Models
|
|
5
|
+
# @see Orb::Resources::Migrations#list
|
|
6
|
+
class MigrationListResponse < Orb::Internal::Type::BaseModel
|
|
7
|
+
# @!attribute id
|
|
8
|
+
# Unique identifier for this plan version change.
|
|
9
|
+
#
|
|
10
|
+
# @return [String]
|
|
11
|
+
required :id, String
|
|
12
|
+
|
|
13
|
+
# @!attribute effective_time
|
|
14
|
+
# When the migration takes effect. Can be a specific date/time, 'start_of_term' or
|
|
15
|
+
# 'end_of_term' when scheduled to be at the start or end of the current billing
|
|
16
|
+
# period, or 'start_of_invoice' or 'end_of_invoice' when scheduled to be at the
|
|
17
|
+
# start of the current or next invoice.
|
|
18
|
+
#
|
|
19
|
+
# @return [Date, Time, Symbol, Orb::Models::MigrationListResponse::EffectiveTime, nil]
|
|
20
|
+
required :effective_time, union: -> { Orb::Models::MigrationListResponse::EffectiveTime }, nil?: true
|
|
21
|
+
|
|
22
|
+
# @!attribute ended_at
|
|
23
|
+
# When the migration completed or was canceled, or null if it is still in
|
|
24
|
+
# progress.
|
|
25
|
+
#
|
|
26
|
+
# @return [Time, nil]
|
|
27
|
+
required :ended_at, Time, nil?: true
|
|
28
|
+
|
|
29
|
+
# @!attribute plan_id
|
|
30
|
+
# The ID of the plan being migrated.
|
|
31
|
+
#
|
|
32
|
+
# @return [String]
|
|
33
|
+
required :plan_id, String
|
|
34
|
+
|
|
35
|
+
# @!attribute started_at
|
|
36
|
+
# When Orb began migrating the plan's subscriptions. Null if the migration has not
|
|
37
|
+
# begun, or was canceled before it began.
|
|
38
|
+
#
|
|
39
|
+
# @return [Time, nil]
|
|
40
|
+
required :started_at, Time, nil?: true
|
|
41
|
+
|
|
42
|
+
# @!attribute status
|
|
43
|
+
# Current status of the migration: 'not_started', 'in_progress', 'completed',
|
|
44
|
+
# 'action_needed', or 'canceled'.
|
|
45
|
+
#
|
|
46
|
+
# @return [Symbol, Orb::Models::MigrationListResponse::Status]
|
|
47
|
+
required :status, enum: -> { Orb::Models::MigrationListResponse::Status }
|
|
48
|
+
|
|
49
|
+
# @!attribute target_plan_version_number
|
|
50
|
+
# The plan version subscriptions are migrated to.
|
|
51
|
+
#
|
|
52
|
+
# @return [Integer]
|
|
53
|
+
required :target_plan_version_number, Integer
|
|
54
|
+
|
|
55
|
+
# @!method initialize(id:, effective_time:, ended_at:, plan_id:, started_at:, status:, target_plan_version_number:)
|
|
56
|
+
# Some parameter documentations has been truncated, see
|
|
57
|
+
# {Orb::Models::MigrationListResponse} for more details.
|
|
58
|
+
#
|
|
59
|
+
# A migration moves a plan's subscriptions onto one of the plan's versions. Each
|
|
60
|
+
# subscription is migrated asynchronously, either immediately or at a scheduled
|
|
61
|
+
# time, and the migration reports its overall status as it progresses.
|
|
62
|
+
#
|
|
63
|
+
# @param id [String] Unique identifier for this plan version change.
|
|
64
|
+
#
|
|
65
|
+
# @param effective_time [Date, Time, Symbol, Orb::Models::MigrationListResponse::EffectiveTime, nil] When the migration takes effect. Can be a specific date/time, 'start_of_term' or
|
|
66
|
+
#
|
|
67
|
+
# @param ended_at [Time, nil] When the migration completed or was canceled, or null if it is still in progress
|
|
68
|
+
#
|
|
69
|
+
# @param plan_id [String] The ID of the plan being migrated.
|
|
70
|
+
#
|
|
71
|
+
# @param started_at [Time, nil] When Orb began migrating the plan's subscriptions. Null if the migration has not
|
|
72
|
+
#
|
|
73
|
+
# @param status [Symbol, Orb::Models::MigrationListResponse::Status] Current status of the migration: 'not_started', 'in_progress', 'completed', 'act
|
|
74
|
+
#
|
|
75
|
+
# @param target_plan_version_number [Integer] The plan version subscriptions are migrated to.
|
|
76
|
+
|
|
77
|
+
# When the migration takes effect. Can be a specific date/time, 'start_of_term' or
|
|
78
|
+
# 'end_of_term' when scheduled to be at the start or end of the current billing
|
|
79
|
+
# period, or 'start_of_invoice' or 'end_of_invoice' when scheduled to be at the
|
|
80
|
+
# start of the current or next invoice.
|
|
81
|
+
#
|
|
82
|
+
# @see Orb::Models::MigrationListResponse#effective_time
|
|
83
|
+
module EffectiveTime
|
|
84
|
+
extend Orb::Internal::Type::Union
|
|
85
|
+
|
|
86
|
+
variant Date
|
|
87
|
+
|
|
88
|
+
variant Time
|
|
89
|
+
|
|
90
|
+
variant const: -> { Orb::Models::MigrationListResponse::EffectiveTime::START_OF_TERM }
|
|
91
|
+
|
|
92
|
+
variant const: -> { Orb::Models::MigrationListResponse::EffectiveTime::END_OF_TERM }
|
|
93
|
+
|
|
94
|
+
variant const: -> { Orb::Models::MigrationListResponse::EffectiveTime::START_OF_INVOICE }
|
|
95
|
+
|
|
96
|
+
variant const: -> { Orb::Models::MigrationListResponse::EffectiveTime::END_OF_INVOICE }
|
|
97
|
+
|
|
98
|
+
# @!method self.variants
|
|
99
|
+
# @return [Array(Date, Time, Symbol)]
|
|
100
|
+
|
|
101
|
+
define_sorbet_constant!(:Variants) do
|
|
102
|
+
T.type_alias { T.any(Date, Time, Orb::Models::MigrationListResponse::EffectiveTime::TaggedSymbol) }
|
|
103
|
+
end
|
|
104
|
+
|
|
105
|
+
# @!group
|
|
106
|
+
|
|
107
|
+
START_OF_TERM = :start_of_term
|
|
108
|
+
END_OF_TERM = :end_of_term
|
|
109
|
+
START_OF_INVOICE = :start_of_invoice
|
|
110
|
+
END_OF_INVOICE = :end_of_invoice
|
|
111
|
+
|
|
112
|
+
# @!endgroup
|
|
113
|
+
end
|
|
114
|
+
|
|
115
|
+
# Current status of the migration: 'not_started', 'in_progress', 'completed',
|
|
116
|
+
# 'action_needed', or 'canceled'.
|
|
117
|
+
#
|
|
118
|
+
# @see Orb::Models::MigrationListResponse#status
|
|
119
|
+
module Status
|
|
120
|
+
extend Orb::Internal::Type::Enum
|
|
121
|
+
|
|
122
|
+
NOT_STARTED = :not_started
|
|
123
|
+
IN_PROGRESS = :in_progress
|
|
124
|
+
COMPLETED = :completed
|
|
125
|
+
ACTION_NEEDED = :action_needed
|
|
126
|
+
CANCELED = :canceled
|
|
127
|
+
|
|
128
|
+
# @!method self.values
|
|
129
|
+
# @return [Array<Symbol>]
|
|
130
|
+
end
|
|
131
|
+
end
|
|
132
|
+
end
|
|
133
|
+
end
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Orb
|
|
4
|
+
module Models
|
|
5
|
+
# @see Orb::Resources::Migrations#retrieve
|
|
6
|
+
class MigrationRetrieveParams < Orb::Internal::Type::BaseModel
|
|
7
|
+
extend Orb::Internal::Type::RequestParameters::Converter
|
|
8
|
+
include Orb::Internal::Type::RequestParameters
|
|
9
|
+
|
|
10
|
+
# @!attribute migration_id
|
|
11
|
+
#
|
|
12
|
+
# @return [String]
|
|
13
|
+
required :migration_id, String
|
|
14
|
+
|
|
15
|
+
# @!method initialize(migration_id:, request_options: {})
|
|
16
|
+
# @param migration_id [String]
|
|
17
|
+
# @param request_options [Orb::RequestOptions, Hash{Symbol=>Object}]
|
|
18
|
+
end
|
|
19
|
+
end
|
|
20
|
+
end
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Orb
|
|
4
|
+
module Models
|
|
5
|
+
# @see Orb::Resources::Migrations#retrieve
|
|
6
|
+
class MigrationRetrieveResponse < Orb::Internal::Type::BaseModel
|
|
7
|
+
# @!attribute id
|
|
8
|
+
# Unique identifier for this plan version change.
|
|
9
|
+
#
|
|
10
|
+
# @return [String]
|
|
11
|
+
required :id, String
|
|
12
|
+
|
|
13
|
+
# @!attribute effective_time
|
|
14
|
+
# When the migration takes effect. Can be a specific date/time, 'start_of_term' or
|
|
15
|
+
# 'end_of_term' when scheduled to be at the start or end of the current billing
|
|
16
|
+
# period, or 'start_of_invoice' or 'end_of_invoice' when scheduled to be at the
|
|
17
|
+
# start of the current or next invoice.
|
|
18
|
+
#
|
|
19
|
+
# @return [Date, Time, Symbol, Orb::Models::MigrationRetrieveResponse::EffectiveTime, nil]
|
|
20
|
+
required :effective_time, union: -> { Orb::Models::MigrationRetrieveResponse::EffectiveTime }, nil?: true
|
|
21
|
+
|
|
22
|
+
# @!attribute ended_at
|
|
23
|
+
# When the migration completed or was canceled, or null if it is still in
|
|
24
|
+
# progress.
|
|
25
|
+
#
|
|
26
|
+
# @return [Time, nil]
|
|
27
|
+
required :ended_at, Time, nil?: true
|
|
28
|
+
|
|
29
|
+
# @!attribute plan_id
|
|
30
|
+
# The ID of the plan being migrated.
|
|
31
|
+
#
|
|
32
|
+
# @return [String]
|
|
33
|
+
required :plan_id, String
|
|
34
|
+
|
|
35
|
+
# @!attribute started_at
|
|
36
|
+
# When Orb began migrating the plan's subscriptions. Null if the migration has not
|
|
37
|
+
# begun, or was canceled before it began.
|
|
38
|
+
#
|
|
39
|
+
# @return [Time, nil]
|
|
40
|
+
required :started_at, Time, nil?: true
|
|
41
|
+
|
|
42
|
+
# @!attribute status
|
|
43
|
+
# Current status of the migration: 'not_started', 'in_progress', 'completed',
|
|
44
|
+
# 'action_needed', or 'canceled'.
|
|
45
|
+
#
|
|
46
|
+
# @return [Symbol, Orb::Models::MigrationRetrieveResponse::Status]
|
|
47
|
+
required :status, enum: -> { Orb::Models::MigrationRetrieveResponse::Status }
|
|
48
|
+
|
|
49
|
+
# @!attribute target_plan_version_number
|
|
50
|
+
# The plan version subscriptions are migrated to.
|
|
51
|
+
#
|
|
52
|
+
# @return [Integer]
|
|
53
|
+
required :target_plan_version_number, Integer
|
|
54
|
+
|
|
55
|
+
# @!method initialize(id:, effective_time:, ended_at:, plan_id:, started_at:, status:, target_plan_version_number:)
|
|
56
|
+
# Some parameter documentations has been truncated, see
|
|
57
|
+
# {Orb::Models::MigrationRetrieveResponse} for more details.
|
|
58
|
+
#
|
|
59
|
+
# A migration moves a plan's subscriptions onto one of the plan's versions. Each
|
|
60
|
+
# subscription is migrated asynchronously, either immediately or at a scheduled
|
|
61
|
+
# time, and the migration reports its overall status as it progresses.
|
|
62
|
+
#
|
|
63
|
+
# @param id [String] Unique identifier for this plan version change.
|
|
64
|
+
#
|
|
65
|
+
# @param effective_time [Date, Time, Symbol, Orb::Models::MigrationRetrieveResponse::EffectiveTime, nil] When the migration takes effect. Can be a specific date/time, 'start_of_term' or
|
|
66
|
+
#
|
|
67
|
+
# @param ended_at [Time, nil] When the migration completed or was canceled, or null if it is still in progress
|
|
68
|
+
#
|
|
69
|
+
# @param plan_id [String] The ID of the plan being migrated.
|
|
70
|
+
#
|
|
71
|
+
# @param started_at [Time, nil] When Orb began migrating the plan's subscriptions. Null if the migration has not
|
|
72
|
+
#
|
|
73
|
+
# @param status [Symbol, Orb::Models::MigrationRetrieveResponse::Status] Current status of the migration: 'not_started', 'in_progress', 'completed', 'act
|
|
74
|
+
#
|
|
75
|
+
# @param target_plan_version_number [Integer] The plan version subscriptions are migrated to.
|
|
76
|
+
|
|
77
|
+
# When the migration takes effect. Can be a specific date/time, 'start_of_term' or
|
|
78
|
+
# 'end_of_term' when scheduled to be at the start or end of the current billing
|
|
79
|
+
# period, or 'start_of_invoice' or 'end_of_invoice' when scheduled to be at the
|
|
80
|
+
# start of the current or next invoice.
|
|
81
|
+
#
|
|
82
|
+
# @see Orb::Models::MigrationRetrieveResponse#effective_time
|
|
83
|
+
module EffectiveTime
|
|
84
|
+
extend Orb::Internal::Type::Union
|
|
85
|
+
|
|
86
|
+
variant Date
|
|
87
|
+
|
|
88
|
+
variant Time
|
|
89
|
+
|
|
90
|
+
variant const: -> { Orb::Models::MigrationRetrieveResponse::EffectiveTime::START_OF_TERM }
|
|
91
|
+
|
|
92
|
+
variant const: -> { Orb::Models::MigrationRetrieveResponse::EffectiveTime::END_OF_TERM }
|
|
93
|
+
|
|
94
|
+
variant const: -> { Orb::Models::MigrationRetrieveResponse::EffectiveTime::START_OF_INVOICE }
|
|
95
|
+
|
|
96
|
+
variant const: -> { Orb::Models::MigrationRetrieveResponse::EffectiveTime::END_OF_INVOICE }
|
|
97
|
+
|
|
98
|
+
# @!method self.variants
|
|
99
|
+
# @return [Array(Date, Time, Symbol)]
|
|
100
|
+
|
|
101
|
+
define_sorbet_constant!(:Variants) do
|
|
102
|
+
T.type_alias { T.any(Date, Time, Orb::Models::MigrationRetrieveResponse::EffectiveTime::TaggedSymbol) }
|
|
103
|
+
end
|
|
104
|
+
|
|
105
|
+
# @!group
|
|
106
|
+
|
|
107
|
+
START_OF_TERM = :start_of_term
|
|
108
|
+
END_OF_TERM = :end_of_term
|
|
109
|
+
START_OF_INVOICE = :start_of_invoice
|
|
110
|
+
END_OF_INVOICE = :end_of_invoice
|
|
111
|
+
|
|
112
|
+
# @!endgroup
|
|
113
|
+
end
|
|
114
|
+
|
|
115
|
+
# Current status of the migration: 'not_started', 'in_progress', 'completed',
|
|
116
|
+
# 'action_needed', or 'canceled'.
|
|
117
|
+
#
|
|
118
|
+
# @see Orb::Models::MigrationRetrieveResponse#status
|
|
119
|
+
module Status
|
|
120
|
+
extend Orb::Internal::Type::Enum
|
|
121
|
+
|
|
122
|
+
NOT_STARTED = :not_started
|
|
123
|
+
IN_PROGRESS = :in_progress
|
|
124
|
+
COMPLETED = :completed
|
|
125
|
+
ACTION_NEEDED = :action_needed
|
|
126
|
+
CANCELED = :canceled
|
|
127
|
+
|
|
128
|
+
# @!method self.values
|
|
129
|
+
# @return [Array<Symbol>]
|
|
130
|
+
end
|
|
131
|
+
end
|
|
132
|
+
end
|
|
133
|
+
end
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Orb
|
|
4
|
+
module Models
|
|
5
|
+
class MigrationSubscription < Orb::Internal::Type::BaseModel
|
|
6
|
+
# @!attribute customer
|
|
7
|
+
#
|
|
8
|
+
# @return [Orb::Models::CustomerMinified]
|
|
9
|
+
required :customer, -> { Orb::CustomerMinified }
|
|
10
|
+
|
|
11
|
+
# @!attribute effective_date
|
|
12
|
+
# When the subscription is migrated to the target plan version. Null unless the
|
|
13
|
+
# status is 'scheduled' or 'completed'.
|
|
14
|
+
#
|
|
15
|
+
# @return [Time, nil]
|
|
16
|
+
required :effective_date, Time, nil?: true
|
|
17
|
+
|
|
18
|
+
# @!attribute failure_reason
|
|
19
|
+
# Why the subscription could not be migrated. Null unless the status is 'failed'.
|
|
20
|
+
#
|
|
21
|
+
# @return [String, nil]
|
|
22
|
+
required :failure_reason, String, nil?: true
|
|
23
|
+
|
|
24
|
+
# @!attribute status
|
|
25
|
+
# The subscription's status in the migration: 'scheduling' until the migration has
|
|
26
|
+
# processed it, 'scheduled' when it will be migrated to the target version at
|
|
27
|
+
# `effective_date`, 'completed' once it has been migrated, 'skipped' when the
|
|
28
|
+
# migration left it unchanged, or 'failed' when it could not be migrated (see
|
|
29
|
+
# `failure_reason`).
|
|
30
|
+
#
|
|
31
|
+
# @return [Symbol, Orb::Models::MigrationSubscription::Status]
|
|
32
|
+
required :status, enum: -> { Orb::MigrationSubscription::Status }
|
|
33
|
+
|
|
34
|
+
# @!attribute subscription_id
|
|
35
|
+
# The ID of the subscription.
|
|
36
|
+
#
|
|
37
|
+
# @return [String]
|
|
38
|
+
required :subscription_id, String
|
|
39
|
+
|
|
40
|
+
# @!method initialize(customer:, effective_date:, failure_reason:, status:, subscription_id:)
|
|
41
|
+
# Some parameter documentations has been truncated, see
|
|
42
|
+
# {Orb::Models::MigrationSubscription} for more details.
|
|
43
|
+
#
|
|
44
|
+
# @param customer [Orb::Models::CustomerMinified]
|
|
45
|
+
#
|
|
46
|
+
# @param effective_date [Time, nil] When the subscription is migrated to the target plan version. Null unless the st
|
|
47
|
+
#
|
|
48
|
+
# @param failure_reason [String, nil] Why the subscription could not be migrated. Null unless the status is 'failed'.
|
|
49
|
+
#
|
|
50
|
+
# @param status [Symbol, Orb::Models::MigrationSubscription::Status] The subscription's status in the migration: 'scheduling' until the migration has
|
|
51
|
+
#
|
|
52
|
+
# @param subscription_id [String] The ID of the subscription.
|
|
53
|
+
|
|
54
|
+
# The subscription's status in the migration: 'scheduling' until the migration has
|
|
55
|
+
# processed it, 'scheduled' when it will be migrated to the target version at
|
|
56
|
+
# `effective_date`, 'completed' once it has been migrated, 'skipped' when the
|
|
57
|
+
# migration left it unchanged, or 'failed' when it could not be migrated (see
|
|
58
|
+
# `failure_reason`).
|
|
59
|
+
#
|
|
60
|
+
# @see Orb::Models::MigrationSubscription#status
|
|
61
|
+
module Status
|
|
62
|
+
extend Orb::Internal::Type::Enum
|
|
63
|
+
|
|
64
|
+
SCHEDULING = :scheduling
|
|
65
|
+
SCHEDULED = :scheduled
|
|
66
|
+
COMPLETED = :completed
|
|
67
|
+
SKIPPED = :skipped
|
|
68
|
+
FAILED = :failed
|
|
69
|
+
|
|
70
|
+
# @!method self.values
|
|
71
|
+
# @return [Array<Symbol>]
|
|
72
|
+
end
|
|
73
|
+
end
|
|
74
|
+
end
|
|
75
|
+
end
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Orb
|
|
4
|
+
module Models
|
|
5
|
+
module Migrations
|
|
6
|
+
# @see Orb::Resources::Migrations::Subscriptions#list
|
|
7
|
+
class SubscriptionListParams < Orb::Internal::Type::BaseModel
|
|
8
|
+
extend Orb::Internal::Type::RequestParameters::Converter
|
|
9
|
+
include Orb::Internal::Type::RequestParameters
|
|
10
|
+
|
|
11
|
+
# @!attribute migration_id
|
|
12
|
+
#
|
|
13
|
+
# @return [String]
|
|
14
|
+
required :migration_id, String
|
|
15
|
+
|
|
16
|
+
# @!attribute cursor
|
|
17
|
+
# Cursor for pagination. This can be populated by the `next_cursor` value returned
|
|
18
|
+
# from the initial request.
|
|
19
|
+
#
|
|
20
|
+
# @return [String, nil]
|
|
21
|
+
optional :cursor, String, nil?: true
|
|
22
|
+
|
|
23
|
+
# @!attribute limit
|
|
24
|
+
# The number of items to fetch. Defaults to 20.
|
|
25
|
+
#
|
|
26
|
+
# @return [Integer, nil]
|
|
27
|
+
optional :limit, Integer
|
|
28
|
+
|
|
29
|
+
# @!attribute status
|
|
30
|
+
# Only return subscriptions with one of these statuses.
|
|
31
|
+
#
|
|
32
|
+
# @return [Array<Symbol, Orb::Models::Migrations::SubscriptionListParams::Status>, nil]
|
|
33
|
+
optional :status,
|
|
34
|
+
-> { Orb::Internal::Type::ArrayOf[enum: Orb::Migrations::SubscriptionListParams::Status] },
|
|
35
|
+
nil?: true
|
|
36
|
+
|
|
37
|
+
# @!attribute subscription_id
|
|
38
|
+
# Only return these subscriptions. Up to 100 IDs.
|
|
39
|
+
#
|
|
40
|
+
# @return [Array<String>, nil]
|
|
41
|
+
optional :subscription_id, Orb::Internal::Type::ArrayOf[String], nil?: true
|
|
42
|
+
|
|
43
|
+
# @!method initialize(migration_id:, cursor: nil, limit: nil, status: nil, subscription_id: nil, request_options: {})
|
|
44
|
+
# Some parameter documentations has been truncated, see
|
|
45
|
+
# {Orb::Models::Migrations::SubscriptionListParams} for more details.
|
|
46
|
+
#
|
|
47
|
+
# @param migration_id [String]
|
|
48
|
+
#
|
|
49
|
+
# @param cursor [String, nil] Cursor for pagination. This can be populated by the `next_cursor` value returned
|
|
50
|
+
#
|
|
51
|
+
# @param limit [Integer] The number of items to fetch. Defaults to 20.
|
|
52
|
+
#
|
|
53
|
+
# @param status [Array<Symbol, Orb::Models::Migrations::SubscriptionListParams::Status>, nil] Only return subscriptions with one of these statuses.
|
|
54
|
+
#
|
|
55
|
+
# @param subscription_id [Array<String>, nil] Only return these subscriptions. Up to 100 IDs.
|
|
56
|
+
#
|
|
57
|
+
# @param request_options [Orb::RequestOptions, Hash{Symbol=>Object}]
|
|
58
|
+
|
|
59
|
+
module Status
|
|
60
|
+
extend Orb::Internal::Type::Enum
|
|
61
|
+
|
|
62
|
+
SCHEDULING = :scheduling
|
|
63
|
+
SCHEDULED = :scheduled
|
|
64
|
+
COMPLETED = :completed
|
|
65
|
+
SKIPPED = :skipped
|
|
66
|
+
FAILED = :failed
|
|
67
|
+
|
|
68
|
+
# @!method self.values
|
|
69
|
+
# @return [Array<Symbol>]
|
|
70
|
+
end
|
|
71
|
+
end
|
|
72
|
+
end
|
|
73
|
+
end
|
|
74
|
+
end
|
|
@@ -12,9 +12,10 @@ module Orb
|
|
|
12
12
|
required :id, String
|
|
13
13
|
|
|
14
14
|
# @!attribute effective_time
|
|
15
|
-
# When the migration takes effect. Can be a specific date/time, '
|
|
16
|
-
# scheduled to be at the end of the current billing
|
|
17
|
-
# when scheduled to be at the
|
|
15
|
+
# When the migration takes effect. Can be a specific date/time, 'start_of_term' or
|
|
16
|
+
# 'end_of_term' when scheduled to be at the start or end of the current billing
|
|
17
|
+
# period, or 'start_of_invoice' or 'end_of_invoice' when scheduled to be at the
|
|
18
|
+
# start of the current or next invoice.
|
|
18
19
|
#
|
|
19
20
|
# @return [Date, Time, Symbol, Orb::Models::Plans::MigrationCancelResponse::EffectiveTime, nil]
|
|
20
21
|
required :effective_time,
|
|
@@ -48,13 +49,23 @@ module Orb
|
|
|
48
49
|
# @return [Symbol, Orb::Models::Plans::MigrationCancelResponse::Status]
|
|
49
50
|
required :status, enum: -> { Orb::Models::Plans::MigrationCancelResponse::Status }
|
|
50
51
|
|
|
51
|
-
# @!
|
|
52
|
+
# @!attribute target_plan_version_number
|
|
53
|
+
# The plan version subscriptions are migrated to.
|
|
54
|
+
#
|
|
55
|
+
# @return [Integer]
|
|
56
|
+
required :target_plan_version_number, Integer
|
|
57
|
+
|
|
58
|
+
# @!method initialize(id:, effective_time:, ended_at:, plan_id:, started_at:, status:, target_plan_version_number:)
|
|
52
59
|
# Some parameter documentations has been truncated, see
|
|
53
60
|
# {Orb::Models::Plans::MigrationCancelResponse} for more details.
|
|
54
61
|
#
|
|
62
|
+
# A migration moves a plan's subscriptions onto one of the plan's versions. Each
|
|
63
|
+
# subscription is migrated asynchronously, either immediately or at a scheduled
|
|
64
|
+
# time, and the migration reports its overall status as it progresses.
|
|
65
|
+
#
|
|
55
66
|
# @param id [String] Unique identifier for this plan version change.
|
|
56
67
|
#
|
|
57
|
-
# @param effective_time [Date, Time, Symbol, Orb::Models::Plans::MigrationCancelResponse::EffectiveTime, nil] When the migration takes effect. Can be a specific date/time, '
|
|
68
|
+
# @param effective_time [Date, Time, Symbol, Orb::Models::Plans::MigrationCancelResponse::EffectiveTime, nil] When the migration takes effect. Can be a specific date/time, 'start_of_term' or
|
|
58
69
|
#
|
|
59
70
|
# @param ended_at [Time, nil] When the migration completed or was canceled, or null if it is still in progress
|
|
60
71
|
#
|
|
@@ -63,10 +74,13 @@ module Orb
|
|
|
63
74
|
# @param started_at [Time, nil] When Orb began migrating the plan's subscriptions. Null if the migration has not
|
|
64
75
|
#
|
|
65
76
|
# @param status [Symbol, Orb::Models::Plans::MigrationCancelResponse::Status] Current status of the migration: 'not_started', 'in_progress', 'completed', 'act
|
|
77
|
+
#
|
|
78
|
+
# @param target_plan_version_number [Integer] The plan version subscriptions are migrated to.
|
|
66
79
|
|
|
67
|
-
# When the migration takes effect. Can be a specific date/time, '
|
|
68
|
-
# scheduled to be at the end of the current billing
|
|
69
|
-
# when scheduled to be at the
|
|
80
|
+
# When the migration takes effect. Can be a specific date/time, 'start_of_term' or
|
|
81
|
+
# 'end_of_term' when scheduled to be at the start or end of the current billing
|
|
82
|
+
# period, or 'start_of_invoice' or 'end_of_invoice' when scheduled to be at the
|
|
83
|
+
# start of the current or next invoice.
|
|
70
84
|
#
|
|
71
85
|
# @see Orb::Models::Plans::MigrationCancelResponse#effective_time
|
|
72
86
|
module EffectiveTime
|
|
@@ -76,8 +90,12 @@ module Orb
|
|
|
76
90
|
|
|
77
91
|
variant Time
|
|
78
92
|
|
|
93
|
+
variant const: -> { Orb::Models::Plans::MigrationCancelResponse::EffectiveTime::START_OF_TERM }
|
|
94
|
+
|
|
79
95
|
variant const: -> { Orb::Models::Plans::MigrationCancelResponse::EffectiveTime::END_OF_TERM }
|
|
80
96
|
|
|
97
|
+
variant const: -> { Orb::Models::Plans::MigrationCancelResponse::EffectiveTime::START_OF_INVOICE }
|
|
98
|
+
|
|
81
99
|
variant const: -> { Orb::Models::Plans::MigrationCancelResponse::EffectiveTime::END_OF_INVOICE }
|
|
82
100
|
|
|
83
101
|
# @!method self.variants
|
|
@@ -89,7 +107,9 @@ module Orb
|
|
|
89
107
|
|
|
90
108
|
# @!group
|
|
91
109
|
|
|
110
|
+
START_OF_TERM = :start_of_term
|
|
92
111
|
END_OF_TERM = :end_of_term
|
|
112
|
+
START_OF_INVOICE = :start_of_invoice
|
|
93
113
|
END_OF_INVOICE = :end_of_invoice
|
|
94
114
|
|
|
95
115
|
# @!endgroup
|
|
@@ -12,9 +12,10 @@ module Orb
|
|
|
12
12
|
required :id, String
|
|
13
13
|
|
|
14
14
|
# @!attribute effective_time
|
|
15
|
-
# When the migration takes effect. Can be a specific date/time, '
|
|
16
|
-
# scheduled to be at the end of the current billing
|
|
17
|
-
# when scheduled to be at the
|
|
15
|
+
# When the migration takes effect. Can be a specific date/time, 'start_of_term' or
|
|
16
|
+
# 'end_of_term' when scheduled to be at the start or end of the current billing
|
|
17
|
+
# period, or 'start_of_invoice' or 'end_of_invoice' when scheduled to be at the
|
|
18
|
+
# start of the current or next invoice.
|
|
18
19
|
#
|
|
19
20
|
# @return [Date, Time, Symbol, Orb::Models::Plans::MigrationListResponse::EffectiveTime, nil]
|
|
20
21
|
required :effective_time,
|
|
@@ -48,13 +49,23 @@ module Orb
|
|
|
48
49
|
# @return [Symbol, Orb::Models::Plans::MigrationListResponse::Status]
|
|
49
50
|
required :status, enum: -> { Orb::Models::Plans::MigrationListResponse::Status }
|
|
50
51
|
|
|
51
|
-
# @!
|
|
52
|
+
# @!attribute target_plan_version_number
|
|
53
|
+
# The plan version subscriptions are migrated to.
|
|
54
|
+
#
|
|
55
|
+
# @return [Integer]
|
|
56
|
+
required :target_plan_version_number, Integer
|
|
57
|
+
|
|
58
|
+
# @!method initialize(id:, effective_time:, ended_at:, plan_id:, started_at:, status:, target_plan_version_number:)
|
|
52
59
|
# Some parameter documentations has been truncated, see
|
|
53
60
|
# {Orb::Models::Plans::MigrationListResponse} for more details.
|
|
54
61
|
#
|
|
62
|
+
# A migration moves a plan's subscriptions onto one of the plan's versions. Each
|
|
63
|
+
# subscription is migrated asynchronously, either immediately or at a scheduled
|
|
64
|
+
# time, and the migration reports its overall status as it progresses.
|
|
65
|
+
#
|
|
55
66
|
# @param id [String] Unique identifier for this plan version change.
|
|
56
67
|
#
|
|
57
|
-
# @param effective_time [Date, Time, Symbol, Orb::Models::Plans::MigrationListResponse::EffectiveTime, nil] When the migration takes effect. Can be a specific date/time, '
|
|
68
|
+
# @param effective_time [Date, Time, Symbol, Orb::Models::Plans::MigrationListResponse::EffectiveTime, nil] When the migration takes effect. Can be a specific date/time, 'start_of_term' or
|
|
58
69
|
#
|
|
59
70
|
# @param ended_at [Time, nil] When the migration completed or was canceled, or null if it is still in progress
|
|
60
71
|
#
|
|
@@ -63,10 +74,13 @@ module Orb
|
|
|
63
74
|
# @param started_at [Time, nil] When Orb began migrating the plan's subscriptions. Null if the migration has not
|
|
64
75
|
#
|
|
65
76
|
# @param status [Symbol, Orb::Models::Plans::MigrationListResponse::Status] Current status of the migration: 'not_started', 'in_progress', 'completed', 'act
|
|
77
|
+
#
|
|
78
|
+
# @param target_plan_version_number [Integer] The plan version subscriptions are migrated to.
|
|
66
79
|
|
|
67
|
-
# When the migration takes effect. Can be a specific date/time, '
|
|
68
|
-
# scheduled to be at the end of the current billing
|
|
69
|
-
# when scheduled to be at the
|
|
80
|
+
# When the migration takes effect. Can be a specific date/time, 'start_of_term' or
|
|
81
|
+
# 'end_of_term' when scheduled to be at the start or end of the current billing
|
|
82
|
+
# period, or 'start_of_invoice' or 'end_of_invoice' when scheduled to be at the
|
|
83
|
+
# start of the current or next invoice.
|
|
70
84
|
#
|
|
71
85
|
# @see Orb::Models::Plans::MigrationListResponse#effective_time
|
|
72
86
|
module EffectiveTime
|
|
@@ -76,8 +90,12 @@ module Orb
|
|
|
76
90
|
|
|
77
91
|
variant Time
|
|
78
92
|
|
|
93
|
+
variant const: -> { Orb::Models::Plans::MigrationListResponse::EffectiveTime::START_OF_TERM }
|
|
94
|
+
|
|
79
95
|
variant const: -> { Orb::Models::Plans::MigrationListResponse::EffectiveTime::END_OF_TERM }
|
|
80
96
|
|
|
97
|
+
variant const: -> { Orb::Models::Plans::MigrationListResponse::EffectiveTime::START_OF_INVOICE }
|
|
98
|
+
|
|
81
99
|
variant const: -> { Orb::Models::Plans::MigrationListResponse::EffectiveTime::END_OF_INVOICE }
|
|
82
100
|
|
|
83
101
|
# @!method self.variants
|
|
@@ -89,7 +107,9 @@ module Orb
|
|
|
89
107
|
|
|
90
108
|
# @!group
|
|
91
109
|
|
|
110
|
+
START_OF_TERM = :start_of_term
|
|
92
111
|
END_OF_TERM = :end_of_term
|
|
112
|
+
START_OF_INVOICE = :start_of_invoice
|
|
93
113
|
END_OF_INVOICE = :end_of_invoice
|
|
94
114
|
|
|
95
115
|
# @!endgroup
|
|
@@ -12,9 +12,10 @@ module Orb
|
|
|
12
12
|
required :id, String
|
|
13
13
|
|
|
14
14
|
# @!attribute effective_time
|
|
15
|
-
# When the migration takes effect. Can be a specific date/time, '
|
|
16
|
-
# scheduled to be at the end of the current billing
|
|
17
|
-
# when scheduled to be at the
|
|
15
|
+
# When the migration takes effect. Can be a specific date/time, 'start_of_term' or
|
|
16
|
+
# 'end_of_term' when scheduled to be at the start or end of the current billing
|
|
17
|
+
# period, or 'start_of_invoice' or 'end_of_invoice' when scheduled to be at the
|
|
18
|
+
# start of the current or next invoice.
|
|
18
19
|
#
|
|
19
20
|
# @return [Date, Time, Symbol, Orb::Models::Plans::MigrationRetrieveResponse::EffectiveTime, nil]
|
|
20
21
|
required :effective_time,
|
|
@@ -48,13 +49,23 @@ module Orb
|
|
|
48
49
|
# @return [Symbol, Orb::Models::Plans::MigrationRetrieveResponse::Status]
|
|
49
50
|
required :status, enum: -> { Orb::Models::Plans::MigrationRetrieveResponse::Status }
|
|
50
51
|
|
|
51
|
-
# @!
|
|
52
|
+
# @!attribute target_plan_version_number
|
|
53
|
+
# The plan version subscriptions are migrated to.
|
|
54
|
+
#
|
|
55
|
+
# @return [Integer]
|
|
56
|
+
required :target_plan_version_number, Integer
|
|
57
|
+
|
|
58
|
+
# @!method initialize(id:, effective_time:, ended_at:, plan_id:, started_at:, status:, target_plan_version_number:)
|
|
52
59
|
# Some parameter documentations has been truncated, see
|
|
53
60
|
# {Orb::Models::Plans::MigrationRetrieveResponse} for more details.
|
|
54
61
|
#
|
|
62
|
+
# A migration moves a plan's subscriptions onto one of the plan's versions. Each
|
|
63
|
+
# subscription is migrated asynchronously, either immediately or at a scheduled
|
|
64
|
+
# time, and the migration reports its overall status as it progresses.
|
|
65
|
+
#
|
|
55
66
|
# @param id [String] Unique identifier for this plan version change.
|
|
56
67
|
#
|
|
57
|
-
# @param effective_time [Date, Time, Symbol, Orb::Models::Plans::MigrationRetrieveResponse::EffectiveTime, nil] When the migration takes effect. Can be a specific date/time, '
|
|
68
|
+
# @param effective_time [Date, Time, Symbol, Orb::Models::Plans::MigrationRetrieveResponse::EffectiveTime, nil] When the migration takes effect. Can be a specific date/time, 'start_of_term' or
|
|
58
69
|
#
|
|
59
70
|
# @param ended_at [Time, nil] When the migration completed or was canceled, or null if it is still in progress
|
|
60
71
|
#
|
|
@@ -63,10 +74,13 @@ module Orb
|
|
|
63
74
|
# @param started_at [Time, nil] When Orb began migrating the plan's subscriptions. Null if the migration has not
|
|
64
75
|
#
|
|
65
76
|
# @param status [Symbol, Orb::Models::Plans::MigrationRetrieveResponse::Status] Current status of the migration: 'not_started', 'in_progress', 'completed', 'act
|
|
77
|
+
#
|
|
78
|
+
# @param target_plan_version_number [Integer] The plan version subscriptions are migrated to.
|
|
66
79
|
|
|
67
|
-
# When the migration takes effect. Can be a specific date/time, '
|
|
68
|
-
# scheduled to be at the end of the current billing
|
|
69
|
-
# when scheduled to be at the
|
|
80
|
+
# When the migration takes effect. Can be a specific date/time, 'start_of_term' or
|
|
81
|
+
# 'end_of_term' when scheduled to be at the start or end of the current billing
|
|
82
|
+
# period, or 'start_of_invoice' or 'end_of_invoice' when scheduled to be at the
|
|
83
|
+
# start of the current or next invoice.
|
|
70
84
|
#
|
|
71
85
|
# @see Orb::Models::Plans::MigrationRetrieveResponse#effective_time
|
|
72
86
|
module EffectiveTime
|
|
@@ -76,8 +90,12 @@ module Orb
|
|
|
76
90
|
|
|
77
91
|
variant Time
|
|
78
92
|
|
|
93
|
+
variant const: -> { Orb::Models::Plans::MigrationRetrieveResponse::EffectiveTime::START_OF_TERM }
|
|
94
|
+
|
|
79
95
|
variant const: -> { Orb::Models::Plans::MigrationRetrieveResponse::EffectiveTime::END_OF_TERM }
|
|
80
96
|
|
|
97
|
+
variant const: -> { Orb::Models::Plans::MigrationRetrieveResponse::EffectiveTime::START_OF_INVOICE }
|
|
98
|
+
|
|
81
99
|
variant const: -> { Orb::Models::Plans::MigrationRetrieveResponse::EffectiveTime::END_OF_INVOICE }
|
|
82
100
|
|
|
83
101
|
# @!method self.variants
|
|
@@ -89,7 +107,9 @@ module Orb
|
|
|
89
107
|
|
|
90
108
|
# @!group
|
|
91
109
|
|
|
110
|
+
START_OF_TERM = :start_of_term
|
|
92
111
|
END_OF_TERM = :end_of_term
|
|
112
|
+
START_OF_INVOICE = :start_of_invoice
|
|
93
113
|
END_OF_INVOICE = :end_of_invoice
|
|
94
114
|
|
|
95
115
|
# @!endgroup
|