Skip to content
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 .stats.yml
Original file line number Diff line number Diff line change
@@ -1 +1 @@
configured_endpoints: 137
configured_endpoints: 145
43 changes: 43 additions & 0 deletions api.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ from dodopayments.types import (
CustomerLimitedDetails,
CustomerRequest,
IntentStatus,
ManualRetry,
ManualRetryState,
NewCustomer,
OneTimeProductCartItem,
Payment,
Expand All @@ -56,6 +58,8 @@ Methods:
- <code title="get /payments/{payment_id}">client.payments.<a href="./src/dodopayments/resources/payments.py">retrieve</a>(payment_id) -> <a href="./src/dodopayments/types/payment.py">Payment</a></code>
- <code title="get /payments">client.payments.<a href="./src/dodopayments/resources/payments.py">list</a>(\*\*<a href="src/dodopayments/types/payment_list_params.py">params</a>) -> <a href="./src/dodopayments/types/payment_list_response.py">SyncDefaultPageNumberPagination[PaymentListResponse]</a></code>
- <code title="get /payments/{payment_id}/line-items">client.payments.<a href="./src/dodopayments/resources/payments.py">retrieve_line_items</a>(payment_id) -> <a href="./src/dodopayments/types/payment_retrieve_line_items_response.py">PaymentRetrieveLineItemsResponse</a></code>
- <code title="get /payments/{payment_id}/retry">client.payments.<a href="./src/dodopayments/resources/payments.py">retrieve_retry_state</a>(payment_id) -> <a href="./src/dodopayments/types/manual_retry_state.py">ManualRetryState</a></code>
- <code title="post /payments/{payment_id}/retry">client.payments.<a href="./src/dodopayments/resources/payments.py">retry</a>(payment_id) -> <a href="./src/dodopayments/types/manual_retry.py">ManualRetry</a></code>

# Subscriptions

Expand Down Expand Up @@ -210,6 +214,43 @@ Methods:
- <code title="post /customers/{customer_id}/wallets/ledger-entries">client.customers.wallets.ledger_entries.<a href="./src/dodopayments/resources/customers/wallets/ledger_entries.py">create</a>(customer_id, \*\*<a href="src/dodopayments/types/customers/wallets/ledger_entry_create_params.py">params</a>) -> <a href="./src/dodopayments/types/customers/customer_wallet.py">CustomerWallet</a></code>
- <code title="get /customers/{customer_id}/wallets/ledger-entries">client.customers.wallets.ledger_entries.<a href="./src/dodopayments/resources/customers/wallets/ledger_entries.py">list</a>(customer_id, \*\*<a href="src/dodopayments/types/customers/wallets/ledger_entry_list_params.py">params</a>) -> <a href="./src/dodopayments/types/customers/wallets/customer_wallet_transaction.py">SyncDefaultPageNumberPagination[CustomerWalletTransaction]</a></code>

# Blocklist

## Customers

Types:

```python
from dodopayments.types.blocklist import (
BlockByCustomerID,
BlockByEmail,
BlockIdentifier,
BlockedCustomer,
BlockedCustomerSource,
CreateBlockedCustomerRequest,
)
```

Methods:

- <code title="post /blocklist/customers">client.blocklist.customers.<a href="./src/dodopayments/resources/blocklist/customers/customers.py">create</a>(\*\*<a href="src/dodopayments/types/blocklist/customer_create_params.py">params</a>) -> <a href="./src/dodopayments/types/blocklist/blocked_customer.py">BlockedCustomer</a></code>
- <code title="get /blocklist/customers/{entry_id}">client.blocklist.customers.<a href="./src/dodopayments/resources/blocklist/customers/customers.py">retrieve</a>(entry_id) -> <a href="./src/dodopayments/types/blocklist/blocked_customer.py">BlockedCustomer</a></code>
- <code title="get /blocklist/customers">client.blocklist.customers.<a href="./src/dodopayments/resources/blocklist/customers/customers.py">list</a>(\*\*<a href="src/dodopayments/types/blocklist/customer_list_params.py">params</a>) -> <a href="./src/dodopayments/types/blocklist/blocked_customer.py">SyncDefaultPageNumberPagination[BlockedCustomer]</a></code>
- <code title="delete /blocklist/customers/{entry_id}">client.blocklist.customers.<a href="./src/dodopayments/resources/blocklist/customers/customers.py">delete</a>(entry_id) -> None</code>

### Notes

Types:

```python
from dodopayments.types.blocklist.customers import BlockedCustomerNote, NoteRequest
```

Methods:

- <code title="post /blocklist/customers/{entry_id}/notes">client.blocklist.customers.notes.<a href="./src/dodopayments/resources/blocklist/customers/notes.py">create</a>(entry_id, \*\*<a href="src/dodopayments/types/blocklist/customers/note_create_params.py">params</a>) -> <a href="./src/dodopayments/types/blocklist/customers/blocked_customer_note.py">BlockedCustomerNote</a></code>
- <code title="patch /blocklist/customers/{entry_id}/notes/{note_id}">client.blocklist.customers.notes.<a href="./src/dodopayments/resources/blocklist/customers/notes.py">update</a>(note_id, \*, entry_id, \*\*<a href="src/dodopayments/types/blocklist/customers/note_update_params.py">params</a>) -> <a href="./src/dodopayments/types/blocklist/customers/blocked_customer_note.py">BlockedCustomerNote</a></code>

# Refunds

Types:
Expand Down Expand Up @@ -469,6 +510,7 @@ from dodopayments.types import (
SubscriptionExpiredWebhookEvent,
SubscriptionFailedWebhookEvent,
SubscriptionOnHoldWebhookEvent,
SubscriptionPastDueWebhookEvent,
SubscriptionPausedWebhookEvent,
SubscriptionPlanChangedWebhookEvent,
SubscriptionRenewedWebhookEvent,
Expand Down Expand Up @@ -516,6 +558,7 @@ from dodopayments.types import (
SubscriptionExpiredWebhookEvent,
SubscriptionFailedWebhookEvent,
SubscriptionOnHoldWebhookEvent,
SubscriptionPastDueWebhookEvent,
SubscriptionPausedWebhookEvent,
SubscriptionPlanChangedWebhookEvent,
SubscriptionRenewedWebhookEvent,
Expand Down
2 changes: 1 addition & 1 deletion scripts/mock

Large diffs are not rendered by default.

38 changes: 38 additions & 0 deletions src/dodopayments/_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@
payments,
products,
webhooks,
blocklist,
customers,
discounts,
entitlements,
Expand Down Expand Up @@ -78,6 +79,7 @@
from .resources.invoices.invoices import InvoicesResource, AsyncInvoicesResource
from .resources.products.products import ProductsResource, AsyncProductsResource
from .resources.webhooks.webhooks import WebhooksResource, AsyncWebhooksResource
from .resources.blocklist.blocklist import BlocklistResource, AsyncBlocklistResource
from .resources.customers.customers import CustomersResource, AsyncCustomersResource
from .resources.license_key_instances import LicenseKeyInstancesResource, AsyncLicenseKeyInstancesResource
from .resources.entitlements.entitlements import EntitlementsResource, AsyncEntitlementsResource
Expand Down Expand Up @@ -252,6 +254,12 @@ def customers(self) -> CustomersResource:

return CustomersResource(self)

@cached_property
def blocklist(self) -> BlocklistResource:
from .resources.blocklist import BlocklistResource

return BlocklistResource(self)

@cached_property
def refunds(self) -> RefundsResource:
from .resources.refunds import RefundsResource
Expand Down Expand Up @@ -603,6 +611,12 @@ def customers(self) -> AsyncCustomersResource:

return AsyncCustomersResource(self)

@cached_property
def blocklist(self) -> AsyncBlocklistResource:
from .resources.blocklist import AsyncBlocklistResource

return AsyncBlocklistResource(self)

@cached_property
def refunds(self) -> AsyncRefundsResource:
from .resources.refunds import AsyncRefundsResource
Expand Down Expand Up @@ -864,6 +878,12 @@ def customers(self) -> customers.CustomersResourceWithRawResponse:

return CustomersResourceWithRawResponse(self._client.customers)

@cached_property
def blocklist(self) -> blocklist.BlocklistResourceWithRawResponse:
from .resources.blocklist import BlocklistResourceWithRawResponse

return BlocklistResourceWithRawResponse(self._client.blocklist)

@cached_property
def refunds(self) -> refunds.RefundsResourceWithRawResponse:
from .resources.refunds import RefundsResourceWithRawResponse
Expand Down Expand Up @@ -1009,6 +1029,12 @@ def customers(self) -> customers.AsyncCustomersResourceWithRawResponse:

return AsyncCustomersResourceWithRawResponse(self._client.customers)

@cached_property
def blocklist(self) -> blocklist.AsyncBlocklistResourceWithRawResponse:
from .resources.blocklist import AsyncBlocklistResourceWithRawResponse

return AsyncBlocklistResourceWithRawResponse(self._client.blocklist)

@cached_property
def refunds(self) -> refunds.AsyncRefundsResourceWithRawResponse:
from .resources.refunds import AsyncRefundsResourceWithRawResponse
Expand Down Expand Up @@ -1154,6 +1180,12 @@ def customers(self) -> customers.CustomersResourceWithStreamingResponse:

return CustomersResourceWithStreamingResponse(self._client.customers)

@cached_property
def blocklist(self) -> blocklist.BlocklistResourceWithStreamingResponse:
from .resources.blocklist import BlocklistResourceWithStreamingResponse

return BlocklistResourceWithStreamingResponse(self._client.blocklist)

@cached_property
def refunds(self) -> refunds.RefundsResourceWithStreamingResponse:
from .resources.refunds import RefundsResourceWithStreamingResponse
Expand Down Expand Up @@ -1299,6 +1331,12 @@ def customers(self) -> customers.AsyncCustomersResourceWithStreamingResponse:

return AsyncCustomersResourceWithStreamingResponse(self._client.customers)

@cached_property
def blocklist(self) -> blocklist.AsyncBlocklistResourceWithStreamingResponse:
from .resources.blocklist import AsyncBlocklistResourceWithStreamingResponse

return AsyncBlocklistResourceWithStreamingResponse(self._client.blocklist)

@cached_property
def refunds(self) -> refunds.AsyncRefundsResourceWithStreamingResponse:
from .resources.refunds import AsyncRefundsResourceWithStreamingResponse
Expand Down
14 changes: 14 additions & 0 deletions src/dodopayments/resources/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,14 @@
WebhooksResourceWithStreamingResponse,
AsyncWebhooksResourceWithStreamingResponse,
)
from .blocklist import (
BlocklistResource,
AsyncBlocklistResource,
BlocklistResourceWithRawResponse,
AsyncBlocklistResourceWithRawResponse,
BlocklistResourceWithStreamingResponse,
AsyncBlocklistResourceWithStreamingResponse,
)
from .customers import (
CustomersResource,
AsyncCustomersResource,
Expand Down Expand Up @@ -234,6 +242,12 @@
"AsyncCustomersResourceWithRawResponse",
"CustomersResourceWithStreamingResponse",
"AsyncCustomersResourceWithStreamingResponse",
"BlocklistResource",
"AsyncBlocklistResource",
"BlocklistResourceWithRawResponse",
"AsyncBlocklistResourceWithRawResponse",
"BlocklistResourceWithStreamingResponse",
"AsyncBlocklistResourceWithStreamingResponse",
"RefundsResource",
"AsyncRefundsResource",
"RefundsResourceWithRawResponse",
Expand Down
33 changes: 33 additions & 0 deletions src/dodopayments/resources/blocklist/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

from .blocklist import (
BlocklistResource,
AsyncBlocklistResource,
BlocklistResourceWithRawResponse,
AsyncBlocklistResourceWithRawResponse,
BlocklistResourceWithStreamingResponse,
AsyncBlocklistResourceWithStreamingResponse,
)
from .customers import (
CustomersResource,
AsyncCustomersResource,
CustomersResourceWithRawResponse,
AsyncCustomersResourceWithRawResponse,
CustomersResourceWithStreamingResponse,
AsyncCustomersResourceWithStreamingResponse,
)

__all__ = [
"CustomersResource",
"AsyncCustomersResource",
"CustomersResourceWithRawResponse",
"AsyncCustomersResourceWithRawResponse",
"CustomersResourceWithStreamingResponse",
"AsyncCustomersResourceWithStreamingResponse",
"BlocklistResource",
"AsyncBlocklistResource",
"BlocklistResourceWithRawResponse",
"AsyncBlocklistResourceWithRawResponse",
"BlocklistResourceWithStreamingResponse",
"AsyncBlocklistResourceWithStreamingResponse",
]
102 changes: 102 additions & 0 deletions src/dodopayments/resources/blocklist/blocklist.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

from __future__ import annotations

from ..._compat import cached_property
from ..._resource import SyncAPIResource, AsyncAPIResource
from .customers.customers import (
CustomersResource,
AsyncCustomersResource,
CustomersResourceWithRawResponse,
AsyncCustomersResourceWithRawResponse,
CustomersResourceWithStreamingResponse,
AsyncCustomersResourceWithStreamingResponse,
)

__all__ = ["BlocklistResource", "AsyncBlocklistResource"]


class BlocklistResource(SyncAPIResource):
@cached_property
def customers(self) -> CustomersResource:
return CustomersResource(self._client)

@cached_property
def with_raw_response(self) -> BlocklistResourceWithRawResponse:
"""
This property can be used as a prefix for any HTTP method call to return
the raw response object instead of the parsed content.

For more information, see https://www.github.com/dodopayments/dodopayments-python#accessing-raw-response-data-eg-headers
"""
return BlocklistResourceWithRawResponse(self)

@cached_property
def with_streaming_response(self) -> BlocklistResourceWithStreamingResponse:
"""
An alternative to `.with_raw_response` that doesn't eagerly read the response body.

For more information, see https://www.github.com/dodopayments/dodopayments-python#with_streaming_response
"""
return BlocklistResourceWithStreamingResponse(self)


class AsyncBlocklistResource(AsyncAPIResource):
@cached_property
def customers(self) -> AsyncCustomersResource:
return AsyncCustomersResource(self._client)

@cached_property
def with_raw_response(self) -> AsyncBlocklistResourceWithRawResponse:
"""
This property can be used as a prefix for any HTTP method call to return
the raw response object instead of the parsed content.

For more information, see https://www.github.com/dodopayments/dodopayments-python#accessing-raw-response-data-eg-headers
"""
return AsyncBlocklistResourceWithRawResponse(self)

@cached_property
def with_streaming_response(self) -> AsyncBlocklistResourceWithStreamingResponse:
"""
An alternative to `.with_raw_response` that doesn't eagerly read the response body.

For more information, see https://www.github.com/dodopayments/dodopayments-python#with_streaming_response
"""
return AsyncBlocklistResourceWithStreamingResponse(self)


class BlocklistResourceWithRawResponse:
def __init__(self, blocklist: BlocklistResource) -> None:
self._blocklist = blocklist

@cached_property
def customers(self) -> CustomersResourceWithRawResponse:
return CustomersResourceWithRawResponse(self._blocklist.customers)


class AsyncBlocklistResourceWithRawResponse:
def __init__(self, blocklist: AsyncBlocklistResource) -> None:
self._blocklist = blocklist

@cached_property
def customers(self) -> AsyncCustomersResourceWithRawResponse:
return AsyncCustomersResourceWithRawResponse(self._blocklist.customers)


class BlocklistResourceWithStreamingResponse:
def __init__(self, blocklist: BlocklistResource) -> None:
self._blocklist = blocklist

@cached_property
def customers(self) -> CustomersResourceWithStreamingResponse:
return CustomersResourceWithStreamingResponse(self._blocklist.customers)


class AsyncBlocklistResourceWithStreamingResponse:
def __init__(self, blocklist: AsyncBlocklistResource) -> None:
self._blocklist = blocklist

@cached_property
def customers(self) -> AsyncCustomersResourceWithStreamingResponse:
return AsyncCustomersResourceWithStreamingResponse(self._blocklist.customers)
33 changes: 33 additions & 0 deletions src/dodopayments/resources/blocklist/customers/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

from .notes import (
NotesResource,
AsyncNotesResource,
NotesResourceWithRawResponse,
AsyncNotesResourceWithRawResponse,
NotesResourceWithStreamingResponse,
AsyncNotesResourceWithStreamingResponse,
)
from .customers import (
CustomersResource,
AsyncCustomersResource,
CustomersResourceWithRawResponse,
AsyncCustomersResourceWithRawResponse,
CustomersResourceWithStreamingResponse,
AsyncCustomersResourceWithStreamingResponse,
)

__all__ = [
"NotesResource",
"AsyncNotesResource",
"NotesResourceWithRawResponse",
"AsyncNotesResourceWithRawResponse",
"NotesResourceWithStreamingResponse",
"AsyncNotesResourceWithStreamingResponse",
"CustomersResource",
"AsyncCustomersResource",
"CustomersResourceWithRawResponse",
"AsyncCustomersResourceWithRawResponse",
"CustomersResourceWithStreamingResponse",
"AsyncCustomersResourceWithStreamingResponse",
]
Loading