Skip to content

Commit 90f2146

Browse files
chore(internal): restructure imports (#239)
1 parent f132916 commit 90f2146

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+116
-151
lines changed

src/orb/resources/beta/price.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,11 @@
1616
from ..._compat import cached_property
1717
from ..._resource import SyncAPIResource, AsyncAPIResource
1818
from ..._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper
19-
from ...types.beta import PriceEvaluateResponse, price_evaluate_params
19+
from ...types.beta import price_evaluate_params
2020
from ..._base_client import (
2121
make_request_options,
2222
)
23+
from ...types.beta.price_evaluate_response import PriceEvaluateResponse
2324

2425
__all__ = ["Price", "AsyncPrice"]
2526

src/orb/resources/coupons/coupons.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
import httpx
88

99
from ... import _legacy_response
10-
from ...types import Coupon, coupon_list_params, coupon_create_params
10+
from ...types import coupon_list_params, coupon_create_params
1111
from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven
1212
from ..._utils import (
1313
maybe_transform,
@@ -29,6 +29,7 @@
2929
AsyncPaginator,
3030
make_request_options,
3131
)
32+
from ...types.coupon import Coupon
3233

3334
__all__ = ["Coupons", "AsyncCoupons"]
3435

src/orb/resources/coupons/subscriptions.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
import httpx
88

99
from ... import _legacy_response
10-
from ...types import Subscription
1110
from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven
1211
from ..._utils import maybe_transform
1312
from ..._compat import cached_property
@@ -19,6 +18,7 @@
1918
make_request_options,
2019
)
2120
from ...types.coupons import subscription_list_params
21+
from ...types.subscription import Subscription
2222

2323
__all__ = ["Subscriptions", "AsyncSubscriptions"]
2424

src/orb/resources/credit_notes.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
import httpx
88

99
from .. import _legacy_response
10-
from ..types import CreditNote, credit_note_list_params
10+
from ..types import credit_note_list_params
1111
from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven
1212
from .._utils import maybe_transform
1313
from .._compat import cached_property
@@ -18,6 +18,7 @@
1818
AsyncPaginator,
1919
make_request_options,
2020
)
21+
from ..types.credit_note import CreditNote
2122

2223
__all__ = ["CreditNotes", "AsyncCreditNotes"]
2324

src/orb/resources/customers/balance_transactions.py

+3-6
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,9 @@
2222
AsyncPaginator,
2323
make_request_options,
2424
)
25-
from ...types.customers import (
26-
BalanceTransactionListResponse,
27-
BalanceTransactionCreateResponse,
28-
balance_transaction_list_params,
29-
balance_transaction_create_params,
30-
)
25+
from ...types.customers import balance_transaction_list_params, balance_transaction_create_params
26+
from ...types.customers.balance_transaction_list_response import BalanceTransactionListResponse
27+
from ...types.customers.balance_transaction_create_response import BalanceTransactionCreateResponse
3128

3229
__all__ = ["BalanceTransactions", "AsyncBalanceTransactions"]
3330

src/orb/resources/customers/costs.py

+3-6
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,9 @@
2020
from ..._base_client import (
2121
make_request_options,
2222
)
23-
from ...types.customers import (
24-
CostListResponse,
25-
CostListByExternalIDResponse,
26-
cost_list_params,
27-
cost_list_by_external_id_params,
28-
)
23+
from ...types.customers import cost_list_params, cost_list_by_external_id_params
24+
from ...types.customers.cost_list_response import CostListResponse
25+
from ...types.customers.cost_list_by_external_id_response import CostListByExternalIDResponse
2926

3027
__all__ = ["Costs", "AsyncCosts"]
3128

src/orb/resources/customers/credits/credits.py

+3-6
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,9 @@
3333
AsyncPaginator,
3434
make_request_options,
3535
)
36-
from ....types.customers import (
37-
CreditListResponse,
38-
CreditListByExternalIDResponse,
39-
credit_list_params,
40-
credit_list_by_external_id_params,
41-
)
36+
from ....types.customers import credit_list_params, credit_list_by_external_id_params
37+
from ....types.customers.credit_list_response import CreditListResponse
38+
from ....types.customers.credit_list_by_external_id_response import CreditListByExternalIDResponse
4239

4340
__all__ = ["Credits", "AsyncCredits"]
4441

src/orb/resources/customers/credits/ledger.py

+6-4
Original file line numberDiff line numberDiff line change
@@ -24,15 +24,17 @@
2424
make_request_options,
2525
)
2626
from ....types.customers.credits import (
27-
LedgerListResponse,
28-
LedgerCreateEntryResponse,
29-
LedgerListByExternalIDResponse,
30-
LedgerCreateEntryByExternalIDResponse,
3127
ledger_list_params,
3228
ledger_create_entry_params,
3329
ledger_list_by_external_id_params,
3430
ledger_create_entry_by_external_id_params,
3531
)
32+
from ....types.customers.credits.ledger_list_response import LedgerListResponse
33+
from ....types.customers.credits.ledger_create_entry_response import LedgerCreateEntryResponse
34+
from ....types.customers.credits.ledger_list_by_external_id_response import LedgerListByExternalIDResponse
35+
from ....types.customers.credits.ledger_create_entry_by_external_id_response import (
36+
LedgerCreateEntryByExternalIDResponse,
37+
)
3638

