Skip to content

Commit 863a72d

Browse files
feat(api): api update
1 parent bd23d78 commit 863a72d

File tree

7 files changed

+93
-4
lines changed

7 files changed

+93
-4
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-828c91953d2351040fdd4d90a3d9eafd09f9d240c4f6ce0441b7a10c06c1c722.yml
3-
openapi_spec_hash: c82bc88563f80f600e59e22014d4cec4
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/orb%2Forb-cbce25283cb9c3282e03e08b7ee81395436af7d0eb480ffcbab307b5bf1c92a0.yml
3+
openapi_spec_hash: c286edf46db95dee05eb6f180ac24ab0
44
config_hash: 1f73a949b649ecfe6ec68ba1bb459dc2

lib/orb/models/subscription_change_apply_params.rb

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,21 +20,47 @@ class SubscriptionChangeApplyParams < Orb::Internal::Type::BaseModel
2020
# @return [Boolean, nil]
2121
optional :mark_as_paid, Orb::Internal::Type::Boolean, nil?: true
2222

23+
# @!attribute payment_external_id
24+
# An optional external ID to associate with the payment. Only applicable when
25+
# mark_as_paid is true.
26+
#
27+
# @return [String, nil]
28+
optional :payment_external_id, String, nil?: true
29+
30+
# @!attribute payment_notes
31+
# Optional notes about the payment. Only applicable when mark_as_paid is true.
32+
#
33+
# @return [String, nil]
34+
optional :payment_notes, String, nil?: true
35+
36+
# @!attribute payment_received_date
37+
# A date string to specify the date the payment was received. Only applicable when
38+
# mark_as_paid is true. If not provided, defaults to the current date.
39+
#
40+
# @return [Date, nil]
41+
optional :payment_received_date, Date, nil?: true
42+
2343
# @!attribute previously_collected_amount
2444
# Amount already collected to apply to the customer's balance. If mark_as_paid is
2545
# also provided, credit the difference to the customer's balance.
2646
#
2747
# @return [String, nil]
2848
optional :previously_collected_amount, String, nil?: true
2949

30-
# @!method initialize(description: nil, mark_as_paid: nil, previously_collected_amount: nil, request_options: {})
50+
# @!method initialize(description: nil, mark_as_paid: nil, payment_external_id: nil, payment_notes: nil, payment_received_date: nil, previously_collected_amount: nil, request_options: {})
3151
# Some parameter documentations has been truncated, see
3252
# {Orb::Models::SubscriptionChangeApplyParams} for more details.
3353
#
3454
# @param description [String, nil] Description to apply to the balance transaction representing this credit.
3555
#
3656
# @param mark_as_paid [Boolean, nil] Mark all pending invoices that are payable as paid. If amount is also provided,
3757
#
58+
# @param payment_external_id [String, nil] An optional external ID to associate with the payment. Only applicable when mark
59+
#
60+
# @param payment_notes [String, nil] Optional notes about the payment. Only applicable when mark_as_paid is true.
61+
#
62+
# @param payment_received_date [Date, nil] A date string to specify the date the payment was received. Only applicable when
63+
#
3864
# @param previously_collected_amount [String, nil] Amount already collected to apply to the customer's balance. If mark_as_paid is
3965
#
4066
# @param request_options [Orb::RequestOptions, Hash{Symbol=>Object}]

lib/orb/resources/subscription_changes.rb

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,14 +37,20 @@ def retrieve(subscription_change_id, params = {})
3737
# is passed with a request to this endpoint, any eligible invoices that were
3838
# created will be issued immediately if they only contain in-advance fees.
3939
#
40-
# @overload apply(subscription_change_id, description: nil, mark_as_paid: nil, previously_collected_amount: nil, request_options: {})
40+
# @overload apply(subscription_change_id, description: nil, mark_as_paid: nil, payment_external_id: nil, payment_notes: nil, payment_received_date: nil, previously_collected_amount: nil, request_options: {})
4141
#
4242
# @param subscription_change_id [String]
4343
#
4444
# @param description [String, nil] Description to apply to the balance transaction representing this credit.
4545
#
4646
# @param mark_as_paid [Boolean, nil] Mark all pending invoices that are payable as paid. If amount is also provided,
4747
#
48+
# @param payment_external_id [String, nil] An optional external ID to associate with the payment. Only applicable when mark
49+
#
50+
# @param payment_notes [String, nil] Optional notes about the payment. Only applicable when mark_as_paid is true.
51+
#
52+
# @param payment_received_date [Date, nil] A date string to specify the date the payment was received. Only applicable when
53+
#
4854
# @param previously_collected_amount [String, nil] Amount already collected to apply to the customer's balance. If mark_as_paid is
4955
#
5056
# @param request_options [Orb::RequestOptions, Hash{Symbol=>Object}, nil]

rbi/orb/models/subscription_change_apply_params.rbi

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,20 @@ module Orb
2020
sig { returns(T.nilable(T::Boolean)) }
2121
attr_accessor :mark_as_paid
2222

