Skip to content

Commit 83a6ffd

Browse files
feat(api): api update
1 parent aefe58f commit 83a6ffd

File tree

7 files changed

+55
-11
lines changed

7 files changed

+55
-11
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-42aa43f3893eef31a351e066bf0cf8c56da8c857ccbb45eb7dd58739ad43bd86.yml
3-
openapi_spec_hash: e6b8c1e707036539d88a7b79af864a49
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/orb%2Forb-c075f748a7de8ecdccf11a8f2374682b0efd84f1318147274a838bf2fdd73b58.yml
3+
openapi_spec_hash: ae918b8f348f1b7d3252a59dac36c453
44
config_hash: 1f73a949b649ecfe6ec68ba1bb459dc2

lib/orb/models/subscription_change_apply_params.rb

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,16 +13,29 @@ class SubscriptionChangeApplyParams < Orb::Internal::Type::BaseModel
1313
# @return [String, nil]
1414
optional :description, String, nil?: true
1515

16+
# @!attribute mark_as_paid
17+
# Mark all pending invoices that are payable as paid. If amount is also provided,
18+
# mark as paid and credit the difference to the customer's balance.
19+
#
20+
# @return [Boolean, nil]
21+
optional :mark_as_paid, Orb::Internal::Type::Boolean, nil?: true
22+
1623
# @!attribute previously_collected_amount
17-
# Amount already collected to apply to the customer's balance.
24+
# Amount already collected to apply to the customer's balance. If mark_as_paid is
25+
# also provided, credit the difference to the customer's balance.
1826
#
1927
# @return [String, nil]
2028
optional :previously_collected_amount, String, nil?: true
2129

22-
# @!method initialize(description: nil, previously_collected_amount: nil, request_options: {})
30+
# @!method initialize(description: nil, mark_as_paid: nil, previously_collected_amount: nil, request_options: {})
31+
# Some parameter documentations has been truncated, see
32+
# {Orb::Models::SubscriptionChangeApplyParams} for more details.
33+
#
2334
# @param description [String, nil] Description to apply to the balance transaction representing this credit.
2435
#
25-
# @param previously_collected_amount [String, nil] Amount already collected to apply to the customer's balance.
36+
# @param mark_as_paid [Boolean, nil] Mark all pending invoices that are payable as paid. If amount is also provided,
37+
#
38+
# @param previously_collected_amount [String, nil] Amount already collected to apply to the customer's balance. If mark_as_paid is
2639
#
2740
# @param request_options [Orb::RequestOptions, Hash{Symbol=>Object}]
2841
end

lib/orb/resources/subscription_changes.rb

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,17 +30,22 @@ def retrieve(subscription_change_id, params = {})
3030
)
3131
end
3232

33+
# Some parameter documentations has been truncated, see
34+
# {Orb::Models::SubscriptionChangeApplyParams} for more details.
35+
#
3336
# Apply a subscription change to perform the intended action. If a positive amount
3437
# is passed with a request to this endpoint, any eligible invoices that were
3538
# created will be issued immediately if they only contain in-advance fees.
3639
#
37-
# @overload apply(subscription_change_id, description: nil, previously_collected_amount: nil, request_options: {})
40+
# @overload apply(subscription_change_id, description: nil, mark_as_paid: nil, previously_collected_amount: nil, request_options: {})
3841
#
3942
# @param subscription_change_id [String]
4043
#
4144
# @param description [String, nil] Description to apply to the balance transaction representing this credit.
4245
#
43-
# @param previously_collected_amount [String, nil] Amount already collected to apply to the customer's balance.
46+
# @param mark_as_paid [Boolean, nil] Mark all pending invoices that are payable as paid. If amount is also provided,
47+
#
48+
# @param previously_collected_amount [String, nil] Amount already collected to apply to the customer's balance. If mark_as_paid is
4449
#
4550
# @param request_options [Orb::RequestOptions, Hash{Symbol=>Object}, nil]
4651
#

rbi/orb/models/subscription_change_apply_params.rbi

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,21 +15,32 @@ module Orb
1515
sig { returns(T.nilable(String)) }
1616
attr_accessor :description
1717

