Skip to content

Commit 6ff5a68

Browse files
feat(api): api update (#87)
1 parent 5685579 commit 6ff5a68

11 files changed

+157
-17
lines changed

.stats.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
configured_endpoints: 103
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/orb%2Forb-d4f03b16daf0bae33be634c959dafb0e21b0bcb156beb162f8235394dca88e7c.yml
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/orb%2Forb-c8fc7d0bf70bf7ed91a141f346a02929e4d25a6fac7b59f58b68136ed6ff024f.yml

lib/orb/models/invoice.rb

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1211,6 +1211,12 @@ class LineItem < Orb::BaseModel
12111211
# @return [Time]
12121212
required :end_date, Time
12131213

1214+
# @!attribute filter
1215+
# An additional filter that was used to calculate the usage for this line item.
1216+
#
1217+
# @return [String, nil]
1218+
required :filter, String, nil?: true
1219+
12141220
# @!attribute grouping
12151221
# [DEPRECATED] For configured prices that are split by a grouping key, this will
12161222
# be populated with the key and a value. The `amount` and `subtotal` will be the
@@ -1302,6 +1308,12 @@ class LineItem < Orb::BaseModel
13021308
# @return [Array<Orb::Models::Invoice::LineItem::TaxAmount>]
13031309
required :tax_amounts, -> { Orb::ArrayOf[Orb::Models::Invoice::LineItem::TaxAmount] }
13041310

1311+
# @!attribute usage_customer_ids
1312+
# A list of customer ids that were used to calculate the usage for this line item.
1313+
#
1314+
# @return [Array<String>, nil]
1315+
required :usage_customer_ids, Orb::ArrayOf[String], nil?: true
1316+
13051317
# @!parse
13061318
# # @param id [String]
13071319
# # @param adjusted_subtotal [String]
@@ -1310,6 +1322,7 @@ class LineItem < Orb::BaseModel
13101322
# # @param credits_applied [String]
13111323
# # @param discount [Orb::Models::PercentageDiscount, Orb::Models::TrialDiscount, Orb::Models::Discount::UsageDiscount, Orb::Models::AmountDiscount, nil]
13121324
# # @param end_date [Time]
1325+
# # @param filter [String, nil]
13131326
# # @param grouping [String, nil]
13141327
# # @param maximum [Orb::Models::Invoice::LineItem::Maximum, nil]
13151328
# # @param maximum_amount [String, nil]
@@ -1323,6 +1336,7 @@ class LineItem < Orb::BaseModel
13231336
# # @param sub_line_items [Array<Orb::Models::Invoice::LineItem::SubLineItem::MatrixSubLineItem, Orb::Models::Invoice::LineItem::SubLineItem::TierSubLineItem, Orb::Models::Invoice::LineItem::SubLineItem::OtherSubLineItem>]
13241337
# # @param subtotal [String]
13251338
# # @param tax_amounts [Array<Orb::Models::Invoice::LineItem::TaxAmount>]
1339+
# # @param usage_customer_ids [Array<String>, nil]
13261340
# #
13271341
# def initialize(
13281342
# id:,
@@ -1332,6 +1346,7 @@ class LineItem < Orb::BaseModel
13321346
# credits_applied:,
13331347
# discount:,
13341348
# end_date:,
1349+
# filter:,
13351350
# grouping:,
13361351
# maximum:,
13371352
# maximum_amount:,
@@ -1345,6 +1360,7 @@ class LineItem < Orb::BaseModel
13451360
# sub_line_items:,
13461361
# subtotal:,
13471362
# tax_amounts:,
1363+
# usage_customer_ids:,
13481364
# **
13491365
# )
13501366
# super

lib/orb/models/invoice_fetch_upcoming_response.rb

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1211,6 +1211,12 @@ class LineItem < Orb::BaseModel
12111211
# @return [Time]
12121212
required :end_date, Time
12131213

1214+
# @!attribute filter
1215+
# An additional filter that was used to calculate the usage for this line item.
1216+
#
1217+
# @return [String, nil]
1218+
required :filter, String, nil?: true
1219+
12141220
# @!attribute grouping
12151221
# [DEPRECATED] For configured prices that are split by a grouping key, this will
12161222
# be populated with the key and a value. The `amount` and `subtotal` will be the
@@ -1303,6 +1309,12 @@ class LineItem < Orb::BaseModel
13031309
# @return [Array<Orb::Models::InvoiceFetchUpcomingResponse::LineItem::TaxAmount>]
13041310
required :tax_amounts, -> { Orb::ArrayOf[Orb::Models::InvoiceFetchUpcomingResponse::LineItem::TaxAmount] }
13051311

1312+
# @!attribute usage_customer_ids
1313+
# A list of customer ids that were used to calculate the usage for this line item.
1314+
#
1315+
# @return [Array<String>, nil]
1316+
required :usage_customer_ids, Orb::ArrayOf[String], nil?: true
1317+
13061318
# @!parse
13071319
# # @param id [String]
13081320
# # @param adjusted_subtotal [String]
@@ -1311,6 +1323,7 @@ class LineItem < Orb::BaseModel
13111323
# # @param credits_applied [String]
13121324
# # @param discount [Orb::Models::PercentageDiscount, Orb::Models::TrialDiscount, Orb::Models::Discount::UsageDiscount, Orb::Models::AmountDiscount, nil]
13131325
# # @param end_date [Time]
1326+
# # @param filter [String, nil]
13141327
# # @param grouping [String, nil]
13151328
# # @param maximum [Orb::Models::InvoiceFetchUpcomingResponse::LineItem::Maximum, nil]
13161329
# # @param maximum_amount [String, nil]
@@ -1324,6 +1337,7 @@ class LineItem < Orb::BaseModel
13241337
# # @param sub_line_items [Array<Orb::Models::InvoiceFetchUpcomingResponse::LineItem::SubLineItem::MatrixSubLineItem, Orb::Models::InvoiceFetchUpcomingResponse::LineItem::SubLineItem::TierSubLineItem, Orb::Models::InvoiceFetchUpcomingResponse::LineItem::SubLineItem::OtherSubLineItem>]
13251338
# # @param subtotal [String]
13261339
# # @param tax_amounts [Array<Orb::Models::InvoiceFetchUpcomingResponse::LineItem::TaxAmount>]
1340+
# # @param usage_customer_ids [Array<String>, nil]
13271341
# #
13281342
# def initialize(
13291343
# id:,
@@ -1333,6 +1347,7 @@ class LineItem < Orb::BaseModel
13331347
# credits_applied:,
13341348
# discount:,
13351349
# end_date:,
1350+
# filter:,
13361351
# grouping:,
13371352
# maximum:,
13381353
# maximum_amount:,
@@ -1346,6 +1361,7 @@ class LineItem < Orb::BaseModel
13461361
# sub_line_items:,
13471362
# subtotal:,
13481363
# tax_amounts:,
1364+
# usage_customer_ids:,
13491365
# **
13501366
# )
13511367
# super

lib/orb/models/invoice_line_item_create_response.rb

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,12 @@ class InvoiceLineItemCreateResponse < Orb::BaseModel
4646
# @return [Time]
4747
required :end_date, Time
4848

49+
# @!attribute filter
50+
# An additional filter that was used to calculate the usage for this line item.
51+
#
52+
# @return [String, nil]
53+
required :filter, String, nil?: true
54+
4955
# @!attribute grouping
5056
# [DEPRECATED] For configured prices that are split by a grouping key, this will
5157
# be populated with the key and a value. The `amount` and `subtotal` will be the
@@ -138,6 +144,12 @@ class InvoiceLineItemCreateResponse < Orb::BaseModel
138144
# @return [Array<Orb::Models::InvoiceLineItemCreateResponse::TaxAmount>]
139145
required :tax_amounts, -> { Orb::ArrayOf[Orb::Models::InvoiceLineItemCreateResponse::TaxAmount] }
140146

147+
# @!attribute usage_customer_ids
148+
# A list of customer ids that were used to calculate the usage for this line item.
149+
#
150+
# @return [Array<String>, nil]
151+
required :usage_customer_ids, Orb::ArrayOf[String], nil?: true
152+
141153
# @!parse
142154
# # @param id [String]
143155
# # @param adjusted_subtotal [String]
@@ -146,6 +158,7 @@ class InvoiceLineItemCreateResponse < Orb::BaseModel
146158
# # @param credits_applied [String]
147159
# # @param discount [Orb::Models::PercentageDiscount, Orb::Models::TrialDiscount, Orb::Models::Discount::UsageDiscount, Orb::Models::AmountDiscount, nil]
148160
# # @param end_date [Time]
161+
# # @param filter [String, nil]
149162
# # @param grouping [String, nil]
150163
# # @param maximum [Orb::Models::InvoiceLineItemCreateResponse::Maximum, nil]
151164
# # @param maximum_amount [String, nil]
@@ -159,6 +172,7 @@ class InvoiceLineItemCreateResponse < Orb::BaseModel
159172
# # @param sub_line_items [Array<Orb::Models::InvoiceLineItemCreateResponse::SubLineItem::MatrixSubLineItem, Orb::Models::InvoiceLineItemCreateResponse::SubLineItem::TierSubLineItem, Orb::Models::InvoiceLineItemCreateResponse::SubLineItem::OtherSubLineItem>]
160173
# # @param subtotal [String]
161174
# # @param tax_amounts [Array<Orb::Models::InvoiceLineItemCreateResponse::TaxAmount>]
175+
# # @param usage_customer_ids [Array<String>, nil]
162176
# #
163177
# def initialize(
164178
# id:,
@@ -168,6 +182,7 @@ class InvoiceLineItemCreateResponse < Orb::BaseModel
168182
# credits_applied:,
169183
# discount:,
170184
# end_date:,
185+
# filter:,
171186
# grouping:,
172187
# maximum:,
173188
# maximum_amount:,
@@ -181,6 +196,7 @@ class InvoiceLineItemCreateResponse < Orb::BaseModel
181196
# sub_line_items:,
182197
# subtotal:,
183198
# tax_amounts:,
199+
# usage_customer_ids:,
184200
# **
185201
# )
186202
# super

rbi/lib/orb/models/invoice.rbi

Lines changed: 25 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1297,6 +1297,14 @@ module Orb
12971297
def end_date=(_)
12981298
end
12991299

1300+
sig { returns(T.nilable(String)) }
1301+
def filter
1302+
end
1303+
1304+
sig { params(_: T.nilable(String)).returns(T.nilable(String)) }
1305+
def filter=(_)
1306+
end
1307+
13001308
sig { returns(T.nilable(String)) }
13011309
def grouping
13021310
end
@@ -1543,6 +1551,14 @@ module Orb
15431551
def tax_amounts=(_)
15441552
end
15451553

1554+
sig { returns(T.nilable(T::Array[String])) }
1555+
def usage_customer_ids
1556+
end
1557+
1558+
sig { params(_: T.nilable(T::Array[String])).returns(T.nilable(T::Array[String])) }
1559+
def usage_customer_ids=(_)
1560+
end
1561+
15461562
sig do
15471563
params(
15481564
id: String,
@@ -1567,6 +1583,7 @@ module Orb
15671583
)
15681584
),
15691585
end_date: Time,
1586+
filter: T.nilable(String),
15701587
grouping: T.nilable(String),
15711588
maximum: T.nilable(Orb::Models::Invoice::LineItem::Maximum),
15721589
maximum_amount: T.nilable(String),
@@ -1616,7 +1633,8 @@ module Orb
16161633
)
16171634
],
16181635
subtotal: String,
1619-
tax_amounts: T::Array[Orb::Models::Invoice::LineItem::TaxAmount]
1636+
tax_amounts: T::Array[Orb::Models::Invoice::LineItem::TaxAmount],
1637+
usage_customer_ids: T.nilable(T::Array[String])
16201638
)
16211639
.void
16221640
end
@@ -1628,6 +1646,7 @@ module Orb
16281646
credits_applied:,
16291647
discount:,
16301648
end_date:,
1649+
filter:,
16311650
grouping:,
16321651
maximum:,
16331652
maximum_amount:,
@@ -1640,7 +1659,8 @@ module Orb
16401659
start_date:,
16411660
sub_line_items:,
16421661
subtotal:,
1643-
tax_amounts:
1662+
tax_amounts:,
1663+
usage_customer_ids:
16441664
)
16451665
end
16461666