23+
# An optional external ID to associate with the payment. Only applicable when
24+
# mark_as_paid is true.
25+
sig { returns(T.nilable(String)) }
26+
attr_accessor :payment_external_id
27+
28+
# Optional notes about the payment. Only applicable when mark_as_paid is true.
29+
sig { returns(T.nilable(String)) }
30+
attr_accessor :payment_notes
31+
32+
# A date string to specify the date the payment was received. Only applicable when
33+
# mark_as_paid is true. If not provided, defaults to the current date.
34+
sig { returns(T.nilable(Date)) }
35+
attr_accessor :payment_received_date
36+
2337
# Amount already collected to apply to the customer's balance. If mark_as_paid is
2438
# also provided, credit the difference to the customer's balance.
2539
sig { returns(T.nilable(String)) }
@@ -29,6 +43,9 @@ module Orb
2943
params(
3044
description: T.nilable(String),
3145
mark_as_paid: T.nilable(T::Boolean),
46+
payment_external_id: T.nilable(String),
47+
payment_notes: T.nilable(String),
48+
payment_received_date: T.nilable(Date),
3249
previously_collected_amount: T.nilable(String),
3350
request_options: Orb::RequestOptions::OrHash
3451
).returns(T.attached_class)
@@ -39,6 +56,14 @@ module Orb
3956
# Mark all pending invoices that are payable as paid. If amount is also provided,
4057
# mark as paid and credit the difference to the customer's balance.
4158
mark_as_paid: nil,
59+
# An optional external ID to associate with the payment. Only applicable when
60+
# mark_as_paid is true.
61+
payment_external_id: nil,
62+
# Optional notes about the payment. Only applicable when mark_as_paid is true.
63+
payment_notes: nil,
64+
# A date string to specify the date the payment was received. Only applicable when
65+
# mark_as_paid is true. If not provided, defaults to the current date.
66+
payment_received_date: nil,
4267
# Amount already collected to apply to the customer's balance. If mark_as_paid is
4368
# also provided, credit the difference to the customer's balance.
4469
previously_collected_amount: nil,
@@ -51,6 +76,9 @@ module Orb
5176
{
5277
description: T.nilable(String),
5378
mark_as_paid: T.nilable(T::Boolean),
79+
payment_external_id: T.nilable(String),
80+
payment_notes: T.nilable(String),
81+
payment_received_date: T.nilable(Date),
5482
previously_collected_amount: T.nilable(String),
5583
request_options: Orb::RequestOptions
5684
}

rbi/orb/resources/subscription_changes.rbi

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,9 @@ module Orb
2929
subscription_change_id: String,
3030
description: T.nilable(String),
3131
mark_as_paid: T.nilable(T::Boolean),
32+
payment_external_id: T.nilable(String),
33+
payment_notes: T.nilable(String),
34+
payment_received_date: T.nilable(Date),
3235
previously_collected_amount: T.nilable(String),
3336
request_options: Orb::RequestOptions::OrHash
3437
).returns(Orb::Models::SubscriptionChangeApplyResponse)
@@ -40,6 +43,14 @@ module Orb
4043
# Mark all pending invoices that are payable as paid. If amount is also provided,
4144
# mark as paid and credit the difference to the customer's balance.
4245
mark_as_paid: nil,
46+
# An optional external ID to associate with the payment. Only applicable when
47+
# mark_as_paid is true.
48+
payment_external_id: nil,
49+
# Optional notes about the payment. Only applicable when mark_as_paid is true.
50+
payment_notes: nil,
51+
# A date string to specify the date the payment was received. Only applicable when
52+
# mark_as_paid is true. If not provided, defaults to the current date.
53+
payment_received_date: nil,
4354
# Amount already collected to apply to the customer's balance. If mark_as_paid is
4455
# also provided, credit the difference to the customer's balance.
4556
previously_collected_amount: nil,

sig/orb/models/subscription_change_apply_params.rbs

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ module Orb
44
{
55
description: String?,
66
mark_as_paid: bool?,
7+
payment_external_id: String?,
8+
payment_notes: String?,
9+
payment_received_date: Date?,
710
previously_collected_amount: String?
811
}
912
& Orb::Internal::Type::request_parameters
@@ -16,18 +19,30 @@ module Orb
1619

1720
attr_accessor mark_as_paid: bool?
1821

22+
attr_accessor payment_external_id: String?
23+
24+
attr_accessor payment_notes: String?
25+
26+
attr_accessor payment_received_date: Date?
27+
1928
attr_accessor previously_collected_amount: String?
2029

2130
def initialize: (
2231
?description: String?,
2332
?mark_as_paid: bool?,
33+
?payment_external_id: String?,
34+
?payment_notes: String?,
35+
?payment_received_date: Date?,
2436
?previously_collected_amount: String?,
2537
?request_options: Orb::request_opts
2638
) -> void
2739

2840
def to_hash: -> {
2941
description: String?,
3042
mark_as_paid: bool?,
43+
payment_external_id: String?,
44+
payment_notes: String?,
45+
payment_received_date: Date?,
3146
previously_collected_amount: String?,
3247
request_options: Orb::RequestOptions
3348
}

sig/orb/resources/subscription_changes.rbs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ module Orb
1010
String subscription_change_id,
1111
?description: String?,
1212
?mark_as_paid: bool?,
13+
?payment_external_id: String?,
14+
?payment_notes: String?,
15+
?payment_received_date: Date?,
1316
?previously_collected_amount: String?,
1417
?request_options: Orb::request_opts
1518
) -> Orb::Models::SubscriptionChangeApplyResponse

0 commit comments

Comments
 (0)