18-
# Amount already collected to apply to the customer's balance.
18+
# Mark all pending invoices that are payable as paid. If amount is also provided,
19+
# mark as paid and credit the difference to the customer's balance.
20+
sig { returns(T.nilable(T::Boolean)) }
21+
attr_accessor :mark_as_paid
22+
23+
# Amount already collected to apply to the customer's balance. If mark_as_paid is
24+
# also provided, credit the difference to the customer's balance.
1925
sig { returns(T.nilable(String)) }
2026
attr_accessor :previously_collected_amount
2127

2228
sig do
2329
params(
2430
description: T.nilable(String),
31+
mark_as_paid: T.nilable(T::Boolean),
2532
previously_collected_amount: T.nilable(String),
2633
request_options: Orb::RequestOptions::OrHash
2734
).returns(T.attached_class)
2835
end
2936
def self.new(
3037
# Description to apply to the balance transaction representing this credit.
3138
description: nil,
32-
# Amount already collected to apply to the customer's balance.
39+
# Mark all pending invoices that are payable as paid. If amount is also provided,
40+
# mark as paid and credit the difference to the customer's balance.
41+
mark_as_paid: nil,
42+
# Amount already collected to apply to the customer's balance. If mark_as_paid is
43+
# also provided, credit the difference to the customer's balance.
3344
previously_collected_amount: nil,
3445
request_options: {}
3546
)
@@ -39,6 +50,7 @@ module Orb
3950
override.returns(
4051
{
4152
description: T.nilable(String),
53+
mark_as_paid: T.nilable(T::Boolean),
4254
previously_collected_amount: T.nilable(String),
4355
request_options: Orb::RequestOptions
4456
}

rbi/orb/resources/subscription_changes.rbi

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ module Orb
2828
params(
2929
subscription_change_id: String,
3030
description: T.nilable(String),
31+
mark_as_paid: T.nilable(T::Boolean),
3132
previously_collected_amount: T.nilable(String),
3233
request_options: Orb::RequestOptions::OrHash
3334
).returns(Orb::Models::SubscriptionChangeApplyResponse)
@@ -36,7 +37,11 @@ module Orb
3637
subscription_change_id,
3738
# Description to apply to the balance transaction representing this credit.
3839
description: nil,
39-
# Amount already collected to apply to the customer's balance.
40+
# Mark all pending invoices that are payable as paid. If amount is also provided,
41+
# mark as paid and credit the difference to the customer's balance.
42+
mark_as_paid: nil,
43+
# Amount already collected to apply to the customer's balance. If mark_as_paid is
44+
# also provided, credit the difference to the customer's balance.
4045
previously_collected_amount: nil,
4146
request_options: {}
4247
)

sig/orb/models/subscription_change_apply_params.rbs

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
11
module Orb
22
module Models
33
type subscription_change_apply_params =
4-
{ description: String?, previously_collected_amount: String? }
4+
{
5+
description: String?,
6+
mark_as_paid: bool?,
7+
previously_collected_amount: String?
8+
}
59
& Orb::Internal::Type::request_parameters
610

711
class SubscriptionChangeApplyParams < Orb::Internal::Type::BaseModel
@@ -10,16 +14,20 @@ module Orb
1014

1115
attr_accessor description: String?
1216

17+
attr_accessor mark_as_paid: bool?
18+
1319
attr_accessor previously_collected_amount: String?
1420

1521
def initialize: (
1622
?description: String?,
23+
?mark_as_paid: bool?,
1724
?previously_collected_amount: String?,
1825
?request_options: Orb::request_opts
1926
) -> void
2027

2128
def to_hash: -> {
2229
description: String?,
30+
mark_as_paid: bool?,
2331
previously_collected_amount: String?,
2432
request_options: Orb::RequestOptions
2533
}

sig/orb/resources/subscription_changes.rbs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ module Orb
99
def apply: (
1010
String subscription_change_id,
1111
?description: String?,
12+
?mark_as_paid: bool?,
1213
?previously_collected_amount: String?,
1314
?request_options: Orb::request_opts
1415
) -> Orb::Models::SubscriptionChangeApplyResponse

0 commit comments

Comments
 (0)