Skip to content

[Do not merge] Updated stripeclient snippets in Readme.md #1528

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,13 +51,13 @@ from stripe import StripeClient
client = StripeClient("sk_test_...")

# list customers
customers = client.customers.list()
customers = client.v1.customers.list()

# print the first customer's email
print(customers.data[0].email)

# retrieve specific Customer
customer = client.customers.retrieve("cus_123456789")
customer = client.v1.customers.retrieve("cus_123456789")

# print that customer's email
print(customer.email)
Expand Down Expand Up @@ -89,7 +89,7 @@ from stripe import StripeClient
client = StripeClient("sk_test_...")

# list customers
client.customers.list(
client.v1.customers.list(
options={
"api_key": "sk_test_...",
"stripe_account": "acct_...",
Expand All @@ -98,7 +98,7 @@ client.customers.list(
)

# retrieve single customer
client.customers.retrieve(
client.v1.customers.retrieve(
"cus_123456789",
options={
"api_key": "sk_test_...",
Expand Down Expand Up @@ -181,7 +181,7 @@ There are a few options for enabling it:
You can access the HTTP response code and headers using the `last_response` property of the returned resource.

```python
customer = client.customers.retrieve(
customer = client.v1.customers.retrieve(
"cus_123456789"
)

Expand Down Expand Up @@ -288,7 +288,7 @@ with `_async`.
```python
# With StripeClient
client = StripeClient("sk_test_...")
customer = await client.customers.retrieve_async("cus_xyz")
customer = await client.v1.customers.retrieve_async("cus_xyz")

# With global client
stripe.api_key = "sk_test_..."
Expand Down
Loading