Skip to content

Commit 2bb3d1a

Browse files
committed
sideko sdk update
1 parent 49361ce commit 2bb3d1a

492 files changed

Lines changed: 3375 additions & 13501 deletions

File tree

Some content is hidden

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

.sdk.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
"id": "a4a79c93-d8fb-422e-ac5a-e697cf9415d1"
2+
"id": "195d007b-cf77-4a40-bec1-3fcb0f100e6f"
33
}

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "sideko_stripe"
3-
version = "0.1.1"
3+
version = "0.1.2"
44
description = ""
55
readme = "README.md"
66
authors = []

sideko_stripe/client.py

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import httpx
22
import typing
33

4-
from sideko_stripe.core import AsyncBaseClient, AuthBasic, AuthBearer, SyncBaseClient
4+
from sideko_stripe.core import AsyncBaseClient, AuthBearer, SyncBaseClient
55
from sideko_stripe.environment import Environment
66
from sideko_stripe.resources.account import AccountClient, AsyncAccountClient
77
from sideko_stripe.resources.account_link import (
@@ -189,8 +189,6 @@ def __init__(
189189
timeout: typing.Optional[float] = 60,
190190
httpx_client: typing.Optional[httpx.Client] = None,
191191
environment: Environment = Environment.PRODUCTION,
192-
username: typing.Optional[str] = None,
193-
password: typing.Optional[str] = None,
194192
token: typing.Optional[str] = None,
195193
):
196194
"""Initialize root client"""
@@ -200,9 +198,6 @@ def __init__(
200198
if httpx_client is None
201199
else httpx_client,
202200
)
203-
self._base_client.register_auth(
204-
"basicAuth", AuthBasic(username=username, password=password)
205-
)
206201
self._base_client.register_auth("bearerAuth", AuthBearer(val=token))
207202
self.account = AccountClient(base_client=self._base_client)
208203
self.apple_pay = ApplePayClient(base_client=self._base_client)
@@ -305,8 +300,6 @@ def __init__(
305300
timeout: typing.Optional[float] = 60,
306301
httpx_client: typing.Optional[httpx.AsyncClient] = None,
307302
environment: Environment = Environment.PRODUCTION,
308-
username: typing.Optional[str] = None,
309-
password: typing.Optional[str] = None,
310303
token: typing.Optional[str] = None,
311304
):
312305
"""Initialize root client"""
@@ -316,9 +309,6 @@ def __init__(
316309
if httpx_client is None
317310
else httpx_client,
318311
)
319-
self._base_client.register_auth(
320-
"basicAuth", AuthBasic(username=username, password=password)
321-
)
322312
self._base_client.register_auth("bearerAuth", AuthBearer(val=token))
323313
self.account = AsyncAccountClient(base_client=self._base_client)
324314
self.apple_pay = AsyncApplePayClient(base_client=self._base_client)

sideko_stripe/resources/account/README.md

Lines changed: 16 additions & 80 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,7 @@ Delete an account
1818
from os import getenv
1919
from sideko_stripe import Stripe
2020

21-
client = Stripe(
22-
username=getenv("API_USERNAME"),
23-
password=getenv("API_PASSWORD"),
24-
token=getenv("API_TOKEN"),
25-
)
21+
client = Stripe(token=getenv("API_TOKEN"))
2622
res = client.account.delete(account="string")
2723
```
2824

@@ -32,11 +28,7 @@ res = client.account.delete(account="string")
3228
from os import getenv
3329
from sideko_stripe import AsyncStripe
3430

35-
client = AsyncStripe(
36-
username=getenv("API_USERNAME"),
37-
password=getenv("API_PASSWORD"),
38-
token=getenv("API_TOKEN"),
39-
)
31+
client = AsyncStripe(token=getenv("API_TOKEN"))
4032
res = await client.account.delete(account="string")
4133
```
4234

@@ -53,11 +45,7 @@ Retrieve account
5345
from os import getenv
5446
from sideko_stripe import Stripe
5547

56-
client = Stripe(
57-
username=getenv("API_USERNAME"),
58-
password=getenv("API_PASSWORD"),
59-
token=getenv("API_TOKEN"),
60-
)
48+
client = Stripe(token=getenv("API_TOKEN"))
6149
res = client.account.details()
6250
```
6351

@@ -67,11 +55,7 @@ res = client.account.details()
6755
from os import getenv
6856
from sideko_stripe import AsyncStripe
6957

70-
client = AsyncStripe(
71-
username=getenv("API_USERNAME"),
72-
password=getenv("API_PASSWORD"),
73-
token=getenv("API_TOKEN"),
74-
)
58+
client = AsyncStripe(token=getenv("API_TOKEN"))
7559
res = await client.account.details()
7660
```
7761

@@ -88,11 +72,7 @@ List all connected accounts
8872
from os import getenv
8973
from sideko_stripe import Stripe
9074

91-
client = Stripe(
92-
username=getenv("API_USERNAME"),
93-
password=getenv("API_PASSWORD"),
94-
token=getenv("API_TOKEN"),
95-
)
75+
client = Stripe(token=getenv("API_TOKEN"))
9676
res = client.account.list()
9777
```
9878

@@ -102,11 +82,7 @@ res = client.account.list()
10282
from os import getenv
10383
from sideko_stripe import AsyncStripe
10484

105-
client = AsyncStripe(
106-
username=getenv("API_USERNAME"),
107-
password=getenv("API_PASSWORD"),
108-
token=getenv("API_TOKEN"),
109-
)
85+
client = AsyncStripe(token=getenv("API_TOKEN"))
11086
res = await client.account.list()
11187
```
11288

@@ -123,11 +99,7 @@ Retrieve account
12399
from os import getenv
124100
from sideko_stripe import Stripe
125101

126-
client = Stripe(
127-
username=getenv("API_USERNAME"),
128-
password=getenv("API_PASSWORD"),
129-
token=getenv("API_TOKEN"),
130-
)
102+
client = Stripe(token=getenv("API_TOKEN"))
131103
res = client.account.get(account="string")
132104
```
133105

@@ -137,11 +109,7 @@ res = client.account.get(account="string")
137109
from os import getenv
138110
from sideko_stripe import AsyncStripe
139111

140-
client = AsyncStripe(
141-
username=getenv("API_USERNAME"),
142-
password=getenv("API_PASSWORD"),
143-
token=getenv("API_TOKEN"),
144-
)
112+
client = AsyncStripe(token=getenv("API_TOKEN"))
145113
res = await client.account.get(account="string")
146114
```
147115

@@ -163,11 +131,7 @@ You can prefill any information on the account.</p>
163131
from os import getenv
164132
from sideko_stripe import Stripe
165133

166-
client = Stripe(
167-
username=getenv("API_USERNAME"),
168-
password=getenv("API_PASSWORD"),
169-
token=getenv("API_TOKEN"),
170-
)
134+
client = Stripe(token=getenv("API_TOKEN"))
171135
res = client.account.create()
172136
```
173137

@@ -177,11 +141,7 @@ res = client.account.create()
177141
from os import getenv
178142
from sideko_stripe import AsyncStripe
179143

180-
client = AsyncStripe(
181-
username=getenv("API_USERNAME"),
182-
password=getenv("API_PASSWORD"),
183-
token=getenv("API_TOKEN"),
184-
)
144+
client = AsyncStripe(token=getenv("API_TOKEN"))
185145
res = await client.account.create()
186146
```
187147

@@ -210,11 +170,7 @@ after which some properties can no longer be updated.</p>
210170
from os import getenv
211171
from sideko_stripe import Stripe
212172

213-
client = Stripe(
214-
username=getenv("API_USERNAME"),
215-
password=getenv("API_PASSWORD"),
216-
token=getenv("API_TOKEN"),
217-
)
173+
client = Stripe(token=getenv("API_TOKEN"))
218174
res = client.account.update(account="string")
219175
```
220176

@@ -224,11 +180,7 @@ res = client.account.update(account="string")
224180
from os import getenv
225181
from sideko_stripe import AsyncStripe
226182

227-
client = AsyncStripe(
228-
username=getenv("API_USERNAME"),
229-
password=getenv("API_PASSWORD"),
230-
token=getenv("API_TOKEN"),
231-
)
183+
client = AsyncStripe(token=getenv("API_TOKEN"))
232184
res = await client.account.update(account="string")
233185
```
234186

@@ -247,11 +199,7 @@ Create a login link
247199
from os import getenv
248200
from sideko_stripe import Stripe
249201

250-
client = Stripe(
251-
username=getenv("API_USERNAME"),
252-
password=getenv("API_PASSWORD"),
253-
token=getenv("API_TOKEN"),
254-
)
202+
client = Stripe(token=getenv("API_TOKEN"))
255203
res = client.account.create_login_link(account="string")
256204
```
257205

@@ -261,11 +209,7 @@ res = client.account.create_login_link(account="string")
261209
from os import getenv
262210
from sideko_stripe import AsyncStripe
263211

264-
client = AsyncStripe(
265-
username=getenv("API_USERNAME"),
266-
password=getenv("API_PASSWORD"),
267-
token=getenv("API_TOKEN"),
268-
)
212+
client = AsyncStripe(token=getenv("API_TOKEN"))
269213
res = await client.account.create_login_link(account="string")
270214
```
271215

@@ -284,11 +228,7 @@ Reject an account
284228
from os import getenv
285229
from sideko_stripe import Stripe
286230

287-
client = Stripe(
288-
username=getenv("API_USERNAME"),
289-
password=getenv("API_PASSWORD"),
290-
token=getenv("API_TOKEN"),
291-
)
231+
client = Stripe(token=getenv("API_TOKEN"))
292232
res = client.account.reject(account="string", reason="string")
293233
```
294234

@@ -298,10 +238,6 @@ res = client.account.reject(account="string", reason="string")
298238
from os import getenv
299239
from sideko_stripe import AsyncStripe
300240

301-
client = AsyncStripe(
302-
username=getenv("API_USERNAME"),
303-
password=getenv("API_PASSWORD"),
304-
token=getenv("API_TOKEN"),
305-
)
241+
client = AsyncStripe(token=getenv("API_TOKEN"))
306242
res = await client.account.reject(account="string", reason="string")
307243
```

sideko_stripe/resources/account/bank_account/README.md

Lines changed: 8 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,7 @@ Delete an external account
1212
from os import getenv
1313
from sideko_stripe import Stripe
1414

15-
client = Stripe(
16-
username=getenv("API_USERNAME"),
17-
password=getenv("API_PASSWORD"),
18-
token=getenv("API_TOKEN"),
19-
)
15+
client = Stripe(token=getenv("API_TOKEN"))
2016
res = client.account.bank_account.delete(account="string", id="string")
2117
```
2218

@@ -26,11 +22,7 @@ res = client.account.bank_account.delete(account="string", id="string")
2622
from os import getenv
2723
from sideko_stripe import AsyncStripe
2824

29-
client = AsyncStripe(
30-
username=getenv("API_USERNAME"),
31-
password=getenv("API_PASSWORD"),
32-
token=getenv("API_TOKEN"),
33-
)
25+
client = AsyncStripe(token=getenv("API_TOKEN"))
3426
res = await client.account.bank_account.delete(account="string", id="string")
3527
```
3628

@@ -47,11 +39,7 @@ Retrieve an external account
4739
from os import getenv
4840
from sideko_stripe import Stripe
4941

50-
client = Stripe(
51-
username=getenv("API_USERNAME"),
52-
password=getenv("API_PASSWORD"),
53-
token=getenv("API_TOKEN"),
54-
)
42+
client = Stripe(token=getenv("API_TOKEN"))
5543
res = client.account.bank_account.get(account="string", id="string")
5644
```
5745

@@ -61,11 +49,7 @@ res = client.account.bank_account.get(account="string", id="string")
6149
from os import getenv
6250
from sideko_stripe import AsyncStripe
6351

64-
client = AsyncStripe(
65-
username=getenv("API_USERNAME"),
66-
password=getenv("API_PASSWORD"),
67-
token=getenv("API_TOKEN"),
68-
)
52+
client = AsyncStripe(token=getenv("API_TOKEN"))
6953
res = await client.account.bank_account.get(account="string", id="string")
7054
```
7155

@@ -82,11 +66,7 @@ Create an external account
8266
from os import getenv
8367
from sideko_stripe import Stripe
8468

85-
client = Stripe(
86-
username=getenv("API_USERNAME"),
87-
password=getenv("API_PASSWORD"),
88-
token=getenv("API_TOKEN"),
89-
)
69+
client = Stripe(token=getenv("API_TOKEN"))
9070
res = client.account.bank_account.create(account="string")
9171
```
9272

@@ -96,11 +76,7 @@ res = client.account.bank_account.create(account="string")
9676
from os import getenv
9777
from sideko_stripe import AsyncStripe
9878

99-
client = AsyncStripe(
100-
username=getenv("API_USERNAME"),
101-
password=getenv("API_PASSWORD"),
102-
token=getenv("API_TOKEN"),
103-
)
79+
client = AsyncStripe(token=getenv("API_TOKEN"))
10480
res = await client.account.bank_account.create(account="string")
10581
```
10682

@@ -124,11 +100,7 @@ arguments or changes.</p>
124100
from os import getenv
125101
from sideko_stripe import Stripe
126102

127-
client = Stripe(
128-
username=getenv("API_USERNAME"),
129-
password=getenv("API_PASSWORD"),
130-
token=getenv("API_TOKEN"),
131-
)
103+
client = Stripe(token=getenv("API_TOKEN"))
132104
res = client.account.bank_account.update(account="string", id="string")
133105
```
134106

@@ -138,10 +110,6 @@ res = client.account.bank_account.update(account="string", id="string")
138110
from os import getenv
139111
from sideko_stripe import AsyncStripe
140112

141-
client = AsyncStripe(
142-
username=getenv("API_USERNAME"),
143-
password=getenv("API_PASSWORD"),
144-
token=getenv("API_TOKEN"),
145-
)
113+
client = AsyncStripe(token=getenv("API_TOKEN"))
146114
res = await client.account.bank_account.update(account="string", id="string")
147115
```

0 commit comments

Comments
 (0)