@@ -1670,6 +1690,7 @@ module Orb
16701690
)
16711691
),
16721692
end_date: Time,
1693+
filter: T.nilable(String),
16731694
grouping: T.nilable(String),
16741695
maximum: T.nilable(Orb::Models::Invoice::LineItem::Maximum),
16751696
maximum_amount: T.nilable(String),
@@ -1719,7 +1740,8 @@ module Orb
17191740
)
17201741
],
17211742
subtotal: String,
1722-
tax_amounts: T::Array[Orb::Models::Invoice::LineItem::TaxAmount]
1743+
tax_amounts: T::Array[Orb::Models::Invoice::LineItem::TaxAmount],
1744+
usage_customer_ids: T.nilable(T::Array[String])
17231745
}
17241746
)
17251747
end

rbi/lib/orb/models/invoice_fetch_upcoming_response.rbi

Lines changed: 25 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1315,6 +1315,14 @@ module Orb
13151315
def end_date=(_)
13161316
end
13171317

1318+
sig { returns(T.nilable(String)) }
1319+
def filter
1320+
end
1321+
1322+
sig { params(_: T.nilable(String)).returns(T.nilable(String)) }
1323+
def filter=(_)
1324+
end
1325+
13181326
sig { returns(T.nilable(String)) }
13191327
def grouping
13201328
end
@@ -1561,6 +1569,14 @@ module Orb
15611569
def tax_amounts=(_)
15621570
end
15631571

