Skip to content

Commit fbfb2c1

Browse files
feat(api): api update
1 parent 40619a0 commit fbfb2c1

7 files changed

Lines changed: 176 additions & 4 deletions

File tree

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 116
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/orb%2Forb-d4db2933d3d6b8c855e3351dcce658777ec9a413eb78f176b2e63b1e99fddf68.yml
3-
openapi_spec_hash: 858adc7f2e0c8c631ef733dfd8f9ea0a
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/orb%2Forb-0db984d367f9ae04249fb6c72789b0a38ef1785d156b438fe03290fa4e262a7d.yml
3+
openapi_spec_hash: c901c8b4fc2b0399a33b1346f8521850
44
config_hash: 3c3524be9607afb24d2139ce26ce5389

lib/orb/models/customers/credits/ledger_create_entry_by_external_id_params.rb

Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,18 @@ class InvoiceSettings < Orb::Internal::Type::BaseModel
156156
# @return [Integer]
157157
required :net_terms, Integer
158158

159+
# @!attribute invoice_date
160+
# An ISO 8601 format date that denotes when this invoice should be dated in the
161+
# customer's timezone. If not provided, the invoice date will default to the
162+
# credit block's effective date.
163+
#
164+
# @return [Date, Time, nil]
165+
optional :invoice_date,
166+
union: -> {
167+
Orb::Customers::Credits::LedgerCreateEntryByExternalIDParams::InvoiceSettings::InvoiceDate
168+
},
169+
nil?: true
170+
159171
# @!attribute memo
160172
# An optional memo to display on the invoice.
161173
#
@@ -169,7 +181,7 @@ class InvoiceSettings < Orb::Internal::Type::BaseModel
169181
# @return [Boolean, nil]
170182
optional :require_successful_payment, Orb::Internal::Type::Boolean
171183

172-
# @!method initialize(auto_collection:, net_terms:, memo: nil, require_successful_payment: nil)
184+
# @!method initialize(auto_collection:, net_terms:, invoice_date: nil, memo: nil, require_successful_payment: nil)
173185
# Some parameter documentations has been truncated, see
174186
# {Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDParams::InvoiceSettings}
175187
# for more details.
@@ -183,9 +195,27 @@ class InvoiceSettings < Orb::Internal::Type::BaseModel
183195
#
184196
# @param net_terms [Integer] The net terms determines the difference between the invoice date and the issue d
185197
#
198+
# @param invoice_date [Date, Time, nil] An ISO 8601 format date that denotes when this invoice should be dated in the cu
199+
#
186200
# @param memo [String, nil] An optional memo to display on the invoice.
187201
#
188202
# @param require_successful_payment [Boolean] If true, the new credit block will require that the corresponding invoice is pai
203+
204+
# An ISO 8601 format date that denotes when this invoice should be dated in the
205+
# customer's timezone. If not provided, the invoice date will default to the
206+
# credit block's effective date.
207+
#
208+
# @see Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDParams::InvoiceSettings#invoice_date
209+
module InvoiceDate
210+
extend Orb::Internal::Type::Union
211+
212+
variant Date
213+
214+
variant Time
215+
216+
# @!method self.variants
217+
# @return [Array(Date, Time)]
218+
end
189219
end
190220

191221
# Can only be specified when `entry_type=void`. The reason for the void.

lib/orb/models/customers/credits/ledger_create_entry_params.rb

Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,18 @@ class InvoiceSettings < Orb::Internal::Type::BaseModel
152152
# @return [Integer]
153153
required :net_terms, Integer
154154

155+
# @!attribute invoice_date
156+
# An ISO 8601 format date that denotes when this invoice should be dated in the
157+
# customer's timezone. If not provided, the invoice date will default to the
158+
# credit block's effective date.
159+
#
160+
# @return [Date, Time, nil]
161+
optional :invoice_date,
162+
union: -> {
163+
Orb::Customers::Credits::LedgerCreateEntryParams::InvoiceSettings::InvoiceDate
164+
},
165+
nil?: true
166+
155167
# @!attribute memo
156168
# An optional memo to display on the invoice.
157169
#
@@ -165,7 +177,7 @@ class InvoiceSettings < Orb::Internal::Type::BaseModel
165177
# @return [Boolean, nil]
166178
optional :require_successful_payment, Orb::Internal::Type::Boolean
167179

