Skip to content

release: 1.51.0 #269

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 3 commits into from
May 13, 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 @@
{
".": "1.50.1"
".": "1.51.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: 89
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/orb-762f50aa6ea13f42e719339aa5cb31233984499720a7be832182357f949927a1.yml
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/orb-03945a99974ac1e7218fd458dceef31887a249cc048bcbbbe3828c1d893f95ea.yml
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,18 @@
# Changelog

## 1.51.0 (2024-05-13)

Full Changelog: [v1.50.1...v1.51.0](https://github.com/orbcorp/orb-python/compare/v1.50.1...v1.51.0)

### Features

* **api:** updates ([#270](https://github.com/orbcorp/orb-python/issues/270)) ([cc12356](https://github.com/orbcorp/orb-python/commit/cc12356f4d04c4b97ae7eb9ebaf92abdd4192658))


### Chores

* **docs:** add SECURITY.md ([#268](https://github.com/orbcorp/orb-python/issues/268)) ([57ed634](https://github.com/orbcorp/orb-python/commit/57ed634ffbe8be758a1123359f5e61c7e09f7eb7))

## 1.50.1 (2024-05-10)

Full Changelog: [v1.50.0...v1.50.1](https://github.com/orbcorp/orb-python/compare/v1.50.0...v1.50.1)
Expand Down
27 changes: 27 additions & 0 deletions SECURITY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Security Policy

## Reporting Security Issues

This SDK is generated by [Stainless Software Inc](http://stainlessapi.com). Stainless takes security seriously, and encourages you to report any security vulnerability promptly so that appropriate action can be taken.

To report a security issue, please contact the Stainless team at [email protected].

## Responsible Disclosure

We appreciate the efforts of security researchers and individuals who help us maintain the security of
SDKs we generate. If you believe you have found a security vulnerability, please adhere to responsible
disclosure practices by allowing us a reasonable amount of time to investigate and address the issue
before making any information public.

## Reporting Non-SDK Related Security Issues

If you encounter security issues that are not directly related to SDKs but pertain to the services
or products provided by Orb please follow the respective company's security reporting guidelines.

### Orb Terms and Policies

Please contact [email protected] for any questions or concerns regarding security of our services.

---

Thank you for helping us keep the SDKs and systems they interact with secure.
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 = "1.50.1"
version = "1.51.0"
description = "The official Python library for the orb API"
dynamic = ["readme"]
license = "Apache-2.0"
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__ = "1.50.1" # x-release-please-version
__version__ = "1.51.0" # x-release-please-version
20 changes: 8 additions & 12 deletions src/orb/resources/events/events.py
Original file line number Diff line number Diff line change
Expand Up @@ -373,12 +373,10 @@ def ingest(
We validate the following:

- Exactly one of `customer_id` and `external_customer_id` should be specified.
- If specified, `customer_id` must identify a Customer resource within Orb. We
do not support sending events for customers that have not been provisioned.
Similarly, if specified, `external_customer_id` must be an identifier that is
associated with an Orb Customer resource. Note: During our initial integration
period, this enforcement will be temporarily turned into a warning to ensure
smooth customer migration.
- If the `customer_id` is specified, the customer in Orb must exist.
- If the `external_customer_id` is specified, the customer in Orb does not need
to exist. Events will be attributed to any future customers with the
`external_customer_id` on subscription creation.
- `timestamp` must conform to ISO 8601 and represent a timestamp at most 1 hour
in the future. This timestamp should be sent in UTC timezone (no timezone
offset).
Expand Down Expand Up @@ -900,12 +898,10 @@ async def ingest(
We validate the following:

- Exactly one of `customer_id` and `external_customer_id` should be specified.
- If specified, `customer_id` must identify a Customer resource within Orb. We
do not support sending events for customers that have not been provisioned.
Similarly, if specified, `external_customer_id` must be an identifier that is
associated with an Orb Customer resource. Note: During our initial integration
period, this enforcement will be temporarily turned into a warning to ensure
smooth customer migration.
- If the `customer_id` is specified, the customer in Orb must exist.
- If the `external_customer_id` is specified, the customer in Orb does not need
to exist. Events will be attributed to any future customers with the
`external_customer_id` on subscription creation.
- `timestamp` must conform to ISO 8601 and represent a timestamp at most 1 hour
in the future. This timestamp should be sent in UTC timezone (no timezone
offset).
Expand Down
8 changes: 4 additions & 4 deletions src/orb/resources/subscriptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ def create(
invoicing_threshold: Optional[str] | NotGiven = NOT_GIVEN,
metadata: Optional[Dict[str, Optional[str]]] | NotGiven = NOT_GIVEN,
net_terms: Optional[int] | NotGiven = NOT_GIVEN,
per_credit_overage_amount: Optional[str] | NotGiven = NOT_GIVEN,
per_credit_overage_amount: Optional[float] | NotGiven = NOT_GIVEN,
plan_id: Optional[str] | NotGiven = NOT_GIVEN,
price_overrides: Optional[Iterable[subscription_create_params.PriceOverride]] | NotGiven = NOT_GIVEN,
start_date: Union[str, datetime, None] | NotGiven = NOT_GIVEN,
Expand Down Expand Up @@ -1366,7 +1366,7 @@ def schedule_plan_change(
external_plan_id: Optional[str] | NotGiven = NOT_GIVEN,
initial_phase_order: Optional[int] | NotGiven = NOT_GIVEN,
invoicing_threshold: Optional[str] | NotGiven = NOT_GIVEN,
per_credit_overage_amount: Optional[str] | NotGiven = NOT_GIVEN,
per_credit_overage_amount: Optional[float] | NotGiven = NOT_GIVEN,
plan_id: Optional[str] | NotGiven = NOT_GIVEN,
price_overrides: Optional[Iterable[subscription_schedule_plan_change_params.PriceOverride]]
| NotGiven = NOT_GIVEN,
Expand Down Expand Up @@ -1784,7 +1784,7 @@ async def create(
invoicing_threshold: Optional[str] | NotGiven = NOT_GIVEN,
metadata: Optional[Dict[str, Optional[str]]] | NotGiven = NOT_GIVEN,
net_terms: Optional[int] | NotGiven = NOT_GIVEN,
per_credit_overage_amount: Optional[str] | NotGiven = NOT_GIVEN,
per_credit_overage_amount: Optional[float] | NotGiven = NOT_GIVEN,
plan_id: Optional[str] | NotGiven = NOT_GIVEN,
price_overrides: Optional[Iterable[subscription_create_params.PriceOverride]] | NotGiven = NOT_GIVEN,
start_date: Union[str, datetime, None] | NotGiven = NOT_GIVEN,
Expand Down Expand Up @@ -3078,7 +3078,7 @@ async def schedule_plan_change(
external_plan_id: Optional[str] | NotGiven = NOT_GIVEN,
initial_phase_order: Optional[int] | NotGiven = NOT_GIVEN,
invoicing_threshold: Optional[str] | NotGiven = NOT_GIVEN,
per_credit_overage_amount: Optional[str] | NotGiven = NOT_GIVEN,
per_credit_overage_amount: Optional[float] | NotGiven = NOT_GIVEN,
plan_id: Optional[str] | NotGiven = NOT_GIVEN,
price_overrides: Optional[Iterable[subscription_schedule_plan_change_params.PriceOverride]]
| NotGiven = NOT_GIVEN,
Expand Down
2 changes: 1 addition & 1 deletion src/orb/types/subscription_create_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ class SubscriptionCreateParams(TypedDict, total=False):

net_terms: Optional[int]

per_credit_overage_amount: Optional[str]
per_credit_overage_amount: Optional[float]

plan_id: Optional[str]
"""The plan that the given subscription should be switched to.
Expand Down
2 changes: 1 addition & 1 deletion src/orb/types/subscription_schedule_plan_change_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ class SubscriptionSchedulePlanChangeParams(TypedDict, total=False):
at the end of the billing period.
"""

per_credit_overage_amount: Optional[str]
per_credit_overage_amount: Optional[float]

plan_id: Optional[str]
"""The plan that the given subscription should be switched to.
Expand Down
4 changes: 2 additions & 2 deletions tests/api_resources/coupons/test_subscriptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def test_method_list_with_all_params(self, client: Orb) -> None:
subscription = client.coupons.subscriptions.list(
"string",
cursor="string",
limit=0,
limit=1,
)
assert_matches_type(SyncPage[Subscription], subscription, path=["response"])

Expand Down Expand Up @@ -81,7 +81,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncOrb) -> None
subscription = await async_client.coupons.subscriptions.list(
"string",
cursor="string",
limit=0,
limit=1,
)
assert_matches_type(AsyncPage[Subscription], subscription, path=["response"])

Expand Down
8 changes: 4 additions & 4 deletions tests/api_resources/customers/credits/test_ledger.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ def test_method_list_with_all_params(self, client: Orb) -> None:
cursor="string",
entry_status="committed",
entry_type="increment",
limit=0,
limit=1,
minimum_amount="string",
)
assert_matches_type(SyncPage[LedgerListResponse], ledger, path=["response"])
Expand Down Expand Up @@ -732,7 +732,7 @@ def test_method_list_by_external_id_with_all_params(self, client: Orb) -> None:
cursor="string",
entry_status="committed",
entry_type="increment",
limit=0,
limit=1,
minimum_amount="string",
)
assert_matches_type(SyncPage[LedgerListByExternalIDResponse], ledger, path=["response"])
Expand Down Expand Up @@ -791,7 +791,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncOrb) -> None
cursor="string",
entry_status="committed",
entry_type="increment",
limit=0,
limit=1,
minimum_amount="string",
)
assert_matches_type(AsyncPage[LedgerListResponse], ledger, path=["response"])
Expand Down Expand Up @@ -1480,7 +1480,7 @@ async def test_method_list_by_external_id_with_all_params(self, async_client: As
cursor="string",
entry_status="committed",
entry_type="increment",
limit=0,
limit=1,
minimum_amount="string",
)
assert_matches_type(AsyncPage[LedgerListByExternalIDResponse], ledger, path=["response"])
Expand Down
8 changes: 4 additions & 4 deletions tests/api_resources/customers/credits/test_top_ups.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ def test_method_list_with_all_params(self, client: Orb) -> None:
top_up = client.customers.credits.top_ups.list(
"string",
cursor="string",
limit=0,
limit=1,
)
assert_matches_type(SyncPage[TopUpListResponse], top_up, path=["response"])

Expand Down Expand Up @@ -356,7 +356,7 @@ def test_method_list_by_external_id_with_all_params(self, client: Orb) -> None:
top_up = client.customers.credits.top_ups.list_by_external_id(
"string",
cursor="string",
limit=0,
limit=1,
)
assert_matches_type(SyncPage[TopUpListByExternalIDResponse], top_up, path=["response"])

Expand Down Expand Up @@ -496,7 +496,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncOrb) -> None
top_up = await async_client.customers.credits.top_ups.list(
"string",
cursor="string",
limit=0,
limit=1,
)
assert_matches_type(AsyncPage[TopUpListResponse], top_up, path=["response"])

Expand Down Expand Up @@ -728,7 +728,7 @@ async def test_method_list_by_external_id_with_all_params(self, async_client: As
top_up = await async_client.customers.credits.top_ups.list_by_external_id(
"string",
cursor="string",
limit=0,
limit=1,
)
assert_matches_type(AsyncPage[TopUpListByExternalIDResponse], top_up, path=["response"])

Expand Down
4 changes: 2 additions & 2 deletions tests/api_resources/customers/test_balance_transactions.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ def test_method_list_with_all_params(self, client: Orb) -> None:
balance_transaction = client.customers.balance_transactions.list(
"string",
cursor="string",
limit=0,
limit=1,
operation_time_gt=parse_datetime("2019-12-27T18:11:19.117Z"),
operation_time_gte=parse_datetime("2019-12-27T18:11:19.117Z"),
operation_time_lt=parse_datetime("2019-12-27T18:11:19.117Z"),
Expand Down Expand Up @@ -201,7 +201,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncOrb) -> None
balance_transaction = await async_client.customers.balance_transactions.list(
"string",
cursor="string",
limit=0,
limit=1,
operation_time_gt=parse_datetime("2019-12-27T18:11:19.117Z"),
operation_time_gte=parse_datetime("2019-12-27T18:11:19.117Z"),
operation_time_lt=parse_datetime("2019-12-27T18:11:19.117Z"),
Expand Down
8 changes: 4 additions & 4 deletions tests/api_resources/customers/test_credits.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def test_method_list_with_all_params(self, client: Orb) -> None:
"string",
currency="string",
cursor="string",
limit=0,
limit=1,
)
assert_matches_type(SyncPage[CreditListResponse], credit, path=["response"])

Expand Down Expand Up @@ -82,7 +82,7 @@ def test_method_list_by_external_id_with_all_params(self, client: Orb) -> None:
"string",
currency="string",
cursor="string",
limit=0,
limit=1,
)
assert_matches_type(SyncPage[CreditListByExternalIDResponse], credit, path=["response"])

Expand Down Expand Up @@ -134,7 +134,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncOrb) -> None
"string",
currency="string",
cursor="string",
limit=0,
limit=1,
)
assert_matches_type(AsyncPage[CreditListResponse], credit, path=["response"])

Expand Down Expand Up @@ -182,7 +182,7 @@ async def test_method_list_by_external_id_with_all_params(self, async_client: As
"string",
currency="string",
cursor="string",
limit=0,
limit=1,
)
assert_matches_type(AsyncPage[CreditListByExternalIDResponse], credit, path=["response"])

Expand Down
4 changes: 2 additions & 2 deletions tests/api_resources/events/test_backfills.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ def test_method_list(self, client: Orb) -> None:
def test_method_list_with_all_params(self, client: Orb) -> None:
backfill = client.events.backfills.list(
cursor="string",
limit=0,
limit=1,
)
assert_matches_type(SyncPage[BackfillListResponse], backfill, path=["response"])

Expand Down Expand Up @@ -277,7 +277,7 @@ async def test_method_list(self, async_client: AsyncOrb) -> None:
async def test_method_list_with_all_params(self, async_client: AsyncOrb) -> None:
backfill = await async_client.events.backfills.list(
cursor="string",
limit=0,
limit=1,
)
assert_matches_type(AsyncPage[BackfillListResponse], backfill, path=["response"])

Expand Down
4 changes: 2 additions & 2 deletions tests/api_resources/test_alerts.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ def test_method_list_with_all_params(self, client: Orb) -> None:
cursor="string",
customer_id="string",
external_customer_id="string",
limit=0,
limit=1,
subscription_id="string",
)
assert_matches_type(SyncPage[Alert], alert, path=["response"])
Expand Down Expand Up @@ -410,7 +410,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncOrb) -> None
cursor="string",
customer_id="string",
external_customer_id="string",
limit=0,
limit=1,
subscription_id="string",
)
assert_matches_type(AsyncPage[Alert], alert, path=["response"])
Expand Down
8 changes: 4 additions & 4 deletions tests/api_resources/test_coupons.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def test_method_create_with_all_params(self, client: Orb) -> None:
},
redemption_code="HALFOFF",
duration_in_months=12,
max_redemptions=0,
max_redemptions=1,
)
assert_matches_type(Coupon, coupon, path=["response"])

Expand Down Expand Up @@ -83,7 +83,7 @@ def test_method_list(self, client: Orb) -> None:
def test_method_list_with_all_params(self, client: Orb) -> None:
coupon = client.coupons.list(
cursor="string",
limit=0,
limit=1,
redemption_code="string",
show_archived=True,
)
Expand Down Expand Up @@ -209,7 +209,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncOrb) -> No
},
redemption_code="HALFOFF",
duration_in_months=12,
max_redemptions=0,
max_redemptions=1,
)
assert_matches_type(Coupon, coupon, path=["response"])

Expand Down Expand Up @@ -254,7 +254,7 @@ async def test_method_list(self, async_client: AsyncOrb) -> None:
async def test_method_list_with_all_params(self, async_client: AsyncOrb) -> None:
coupon = await async_client.coupons.list(
cursor="string",
limit=0,
limit=1,
redemption_code="string",
show_archived=True,
)
Expand Down
4 changes: 2 additions & 2 deletions tests/api_resources/test_credit_notes.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def test_method_list(self, client: Orb) -> None:
def test_method_list_with_all_params(self, client: Orb) -> None:
credit_note = client.credit_notes.list(
cursor="string",
limit=0,
limit=1,
)
assert_matches_type(SyncPage[CreditNote], credit_note, path=["response"])

Expand Down Expand Up @@ -102,7 +102,7 @@ async def test_method_list(self, async_client: AsyncOrb) -> None:
async def test_method_list_with_all_params(self, async_client: AsyncOrb) -> None:
credit_note = await async_client.credit_notes.list(
cursor="string",
limit=0,
limit=1,
)
assert_matches_type(AsyncPage[CreditNote], credit_note, path=["response"])

Expand Down
Loading