Skip to content

Commit becbbfb

Browse files
feat(api): api update
1 parent 0728baa commit becbbfb

11 files changed

+365
-26
lines changed

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 118
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/orb%2Forb-7936e3f73bbe1d59d27fd7a8a226985927b38fdec1c936c77577381699fb6140.yml
3-
openapi_spec_hash: 1d3f9ed5fbdb0e40d56d6acd9d1736e2
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/orb%2Forb-03af7f658aed245cf7e230055de59fe92a78880f3719bf254ed9352bf89bad5e.yml
3+
openapi_spec_hash: c4703d217c25e8c02c248caed9e2d3be
44
config_hash: 895e36fb2d717958770fd4cf883f4b74

lib/orb/models/subscription_change_apply_response.rb

Lines changed: 42 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,12 @@ class SubscriptionChangeApplyResponse < Orb::Internal::Type::BaseModel
99
# @return [String]
1010
required :id, String
1111

12+
# @!attribute change_type
13+
# The type of change (e.g., 'schedule_plan_change', 'create_subscription').
14+
#
15+
# @return [String]
16+
required :change_type, String
17+
1218
# @!attribute expiration_time
1319
# Subscription change will be cancelled at this time and can no longer be applied.
1420
#
@@ -31,13 +37,38 @@ class SubscriptionChangeApplyResponse < Orb::Internal::Type::BaseModel
3137
# @return [Time, nil]
3238
optional :applied_at, Time, nil?: true
3339

40+
# @!attribute billing_cycle_alignment
41+
# Billing cycle alignment for plan changes.
42+
#
43+
# @return [String, nil]
44+
optional :billing_cycle_alignment, String, nil?: true
45+
3446
# @!attribute cancelled_at
3547
# When this change was cancelled.
3648
#
3749
# @return [Time, nil]
3850
optional :cancelled_at, Time, nil?: true
3951

40-
# @!method initialize(id:, expiration_time:, status:, subscription:, applied_at: nil, cancelled_at: nil)
52+
# @!attribute change_option
53+
# How the change is scheduled (e.g., 'immediate', 'end_of_subscription_term',
54+
# 'requested_date').
55+
#
56+
# @return [String, nil]
57+
optional :change_option, String, nil?: true
58+
59+
# @!attribute effective_date
60+
# When this change will take effect.
61+
#
62+
# @return [Time, nil]
63+
optional :effective_date, Time, nil?: true
64+
65+
# @!attribute plan_id
66+
# The target plan ID for plan changes.
67+
#
68+
# @return [String, nil]
69+
optional :plan_id, String, nil?: true
70+
71+
# @!method initialize(id:, change_type:, expiration_time:, status:, subscription:, applied_at: nil, billing_cycle_alignment: nil, cancelled_at: nil, change_option: nil, effective_date: nil, plan_id: nil)
4172
# Some parameter documentations has been truncated, see
4273
# {Orb::Models::SubscriptionChangeApplyResponse} for more details.
4374
#
@@ -48,6 +79,8 @@ class SubscriptionChangeApplyResponse < Orb::Internal::Type::BaseModel
4879
#
4980
# @param id [String]
5081
#
82+
# @param change_type [String] The type of change (e.g., 'schedule_plan_change', 'create_subscription').
83+
#
5184
# @param expiration_time [Time] Subscription change will be cancelled at this time and can no longer be applied.
5285
#
5386
# @param status [Symbol, Orb::Models::SubscriptionChangeApplyResponse::Status]
@@ -56,7 +89,15 @@ class SubscriptionChangeApplyResponse < Orb::Internal::Type::BaseModel
5689
#
5790
# @param applied_at [Time, nil] When this change was applied.
5891
#
92+
# @param billing_cycle_alignment [String, nil] Billing cycle alignment for plan changes.
93+
#
5994
# @param cancelled_at [Time, nil] When this change was cancelled.
95+
#
96+
# @param change_option [String, nil] How the change is scheduled (e.g., 'immediate', 'end_of_subscription_term', 'req
97+
#
98+
# @param effective_date [Time, nil] When this change will take effect.
99+
#
100+
# @param plan_id [String, nil] The target plan ID for plan changes.
60101

61102
# @see Orb::Models::SubscriptionChangeApplyResponse#status
62103
module Status

lib/orb/models/subscription_change_cancel_response.rb

Lines changed: 42 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,12 @@ class SubscriptionChangeCancelResponse < Orb::Internal::Type::BaseModel
99
# @return [String]
1010
required :id, String
1111

12+
# @!attribute change_type
13+
# The type of change (e.g., 'schedule_plan_change', 'create_subscription').
14+
#
15+
# @return [String]
16+
required :change_type, String
17+
1218
# @!attribute expiration_time
1319
# Subscription change will be cancelled at this time and can no longer be applied.
1420
#
@@ -31,13 +37,38 @@ class SubscriptionChangeCancelResponse < Orb::Internal::Type::BaseModel
3137
# @return [Time, nil]
3238
optional :applied_at, Time, nil?: true
3339