168-
# @!method initialize(auto_collection:, net_terms:, memo: nil, require_successful_payment: nil)
180+
# @!method initialize(auto_collection:, net_terms:, invoice_date: nil, memo: nil, require_successful_payment: nil)
169181
# Some parameter documentations has been truncated, see
170182
# {Orb::Models::Customers::Credits::LedgerCreateEntryParams::InvoiceSettings} for
171183
# more details.
@@ -179,9 +191,27 @@ class InvoiceSettings < Orb::Internal::Type::BaseModel
179191
#
180192
# @param net_terms [Integer] The net terms determines the difference between the invoice date and the issue d
181193
#
194+
# @param invoice_date [Date, Time, nil] An ISO 8601 format date that denotes when this invoice should be dated in the cu
195+
#
182196
# @param memo [String, nil] An optional memo to display on the invoice.
183197
#
184198
# @param require_successful_payment [Boolean] If true, the new credit block will require that the corresponding invoice is pai
199+
200+
# An ISO 8601 format date that denotes when this invoice should be dated in the
201+
# customer's timezone. If not provided, the invoice date will default to the
202+
# credit block's effective date.
203+
#
204+
# @see Orb::Models::Customers::Credits::LedgerCreateEntryParams::InvoiceSettings#invoice_date
205+
module InvoiceDate
206+
extend Orb::Internal::Type::Union
207+
208+
variant Date
209+
210+
variant Time
211+
212+
# @!method self.variants
213+
# @return [Array(Date, Time)]
214+
end
185215
end
186216

187217
# Can only be specified when `entry_type=void`. The reason for the void.

rbi/orb/models/customers/credits/ledger_create_entry_by_external_id_params.rbi

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -245,6 +245,18 @@ module Orb
245245
sig { returns(Integer) }
246246
attr_accessor :net_terms
247247

248+
# An ISO 8601 format date that denotes when this invoice should be dated in the
249+
# customer's timezone. If not provided, the invoice date will default to the
250+
# credit block's effective date.
251+
sig do
252+
returns(
253+
T.nilable(
254+
Orb::Customers::Credits::LedgerCreateEntryByExternalIDParams::InvoiceSettings::InvoiceDate::Variants
255+
)
256+
)
257+
end
258+
attr_accessor :invoice_date
259+
248260
# An optional memo to display on the invoice.
249261
sig { returns(T.nilable(String)) }
250262
attr_accessor :memo
@@ -265,6 +277,10 @@ module Orb
265277
params(
266278
auto_collection: T::Boolean,
267279
net_terms: Integer,
280+
invoice_date:
281+
T.nilable(
282+
Orb::Customers::Credits::LedgerCreateEntryByExternalIDParams::InvoiceSettings::InvoiceDate::Variants
283+
),
268284
memo: T.nilable(String),
269285
require_successful_payment: T::Boolean
270286
).returns(T.attached_class)
@@ -277,6 +293,10 @@ module Orb
277293
# date for the invoice. If you intend the invoice to be due on issue, set this
278294
# to 0.
279295
net_terms:,
296+
# An ISO 8601 format date that denotes when this invoice should be dated in the
297+
# customer's timezone. If not provided, the invoice date will default to the
298+
# credit block's effective date.
299+
invoice_date: nil,
280300
# An optional memo to display on the invoice.
281301
memo: nil,
282302
# If true, the new credit block will require that the corresponding invoice is
@@ -290,13 +310,36 @@ module Orb
290310
{
291311
auto_collection: T::Boolean,
292312
net_terms: Integer,
313+
invoice_date:
314+
T.nilable(
315+
Orb::Customers::Credits::LedgerCreateEntryByExternalIDParams::InvoiceSettings::InvoiceDate::Variants
316+
),
293317
memo: T.nilable(String),
294318
require_successful_payment: T::Boolean
295319
}
296320
)
297321
end
298322
def to_hash
299323
end
324+
325+
# An ISO 8601 format date that denotes when this invoice should be dated in the
326+
# customer's timezone. If not provided, the invoice date will default to the
327+
# credit block's effective date.
328+
module InvoiceDate
329+
extend Orb::Internal::Type::Union
330+
331+
Variants = T.type_alias { T.any(Date, Time) }
332+
333+
sig do
334+
override.returns(
335+
T::Array[
336+
Orb::Customers::Credits::LedgerCreateEntryByExternalIDParams::InvoiceSettings::InvoiceDate::Variants
337+
]
338+
)
339+
end
340+
def self.variants
341+
end
342+
end
300343
end
301344

302345
# Can only be specified when `entry_type=void`. The reason for the void.

rbi/orb/models/customers/credits/ledger_create_entry_params.rbi

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -245,6 +245,18 @@ module Orb
245245
sig { returns(Integer) }
246246
attr_accessor :net_terms
247247

