Skip to content

release: 2.20.0 #468

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Dec 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "2.19.0"
".": "2.20.0"
}
2 changes: 1 addition & 1 deletion .stats.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
configured_endpoints: 97
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/orb%2Forb-908960f165205e2874dd29322cc974df5ab10c7634ab9a342ab22047013de1b4.yml
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/orb%2Forb-02151f7654870aee7820ee1c04659a469e6b67ac4977116334512c6b6e6a2016.yml
21 changes: 21 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,26 @@
# Changelog

## 2.20.0 (2024-12-19)

Full Changelog: [v2.19.0...v2.20.0](https://github.com/orbcorp/orb-python/compare/v2.19.0...v2.20.0)

### Features

* **api:** api update ([#466](https://github.com/orbcorp/orb-python/issues/466)) ([abcce3c](https://github.com/orbcorp/orb-python/commit/abcce3cf709af675b0ac2beb2aa1b401b1aada1c))


### Chores

* **internal:** fix some typos ([#465](https://github.com/orbcorp/orb-python/issues/465)) ([8ccbc2a](https://github.com/orbcorp/orb-python/commit/8ccbc2a9d62dc8853b8460562a8fb5760ed6608f))
* **internal:** remove some duplicated imports ([#462](https://github.com/orbcorp/orb-python/issues/462)) ([7ede2cb](https://github.com/orbcorp/orb-python/commit/7ede2cb2c3f741a69b3e5e47553dccc48d409ef6))
* **internal:** updated imports ([#463](https://github.com/orbcorp/orb-python/issues/463)) ([2487ca6](https://github.com/orbcorp/orb-python/commit/2487ca601d123fa24acc8135123f1029933c69c2))
* **internal:** version bump ([#460](https://github.com/orbcorp/orb-python/issues/460)) ([28a5746](https://github.com/orbcorp/orb-python/commit/28a57463640f9be6ee2faa238731525a65adcb2a))


### Documentation

* **readme:** example snippet for client context manager ([#464](https://github.com/orbcorp/orb-python/issues/464)) ([c832f0a](https://github.com/orbcorp/orb-python/commit/c832f0ad06c2048b2961d2b4c9a9febf5b43b9cd))

## 2.19.0 (2024-12-12)

Full Changelog: [v2.18.0...v2.19.0](https://github.com/orbcorp/orb-python/compare/v2.18.0...v2.19.0)
Expand Down
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -425,6 +425,16 @@ client.with_options(http_client=DefaultHttpxClient(...))

By default the library closes underlying HTTP connections whenever the client is [garbage collected](https://docs.python.org/3/reference/datamodel.html#object.__del__). You can manually close the client using the `.close()` method if desired, or with a context manager that closes when exiting.

```py
from orb import Orb

with Orb() as client:
# make requests here
...

# HTTP client is now closed
```

## Versioning

This package generally follows [SemVer](https://semver.org/spec/v2.0.0.html) conventions, though certain backwards-incompatible changes may be released as minor versions:
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "orb-billing"
version = "2.19.0"
version = "2.20.0"
description = "The official Python library for the orb API"
dynamic = ["readme"]
license = "Apache-2.0"
Expand Down
248 changes: 128 additions & 120 deletions src/orb/_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

import httpx

from . import resources, _exceptions
from . import _exceptions
from ._qs import Querystring
from ._types import (
NOT_GIVEN,
Expand All @@ -25,42 +25,48 @@
get_async_library,
)
from ._version import __version__
from .resources import (
items,
alerts,
metrics,
invoices,
webhooks,
top_level,
credit_notes,
subscriptions,
invoice_line_items,
)
from ._streaming import Stream as Stream, AsyncStream as AsyncStream
from ._exceptions import OrbError, APIStatusError
from ._base_client import (
DEFAULT_MAX_RETRIES,
SyncAPIClient,
AsyncAPIClient,
)
from .resources.plans import plans
from .resources.events import events
from .resources.prices import prices
from .resources.coupons import coupons
from .resources.customers import customers

__all__ = [
"Timeout",
"Transport",
"ProxiesTypes",
"RequestOptions",
"resources",
"Orb",
"AsyncOrb",
"Client",
"AsyncClient",
]
__all__ = ["Timeout", "Transport", "ProxiesTypes", "RequestOptions", "Orb", "AsyncOrb", "Client", "AsyncClient"]


class Orb(SyncAPIClient):
top_level: resources.TopLevel
coupons: resources.Coupons
credit_notes: resources.CreditNotes
customers: resources.Customers
events: resources.Events
invoice_line_items: resources.InvoiceLineItems
invoices: resources.Invoices
items: resources.Items
metrics: resources.Metrics
plans: resources.Plans
prices: resources.Prices
subscriptions: resources.Subscriptions
webhooks: resources.Webhooks
alerts: resources.Alerts
top_level: top_level.TopLevel
coupons: coupons.Coupons
credit_notes: credit_notes.CreditNotes
customers: customers.Customers
events: events.Events
invoice_line_items: invoice_line_items.InvoiceLineItems
invoices: invoices.Invoices
items: items.Items
metrics: metrics.Metrics
plans: plans.Plans
prices: prices.Prices
subscriptions: subscriptions.Subscriptions
webhooks: webhooks.Webhooks
alerts: alerts.Alerts
with_raw_response: OrbWithRawResponse
with_streaming_response: OrbWithStreamedResponse

Expand Down Expand Up @@ -128,20 +134,20 @@ def __init__(

self._idempotency_header = "Idempotency-Key"

self.top_level = resources.TopLevel(self)
self.coupons = resources.Coupons(self)
self.credit_notes = resources.CreditNotes(self)
self.customers = resources.Customers(self)
self.events = resources.Events(self)
self.invoice_line_items = resources.InvoiceLineItems(self)
self.invoices = resources.Invoices(self)
self.items = resources.Items(self)
self.metrics = resources.Metrics(self)
self.plans = resources.Plans(self)
self.prices = resources.Prices(self)
self.subscriptions = resources.Subscriptions(self)
self.webhooks = resources.Webhooks(self)
self.alerts = resources.Alerts(self)
self.top_level = top_level.TopLevel(self)
self.coupons = coupons.Coupons(self)
self.credit_notes = credit_notes.CreditNotes(self)
self.customers = customers.Customers(self)
self.events = events.Events(self)
self.invoice_line_items = invoice_line_items.InvoiceLineItems(self)
self.invoices = invoices.Invoices(self)
self.items = items.Items(self)
self.metrics = metrics.Metrics(self)
self.plans = plans.Plans(self)
self.prices = prices.Prices(self)
self.subscriptions = subscriptions.Subscriptions(self)
self.webhooks = webhooks.Webhooks(self)
self.alerts = alerts.Alerts(self)
self.with_raw_response = OrbWithRawResponse(self)
self.with_streaming_response = OrbWithStreamedResponse(self)

Expand Down Expand Up @@ -301,20 +307,20 @@ def _make_status_error(


class AsyncOrb(AsyncAPIClient):
top_level: resources.AsyncTopLevel
coupons: resources.AsyncCoupons
credit_notes: resources.AsyncCreditNotes
customers: resources.AsyncCustomers
events: resources.AsyncEvents
invoice_line_items: resources.AsyncInvoiceLineItems
invoices: resources.AsyncInvoices
items: resources.AsyncItems
metrics: resources.AsyncMetrics
plans: resources.AsyncPlans
prices: resources.AsyncPrices
subscriptions: resources.AsyncSubscriptions
webhooks: resources.AsyncWebhooks
alerts: resources.AsyncAlerts
top_level: top_level.AsyncTopLevel
coupons: coupons.AsyncCoupons
credit_notes: credit_notes.AsyncCreditNotes
customers: customers.AsyncCustomers
events: events.AsyncEvents
invoice_line_items: invoice_line_items.AsyncInvoiceLineItems
invoices: invoices.AsyncInvoices
items: items.AsyncItems
metrics: metrics.AsyncMetrics
plans: plans.AsyncPlans
prices: prices.AsyncPrices
subscriptions: subscriptions.AsyncSubscriptions
webhooks: webhooks.AsyncWebhooks
alerts: alerts.AsyncAlerts
with_raw_response: AsyncOrbWithRawResponse
with_streaming_response: AsyncOrbWithStreamedResponse

Expand Down Expand Up @@ -382,20 +388,20 @@ def __init__(

self._idempotency_header = "Idempotency-Key"

self.top_level = resources.AsyncTopLevel(self)
self.coupons = resources.AsyncCoupons(self)
self.credit_notes = resources.AsyncCreditNotes(self)
self.customers = resources.AsyncCustomers(self)
self.events = resources.AsyncEvents(self)
self.invoice_line_items = resources.AsyncInvoiceLineItems(self)
self.invoices = resources.AsyncInvoices(self)
self.items = resources.AsyncItems(self)
self.metrics = resources.AsyncMetrics(self)
self.plans = resources.AsyncPlans(self)
self.prices = resources.AsyncPrices(self)
self.subscriptions = resources.AsyncSubscriptions(self)
self.webhooks = resources.AsyncWebhooks(self)
self.alerts = resources.AsyncAlerts(self)
self.top_level = top_level.AsyncTopLevel(self)
self.coupons = coupons.AsyncCoupons(self)
self.credit_notes = credit_notes.AsyncCreditNotes(self)
self.customers = customers.AsyncCustomers(self)
self.events = events.AsyncEvents(self)
self.invoice_line_items = invoice_line_items.AsyncInvoiceLineItems(self)
self.invoices = invoices.AsyncInvoices(self)
self.items = items.AsyncItems(self)
self.metrics = metrics.AsyncMetrics(self)
self.plans = plans.AsyncPlans(self)
self.prices = prices.AsyncPrices(self)
self.subscriptions = subscriptions.AsyncSubscriptions(self)
self.webhooks = webhooks.AsyncWebhooks(self)
self.alerts = alerts.AsyncAlerts(self)
self.with_raw_response = AsyncOrbWithRawResponse(self)
self.with_streaming_response = AsyncOrbWithStreamedResponse(self)

Expand Down Expand Up @@ -556,70 +562,72 @@ def _make_status_error(

class OrbWithRawResponse:
def __init__(self, client: Orb) -> None:
self.top_level = resources.TopLevelWithRawResponse(client.top_level)
self.coupons = resources.CouponsWithRawResponse(client.coupons)
self.credit_notes = resources.CreditNotesWithRawResponse(client.credit_notes)
self.customers = resources.CustomersWithRawResponse(client.customers)
self.events = resources.EventsWithRawResponse(client.events)
self.invoice_line_items = resources.InvoiceLineItemsWithRawResponse(client.invoice_line_items)
self.invoices = resources.InvoicesWithRawResponse(client.invoices)
self.items = resources.ItemsWithRawResponse(client.items)
self.metrics = resources.MetricsWithRawResponse(client.metrics)
self.plans = resources.PlansWithRawResponse(client.plans)
self.prices = resources.PricesWithRawResponse(client.prices)
self.subscriptions = resources.SubscriptionsWithRawResponse(client.subscriptions)
self.alerts = resources.AlertsWithRawResponse(client.alerts)
self.top_level = top_level.TopLevelWithRawResponse(client.top_level)
self.coupons = coupons.CouponsWithRawResponse(client.coupons)
self.credit_notes = credit_notes.CreditNotesWithRawResponse(client.credit_notes)
self.customers = customers.CustomersWithRawResponse(client.customers)
self.events = events.EventsWithRawResponse(client.events)
self.invoice_line_items = invoice_line_items.InvoiceLineItemsWithRawResponse(client.invoice_line_items)
self.invoices = invoices.InvoicesWithRawResponse(client.invoices)
self.items = items.ItemsWithRawResponse(client.items)
self.metrics = metrics.MetricsWithRawResponse(client.metrics)
self.plans = plans.PlansWithRawResponse(client.plans)
self.prices = prices.PricesWithRawResponse(client.prices)
self.subscriptions = subscriptions.SubscriptionsWithRawResponse(client.subscriptions)
self.alerts = alerts.AlertsWithRawResponse(client.alerts)


class AsyncOrbWithRawResponse:
def __init__(self, client: AsyncOrb) -> None:
self.top_level = resources.AsyncTopLevelWithRawResponse(client.top_level)
self.coupons = resources.AsyncCouponsWithRawResponse(client.coupons)
self.credit_notes = resources.AsyncCreditNotesWithRawResponse(client.credit_notes)
self.customers = resources.AsyncCustomersWithRawResponse(client.customers)
self.events = resources.AsyncEventsWithRawResponse(client.events)
self.invoice_line_items = resources.AsyncInvoiceLineItemsWithRawResponse(client.invoice_line_items)
self.invoices = resources.AsyncInvoicesWithRawResponse(client.invoices)
self.items = resources.AsyncItemsWithRawResponse(client.items)
self.metrics = resources.AsyncMetricsWithRawResponse(client.metrics)
self.plans = resources.AsyncPlansWithRawResponse(client.plans)
self.prices = resources.AsyncPricesWithRawResponse(client.prices)
self.subscriptions = resources.AsyncSubscriptionsWithRawResponse(client.subscriptions)
self.alerts = resources.AsyncAlertsWithRawResponse(client.alerts)
self.top_level = top_level.AsyncTopLevelWithRawResponse(client.top_level)
self.coupons = coupons.AsyncCouponsWithRawResponse(client.coupons)
self.credit_notes = credit_notes.AsyncCreditNotesWithRawResponse(client.credit_notes)
self.customers = customers.AsyncCustomersWithRawResponse(client.customers)
self.events = events.AsyncEventsWithRawResponse(client.events)
self.invoice_line_items = invoice_line_items.AsyncInvoiceLineItemsWithRawResponse(client.invoice_line_items)
self.invoices = invoices.AsyncInvoicesWithRawResponse(client.invoices)
self.items = items.AsyncItemsWithRawResponse(client.items)
self.metrics = metrics.AsyncMetricsWithRawResponse(client.metrics)
self.plans = plans.AsyncPlansWithRawResponse(client.plans)
self.prices = prices.AsyncPricesWithRawResponse(client.prices)
self.subscriptions = subscriptions.AsyncSubscriptionsWithRawResponse(client.subscriptions)
self.alerts = alerts.AsyncAlertsWithRawResponse(client.alerts)


class OrbWithStreamedResponse:
def __init__(self, client: Orb) -> None:
self.top_level = resources.TopLevelWithStreamingResponse(client.top_level)
self.coupons = resources.CouponsWithStreamingResponse(client.coupons)
self.credit_notes = resources.CreditNotesWithStreamingResponse(client.credit_notes)
self.customers = resources.CustomersWithStreamingResponse(client.customers)
self.events = resources.EventsWithStreamingResponse(client.events)
self.invoice_line_items = resources.InvoiceLineItemsWithStreamingResponse(client.invoice_line_items)
self.invoices = resources.InvoicesWithStreamingResponse(client.invoices)
self.items = resources.ItemsWithStreamingResponse(client.items)
self.metrics = resources.MetricsWithStreamingResponse(client.metrics)
self.plans = resources.PlansWithStreamingResponse(client.plans)
self.prices = resources.PricesWithStreamingResponse(client.prices)
self.subscriptions = resources.SubscriptionsWithStreamingResponse(client.subscriptions)
self.alerts = resources.AlertsWithStreamingResponse(client.alerts)
self.top_level = top_level.TopLevelWithStreamingResponse(client.top_level)
self.coupons = coupons.CouponsWithStreamingResponse(client.coupons)
self.credit_notes = credit_notes.CreditNotesWithStreamingResponse(client.credit_notes)
self.customers = customers.CustomersWithStreamingResponse(client.customers)
self.events = events.EventsWithStreamingResponse(client.events)
self.invoice_line_items = invoice_line_items.InvoiceLineItemsWithStreamingResponse(client.invoice_line_items)
self.invoices = invoices.InvoicesWithStreamingResponse(client.invoices)
self.items = items.ItemsWithStreamingResponse(client.items)
self.metrics = metrics.MetricsWithStreamingResponse(client.metrics)
self.plans = plans.PlansWithStreamingResponse(client.plans)
self.prices = prices.PricesWithStreamingResponse(client.prices)
self.subscriptions = subscriptions.SubscriptionsWithStreamingResponse(client.subscriptions)
self.alerts = alerts.AlertsWithStreamingResponse(client.alerts)


class AsyncOrbWithStreamedResponse:
def __init__(self, client: AsyncOrb) -> None:
self.top_level = resources.AsyncTopLevelWithStreamingResponse(client.top_level)
self.coupons = resources.AsyncCouponsWithStreamingResponse(client.coupons)
self.credit_notes = resources.AsyncCreditNotesWithStreamingResponse(client.credit_notes)
self.customers = resources.AsyncCustomersWithStreamingResponse(client.customers)
self.events = resources.AsyncEventsWithStreamingResponse(client.events)
self.invoice_line_items = resources.AsyncInvoiceLineItemsWithStreamingResponse(client.invoice_line_items)
self.invoices = resources.AsyncInvoicesWithStreamingResponse(client.invoices)
self.items = resources.AsyncItemsWithStreamingResponse(client.items)
self.metrics = resources.AsyncMetricsWithStreamingResponse(client.metrics)
self.plans = resources.AsyncPlansWithStreamingResponse(client.plans)
self.prices = resources.AsyncPricesWithStreamingResponse(client.prices)
self.subscriptions = resources.AsyncSubscriptionsWithStreamingResponse(client.subscriptions)
self.alerts = resources.AsyncAlertsWithStreamingResponse(client.alerts)
self.top_level = top_level.AsyncTopLevelWithStreamingResponse(client.top_level)
self.coupons = coupons.AsyncCouponsWithStreamingResponse(client.coupons)
self.credit_notes = credit_notes.AsyncCreditNotesWithStreamingResponse(client.credit_notes)
self.customers = customers.AsyncCustomersWithStreamingResponse(client.customers)
self.events = events.AsyncEventsWithStreamingResponse(client.events)
self.invoice_line_items = invoice_line_items.AsyncInvoiceLineItemsWithStreamingResponse(
client.invoice_line_items
)
self.invoices = invoices.AsyncInvoicesWithStreamingResponse(client.invoices)
self.items = items.AsyncItemsWithStreamingResponse(client.items)
self.metrics = metrics.AsyncMetricsWithStreamingResponse(client.metrics)
self.plans = plans.AsyncPlansWithStreamingResponse(client.plans)
self.prices = prices.AsyncPricesWithStreamingResponse(client.prices)
self.subscriptions = subscriptions.AsyncSubscriptionsWithStreamingResponse(client.subscriptions)
self.alerts = alerts.AsyncAlertsWithStreamingResponse(client.alerts)


Client = Orb
Expand Down
2 changes: 1 addition & 1 deletion src/orb/_version.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

__title__ = "orb"
__version__ = "2.19.0" # x-release-please-version
__version__ = "2.20.0" # x-release-please-version
Loading
Loading