1572+
sig { returns(T.nilable(T::Array[String])) }
1573+
def usage_customer_ids
1574+
end
1575+
1576+
sig { params(_: T.nilable(T::Array[String])).returns(T.nilable(T::Array[String])) }
1577+
def usage_customer_ids=(_)
1578+
end
1579+
15641580
sig do
15651581
params(
15661582
id: String,
@@ -1585,6 +1601,7 @@ module Orb
15851601
)
15861602
),
15871603
end_date: Time,
1604+
filter: T.nilable(String),
15881605
grouping: T.nilable(String),
15891606
maximum: T.nilable(Orb::Models::InvoiceFetchUpcomingResponse::LineItem::Maximum),
15901607
maximum_amount: T.nilable(String),
@@ -1634,7 +1651,8 @@ module Orb
16341651
)
16351652
],
16361653
subtotal: String,
1637-
tax_amounts: T::Array[Orb::Models::InvoiceFetchUpcomingResponse::LineItem::TaxAmount]
1654+
tax_amounts: T::Array[Orb::Models::InvoiceFetchUpcomingResponse::LineItem::TaxAmount],
1655+
usage_customer_ids: T.nilable(T::Array[String])
16381656
)
16391657
.void
16401658
end
@@ -1646,6 +1664,7 @@ module Orb
16461664
credits_applied:,
16471665
discount:,
16481666
end_date:,
1667+
filter:,
16491668
grouping:,
16501669
maximum:,
16511670
maximum_amount:,
@@ -1658,7 +1677,8 @@ module Orb
16581677
start_date:,
16591678
sub_line_items:,
16601679
subtotal:,
1661-
tax_amounts:
1680+
tax_amounts:,
1681+
usage_customer_ids:
16621682
)
16631683
end
16641684

@@ -1688,6 +1708,7 @@ module Orb
16881708
)
16891709
),
16901710
end_date: Time,
1711+
filter: T.nilable(String),
16911712
grouping: T.nilable(String),
16921713
maximum: T.nilable(Orb::Models::InvoiceFetchUpcomingResponse::LineItem::Maximum),
16931714
maximum_amount: T.nilable(String),
@@ -1737,7 +1758,8 @@ module Orb
17371758
)
17381759
],
17391760
subtotal: String,
1740-
tax_amounts: T::Array[Orb::Models::InvoiceFetchUpcomingResponse::LineItem::TaxAmount]
1761+
tax_amounts: T::Array[Orb::Models::InvoiceFetchUpcomingResponse::LineItem::TaxAmount],
1762+
usage_customer_ids: T.nilable(T::Array[String])
17411763
}
17421764
)
17431765
end

0 commit comments

Comments
 (0)