248+
# An ISO 8601 format date that denotes when this invoice should be dated in the
249+
# customer's timezone. If not provided, the invoice date will default to the
250+
# credit block's effective date.
251+
sig do
252+
returns(
253+
T.nilable(
254+
Orb::Customers::Credits::LedgerCreateEntryParams::InvoiceSettings::InvoiceDate::Variants
255+
)
256+
)
257+
end
258+
attr_accessor :invoice_date
259+
248260
# An optional memo to display on the invoice.
249261
sig { returns(T.nilable(String)) }
250262
attr_accessor :memo
@@ -265,6 +277,10 @@ module Orb
265277
params(
266278
auto_collection: T::Boolean,
267279
net_terms: Integer,
280+
invoice_date:
281+
T.nilable(
282+
Orb::Customers::Credits::LedgerCreateEntryParams::InvoiceSettings::InvoiceDate::Variants
283+
),
268284
memo: T.nilable(String),
269285
require_successful_payment: T::Boolean
270286
).returns(T.attached_class)
@@ -277,6 +293,10 @@ module Orb
277293
# date for the invoice. If you intend the invoice to be due on issue, set this
278294
# to 0.
279295
net_terms:,
296+
# An ISO 8601 format date that denotes when this invoice should be dated in the
297+
# customer's timezone. If not provided, the invoice date will default to the
298+
# credit block's effective date.
299+
invoice_date: nil,
280300
# An optional memo to display on the invoice.
281301
memo: nil,
282302
# If true, the new credit block will require that the corresponding invoice is
@@ -290,13 +310,36 @@ module Orb
290310
{
291311
auto_collection: T::Boolean,
292312
net_terms: Integer,
313+
invoice_date:
314+
T.nilable(
315+
Orb::Customers::Credits::LedgerCreateEntryParams::InvoiceSettings::InvoiceDate::Variants
316+
),
293317
memo: T.nilable(String),
294318
require_successful_payment: T::Boolean
295319
}
296320
)
297321
end
298322
def to_hash
299323
end
324+
325+
# An ISO 8601 format date that denotes when this invoice should be dated in the
326+
# customer's timezone. If not provided, the invoice date will default to the
327+
# credit block's effective date.
328+
module InvoiceDate
329+
extend Orb::Internal::Type::Union
330+
331+
Variants = T.type_alias { T.any(Date, Time) }
332+
333+
sig do
334+
override.returns(
335+
T::Array[
336+
Orb::Customers::Credits::LedgerCreateEntryParams::InvoiceSettings::InvoiceDate::Variants
337+
]
338+
)
339+
end
340+
def self.variants
341+
end
342+
end
300343
end
301344

302345
# Can only be specified when `entry_type=void`. The reason for the void.

sig/orb/models/customers/credits/ledger_create_entry_by_external_id_params.rbs

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@ module Orb
9393
{
9494
auto_collection: bool,
9595
net_terms: Integer,
96+
invoice_date: Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDParams::InvoiceSettings::invoice_date?,
9697
memo: String?,
9798
require_successful_payment: bool
9899
}
@@ -102,6 +103,8 @@ module Orb
102103

103104
attr_accessor net_terms: Integer
104105

106+
attr_accessor invoice_date: Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDParams::InvoiceSettings::invoice_date?
107+
105108
attr_accessor memo: String?
106109

107110
attr_reader require_successful_payment: bool?
@@ -111,16 +114,26 @@ module Orb
111114
def initialize: (
112115
auto_collection: bool,
113116
net_terms: Integer,
117+
?invoice_date: Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDParams::InvoiceSettings::invoice_date?,
114118
?memo: String?,
115119
?require_successful_payment: bool
116120
) -> void
117121

118122
def to_hash: -> {
119123
auto_collection: bool,
120124
net_terms: Integer,
125+
invoice_date: Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDParams::InvoiceSettings::invoice_date?,
121126
memo: String?,
122127
require_successful_payment: bool
123128
}
129+
130+
type invoice_date = Date | Time
131+
132+
module InvoiceDate
133+
extend Orb::Internal::Type::Union
134+
135+
def self?.variants: -> ::Array[Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDParams::InvoiceSettings::invoice_date]
136+
end
124137
end
125138

126139
type void_reason = :refund

sig/orb/models/customers/credits/ledger_create_entry_params.rbs

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@ module Orb
9393
{
9494
auto_collection: bool,
9595
net_terms: Integer,
96+
invoice_date: Orb::Models::Customers::Credits::LedgerCreateEntryParams::InvoiceSettings::invoice_date?,
9697
memo: String?,
9798
require_successful_payment: bool
9899
}
@@ -102,6 +103,8 @@ module Orb
102103

103104
attr_accessor net_terms: Integer
104105

106+
attr_accessor invoice_date: Orb::Models::Customers::Credits::LedgerCreateEntryParams::InvoiceSettings::invoice_date?
107+
105108
attr_accessor memo: String?
106109

107110
attr_reader require_successful_payment: bool?
@@ -111,16 +114,26 @@ module Orb
111114
def initialize: (
112115
auto_collection: bool,
113116
net_terms: Integer,
117+
?invoice_date: Orb::Models::Customers::Credits::LedgerCreateEntryParams::InvoiceSettings::invoice_date?,
114118
?memo: String?,
115119
?require_successful_payment: bool
116120
) -> void
117121

118122
def to_hash: -> {
119123
auto_collection: bool,
120124
net_terms: Integer,
125+
invoice_date: Orb::Models::Customers::Credits::LedgerCreateEntryParams::InvoiceSettings::invoice_date?,
121126
memo: String?,
122127
require_successful_payment: bool
123128
}
129+
130+
type invoice_date = Date | Time
131+
132+
module InvoiceDate
133+
extend Orb::Internal::Type::Union
134+
135+
def self?.variants: -> ::Array[Orb::Models::Customers::Credits::LedgerCreateEntryParams::InvoiceSettings::invoice_date]
136+
end
124137
end
125138

126139
type void_reason = :refund

0 commit comments

Comments
 (0)