3739
__all__ = ["Ledger", "AsyncLedger"]
3840

src/orb/resources/customers/credits/top_ups.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,15 @@
2222
make_request_options,
2323
)
2424
from ....types.customers.credits import (
25-
TopUpListResponse,
26-
TopUpCreateResponse,
27-
TopUpListByExternalIDResponse,
28-
TopUpCreateByExternalIDResponse,
2925
top_up_list_params,
3026
top_up_create_params,
3127
top_up_list_by_external_id_params,
3228
top_up_create_by_external_id_params,
3329
)
30+
from ....types.customers.credits.top_up_list_response import TopUpListResponse
31+
from ....types.customers.credits.top_up_create_response import TopUpCreateResponse
32+
from ....types.customers.credits.top_up_list_by_external_id_response import TopUpListByExternalIDResponse
33+
from ....types.customers.credits.top_up_create_by_external_id_response import TopUpCreateByExternalIDResponse
3434

3535
__all__ = ["TopUps", "AsyncTopUps"]
3636

src/orb/resources/customers/customers.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@
2626
AsyncUsageWithStreamingResponse,
2727
)
2828
from ...types import (
29-
Customer,
3029
customer_list_params,
3130
customer_create_params,
3231
customer_update_params,
@@ -54,6 +53,7 @@
5453
make_request_options,
5554
)
5655
from .credits.credits import Credits, AsyncCredits
56+
from ...types.customer import Customer
5757
from .balance_transactions import (
5858
BalanceTransactions,
5959
AsyncBalanceTransactions,

src/orb/resources/customers/usage.py

+3-6
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,9 @@
1919
from ..._base_client import (
2020
make_request_options,
2121
)
22-
from ...types.customers import (
23-
UsageUpdateResponse,
24-
UsageUpdateByExternalIDResponse,
25-
usage_update_params,
26-
usage_update_by_external_id_params,
27-
)
22+
from ...types.customers import usage_update_params, usage_update_by_external_id_params
23+
from ...types.customers.usage_update_response import UsageUpdateResponse
24+
from ...types.customers.usage_update_by_external_id_response import UsageUpdateByExternalIDResponse
2825

2926
__all__ = ["Usage", "AsyncUsage"]
3027

src/orb/resources/events/backfills.py

+6-9
Original file line numberDiff line numberDiff line change
@@ -21,15 +21,12 @@
2121
AsyncPaginator,
2222
make_request_options,
2323
)
24-
from ...types.events import (
25-
BackfillListResponse,
26-
BackfillCloseResponse,
27-
BackfillFetchResponse,
28-
BackfillCreateResponse,
29-
BackfillRevertResponse,
30-
backfill_list_params,
31-
backfill_create_params,
32-
)
24+
from ...types.events import backfill_list_params, backfill_create_params
25+
from ...types.events.backfill_list_response import BackfillListResponse
26+
from ...types.events.backfill_close_response import BackfillCloseResponse
27+
from ...types.events.backfill_fetch_response import BackfillFetchResponse
28+
from ...types.events.backfill_create_response import BackfillCreateResponse
29+
from ...types.events.backfill_revert_response import BackfillRevertResponse
3330

3431
__all__ = ["Backfills", "AsyncBackfills"]
3532

src/orb/resources/events/events.py

+5-9
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,7 @@
88
import httpx
99

