Skip to content

Commit 77175a0

Browse files
feat(api): update via SDK Studio
1 parent 679c119 commit 77175a0

File tree

92 files changed

+159
-155
lines changed

Some content is hidden

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

92 files changed

+159
-155
lines changed

.stats.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 33
22
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/zbd%2Fzbd-payments-8a37aac39f339fd14d09cc1bbc1444f4d24d0dfd5f8d28d6a4cf096c1a583c4c.yml
33
openapi_spec_hash: 26af776d03d1f1fbcfd2c76856c1f678
4-
config_hash: a0a5b5f4b47717335da0117d8410168f
4+
config_hash: d2ecaa08414cfa2db88041eb1eb589bc

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ $ pip install -r requirements-dev.lock
3737

3838
Most of the SDK is generated code. Modifications to code will be persisted between generations, but may
3939
result in merge conflicts between manual patches and changes from the generator. The generator will never
40-
modify the contents of the `src/zbd_payments/lib/` and `examples/` directories.
40+
modify the contents of the `src/zbdpay_payments_sdk/lib/` and `examples/` directories.
4141

4242
## Adding and running examples
4343

README.md

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Zbd Payments Python API library
22

3-
[![PyPI version](https://img.shields.io/pypi/v/zbd_payments.svg)](https://pypi.org/project/zbd_payments/)
3+
[![PyPI version](https://img.shields.io/pypi/v/zbdpay_payments_sdk.svg)](https://pypi.org/project/zbdpay_payments_sdk/)
44

55
The Zbd Payments Python library provides convenient access to the Zbd Payments REST API from any Python 3.8+
66
application. The library includes type definitions for all request params and response fields,
@@ -18,15 +18,15 @@ pip install git+ssh://git@github.com/stainless-sdks/zbd-payments-python.git
1818
```
1919

2020
> [!NOTE]
21-
> Once this package is [published to PyPI](https://app.stainless.com/docs/guides/publish), this will become: `pip install --pre zbd_payments`
21+
> Once this package is [published to PyPI](https://app.stainless.com/docs/guides/publish), this will become: `pip install --pre zbdpay_payments_sdk`
2222
2323
## Usage
2424

2525
The full API of this library can be found in [api.md](api.md).
2626

2727
```python
2828
import os
29-
from zbd_payments import ZbdPayments
29+
from zbdpay_payments_sdk import ZbdPayments
3030

3131
client = ZbdPayments(
3232
apikey=os.environ.get("ZBD_PAYMENTS_API_KEY"), # This is the default and can be omitted
@@ -51,7 +51,7 @@ Simply import `AsyncZbdPayments` instead of `ZbdPayments` and use `await` with e
5151
```python
5252
import os
5353
import asyncio
54-
from zbd_payments import AsyncZbdPayments
54+
from zbdpay_payments_sdk import AsyncZbdPayments
5555

5656
client = AsyncZbdPayments(
5757
apikey=os.environ.get("ZBD_PAYMENTS_API_KEY"), # This is the default and can be omitted
@@ -82,16 +82,16 @@ Typed requests and responses provide autocomplete and documentation within your
8282

8383
## Handling errors
8484

85-
When the library is unable to connect to the API (for example, due to network connection problems or a timeout), a subclass of `zbd_payments.APIConnectionError` is raised.
85+
When the library is unable to connect to the API (for example, due to network connection problems or a timeout), a subclass of `zbdpay_payments_sdk.APIConnectionError` is raised.
8686

8787
When the API returns a non-success status code (that is, 4xx or 5xx
88-
response), a subclass of `zbd_payments.APIStatusError` is raised, containing `status_code` and `response` properties.
88+
response), a subclass of `zbdpay_payments_sdk.APIStatusError` is raised, containing `status_code` and `response` properties.
8989

90-
All errors inherit from `zbd_payments.APIError`.
90+
All errors inherit from `zbdpay_payments_sdk.APIError`.
9191

9292
```python
93-
import zbd_payments
94-
from zbd_payments import ZbdPayments
93+
import zbdpay_payments_sdk
94+
from zbdpay_payments_sdk import ZbdPayments
9595

9696
client = ZbdPayments()
9797

@@ -101,12 +101,12 @@ try:
101101
comment="Instant global payments",
102102
ln_address="andreneves@zbd.gg",
103103
)
104-
except zbd_payments.APIConnectionError as e:
104+
except zbdpay_payments_sdk.APIConnectionError as e:
105105
print("The server could not be reached")
106106
print(e.__cause__) # an underlying Exception, likely raised within httpx.
107-
except zbd_payments.RateLimitError as e:
107+
except zbdpay_payments_sdk.RateLimitError as e:
108108
print("A 429 status code was received; we should back off a bit.")
109-
except zbd_payments.APIStatusError as e:
109+
except zbdpay_payments_sdk.APIStatusError as e:
110110
print("Another non-200-range status code was received")
111111
print(e.status_code)
112112
print(e.response)
@@ -134,7 +134,7 @@ Connection errors (for example, due to a network connectivity problem), 408 Requ
134134
You can use the `max_retries` option to configure or disable retry settings:
135135

136136
```python
137-
from zbd_payments import ZbdPayments
137+
from zbdpay_payments_sdk import ZbdPayments
138138

139139
# Configure the default for all requests:
140140
client = ZbdPayments(
@@ -156,7 +156,7 @@ By default requests time out after 1 minute. You can configure this with a `time
156156
which accepts a float or an [`httpx.Timeout`](https://www.python-httpx.org/advanced/#fine-tuning-the-configuration) object:
157157

158158
```python
159-
from zbd_payments import ZbdPayments
159+
from zbdpay_payments_sdk import ZbdPayments
160160

161161
# Configure the default for all requests:
162162
client = ZbdPayments(
@@ -212,7 +212,7 @@ if response.my_field is None:
212212
The "raw" Response object can be accessed by prefixing `.with_raw_response.` to any HTTP method call, e.g.,
213213

214214
```py
215-
from zbd_payments import ZbdPayments
215+
from zbdpay_payments_sdk import ZbdPayments
216216

217217
client = ZbdPayments()
218218
response = client.lightning_address.with_raw_response.send_payment(
@@ -226,9 +226,9 @@ lightning_address = response.parse() # get the object that `lightning_address.s
226226
print(lightning_address)
227227
```
228228

229-
These methods return an [`APIResponse`](https://github.com/stainless-sdks/zbd-payments-python/tree/main/src/zbd_payments/_response.py) object.
229+
These methods return an [`APIResponse`](https://github.com/stainless-sdks/zbd-payments-python/tree/main/src/zbdpay_payments_sdk/_response.py) object.
230230

231-
The async client returns an [`AsyncAPIResponse`](https://github.com/stainless-sdks/zbd-payments-python/tree/main/src/zbd_payments/_response.py) with the same structure, the only difference being `await`able methods for reading the response content.
231+
The async client returns an [`AsyncAPIResponse`](https://github.com/stainless-sdks/zbd-payments-python/tree/main/src/zbdpay_payments_sdk/_response.py) with the same structure, the only difference being `await`able methods for reading the response content.
232232

233233
#### `.with_streaming_response`
234234

@@ -294,7 +294,7 @@ You can directly override the [httpx client](https://www.python-httpx.org/api/#c
294294

295295
```python
296296
import httpx
297-
from zbd_payments import ZbdPayments, DefaultHttpxClient
297+
from zbdpay_payments_sdk import ZbdPayments, DefaultHttpxClient
298298

299299
client = ZbdPayments(
300300
# Or use the `ZBD_PAYMENTS_BASE_URL` env var
@@ -317,7 +317,7 @@ client.with_options(http_client=DefaultHttpxClient(...))
317317
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.
318318

319319
```py
320-
from zbd_payments import ZbdPayments
320+
from zbdpay_payments_sdk import ZbdPayments
321321

322322
with ZbdPayments() as client:
323323
# make requests here
@@ -345,8 +345,8 @@ If you've upgraded to the latest version but aren't seeing any new features you
345345
You can determine the version that is being used at runtime with:
346346

347347
```py
348-
import zbd_payments
349-
print(zbd_payments.__version__)
348+
import zbdpay_payments_sdk
349+
print(zbdpay_payments_sdk.__version__)
350350
```
351351

352352
## Requirements

0 commit comments

Comments
 (0)