40+
# @!attribute billing_cycle_alignment
41+
# Billing cycle alignment for plan changes.
42+
#
43+
# @return [String, nil]
44+
optional :billing_cycle_alignment, String, nil?: true
45+
3446
# @!attribute cancelled_at
3547
# When this change was cancelled.
3648
#
3749
# @return [Time, nil]
3850
optional :cancelled_at, Time, nil?: true
3951

40-
# @!method initialize(id:, expiration_time:, status:, subscription:, applied_at: nil, cancelled_at: nil)
52+
# @!attribute change_option
53+
# How the change is scheduled (e.g., 'immediate', 'end_of_subscription_term',
54+
# 'requested_date').
55+
#
56+
# @return [String, nil]
57+
optional :change_option, String, nil?: true
58+
59+
# @!attribute effective_date
60+
# When this change will take effect.
61+
#
62+
# @return [Time, nil]
63+
optional :effective_date, Time, nil?: true
64+
65+
# @!attribute plan_id
66+
# The target plan ID for plan changes.
67+
#
68+
# @return [String, nil]
69+
optional :plan_id, String, nil?: true
70+
71+
# @!method initialize(id:, change_type:, expiration_time:, status:, subscription:, applied_at: nil, billing_cycle_alignment: nil, cancelled_at: nil, change_option: nil, effective_date: nil, plan_id: nil)
4172
# Some parameter documentations has been truncated, see
4273
# {Orb::Models::SubscriptionChangeCancelResponse} for more details.
4374
#
@@ -48,6 +79,8 @@ class SubscriptionChangeCancelResponse < Orb::Internal::Type::BaseModel
4879
#
4980
# @param id [String]
5081
#
82+
# @param change_type [String] The type of change (e.g., 'schedule_plan_change', 'create_subscription').
83+
#
5184
# @param expiration_time [Time] Subscription change will be cancelled at this time and can no longer be applied.
5285
#
5386
# @param status [Symbol, Orb::Models::SubscriptionChangeCancelResponse::Status]
@@ -56,7 +89,15 @@ class SubscriptionChangeCancelResponse < Orb::Internal::Type::BaseModel
5689
#
5790
# @param applied_at [Time, nil] When this change was applied.
5891
#
92+
# @param billing_cycle_alignment [String, nil] Billing cycle alignment for plan changes.
93+
#
5994
# @param cancelled_at [Time, nil] When this change was cancelled.
95+
#
96+
# @param change_option [String, nil] How the change is scheduled (e.g., 'immediate', 'end_of_subscription_term', 'req
97+
#
98+
# @param effective_date [Time, nil] When this change will take effect.
99+
#
100+
# @param plan_id [String, nil] The target plan ID for plan changes.
60101

61102
# @see Orb::Models::SubscriptionChangeCancelResponse#status
62103
module Status

lib/orb/models/subscription_change_retrieve_response.rb

Lines changed: 42 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,12 @@ class SubscriptionChangeRetrieveResponse < Orb::Internal::Type::BaseModel
99
# @return [String]
1010
required :id, String
1111

12+
# @!attribute change_type
13+
# The type of change (e.g., 'schedule_plan_change', 'create_subscription').
14+
#
15+
# @return [String]
16+
required :change_type, String
17+
1218
# @!attribute expiration_time
1319
# Subscription change will be cancelled at this time and can no longer be applied.
1420
#
@@ -31,13 +37,38 @@ class SubscriptionChangeRetrieveResponse < Orb::Internal::Type::BaseModel
3137
# @return [Time, nil]
3238
optional :applied_at, Time, nil?: true
3339

40+
# @!attribute billing_cycle_alignment
41+
# Billing cycle alignment for plan changes.
42+
#
43+
# @return [String, nil]
44+
optional :billing_cycle_alignment, String, nil?: true
45+
3446
# @!attribute cancelled_at
3547
# When this change was cancelled.
3648
#
3749
# @return [Time, nil]
3850
optional :cancelled_at, Time, nil?: true
3951

40-
# @!method initialize(id:, expiration_time:, status:, subscription:, applied_at: nil, cancelled_at: nil)
52+
# @!attribute change_option
53+
# How the change is scheduled (e.g., 'immediate', 'end_of_subscription_term',
54+
# 'requested_date').
55+
#
56+
# @return [String, nil]
57+
optional :change_option, String, nil?: true
58+
59+
# @!attribute effective_date
60+
# When this change will take effect.
61+
#
62+
# @return [Time, nil]
63+
optional :effective_date, Time, nil?: true
64+
65+
# @!attribute plan_id
66+
# The target plan ID for plan changes.
67+
#
68+
# @return [String, nil]
69+
optional :plan_id, String, nil?: true
70+
71+
# @!method initialize(id:, change_type:, expiration_time:, status:, subscription:, applied_at: nil, billing_cycle_alignment: nil, cancelled_at: nil, change_option: nil, effective_date: nil, plan_id: nil)
4172
# Some parameter documentations has been truncated, see
4273
# {Orb::Models::SubscriptionChangeRetrieveResponse} for more details.
4374
#
@@ -48,6 +79,8 @@ class SubscriptionChangeRetrieveResponse < Orb::Internal::Type::BaseModel
4879
#
4980
# @param id [String]
5081
#
82+
# @param change_type [String] The type of change (e.g., 'schedule_plan_change', 'create_subscription').
83+
#
5184
# @param expiration_time [Time] Subscription change will be cancelled at this time and can no longer be applied.
5285
#
5386
# @param status [Symbol, Orb::Models::SubscriptionChangeRetrieveResponse::Status]
@@ -56,7 +89,15 @@ class SubscriptionChangeRetrieveResponse < Orb::Internal::Type::BaseModel
5689
#
5790
# @param applied_at [Time, nil] When this change was applied.
5891
#
92+
# @param billing_cycle_alignment [String, nil] Billing cycle alignment for plan changes.
93+
#
5994
# @param cancelled_at [Time, nil] When this change was cancelled.
95+
#
96+
# @param change_option [String, nil] How the change is scheduled (e.g., 'immediate', 'end_of_subscription_term', 'req
97+
#
98+
# @param effective_date [Time, nil] When this change will take effect.
99+
#
100+
# @param plan_id [String, nil] The target plan ID for plan changes.
60101