1010
from ... import _legacy_response
11-
from ...types import (
12-
EventIngestResponse,
13-
EventSearchResponse,
14-
EventUpdateResponse,
15-
EventDeprecateResponse,
16-
event_ingest_params,
17-
event_search_params,
18-
event_update_params,
19-
)
11+
from ...types import event_ingest_params, event_search_params, event_update_params
2012
from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven
2113
from ..._utils import (
2214
maybe_transform,
@@ -36,6 +28,10 @@
3628
from ..._base_client import (
3729
make_request_options,
3830
)
31+
from ...types.event_ingest_response import EventIngestResponse
32+
from ...types.event_search_response import EventSearchResponse
33+
from ...types.event_update_response import EventUpdateResponse
34+
from ...types.event_deprecate_response import EventDeprecateResponse
3935

4036
__all__ = ["Events", "AsyncEvents"]
4137

src/orb/resources/invoice_line_items.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
import httpx
99

1010
from .. import _legacy_response
11-
from ..types import InvoiceLineItemCreateResponse, invoice_line_item_create_params
11+
from ..types import invoice_line_item_create_params
1212
from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven
1313
from .._utils import (
1414
maybe_transform,
@@ -20,6 +20,7 @@
2020
from .._base_client import (
2121
make_request_options,
2222
)
23+
from ..types.invoice_line_item_create_response import InvoiceLineItemCreateResponse
2324

2425
__all__ = ["InvoiceLineItems", "AsyncInvoiceLineItems"]
2526

src/orb/resources/invoices.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,6 @@
1010

1111
from .. import _legacy_response
1212
from ..types import (
13-
Invoice,
14-
InvoiceFetchUpcomingResponse,
1513
invoice_list_params,
1614
invoice_create_params,
1715
invoice_mark_paid_params,
@@ -30,6 +28,8 @@
3028
AsyncPaginator,
3129
make_request_options,
3230
)
31+
from ..types.invoice import Invoice
32+
from ..types.invoice_fetch_upcoming_response import InvoiceFetchUpcomingResponse
3333

3434
__all__ = ["Invoices", "AsyncInvoices"]
3535

src/orb/resources/items.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
import httpx
88

99
from .. import _legacy_response
10-
from ..types import Item, item_list_params, item_create_params
10+
from ..types import item_list_params, item_create_params
1111
from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven
1212
from .._utils import (
1313
maybe_transform,
@@ -17,6 +17,7 @@
1717
from .._resource import SyncAPIResource, AsyncAPIResource
1818
from .._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper
1919
from ..pagination import SyncPage, AsyncPage
20+
from ..types.item import Item
2021
from .._base_client import (
2122
AsyncPaginator,
2223
make_request_options,

src/orb/resources/metrics.py

+4-7
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,7 @@
88
import httpx
99

1010
from .. import _legacy_response
11-
from ..types import (
12-
MetricListResponse,
13-
MetricFetchResponse,
14-
MetricCreateResponse,
15-
metric_list_params,
16-
metric_create_params,
17-
)
11+
from ..types import metric_list_params, metric_create_params
1812
from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven
1913
from .._utils import (
2014
maybe_transform,
@@ -28,6 +22,9 @@
2822
AsyncPaginator,
2923
make_request_options,
3024
)
25+
from ..types.metric_list_response import MetricListResponse
26+
from ..types.metric_fetch_response import MetricFetchResponse
27+
from ..types.metric_create_response import MetricCreateResponse
3128

3229
__all__ = ["Metrics", "AsyncMetrics"]
3330

src/orb/resources/plans/external_plan_id.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
import httpx
88

99
from ... import _legacy_response
10-
from ...types import Plan
1110
from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven
1211
from ..._utils import (
1312
maybe_transform,
@@ -16,6 +15,7 @@
1615
from ..._compat import cached_property
1716
from ..._resource import SyncAPIResource, AsyncAPIResource
1817
from ..._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper
18+
from ...types.plan import Plan
1919
from ...types.plans import external_plan_id_update_params
2020
from ..._base_client import (
2121
make_request_options,

src/orb/resources/plans/plans.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
import httpx
1010

1111
from ... import _legacy_response
12-
from ...types import Plan, plan_list_params, plan_create_params, plan_update_params
12+
from ...types import plan_list_params, plan_create_params, plan_update_params
1313
from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven
1414
from ..._utils import (
1515
maybe_transform,
@@ -19,6 +19,7 @@
1919
from ..._resource import SyncAPIResource, AsyncAPIResource
2020
from ..._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper
2121
from ...pagination import SyncPage, AsyncPage
22+
from ...types.plan import Plan
2223
from ..._base_client import (
2324
AsyncPaginator,
2425
make_request_options,

src/orb/resources/prices/external_price_id.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@
77
import httpx
88

99
from ... import _legacy_response
10-
from ...types import Price
1110
from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven
1211
from ..._compat import cached_property
1312
from ..._resource import SyncAPIResource, AsyncAPIResource
1413
from ..._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper
14+
from ...types.price import Price
1515
from ..._base_client import (
1616
make_request_options,
1717
)

src/orb/resources/prices/prices.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
import httpx
99

1010
from ... import _legacy_response
11-
from ...types import Price, price_list_params, price_create_params
11+
from ...types import price_list_params, price_create_params
1212
from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven
1313
from ..._utils import (
1414
required_args,
@@ -19,6 +19,7 @@
1919
from ..._resource import SyncAPIResource, AsyncAPIResource
2020
from ..._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper
2121
from ...pagination import SyncPage, AsyncPage
22+
from ...types.price import Price
2223
from ..._base_client import (
2324
AsyncPaginator,
2425
make_request_options,

src/orb/resources/subscriptions.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,6 @@
1010

1111
from .. import _legacy_response
1212
from ..types import (
13-
Subscription,
14-
SubscriptionUsage,
15-
SubscriptionFetchCostsResponse,
16-
SubscriptionFetchScheduleResponse,
1713
subscription_list_params,
1814
subscription_cancel_params,
1915
subscription_create_params,
@@ -40,6 +36,10 @@
4036
AsyncPaginator,
4137
make_request_options,
4238
)
39+
from ..types.subscription import Subscription
40+
from ..types.subscription_usage import SubscriptionUsage
41+
from ..types.subscription_fetch_costs_response import SubscriptionFetchCostsResponse
42+
from ..types.subscription_fetch_schedule_response import SubscriptionFetchScheduleResponse
4343

4444
__all__ = ["Subscriptions", "AsyncSubscriptions"]
4545

0 commit comments

Comments
 (0)