diff --git a/src/orb/resources/beta/beta.py b/src/orb/resources/beta/beta.py index 212a1bce..c75b2e07 100644 --- a/src/orb/resources/beta/beta.py +++ b/src/orb/resources/beta/beta.py @@ -46,19 +46,35 @@ def with_streaming_response(self) -> AsyncBetaWithStreamingResponse: class BetaWithRawResponse: def __init__(self, beta: Beta) -> None: - self.price = PriceWithRawResponse(beta.price) + self._beta = beta + + @cached_property + def price(self) -> PriceWithRawResponse: + return PriceWithRawResponse(self._beta.price) class AsyncBetaWithRawResponse: def __init__(self, beta: AsyncBeta) -> None: - self.price = AsyncPriceWithRawResponse(beta.price) + self._beta = beta + + @cached_property + def price(self) -> AsyncPriceWithRawResponse: + return AsyncPriceWithRawResponse(self._beta.price) class BetaWithStreamingResponse: def __init__(self, beta: Beta) -> None: - self.price = PriceWithStreamingResponse(beta.price) + self._beta = beta + + @cached_property + def price(self) -> PriceWithStreamingResponse: + return PriceWithStreamingResponse(self._beta.price) class AsyncBetaWithStreamingResponse: def __init__(self, beta: AsyncBeta) -> None: - self.price = AsyncPriceWithStreamingResponse(beta.price) + self._beta = beta + + @cached_property + def price(self) -> AsyncPriceWithStreamingResponse: + return AsyncPriceWithStreamingResponse(self._beta.price) diff --git a/src/orb/resources/beta/price.py b/src/orb/resources/beta/price.py index d38b8f09..c2458e49 100644 --- a/src/orb/resources/beta/price.py +++ b/src/orb/resources/beta/price.py @@ -229,6 +229,8 @@ async def evaluate( class PriceWithRawResponse: def __init__(self, price: Price) -> None: + self._price = price + self.evaluate = _legacy_response.to_raw_response_wrapper( price.evaluate, ) @@ -236,6 +238,8 @@ def __init__(self, price: Price) -> None: class AsyncPriceWithRawResponse: def __init__(self, price: AsyncPrice) -> None: + self._price = price + self.evaluate = _legacy_response.async_to_raw_response_wrapper( price.evaluate, ) @@ -243,6 +247,8 @@ def __init__(self, price: AsyncPrice) -> None: class PriceWithStreamingResponse: def __init__(self, price: Price) -> None: + self._price = price + self.evaluate = to_streamed_response_wrapper( price.evaluate, ) @@ -250,6 +256,8 @@ def __init__(self, price: Price) -> None: class AsyncPriceWithStreamingResponse: def __init__(self, price: AsyncPrice) -> None: + self._price = price + self.evaluate = async_to_streamed_response_wrapper( price.evaluate, ) diff --git a/src/orb/resources/coupons/coupons.py b/src/orb/resources/coupons/coupons.py index 83f82cda..5e4b5d1f 100644 --- a/src/orb/resources/coupons/coupons.py +++ b/src/orb/resources/coupons/coupons.py @@ -460,7 +460,7 @@ async def fetch( class CouponsWithRawResponse: def __init__(self, coupons: Coupons) -> None: - self.subscriptions = SubscriptionsWithRawResponse(coupons.subscriptions) + self._coupons = coupons self.create = _legacy_response.to_raw_response_wrapper( coupons.create, @@ -475,10 +475,14 @@ def __init__(self, coupons: Coupons) -> None: coupons.fetch, ) + @cached_property + def subscriptions(self) -> SubscriptionsWithRawResponse: + return SubscriptionsWithRawResponse(self._coupons.subscriptions) + class AsyncCouponsWithRawResponse: def __init__(self, coupons: AsyncCoupons) -> None: - self.subscriptions = AsyncSubscriptionsWithRawResponse(coupons.subscriptions) + self._coupons = coupons self.create = _legacy_response.async_to_raw_response_wrapper( coupons.create, @@ -493,10 +497,14 @@ def __init__(self, coupons: AsyncCoupons) -> None: coupons.fetch, ) + @cached_property + def subscriptions(self) -> AsyncSubscriptionsWithRawResponse: + return AsyncSubscriptionsWithRawResponse(self._coupons.subscriptions) + class CouponsWithStreamingResponse: def __init__(self, coupons: Coupons) -> None: - self.subscriptions = SubscriptionsWithStreamingResponse(coupons.subscriptions) + self._coupons = coupons self.create = to_streamed_response_wrapper( coupons.create, @@ -511,10 +519,14 @@ def __init__(self, coupons: Coupons) -> None: coupons.fetch, ) + @cached_property + def subscriptions(self) -> SubscriptionsWithStreamingResponse: + return SubscriptionsWithStreamingResponse(self._coupons.subscriptions) + class AsyncCouponsWithStreamingResponse: def __init__(self, coupons: AsyncCoupons) -> None: - self.subscriptions = AsyncSubscriptionsWithStreamingResponse(coupons.subscriptions) + self._coupons = coupons self.create = async_to_streamed_response_wrapper( coupons.create, @@ -528,3 +540,7 @@ def __init__(self, coupons: AsyncCoupons) -> None: self.fetch = async_to_streamed_response_wrapper( coupons.fetch, ) + + @cached_property + def subscriptions(self) -> AsyncSubscriptionsWithStreamingResponse: + return AsyncSubscriptionsWithStreamingResponse(self._coupons.subscriptions) diff --git a/src/orb/resources/coupons/subscriptions.py b/src/orb/resources/coupons/subscriptions.py index 3af0a335..65cb0cca 100644 --- a/src/orb/resources/coupons/subscriptions.py +++ b/src/orb/resources/coupons/subscriptions.py @@ -153,6 +153,8 @@ def list( class SubscriptionsWithRawResponse: def __init__(self, subscriptions: Subscriptions) -> None: + self._subscriptions = subscriptions + self.list = _legacy_response.to_raw_response_wrapper( subscriptions.list, ) @@ -160,6 +162,8 @@ def __init__(self, subscriptions: Subscriptions) -> None: class AsyncSubscriptionsWithRawResponse: def __init__(self, subscriptions: AsyncSubscriptions) -> None: + self._subscriptions = subscriptions + self.list = _legacy_response.async_to_raw_response_wrapper( subscriptions.list, ) @@ -167,6 +171,8 @@ def __init__(self, subscriptions: AsyncSubscriptions) -> None: class SubscriptionsWithStreamingResponse: def __init__(self, subscriptions: Subscriptions) -> None: + self._subscriptions = subscriptions + self.list = to_streamed_response_wrapper( subscriptions.list, ) @@ -174,6 +180,8 @@ def __init__(self, subscriptions: Subscriptions) -> None: class AsyncSubscriptionsWithStreamingResponse: def __init__(self, subscriptions: AsyncSubscriptions) -> None: + self._subscriptions = subscriptions + self.list = async_to_streamed_response_wrapper( subscriptions.list, ) diff --git a/src/orb/resources/credit_notes.py b/src/orb/resources/credit_notes.py index 6d7fcf94..5222da7a 100644 --- a/src/orb/resources/credit_notes.py +++ b/src/orb/resources/credit_notes.py @@ -214,6 +214,8 @@ async def fetch( class CreditNotesWithRawResponse: def __init__(self, credit_notes: CreditNotes) -> None: + self._credit_notes = credit_notes + self.list = _legacy_response.to_raw_response_wrapper( credit_notes.list, ) @@ -224,6 +226,8 @@ def __init__(self, credit_notes: CreditNotes) -> None: class AsyncCreditNotesWithRawResponse: def __init__(self, credit_notes: AsyncCreditNotes) -> None: + self._credit_notes = credit_notes + self.list = _legacy_response.async_to_raw_response_wrapper( credit_notes.list, ) @@ -234,6 +238,8 @@ def __init__(self, credit_notes: AsyncCreditNotes) -> None: class CreditNotesWithStreamingResponse: def __init__(self, credit_notes: CreditNotes) -> None: + self._credit_notes = credit_notes + self.list = to_streamed_response_wrapper( credit_notes.list, ) @@ -244,6 +250,8 @@ def __init__(self, credit_notes: CreditNotes) -> None: class AsyncCreditNotesWithStreamingResponse: def __init__(self, credit_notes: AsyncCreditNotes) -> None: + self._credit_notes = credit_notes + self.list = async_to_streamed_response_wrapper( credit_notes.list, ) diff --git a/src/orb/resources/customers/balance_transactions.py b/src/orb/resources/customers/balance_transactions.py index 6b65692d..bbe4b2f3 100644 --- a/src/orb/resources/customers/balance_transactions.py +++ b/src/orb/resources/customers/balance_transactions.py @@ -331,6 +331,8 @@ def list( class BalanceTransactionsWithRawResponse: def __init__(self, balance_transactions: BalanceTransactions) -> None: + self._balance_transactions = balance_transactions + self.create = _legacy_response.to_raw_response_wrapper( balance_transactions.create, ) @@ -341,6 +343,8 @@ def __init__(self, balance_transactions: BalanceTransactions) -> None: class AsyncBalanceTransactionsWithRawResponse: def __init__(self, balance_transactions: AsyncBalanceTransactions) -> None: + self._balance_transactions = balance_transactions + self.create = _legacy_response.async_to_raw_response_wrapper( balance_transactions.create, ) @@ -351,6 +355,8 @@ def __init__(self, balance_transactions: AsyncBalanceTransactions) -> None: class BalanceTransactionsWithStreamingResponse: def __init__(self, balance_transactions: BalanceTransactions) -> None: + self._balance_transactions = balance_transactions + self.create = to_streamed_response_wrapper( balance_transactions.create, ) @@ -361,6 +367,8 @@ def __init__(self, balance_transactions: BalanceTransactions) -> None: class AsyncBalanceTransactionsWithStreamingResponse: def __init__(self, balance_transactions: AsyncBalanceTransactions) -> None: + self._balance_transactions = balance_transactions + self.create = async_to_streamed_response_wrapper( balance_transactions.create, ) diff --git a/src/orb/resources/customers/costs.py b/src/orb/resources/customers/costs.py index 506bede7..f01a7445 100644 --- a/src/orb/resources/customers/costs.py +++ b/src/orb/resources/customers/costs.py @@ -825,6 +825,8 @@ async def list_by_external_id( class CostsWithRawResponse: def __init__(self, costs: Costs) -> None: + self._costs = costs + self.list = _legacy_response.to_raw_response_wrapper( costs.list, ) @@ -835,6 +837,8 @@ def __init__(self, costs: Costs) -> None: class AsyncCostsWithRawResponse: def __init__(self, costs: AsyncCosts) -> None: + self._costs = costs + self.list = _legacy_response.async_to_raw_response_wrapper( costs.list, ) @@ -845,6 +849,8 @@ def __init__(self, costs: AsyncCosts) -> None: class CostsWithStreamingResponse: def __init__(self, costs: Costs) -> None: + self._costs = costs + self.list = to_streamed_response_wrapper( costs.list, ) @@ -855,6 +861,8 @@ def __init__(self, costs: Costs) -> None: class AsyncCostsWithStreamingResponse: def __init__(self, costs: AsyncCosts) -> None: + self._costs = costs + self.list = async_to_streamed_response_wrapper( costs.list, ) diff --git a/src/orb/resources/customers/credits/credits.py b/src/orb/resources/customers/credits/credits.py index 371d9426..ea24d01d 100644 --- a/src/orb/resources/customers/credits/credits.py +++ b/src/orb/resources/customers/credits/credits.py @@ -289,7 +289,7 @@ def list_by_external_id( class CreditsWithRawResponse: def __init__(self, credits: Credits) -> None: - self.ledger = LedgerWithRawResponse(credits.ledger) + self._credits = credits self.list = _legacy_response.to_raw_response_wrapper( credits.list, @@ -298,10 +298,14 @@ def __init__(self, credits: Credits) -> None: credits.list_by_external_id, ) + @cached_property + def ledger(self) -> LedgerWithRawResponse: + return LedgerWithRawResponse(self._credits.ledger) + class AsyncCreditsWithRawResponse: def __init__(self, credits: AsyncCredits) -> None: - self.ledger = AsyncLedgerWithRawResponse(credits.ledger) + self._credits = credits self.list = _legacy_response.async_to_raw_response_wrapper( credits.list, @@ -310,10 +314,14 @@ def __init__(self, credits: AsyncCredits) -> None: credits.list_by_external_id, ) + @cached_property + def ledger(self) -> AsyncLedgerWithRawResponse: + return AsyncLedgerWithRawResponse(self._credits.ledger) + class CreditsWithStreamingResponse: def __init__(self, credits: Credits) -> None: - self.ledger = LedgerWithStreamingResponse(credits.ledger) + self._credits = credits self.list = to_streamed_response_wrapper( credits.list, @@ -322,10 +330,14 @@ def __init__(self, credits: Credits) -> None: credits.list_by_external_id, ) + @cached_property + def ledger(self) -> LedgerWithStreamingResponse: + return LedgerWithStreamingResponse(self._credits.ledger) + class AsyncCreditsWithStreamingResponse: def __init__(self, credits: AsyncCredits) -> None: - self.ledger = AsyncLedgerWithStreamingResponse(credits.ledger) + self._credits = credits self.list = async_to_streamed_response_wrapper( credits.list, @@ -333,3 +345,7 @@ def __init__(self, credits: AsyncCredits) -> None: self.list_by_external_id = async_to_streamed_response_wrapper( credits.list_by_external_id, ) + + @cached_property + def ledger(self) -> AsyncLedgerWithStreamingResponse: + return AsyncLedgerWithStreamingResponse(self._credits.ledger) diff --git a/src/orb/resources/customers/credits/ledger.py b/src/orb/resources/customers/credits/ledger.py index e1d64934..1c15e2d2 100644 --- a/src/orb/resources/customers/credits/ledger.py +++ b/src/orb/resources/customers/credits/ledger.py @@ -4279,6 +4279,8 @@ def list_by_external_id( class LedgerWithRawResponse: def __init__(self, ledger: Ledger) -> None: + self._ledger = ledger + self.list = _legacy_response.to_raw_response_wrapper( ledger.list, ) @@ -4295,6 +4297,8 @@ def __init__(self, ledger: Ledger) -> None: class AsyncLedgerWithRawResponse: def __init__(self, ledger: AsyncLedger) -> None: + self._ledger = ledger + self.list = _legacy_response.async_to_raw_response_wrapper( ledger.list, ) @@ -4311,6 +4315,8 @@ def __init__(self, ledger: AsyncLedger) -> None: class LedgerWithStreamingResponse: def __init__(self, ledger: Ledger) -> None: + self._ledger = ledger + self.list = to_streamed_response_wrapper( ledger.list, ) @@ -4327,6 +4333,8 @@ def __init__(self, ledger: Ledger) -> None: class AsyncLedgerWithStreamingResponse: def __init__(self, ledger: AsyncLedger) -> None: + self._ledger = ledger + self.list = async_to_streamed_response_wrapper( ledger.list, ) diff --git a/src/orb/resources/customers/customers.py b/src/orb/resources/customers/customers.py index cdbadd70..3be85261 100644 --- a/src/orb/resources/customers/customers.py +++ b/src/orb/resources/customers/customers.py @@ -1695,10 +1695,7 @@ async def update_by_external_id( class CustomersWithRawResponse: def __init__(self, customers: Customers) -> None: - self.costs = CostsWithRawResponse(customers.costs) - self.usage = UsageWithRawResponse(customers.usage) - self.credits = CreditsWithRawResponse(customers.credits) - self.balance_transactions = BalanceTransactionsWithRawResponse(customers.balance_transactions) + self._customers = customers self.create = _legacy_response.to_raw_response_wrapper( customers.create, @@ -1722,13 +1719,26 @@ def __init__(self, customers: Customers) -> None: customers.update_by_external_id, ) + @cached_property + def costs(self) -> CostsWithRawResponse: + return CostsWithRawResponse(self._customers.costs) + + @cached_property + def usage(self) -> UsageWithRawResponse: + return UsageWithRawResponse(self._customers.usage) + + @cached_property + def credits(self) -> CreditsWithRawResponse: + return CreditsWithRawResponse(self._customers.credits) + + @cached_property + def balance_transactions(self) -> BalanceTransactionsWithRawResponse: + return BalanceTransactionsWithRawResponse(self._customers.balance_transactions) + class AsyncCustomersWithRawResponse: def __init__(self, customers: AsyncCustomers) -> None: - self.costs = AsyncCostsWithRawResponse(customers.costs) - self.usage = AsyncUsageWithRawResponse(customers.usage) - self.credits = AsyncCreditsWithRawResponse(customers.credits) - self.balance_transactions = AsyncBalanceTransactionsWithRawResponse(customers.balance_transactions) + self._customers = customers self.create = _legacy_response.async_to_raw_response_wrapper( customers.create, @@ -1752,13 +1762,26 @@ def __init__(self, customers: AsyncCustomers) -> None: customers.update_by_external_id, ) + @cached_property + def costs(self) -> AsyncCostsWithRawResponse: + return AsyncCostsWithRawResponse(self._customers.costs) + + @cached_property + def usage(self) -> AsyncUsageWithRawResponse: + return AsyncUsageWithRawResponse(self._customers.usage) + + @cached_property + def credits(self) -> AsyncCreditsWithRawResponse: + return AsyncCreditsWithRawResponse(self._customers.credits) + + @cached_property + def balance_transactions(self) -> AsyncBalanceTransactionsWithRawResponse: + return AsyncBalanceTransactionsWithRawResponse(self._customers.balance_transactions) + class CustomersWithStreamingResponse: def __init__(self, customers: Customers) -> None: - self.costs = CostsWithStreamingResponse(customers.costs) - self.usage = UsageWithStreamingResponse(customers.usage) - self.credits = CreditsWithStreamingResponse(customers.credits) - self.balance_transactions = BalanceTransactionsWithStreamingResponse(customers.balance_transactions) + self._customers = customers self.create = to_streamed_response_wrapper( customers.create, @@ -1782,13 +1805,26 @@ def __init__(self, customers: Customers) -> None: customers.update_by_external_id, ) + @cached_property + def costs(self) -> CostsWithStreamingResponse: + return CostsWithStreamingResponse(self._customers.costs) + + @cached_property + def usage(self) -> UsageWithStreamingResponse: + return UsageWithStreamingResponse(self._customers.usage) + + @cached_property + def credits(self) -> CreditsWithStreamingResponse: + return CreditsWithStreamingResponse(self._customers.credits) + + @cached_property + def balance_transactions(self) -> BalanceTransactionsWithStreamingResponse: + return BalanceTransactionsWithStreamingResponse(self._customers.balance_transactions) + class AsyncCustomersWithStreamingResponse: def __init__(self, customers: AsyncCustomers) -> None: - self.costs = AsyncCostsWithStreamingResponse(customers.costs) - self.usage = AsyncUsageWithStreamingResponse(customers.usage) - self.credits = AsyncCreditsWithStreamingResponse(customers.credits) - self.balance_transactions = AsyncBalanceTransactionsWithStreamingResponse(customers.balance_transactions) + self._customers = customers self.create = async_to_streamed_response_wrapper( customers.create, @@ -1811,3 +1847,19 @@ def __init__(self, customers: AsyncCustomers) -> None: self.update_by_external_id = async_to_streamed_response_wrapper( customers.update_by_external_id, ) + + @cached_property + def costs(self) -> AsyncCostsWithStreamingResponse: + return AsyncCostsWithStreamingResponse(self._customers.costs) + + @cached_property + def usage(self) -> AsyncUsageWithStreamingResponse: + return AsyncUsageWithStreamingResponse(self._customers.usage) + + @cached_property + def credits(self) -> AsyncCreditsWithStreamingResponse: + return AsyncCreditsWithStreamingResponse(self._customers.credits) + + @cached_property + def balance_transactions(self) -> AsyncBalanceTransactionsWithStreamingResponse: + return AsyncBalanceTransactionsWithStreamingResponse(self._customers.balance_transactions) diff --git a/src/orb/resources/customers/usage.py b/src/orb/resources/customers/usage.py index d137dc6d..6294b568 100644 --- a/src/orb/resources/customers/usage.py +++ b/src/orb/resources/customers/usage.py @@ -660,6 +660,8 @@ async def update_by_external_id( class UsageWithRawResponse: def __init__(self, usage: Usage) -> None: + self._usage = usage + self.update = _legacy_response.to_raw_response_wrapper( usage.update, ) @@ -670,6 +672,8 @@ def __init__(self, usage: Usage) -> None: class AsyncUsageWithRawResponse: def __init__(self, usage: AsyncUsage) -> None: + self._usage = usage + self.update = _legacy_response.async_to_raw_response_wrapper( usage.update, ) @@ -680,6 +684,8 @@ def __init__(self, usage: AsyncUsage) -> None: class UsageWithStreamingResponse: def __init__(self, usage: Usage) -> None: + self._usage = usage + self.update = to_streamed_response_wrapper( usage.update, ) @@ -690,6 +696,8 @@ def __init__(self, usage: Usage) -> None: class AsyncUsageWithStreamingResponse: def __init__(self, usage: AsyncUsage) -> None: + self._usage = usage + self.update = async_to_streamed_response_wrapper( usage.update, ) diff --git a/src/orb/resources/events/backfills.py b/src/orb/resources/events/backfills.py index 9242da94..0c0867d2 100644 --- a/src/orb/resources/events/backfills.py +++ b/src/orb/resources/events/backfills.py @@ -595,6 +595,8 @@ async def revert( class BackfillsWithRawResponse: def __init__(self, backfills: Backfills) -> None: + self._backfills = backfills + self.create = _legacy_response.to_raw_response_wrapper( backfills.create, ) @@ -614,6 +616,8 @@ def __init__(self, backfills: Backfills) -> None: class AsyncBackfillsWithRawResponse: def __init__(self, backfills: AsyncBackfills) -> None: + self._backfills = backfills + self.create = _legacy_response.async_to_raw_response_wrapper( backfills.create, ) @@ -633,6 +637,8 @@ def __init__(self, backfills: AsyncBackfills) -> None: class BackfillsWithStreamingResponse: def __init__(self, backfills: Backfills) -> None: + self._backfills = backfills + self.create = to_streamed_response_wrapper( backfills.create, ) @@ -652,6 +658,8 @@ def __init__(self, backfills: Backfills) -> None: class AsyncBackfillsWithStreamingResponse: def __init__(self, backfills: AsyncBackfills) -> None: + self._backfills = backfills + self.create = async_to_streamed_response_wrapper( backfills.create, ) diff --git a/src/orb/resources/events/events.py b/src/orb/resources/events/events.py index 022642ce..a47cf782 100644 --- a/src/orb/resources/events/events.py +++ b/src/orb/resources/events/events.py @@ -1089,7 +1089,7 @@ async def search( class EventsWithRawResponse: def __init__(self, events: Events) -> None: - self.backfills = BackfillsWithRawResponse(events.backfills) + self._events = events self.update = _legacy_response.to_raw_response_wrapper( events.update, @@ -1104,10 +1104,14 @@ def __init__(self, events: Events) -> None: events.search, ) + @cached_property + def backfills(self) -> BackfillsWithRawResponse: + return BackfillsWithRawResponse(self._events.backfills) + class AsyncEventsWithRawResponse: def __init__(self, events: AsyncEvents) -> None: - self.backfills = AsyncBackfillsWithRawResponse(events.backfills) + self._events = events self.update = _legacy_response.async_to_raw_response_wrapper( events.update, @@ -1122,10 +1126,14 @@ def __init__(self, events: AsyncEvents) -> None: events.search, ) + @cached_property + def backfills(self) -> AsyncBackfillsWithRawResponse: + return AsyncBackfillsWithRawResponse(self._events.backfills) + class EventsWithStreamingResponse: def __init__(self, events: Events) -> None: - self.backfills = BackfillsWithStreamingResponse(events.backfills) + self._events = events self.update = to_streamed_response_wrapper( events.update, @@ -1140,10 +1148,14 @@ def __init__(self, events: Events) -> None: events.search, ) + @cached_property + def backfills(self) -> BackfillsWithStreamingResponse: + return BackfillsWithStreamingResponse(self._events.backfills) + class AsyncEventsWithStreamingResponse: def __init__(self, events: AsyncEvents) -> None: - self.backfills = AsyncBackfillsWithStreamingResponse(events.backfills) + self._events = events self.update = async_to_streamed_response_wrapper( events.update, @@ -1157,3 +1169,7 @@ def __init__(self, events: AsyncEvents) -> None: self.search = async_to_streamed_response_wrapper( events.search, ) + + @cached_property + def backfills(self) -> AsyncBackfillsWithStreamingResponse: + return AsyncBackfillsWithStreamingResponse(self._events.backfills) diff --git a/src/orb/resources/invoice_line_items.py b/src/orb/resources/invoice_line_items.py index 5e17dc15..a22613d8 100644 --- a/src/orb/resources/invoice_line_items.py +++ b/src/orb/resources/invoice_line_items.py @@ -181,6 +181,8 @@ async def create( class InvoiceLineItemsWithRawResponse: def __init__(self, invoice_line_items: InvoiceLineItems) -> None: + self._invoice_line_items = invoice_line_items + self.create = _legacy_response.to_raw_response_wrapper( invoice_line_items.create, ) @@ -188,6 +190,8 @@ def __init__(self, invoice_line_items: InvoiceLineItems) -> None: class AsyncInvoiceLineItemsWithRawResponse: def __init__(self, invoice_line_items: AsyncInvoiceLineItems) -> None: + self._invoice_line_items = invoice_line_items + self.create = _legacy_response.async_to_raw_response_wrapper( invoice_line_items.create, ) @@ -195,6 +199,8 @@ def __init__(self, invoice_line_items: AsyncInvoiceLineItems) -> None: class InvoiceLineItemsWithStreamingResponse: def __init__(self, invoice_line_items: InvoiceLineItems) -> None: + self._invoice_line_items = invoice_line_items + self.create = to_streamed_response_wrapper( invoice_line_items.create, ) @@ -202,6 +208,8 @@ def __init__(self, invoice_line_items: InvoiceLineItems) -> None: class AsyncInvoiceLineItemsWithStreamingResponse: def __init__(self, invoice_line_items: AsyncInvoiceLineItems) -> None: + self._invoice_line_items = invoice_line_items + self.create = async_to_streamed_response_wrapper( invoice_line_items.create, ) diff --git a/src/orb/resources/invoices.py b/src/orb/resources/invoices.py index ff251cc1..153bf2b3 100644 --- a/src/orb/resources/invoices.py +++ b/src/orb/resources/invoices.py @@ -843,6 +843,8 @@ async def void( class InvoicesWithRawResponse: def __init__(self, invoices: Invoices) -> None: + self._invoices = invoices + self.create = _legacy_response.to_raw_response_wrapper( invoices.create, ) @@ -868,6 +870,8 @@ def __init__(self, invoices: Invoices) -> None: class AsyncInvoicesWithRawResponse: def __init__(self, invoices: AsyncInvoices) -> None: + self._invoices = invoices + self.create = _legacy_response.async_to_raw_response_wrapper( invoices.create, ) @@ -893,6 +897,8 @@ def __init__(self, invoices: AsyncInvoices) -> None: class InvoicesWithStreamingResponse: def __init__(self, invoices: Invoices) -> None: + self._invoices = invoices + self.create = to_streamed_response_wrapper( invoices.create, ) @@ -918,6 +924,8 @@ def __init__(self, invoices: Invoices) -> None: class AsyncInvoicesWithStreamingResponse: def __init__(self, invoices: AsyncInvoices) -> None: + self._invoices = invoices + self.create = async_to_streamed_response_wrapper( invoices.create, ) diff --git a/src/orb/resources/items.py b/src/orb/resources/items.py index 0107eb2b..b10e4b10 100644 --- a/src/orb/resources/items.py +++ b/src/orb/resources/items.py @@ -290,6 +290,8 @@ async def fetch( class ItemsWithRawResponse: def __init__(self, items: Items) -> None: + self._items = items + self.create = _legacy_response.to_raw_response_wrapper( items.create, ) @@ -303,6 +305,8 @@ def __init__(self, items: Items) -> None: class AsyncItemsWithRawResponse: def __init__(self, items: AsyncItems) -> None: + self._items = items + self.create = _legacy_response.async_to_raw_response_wrapper( items.create, ) @@ -316,6 +320,8 @@ def __init__(self, items: AsyncItems) -> None: class ItemsWithStreamingResponse: def __init__(self, items: Items) -> None: + self._items = items + self.create = to_streamed_response_wrapper( items.create, ) @@ -329,6 +335,8 @@ def __init__(self, items: Items) -> None: class AsyncItemsWithStreamingResponse: def __init__(self, items: AsyncItems) -> None: + self._items = items + self.create = async_to_streamed_response_wrapper( items.create, ) diff --git a/src/orb/resources/metrics.py b/src/orb/resources/metrics.py index da2c9ec3..21dabdda 100644 --- a/src/orb/resources/metrics.py +++ b/src/orb/resources/metrics.py @@ -371,6 +371,8 @@ async def fetch( class MetricsWithRawResponse: def __init__(self, metrics: Metrics) -> None: + self._metrics = metrics + self.create = _legacy_response.to_raw_response_wrapper( metrics.create, ) @@ -384,6 +386,8 @@ def __init__(self, metrics: Metrics) -> None: class AsyncMetricsWithRawResponse: def __init__(self, metrics: AsyncMetrics) -> None: + self._metrics = metrics + self.create = _legacy_response.async_to_raw_response_wrapper( metrics.create, ) @@ -397,6 +401,8 @@ def __init__(self, metrics: AsyncMetrics) -> None: class MetricsWithStreamingResponse: def __init__(self, metrics: Metrics) -> None: + self._metrics = metrics + self.create = to_streamed_response_wrapper( metrics.create, ) @@ -410,6 +416,8 @@ def __init__(self, metrics: Metrics) -> None: class AsyncMetricsWithStreamingResponse: def __init__(self, metrics: AsyncMetrics) -> None: + self._metrics = metrics + self.create = async_to_streamed_response_wrapper( metrics.create, ) diff --git a/src/orb/resources/plans/external_plan_id.py b/src/orb/resources/plans/external_plan_id.py index 58cbf198..a23386f9 100644 --- a/src/orb/resources/plans/external_plan_id.py +++ b/src/orb/resources/plans/external_plan_id.py @@ -271,6 +271,8 @@ async def fetch( class ExternalPlanIDWithRawResponse: def __init__(self, external_plan_id: ExternalPlanID) -> None: + self._external_plan_id = external_plan_id + self.update = _legacy_response.to_raw_response_wrapper( external_plan_id.update, ) @@ -281,6 +283,8 @@ def __init__(self, external_plan_id: ExternalPlanID) -> None: class AsyncExternalPlanIDWithRawResponse: def __init__(self, external_plan_id: AsyncExternalPlanID) -> None: + self._external_plan_id = external_plan_id + self.update = _legacy_response.async_to_raw_response_wrapper( external_plan_id.update, ) @@ -291,6 +295,8 @@ def __init__(self, external_plan_id: AsyncExternalPlanID) -> None: class ExternalPlanIDWithStreamingResponse: def __init__(self, external_plan_id: ExternalPlanID) -> None: + self._external_plan_id = external_plan_id + self.update = to_streamed_response_wrapper( external_plan_id.update, ) @@ -301,6 +307,8 @@ def __init__(self, external_plan_id: ExternalPlanID) -> None: class AsyncExternalPlanIDWithStreamingResponse: def __init__(self, external_plan_id: AsyncExternalPlanID) -> None: + self._external_plan_id = external_plan_id + self.update = async_to_streamed_response_wrapper( external_plan_id.update, ) diff --git a/src/orb/resources/plans/plans.py b/src/orb/resources/plans/plans.py index 502ecc27..05096d62 100644 --- a/src/orb/resources/plans/plans.py +++ b/src/orb/resources/plans/plans.py @@ -552,7 +552,7 @@ async def fetch( class PlansWithRawResponse: def __init__(self, plans: Plans) -> None: - self.external_plan_id = ExternalPlanIDWithRawResponse(plans.external_plan_id) + self._plans = plans self.create = _legacy_response.to_raw_response_wrapper( plans.create, @@ -567,10 +567,14 @@ def __init__(self, plans: Plans) -> None: plans.fetch, ) + @cached_property + def external_plan_id(self) -> ExternalPlanIDWithRawResponse: + return ExternalPlanIDWithRawResponse(self._plans.external_plan_id) + class AsyncPlansWithRawResponse: def __init__(self, plans: AsyncPlans) -> None: - self.external_plan_id = AsyncExternalPlanIDWithRawResponse(plans.external_plan_id) + self._plans = plans self.create = _legacy_response.async_to_raw_response_wrapper( plans.create, @@ -585,10 +589,14 @@ def __init__(self, plans: AsyncPlans) -> None: plans.fetch, ) + @cached_property + def external_plan_id(self) -> AsyncExternalPlanIDWithRawResponse: + return AsyncExternalPlanIDWithRawResponse(self._plans.external_plan_id) + class PlansWithStreamingResponse: def __init__(self, plans: Plans) -> None: - self.external_plan_id = ExternalPlanIDWithStreamingResponse(plans.external_plan_id) + self._plans = plans self.create = to_streamed_response_wrapper( plans.create, @@ -603,10 +611,14 @@ def __init__(self, plans: Plans) -> None: plans.fetch, ) + @cached_property + def external_plan_id(self) -> ExternalPlanIDWithStreamingResponse: + return ExternalPlanIDWithStreamingResponse(self._plans.external_plan_id) + class AsyncPlansWithStreamingResponse: def __init__(self, plans: AsyncPlans) -> None: - self.external_plan_id = AsyncExternalPlanIDWithStreamingResponse(plans.external_plan_id) + self._plans = plans self.create = async_to_streamed_response_wrapper( plans.create, @@ -620,3 +632,7 @@ def __init__(self, plans: AsyncPlans) -> None: self.fetch = async_to_streamed_response_wrapper( plans.fetch, ) + + @cached_property + def external_plan_id(self) -> AsyncExternalPlanIDWithStreamingResponse: + return AsyncExternalPlanIDWithStreamingResponse(self._plans.external_plan_id) diff --git a/src/orb/resources/prices/external_price_id.py b/src/orb/resources/prices/external_price_id.py index 19417a25..b498681f 100644 --- a/src/orb/resources/prices/external_price_id.py +++ b/src/orb/resources/prices/external_price_id.py @@ -119,6 +119,8 @@ async def fetch( class ExternalPriceIDWithRawResponse: def __init__(self, external_price_id: ExternalPriceID) -> None: + self._external_price_id = external_price_id + self.fetch = _legacy_response.to_raw_response_wrapper( external_price_id.fetch, ) @@ -126,6 +128,8 @@ def __init__(self, external_price_id: ExternalPriceID) -> None: class AsyncExternalPriceIDWithRawResponse: def __init__(self, external_price_id: AsyncExternalPriceID) -> None: + self._external_price_id = external_price_id + self.fetch = _legacy_response.async_to_raw_response_wrapper( external_price_id.fetch, ) @@ -133,6 +137,8 @@ def __init__(self, external_price_id: AsyncExternalPriceID) -> None: class ExternalPriceIDWithStreamingResponse: def __init__(self, external_price_id: ExternalPriceID) -> None: + self._external_price_id = external_price_id + self.fetch = to_streamed_response_wrapper( external_price_id.fetch, ) @@ -140,6 +146,8 @@ def __init__(self, external_price_id: ExternalPriceID) -> None: class AsyncExternalPriceIDWithStreamingResponse: def __init__(self, external_price_id: AsyncExternalPriceID) -> None: + self._external_price_id = external_price_id + self.fetch = async_to_streamed_response_wrapper( external_price_id.fetch, ) diff --git a/src/orb/resources/prices/prices.py b/src/orb/resources/prices/prices.py index edf766c5..834c1759 100644 --- a/src/orb/resources/prices/prices.py +++ b/src/orb/resources/prices/prices.py @@ -2111,7 +2111,7 @@ async def fetch( class PricesWithRawResponse: def __init__(self, prices: Prices) -> None: - self.external_price_id = ExternalPriceIDWithRawResponse(prices.external_price_id) + self._prices = prices self.create = _legacy_response.to_raw_response_wrapper( prices.create, @@ -2123,10 +2123,14 @@ def __init__(self, prices: Prices) -> None: prices.fetch, ) + @cached_property + def external_price_id(self) -> ExternalPriceIDWithRawResponse: + return ExternalPriceIDWithRawResponse(self._prices.external_price_id) + class AsyncPricesWithRawResponse: def __init__(self, prices: AsyncPrices) -> None: - self.external_price_id = AsyncExternalPriceIDWithRawResponse(prices.external_price_id) + self._prices = prices self.create = _legacy_response.async_to_raw_response_wrapper( prices.create, @@ -2138,10 +2142,14 @@ def __init__(self, prices: AsyncPrices) -> None: prices.fetch, ) + @cached_property + def external_price_id(self) -> AsyncExternalPriceIDWithRawResponse: + return AsyncExternalPriceIDWithRawResponse(self._prices.external_price_id) + class PricesWithStreamingResponse: def __init__(self, prices: Prices) -> None: - self.external_price_id = ExternalPriceIDWithStreamingResponse(prices.external_price_id) + self._prices = prices self.create = to_streamed_response_wrapper( prices.create, @@ -2153,10 +2161,14 @@ def __init__(self, prices: Prices) -> None: prices.fetch, ) + @cached_property + def external_price_id(self) -> ExternalPriceIDWithStreamingResponse: + return ExternalPriceIDWithStreamingResponse(self._prices.external_price_id) + class AsyncPricesWithStreamingResponse: def __init__(self, prices: AsyncPrices) -> None: - self.external_price_id = AsyncExternalPriceIDWithStreamingResponse(prices.external_price_id) + self._prices = prices self.create = async_to_streamed_response_wrapper( prices.create, @@ -2167,3 +2179,7 @@ def __init__(self, prices: AsyncPrices) -> None: self.fetch = async_to_streamed_response_wrapper( prices.fetch, ) + + @cached_property + def external_price_id(self) -> AsyncExternalPriceIDWithStreamingResponse: + return AsyncExternalPriceIDWithStreamingResponse(self._prices.external_price_id) diff --git a/src/orb/resources/subscriptions.py b/src/orb/resources/subscriptions.py index 921e8f99..fd1e2b11 100644 --- a/src/orb/resources/subscriptions.py +++ b/src/orb/resources/subscriptions.py @@ -3308,6 +3308,8 @@ async def update_fixed_fee_quantity( class SubscriptionsWithRawResponse: def __init__(self, subscriptions: Subscriptions) -> None: + self._subscriptions = subscriptions + self.create = _legacy_response.to_raw_response_wrapper( subscriptions.create, ) @@ -3354,6 +3356,8 @@ def __init__(self, subscriptions: Subscriptions) -> None: class AsyncSubscriptionsWithRawResponse: def __init__(self, subscriptions: AsyncSubscriptions) -> None: + self._subscriptions = subscriptions + self.create = _legacy_response.async_to_raw_response_wrapper( subscriptions.create, ) @@ -3400,6 +3404,8 @@ def __init__(self, subscriptions: AsyncSubscriptions) -> None: class SubscriptionsWithStreamingResponse: def __init__(self, subscriptions: Subscriptions) -> None: + self._subscriptions = subscriptions + self.create = to_streamed_response_wrapper( subscriptions.create, ) @@ -3446,6 +3452,8 @@ def __init__(self, subscriptions: Subscriptions) -> None: class AsyncSubscriptionsWithStreamingResponse: def __init__(self, subscriptions: AsyncSubscriptions) -> None: + self._subscriptions = subscriptions + self.create = async_to_streamed_response_wrapper( subscriptions.create, ) diff --git a/src/orb/resources/top_level.py b/src/orb/resources/top_level.py index bb96d6a7..59b404ab 100644 --- a/src/orb/resources/top_level.py +++ b/src/orb/resources/top_level.py @@ -91,6 +91,8 @@ async def ping( class TopLevelWithRawResponse: def __init__(self, top_level: TopLevel) -> None: + self._top_level = top_level + self.ping = _legacy_response.to_raw_response_wrapper( top_level.ping, ) @@ -98,6 +100,8 @@ def __init__(self, top_level: TopLevel) -> None: class AsyncTopLevelWithRawResponse: def __init__(self, top_level: AsyncTopLevel) -> None: + self._top_level = top_level + self.ping = _legacy_response.async_to_raw_response_wrapper( top_level.ping, ) @@ -105,6 +109,8 @@ def __init__(self, top_level: AsyncTopLevel) -> None: class TopLevelWithStreamingResponse: def __init__(self, top_level: TopLevel) -> None: + self._top_level = top_level + self.ping = to_streamed_response_wrapper( top_level.ping, ) @@ -112,6 +118,8 @@ def __init__(self, top_level: TopLevel) -> None: class AsyncTopLevelWithStreamingResponse: def __init__(self, top_level: AsyncTopLevel) -> None: + self._top_level = top_level + self.ping = async_to_streamed_response_wrapper( top_level.ping, )