61102
# @see Orb::Models::SubscriptionChangeRetrieveResponse#status
62103
module Status

rbi/orb/models/subscription_change_apply_response.rbi

Lines changed: 45 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@ module Orb
1414
sig { returns(String) }
1515
attr_accessor :id
1616

17+
# The type of change (e.g., 'schedule_plan_change', 'create_subscription').
18+
sig { returns(String) }
19+
attr_accessor :change_type
20+
1721
# Subscription change will be cancelled at this time and can no longer be applied.
1822
sig { returns(Time) }
1923
attr_accessor :expiration_time
@@ -37,48 +41,86 @@ module Orb
3741
sig { returns(T.nilable(Time)) }
3842
attr_accessor :applied_at
3943

44+
# Billing cycle alignment for plan changes.
45+
sig { returns(T.nilable(String)) }
46+
attr_accessor :billing_cycle_alignment
47+
4048
# When this change was cancelled.
4149
sig { returns(T.nilable(Time)) }
4250
attr_accessor :cancelled_at
4351

52+
# How the change is scheduled (e.g., 'immediate', 'end_of_subscription_term',
53+
# 'requested_date').
54+
sig { returns(T.nilable(String)) }
55+
attr_accessor :change_option
56+
57+
# When this change will take effect.
58+
sig { returns(T.nilable(Time)) }
59+
attr_accessor :effective_date
60+
61+
# The target plan ID for plan changes.
62+
sig { returns(T.nilable(String)) }
63+
attr_accessor :plan_id
64+
4465
# A subscription change represents a desired new subscription / pending change to
4566
# an existing subscription. It is a way to first preview the effects on the
4667
# subscription as well as any changes/creation of invoices (see
4768
# `subscription.changed_resources`).
4869
sig do
4970
params(
5071
id: String,
72+
change_type: String,
5173
expiration_time: Time,
5274
status:
5375
Orb::Models::SubscriptionChangeApplyResponse::Status::OrSymbol,
5476
subscription: T.nilable(Orb::MutatedSubscription::OrHash),
5577
applied_at: T.nilable(Time),
56-
cancelled_at: T.nilable(Time)
78+
billing_cycle_alignment: T.nilable(String),
79+
cancelled_at: T.nilable(Time),
80+
change_option: T.nilable(String),
81+
effective_date: T.nilable(Time),
82+
plan_id: T.nilable(String)
5783
).returns(T.attached_class)
5884
end
5985
def self.new(
6086
id:,
87+
# The type of change (e.g., 'schedule_plan_change', 'create_subscription').
88+
change_type:,
6189
# Subscription change will be cancelled at this time and can no longer be applied.
6290
expiration_time:,
6391
status:,
6492
subscription:,
6593
# When this change was applied.
6694
applied_at: nil,
95+
# Billing cycle alignment for plan changes.
96+
billing_cycle_alignment: nil,
6797
# When this change was cancelled.
68-
cancelled_at: nil
98+
cancelled_at: nil,
99+
# How the change is scheduled (e.g., 'immediate', 'end_of_subscription_term',
100+
# 'requested_date').
101+
change_option: nil,
102+
# When this change will take effect.
103+
effective_date: nil,
104+
# The target plan ID for plan changes.
105+
plan_id: nil
69106
)
70107
end
71108

72109
sig do
73110
override.returns(
74111
{
75112
id: String,
113+
change_type: String,
76114
expiration_time: Time,
77115
status:
78116
Orb::Models::SubscriptionChangeApplyResponse::Status::TaggedSymbol,
79117
subscription: T.nilable(Orb::MutatedSubscription),
80118
applied_at: T.nilable(Time),
81-
cancelled_at: T.nilable(Time)
119+
billing_cycle_alignment: T.nilable(String),
120+
cancelled_at: T.nilable(Time),
121+
change_option: T.nilable(String),
122+
effective_date: T.nilable(Time),
123+
plan_id: T.nilable(String)
82124
}
83125
)
84126
end

0 commit comments

Comments
 (0)