universal-mcp-applications 0.1.30__py3-none-any.whl → 0.1.36rc1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of universal-mcp-applications might be problematic. Click here for more details.
- universal_mcp/applications/ahrefs/app.py +52 -198
- universal_mcp/applications/airtable/app.py +23 -122
- universal_mcp/applications/apollo/app.py +111 -464
- universal_mcp/applications/asana/app.py +417 -1567
- universal_mcp/applications/aws_s3/app.py +33 -100
- universal_mcp/applications/bill/app.py +546 -1957
- universal_mcp/applications/box/app.py +1068 -3981
- universal_mcp/applications/braze/app.py +364 -1430
- universal_mcp/applications/browser_use/app.py +2 -8
- universal_mcp/applications/cal_com_v2/app.py +207 -625
- universal_mcp/applications/calendly/app.py +61 -200
- universal_mcp/applications/canva/app.py +45 -110
- universal_mcp/applications/clickup/app.py +207 -674
- universal_mcp/applications/coda/app.py +146 -426
- universal_mcp/applications/confluence/app.py +310 -1098
- universal_mcp/applications/contentful/app.py +36 -151
- universal_mcp/applications/crustdata/app.py +28 -107
- universal_mcp/applications/dialpad/app.py +283 -756
- universal_mcp/applications/digitalocean/app.py +1766 -5777
- universal_mcp/applications/domain_checker/app.py +3 -54
- universal_mcp/applications/e2b/app.py +14 -64
- universal_mcp/applications/elevenlabs/app.py +9 -47
- universal_mcp/applications/exa/app.py +6 -17
- universal_mcp/applications/falai/app.py +23 -100
- universal_mcp/applications/figma/app.py +53 -137
- universal_mcp/applications/file_system/app.py +2 -13
- universal_mcp/applications/firecrawl/app.py +51 -152
- universal_mcp/applications/fireflies/app.py +59 -281
- universal_mcp/applications/fpl/app.py +91 -528
- universal_mcp/applications/fpl/utils/fixtures.py +15 -49
- universal_mcp/applications/fpl/utils/helper.py +25 -89
- universal_mcp/applications/fpl/utils/league_utils.py +20 -64
- universal_mcp/applications/ghost_content/app.py +52 -161
- universal_mcp/applications/github/app.py +19 -56
- universal_mcp/applications/gong/app.py +88 -248
- universal_mcp/applications/google_calendar/app.py +16 -68
- universal_mcp/applications/google_docs/app.py +88 -188
- universal_mcp/applications/google_drive/app.py +140 -462
- universal_mcp/applications/google_gemini/app.py +12 -64
- universal_mcp/applications/google_mail/app.py +28 -157
- universal_mcp/applications/google_searchconsole/app.py +15 -48
- universal_mcp/applications/google_sheet/app.py +101 -578
- universal_mcp/applications/google_sheet/helper.py +10 -37
- universal_mcp/applications/hashnode/app.py +57 -269
- universal_mcp/applications/heygen/app.py +44 -122
- universal_mcp/applications/http_tools/app.py +10 -32
- universal_mcp/applications/hubspot/api_segments/crm_api.py +460 -1573
- universal_mcp/applications/hubspot/api_segments/marketing_api.py +74 -262
- universal_mcp/applications/hubspot/app.py +23 -87
- universal_mcp/applications/jira/app.py +2071 -7986
- universal_mcp/applications/klaviyo/app.py +494 -1376
- universal_mcp/applications/linkedin/README.md +9 -2
- universal_mcp/applications/linkedin/app.py +392 -212
- universal_mcp/applications/mailchimp/app.py +450 -1605
- universal_mcp/applications/markitdown/app.py +8 -20
- universal_mcp/applications/miro/app.py +217 -699
- universal_mcp/applications/ms_teams/app.py +64 -186
- universal_mcp/applications/neon/app.py +86 -192
- universal_mcp/applications/notion/app.py +21 -36
- universal_mcp/applications/onedrive/app.py +14 -36
- universal_mcp/applications/openai/app.py +42 -165
- universal_mcp/applications/outlook/app.py +16 -76
- universal_mcp/applications/perplexity/app.py +4 -19
- universal_mcp/applications/pipedrive/app.py +832 -3142
- universal_mcp/applications/posthog/app.py +163 -432
- universal_mcp/applications/reddit/app.py +40 -139
- universal_mcp/applications/resend/app.py +41 -107
- universal_mcp/applications/retell/app.py +14 -41
- universal_mcp/applications/rocketlane/app.py +221 -934
- universal_mcp/applications/scraper/README.md +7 -4
- universal_mcp/applications/scraper/app.py +216 -102
- universal_mcp/applications/semanticscholar/app.py +22 -64
- universal_mcp/applications/semrush/app.py +43 -77
- universal_mcp/applications/sendgrid/app.py +512 -1262
- universal_mcp/applications/sentry/app.py +271 -906
- universal_mcp/applications/serpapi/app.py +40 -143
- universal_mcp/applications/sharepoint/app.py +15 -37
- universal_mcp/applications/shopify/app.py +1551 -4287
- universal_mcp/applications/shortcut/app.py +155 -417
- universal_mcp/applications/slack/app.py +50 -101
- universal_mcp/applications/spotify/app.py +126 -325
- universal_mcp/applications/supabase/app.py +104 -213
- universal_mcp/applications/tavily/app.py +1 -1
- universal_mcp/applications/trello/app.py +693 -2656
- universal_mcp/applications/twilio/app.py +14 -50
- universal_mcp/applications/twitter/api_segments/compliance_api.py +4 -14
- universal_mcp/applications/twitter/api_segments/dm_conversations_api.py +6 -18
- universal_mcp/applications/twitter/api_segments/likes_api.py +1 -3
- universal_mcp/applications/twitter/api_segments/lists_api.py +5 -15
- universal_mcp/applications/twitter/api_segments/trends_api.py +1 -3
- universal_mcp/applications/twitter/api_segments/tweets_api.py +9 -31
- universal_mcp/applications/twitter/api_segments/usage_api.py +1 -5
- universal_mcp/applications/twitter/api_segments/users_api.py +14 -42
- universal_mcp/applications/whatsapp/app.py +35 -186
- universal_mcp/applications/whatsapp/audio.py +2 -6
- universal_mcp/applications/whatsapp/whatsapp.py +17 -51
- universal_mcp/applications/whatsapp_business/app.py +70 -283
- universal_mcp/applications/wrike/app.py +45 -118
- universal_mcp/applications/yahoo_finance/app.py +19 -65
- universal_mcp/applications/youtube/app.py +75 -261
- universal_mcp/applications/zenquotes/app.py +2 -2
- {universal_mcp_applications-0.1.30.dist-info → universal_mcp_applications-0.1.36rc1.dist-info}/METADATA +2 -2
- {universal_mcp_applications-0.1.30.dist-info → universal_mcp_applications-0.1.36rc1.dist-info}/RECORD +105 -105
- {universal_mcp_applications-0.1.30.dist-info → universal_mcp_applications-0.1.36rc1.dist-info}/WHEEL +0 -0
- {universal_mcp_applications-0.1.30.dist-info → universal_mcp_applications-0.1.36rc1.dist-info}/licenses/LICENSE +0 -0
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
from typing import Any
|
|
2
|
-
|
|
3
2
|
from universal_mcp.applications.application import APIApplication
|
|
4
3
|
from universal_mcp.integrations import Integration
|
|
5
4
|
|
|
@@ -9,9 +8,7 @@ class BillApp(APIApplication):
|
|
|
9
8
|
super().__init__(name="bill", integration=integration, **kwargs)
|
|
10
9
|
self.base_url = "https://gateway.stage.bill.com/connect"
|
|
11
10
|
|
|
12
|
-
def list_customer_attachments(
|
|
13
|
-
self, customerId: str, max: int | None = None, page: str | None = None
|
|
14
|
-
) -> dict[str, Any]:
|
|
11
|
+
async def list_customer_attachments(self, customerId: str, max: int | None = None, page: str | None = None) -> dict[str, Any]:
|
|
15
12
|
"""
|
|
16
13
|
Get list of customer attachments
|
|
17
14
|
|
|
@@ -32,15 +29,11 @@ class BillApp(APIApplication):
|
|
|
32
29
|
if customerId is None:
|
|
33
30
|
raise ValueError("Missing required parameter 'customerId'.")
|
|
34
31
|
url = f"{self.base_url}/v3/attachments/customers/{customerId}"
|
|
35
|
-
query_params = {
|
|
36
|
-
k: v for k, v in [("max", max), ("page", page)] if v is not None
|
|
37
|
-
}
|
|
32
|
+
query_params = {k: v for k, v in [("max", max), ("page", page)] if v is not None}
|
|
38
33
|
response = self._get(url, params=query_params)
|
|
39
34
|
return self._handle_response(response)
|
|
40
35
|
|
|
41
|
-
def create_customer_attachment(
|
|
42
|
-
self, customerId: str, name: str, items: list[bytes]
|
|
43
|
-
) -> dict[str, Any]:
|
|
36
|
+
async def create_customer_attachment(self, customerId: str, name: str, items: list[bytes]) -> dict[str, Any]:
|
|
44
37
|
"""
|
|
45
38
|
Upload customer attachment
|
|
46
39
|
|
|
@@ -60,21 +53,13 @@ class BillApp(APIApplication):
|
|
|
60
53
|
if customerId is None:
|
|
61
54
|
raise ValueError("Missing required parameter 'customerId'.")
|
|
62
55
|
request_body_data = None
|
|
63
|
-
# Using array parameter 'items' directly as request body
|
|
64
56
|
request_body_data = items
|
|
65
57
|
url = f"{self.base_url}/v3/attachments/customers/{customerId}"
|
|
66
58
|
query_params = {k: v for k, v in [("name", name)] if v is not None}
|
|
67
|
-
response = self._post(
|
|
68
|
-
url,
|
|
69
|
-
data=request_body_data,
|
|
70
|
-
params=query_params,
|
|
71
|
-
content_type="application/octet-stream",
|
|
72
|
-
)
|
|
59
|
+
response = self._post(url, data=request_body_data, params=query_params, content_type="application/octet-stream")
|
|
73
60
|
return self._handle_response(response)
|
|
74
61
|
|
|
75
|
-
def list_invoice_attachments(
|
|
76
|
-
self, invoiceId: str, max: int | None = None, page: str | None = None
|
|
77
|
-
) -> dict[str, Any]:
|
|
62
|
+
async def list_invoice_attachments(self, invoiceId: str, max: int | None = None, page: str | None = None) -> dict[str, Any]:
|
|
78
63
|
"""
|
|
79
64
|
Get list of invoice attachments
|
|
80
65
|
|
|
@@ -95,15 +80,11 @@ class BillApp(APIApplication):
|
|
|
95
80
|
if invoiceId is None:
|
|
96
81
|
raise ValueError("Missing required parameter 'invoiceId'.")
|
|
97
82
|
url = f"{self.base_url}/v3/attachments/invoices/{invoiceId}"
|
|
98
|
-
query_params = {
|
|
99
|
-
k: v for k, v in [("max", max), ("page", page)] if v is not None
|
|
100
|
-
}
|
|
83
|
+
query_params = {k: v for k, v in [("max", max), ("page", page)] if v is not None}
|
|
101
84
|
response = self._get(url, params=query_params)
|
|
102
85
|
return self._handle_response(response)
|
|
103
86
|
|
|
104
|
-
def create_invoice_attachment(
|
|
105
|
-
self, invoiceId: str, name: str, items: list[bytes]
|
|
106
|
-
) -> dict[str, Any]:
|
|
87
|
+
async def create_invoice_attachment(self, invoiceId: str, name: str, items: list[bytes]) -> dict[str, Any]:
|
|
107
88
|
"""
|
|
108
89
|
Upload invoice attachment
|
|
109
90
|
|
|
@@ -123,21 +104,13 @@ class BillApp(APIApplication):
|
|
|
123
104
|
if invoiceId is None:
|
|
124
105
|
raise ValueError("Missing required parameter 'invoiceId'.")
|
|
125
106
|
request_body_data = None
|
|
126
|
-
# Using array parameter 'items' directly as request body
|
|
127
107
|
request_body_data = items
|
|
128
108
|
url = f"{self.base_url}/v3/attachments/invoices/{invoiceId}"
|
|
129
109
|
query_params = {k: v for k, v in [("name", name)] if v is not None}
|
|
130
|
-
response = self._post(
|
|
131
|
-
url,
|
|
132
|
-
data=request_body_data,
|
|
133
|
-
params=query_params,
|
|
134
|
-
content_type="application/octet-stream",
|
|
135
|
-
)
|
|
110
|
+
response = self._post(url, data=request_body_data, params=query_params, content_type="application/octet-stream")
|
|
136
111
|
return self._handle_response(response)
|
|
137
112
|
|
|
138
|
-
def list_vendor_attachments(
|
|
139
|
-
self, vendorId: str, max: int | None = None, page: str | None = None
|
|
140
|
-
) -> dict[str, Any]:
|
|
113
|
+
async def list_vendor_attachments(self, vendorId: str, max: int | None = None, page: str | None = None) -> dict[str, Any]:
|
|
141
114
|
"""
|
|
142
115
|
Get list of vendor attachments
|
|
143
116
|
|
|
@@ -158,15 +131,11 @@ class BillApp(APIApplication):
|
|
|
158
131
|
if vendorId is None:
|
|
159
132
|
raise ValueError("Missing required parameter 'vendorId'.")
|
|
160
133
|
url = f"{self.base_url}/v3/attachments/vendors/{vendorId}"
|
|
161
|
-
query_params = {
|
|
162
|
-
k: v for k, v in [("max", max), ("page", page)] if v is not None
|
|
163
|
-
}
|
|
134
|
+
query_params = {k: v for k, v in [("max", max), ("page", page)] if v is not None}
|
|
164
135
|
response = self._get(url, params=query_params)
|
|
165
136
|
return self._handle_response(response)
|
|
166
137
|
|
|
167
|
-
def create_vendor_attachment(
|
|
168
|
-
self, vendorId: str, name: str, items: list[bytes]
|
|
169
|
-
) -> dict[str, Any]:
|
|
138
|
+
async def create_vendor_attachment(self, vendorId: str, name: str, items: list[bytes]) -> dict[str, Any]:
|
|
170
139
|
"""
|
|
171
140
|
Upload vendor attachment
|
|
172
141
|
|
|
@@ -186,19 +155,13 @@ class BillApp(APIApplication):
|
|
|
186
155
|
if vendorId is None:
|
|
187
156
|
raise ValueError("Missing required parameter 'vendorId'.")
|
|
188
157
|
request_body_data = None
|
|
189
|
-
# Using array parameter 'items' directly as request body
|
|
190
158
|
request_body_data = items
|
|
191
159
|
url = f"{self.base_url}/v3/attachments/vendors/{vendorId}"
|
|
192
160
|
query_params = {k: v for k, v in [("name", name)] if v is not None}
|
|
193
|
-
response = self._post(
|
|
194
|
-
url,
|
|
195
|
-
data=request_body_data,
|
|
196
|
-
params=query_params,
|
|
197
|
-
content_type="application/octet-stream",
|
|
198
|
-
)
|
|
161
|
+
response = self._post(url, data=request_body_data, params=query_params, content_type="application/octet-stream")
|
|
199
162
|
return self._handle_response(response)
|
|
200
163
|
|
|
201
|
-
def get_attachment(self, attachmentId: str) -> dict[str, Any]:
|
|
164
|
+
async def get_attachment(self, attachmentId: str) -> dict[str, Any]:
|
|
202
165
|
"""
|
|
203
166
|
Get attachment details
|
|
204
167
|
|
|
@@ -221,12 +184,8 @@ class BillApp(APIApplication):
|
|
|
221
184
|
response = self._get(url, params=query_params)
|
|
222
185
|
return self._handle_response(response)
|
|
223
186
|
|
|
224
|
-
def list_bills(
|
|
225
|
-
self,
|
|
226
|
-
max: int | None = None,
|
|
227
|
-
sort: str | None = None,
|
|
228
|
-
filters: str | None = None,
|
|
229
|
-
page: str | None = None,
|
|
187
|
+
async def list_bills(
|
|
188
|
+
self, max: int | None = None, sort: str | None = None, filters: str | None = None, page: str | None = None
|
|
230
189
|
) -> dict[str, Any]:
|
|
231
190
|
"""
|
|
232
191
|
Get list of bills
|
|
@@ -247,20 +206,11 @@ class BillApp(APIApplication):
|
|
|
247
206
|
bills, , important
|
|
248
207
|
"""
|
|
249
208
|
url = f"{self.base_url}/v3/bills"
|
|
250
|
-
query_params = {
|
|
251
|
-
k: v
|
|
252
|
-
for k, v in [
|
|
253
|
-
("max", max),
|
|
254
|
-
("sort", sort),
|
|
255
|
-
("filters", filters),
|
|
256
|
-
("page", page),
|
|
257
|
-
]
|
|
258
|
-
if v is not None
|
|
259
|
-
}
|
|
209
|
+
query_params = {k: v for k, v in [("max", max), ("sort", sort), ("filters", filters), ("page", page)] if v is not None}
|
|
260
210
|
response = self._get(url, params=query_params)
|
|
261
211
|
return self._handle_response(response)
|
|
262
212
|
|
|
263
|
-
def create_bill(
|
|
213
|
+
async def create_bill(
|
|
264
214
|
self,
|
|
265
215
|
vendorId: str,
|
|
266
216
|
dueDate: str,
|
|
@@ -301,20 +251,13 @@ class BillApp(APIApplication):
|
|
|
301
251
|
"payFromChartOfAccountId": payFromChartOfAccountId,
|
|
302
252
|
"classifications": classifications,
|
|
303
253
|
}
|
|
304
|
-
request_body_data = {
|
|
305
|
-
k: v for k, v in request_body_data.items() if v is not None
|
|
306
|
-
}
|
|
254
|
+
request_body_data = {k: v for k, v in request_body_data.items() if v is not None}
|
|
307
255
|
url = f"{self.base_url}/v3/bills"
|
|
308
256
|
query_params = {}
|
|
309
|
-
response = self._post(
|
|
310
|
-
url,
|
|
311
|
-
data=request_body_data,
|
|
312
|
-
params=query_params,
|
|
313
|
-
content_type="application/json",
|
|
314
|
-
)
|
|
257
|
+
response = self._post(url, data=request_body_data, params=query_params, content_type="application/json")
|
|
315
258
|
return self._handle_response(response)
|
|
316
259
|
|
|
317
|
-
def create_bulk_bills(self, items: list[dict[str, Any]]) -> list[Any]:
|
|
260
|
+
async def create_bulk_bills(self, items: list[dict[str, Any]]) -> list[Any]:
|
|
318
261
|
"""
|
|
319
262
|
Create multiple bills
|
|
320
263
|
|
|
@@ -330,19 +273,13 @@ class BillApp(APIApplication):
|
|
|
330
273
|
bills
|
|
331
274
|
"""
|
|
332
275
|
request_body_data = None
|
|
333
|
-
# Using array parameter 'items' directly as request body
|
|
334
276
|
request_body_data = items
|
|
335
277
|
url = f"{self.base_url}/v3/bills/bulk"
|
|
336
278
|
query_params = {}
|
|
337
|
-
response = self._post(
|
|
338
|
-
url,
|
|
339
|
-
data=request_body_data,
|
|
340
|
-
params=query_params,
|
|
341
|
-
content_type="application/json",
|
|
342
|
-
)
|
|
279
|
+
response = self._post(url, data=request_body_data, params=query_params, content_type="application/json")
|
|
343
280
|
return self._handle_response(response)
|
|
344
281
|
|
|
345
|
-
def get_bill(self, billId: str) -> dict[str, Any]:
|
|
282
|
+
async def get_bill(self, billId: str) -> dict[str, Any]:
|
|
346
283
|
"""
|
|
347
284
|
Get bill details
|
|
348
285
|
|
|
@@ -365,7 +302,7 @@ class BillApp(APIApplication):
|
|
|
365
302
|
response = self._get(url, params=query_params)
|
|
366
303
|
return self._handle_response(response)
|
|
367
304
|
|
|
368
|
-
def replace_bill(
|
|
305
|
+
async def replace_bill(
|
|
369
306
|
self,
|
|
370
307
|
billId: str,
|
|
371
308
|
vendorId: str,
|
|
@@ -410,20 +347,13 @@ class BillApp(APIApplication):
|
|
|
410
347
|
"payFromChartOfAccountId": payFromChartOfAccountId,
|
|
411
348
|
"classifications": classifications,
|
|
412
349
|
}
|
|
413
|
-
request_body_data = {
|
|
414
|
-
k: v for k, v in request_body_data.items() if v is not None
|
|
415
|
-
}
|
|
350
|
+
request_body_data = {k: v for k, v in request_body_data.items() if v is not None}
|
|
416
351
|
url = f"{self.base_url}/v3/bills/{billId}"
|
|
417
352
|
query_params = {}
|
|
418
|
-
response = self._put(
|
|
419
|
-
url,
|
|
420
|
-
data=request_body_data,
|
|
421
|
-
params=query_params,
|
|
422
|
-
content_type="application/json",
|
|
423
|
-
)
|
|
353
|
+
response = self._put(url, data=request_body_data, params=query_params, content_type="application/json")
|
|
424
354
|
return self._handle_response(response)
|
|
425
355
|
|
|
426
|
-
def update_bill(
|
|
356
|
+
async def update_bill(
|
|
427
357
|
self,
|
|
428
358
|
billId: str,
|
|
429
359
|
vendorId: str | None = None,
|
|
@@ -468,15 +398,13 @@ class BillApp(APIApplication):
|
|
|
468
398
|
"payFromChartOfAccountId": payFromChartOfAccountId,
|
|
469
399
|
"classifications": classifications,
|
|
470
400
|
}
|
|
471
|
-
request_body_data = {
|
|
472
|
-
k: v for k, v in request_body_data.items() if v is not None
|
|
473
|
-
}
|
|
401
|
+
request_body_data = {k: v for k, v in request_body_data.items() if v is not None}
|
|
474
402
|
url = f"{self.base_url}/v3/bills/{billId}"
|
|
475
403
|
query_params = {}
|
|
476
404
|
response = self._patch(url, data=request_body_data, params=query_params)
|
|
477
405
|
return self._handle_response(response)
|
|
478
406
|
|
|
479
|
-
def archive_bill(self, billId: str) -> dict[str, Any]:
|
|
407
|
+
async def archive_bill(self, billId: str) -> dict[str, Any]:
|
|
480
408
|
"""
|
|
481
409
|
Archive a bill
|
|
482
410
|
|
|
@@ -497,15 +425,10 @@ class BillApp(APIApplication):
|
|
|
497
425
|
request_body_data = None
|
|
498
426
|
url = f"{self.base_url}/v3/bills/{billId}/archive"
|
|
499
427
|
query_params = {}
|
|
500
|
-
response = self._post(
|
|
501
|
-
url,
|
|
502
|
-
data=request_body_data,
|
|
503
|
-
params=query_params,
|
|
504
|
-
content_type="application/json",
|
|
505
|
-
)
|
|
428
|
+
response = self._post(url, data=request_body_data, params=query_params, content_type="application/json")
|
|
506
429
|
return self._handle_response(response)
|
|
507
430
|
|
|
508
|
-
def restore_bill(self, billId: str) -> dict[str, Any]:
|
|
431
|
+
async def restore_bill(self, billId: str) -> dict[str, Any]:
|
|
509
432
|
"""
|
|
510
433
|
Restore an archived bill
|
|
511
434
|
|
|
@@ -526,20 +449,11 @@ class BillApp(APIApplication):
|
|
|
526
449
|
request_body_data = None
|
|
527
450
|
url = f"{self.base_url}/v3/bills/{billId}/restore"
|
|
528
451
|
query_params = {}
|
|
529
|
-
response = self._post(
|
|
530
|
-
url,
|
|
531
|
-
data=request_body_data,
|
|
532
|
-
params=query_params,
|
|
533
|
-
content_type="application/json",
|
|
534
|
-
)
|
|
452
|
+
response = self._post(url, data=request_body_data, params=query_params, content_type="application/json")
|
|
535
453
|
return self._handle_response(response)
|
|
536
454
|
|
|
537
|
-
def list_classification_accounting_classes(
|
|
538
|
-
self,
|
|
539
|
-
max: int | None = None,
|
|
540
|
-
sort: str | None = None,
|
|
541
|
-
filters: str | None = None,
|
|
542
|
-
page: str | None = None,
|
|
455
|
+
async def list_classification_accounting_classes(
|
|
456
|
+
self, max: int | None = None, sort: str | None = None, filters: str | None = None, page: str | None = None
|
|
543
457
|
) -> dict[str, Any]:
|
|
544
458
|
"""
|
|
545
459
|
Get list of accounting classes
|
|
@@ -560,25 +474,12 @@ class BillApp(APIApplication):
|
|
|
560
474
|
classifications
|
|
561
475
|
"""
|
|
562
476
|
url = f"{self.base_url}/v3/classifications/accounting-classes"
|
|
563
|
-
query_params = {
|
|
564
|
-
k: v
|
|
565
|
-
for k, v in [
|
|
566
|
-
("max", max),
|
|
567
|
-
("sort", sort),
|
|
568
|
-
("filters", filters),
|
|
569
|
-
("page", page),
|
|
570
|
-
]
|
|
571
|
-
if v is not None
|
|
572
|
-
}
|
|
477
|
+
query_params = {k: v for k, v in [("max", max), ("sort", sort), ("filters", filters), ("page", page)] if v is not None}
|
|
573
478
|
response = self._get(url, params=query_params)
|
|
574
479
|
return self._handle_response(response)
|
|
575
480
|
|
|
576
|
-
def create_classification_accounting_class(
|
|
577
|
-
self,
|
|
578
|
-
name: str | None = None,
|
|
579
|
-
shortName: str | None = None,
|
|
580
|
-
description: str | None = None,
|
|
581
|
-
parentId: str | None = None,
|
|
481
|
+
async def create_classification_accounting_class(
|
|
482
|
+
self, name: str | None = None, shortName: str | None = None, description: str | None = None, parentId: str | None = None
|
|
582
483
|
) -> dict[str, Any]:
|
|
583
484
|
"""
|
|
584
485
|
Create an accounting class
|
|
@@ -599,28 +500,14 @@ class BillApp(APIApplication):
|
|
|
599
500
|
classifications
|
|
600
501
|
"""
|
|
601
502
|
request_body_data = None
|
|
602
|
-
request_body_data = {
|
|
603
|
-
|
|
604
|
-
"shortName": shortName,
|
|
605
|
-
"description": description,
|
|
606
|
-
"parentId": parentId,
|
|
607
|
-
}
|
|
608
|
-
request_body_data = {
|
|
609
|
-
k: v for k, v in request_body_data.items() if v is not None
|
|
610
|
-
}
|
|
503
|
+
request_body_data = {"name": name, "shortName": shortName, "description": description, "parentId": parentId}
|
|
504
|
+
request_body_data = {k: v for k, v in request_body_data.items() if v is not None}
|
|
611
505
|
url = f"{self.base_url}/v3/classifications/accounting-classes"
|
|
612
506
|
query_params = {}
|
|
613
|
-
response = self._post(
|
|
614
|
-
url,
|
|
615
|
-
data=request_body_data,
|
|
616
|
-
params=query_params,
|
|
617
|
-
content_type="application/json",
|
|
618
|
-
)
|
|
507
|
+
response = self._post(url, data=request_body_data, params=query_params, content_type="application/json")
|
|
619
508
|
return self._handle_response(response)
|
|
620
509
|
|
|
621
|
-
def bulk_create_classification_accounting_class(
|
|
622
|
-
self, items: list[dict[str, Any]]
|
|
623
|
-
) -> dict[str, Any]:
|
|
510
|
+
async def bulk_create_classification_accounting_class(self, items: list[dict[str, Any]]) -> dict[str, Any]:
|
|
624
511
|
"""
|
|
625
512
|
Create multiple accounting classes
|
|
626
513
|
|
|
@@ -636,21 +523,13 @@ class BillApp(APIApplication):
|
|
|
636
523
|
classifications
|
|
637
524
|
"""
|
|
638
525
|
request_body_data = None
|
|
639
|
-
# Using array parameter 'items' directly as request body
|
|
640
526
|
request_body_data = items
|
|
641
527
|
url = f"{self.base_url}/v3/classifications/accounting-classes/bulk"
|
|
642
528
|
query_params = {}
|
|
643
|
-
response = self._post(
|
|
644
|
-
url,
|
|
645
|
-
data=request_body_data,
|
|
646
|
-
params=query_params,
|
|
647
|
-
content_type="application/json",
|
|
648
|
-
)
|
|
529
|
+
response = self._post(url, data=request_body_data, params=query_params, content_type="application/json")
|
|
649
530
|
return self._handle_response(response)
|
|
650
531
|
|
|
651
|
-
def bulk_update_classification_accounting_class(
|
|
652
|
-
self, items: list[dict[str, Any]]
|
|
653
|
-
) -> dict[str, Any]:
|
|
532
|
+
async def bulk_update_classification_accounting_class(self, items: list[dict[str, Any]]) -> dict[str, Any]:
|
|
654
533
|
"""
|
|
655
534
|
Update multiple accounting classes
|
|
656
535
|
|
|
@@ -666,14 +545,13 @@ class BillApp(APIApplication):
|
|
|
666
545
|
classifications
|
|
667
546
|
"""
|
|
668
547
|
request_body_data = None
|
|
669
|
-
# Using array parameter 'items' directly as request body
|
|
670
548
|
request_body_data = items
|
|
671
549
|
url = f"{self.base_url}/v3/classifications/accounting-classes/bulk"
|
|
672
550
|
query_params = {}
|
|
673
551
|
response = self._patch(url, data=request_body_data, params=query_params)
|
|
674
552
|
return self._handle_response(response)
|
|
675
553
|
|
|
676
|
-
def bulk_archive_classification_accounting_class(self, ids: str) -> dict[str, Any]:
|
|
554
|
+
async def bulk_archive_classification_accounting_class(self, ids: str) -> dict[str, Any]:
|
|
677
555
|
"""
|
|
678
556
|
Archive multiple accounting classes
|
|
679
557
|
|
|
@@ -692,15 +570,10 @@ class BillApp(APIApplication):
|
|
|
692
570
|
request_body_data = None
|
|
693
571
|
url = f"{self.base_url}/v3/classifications/accounting-classes/bulk/archive"
|
|
694
572
|
query_params = {k: v for k, v in [("ids", ids)] if v is not None}
|
|
695
|
-
response = self._post(
|
|
696
|
-
url,
|
|
697
|
-
data=request_body_data,
|
|
698
|
-
params=query_params,
|
|
699
|
-
content_type="application/json",
|
|
700
|
-
)
|
|
573
|
+
response = self._post(url, data=request_body_data, params=query_params, content_type="application/json")
|
|
701
574
|
return self._handle_response(response)
|
|
702
575
|
|
|
703
|
-
def bulk_restore_classification_accounting_class(self, ids: str) -> dict[str, Any]:
|
|
576
|
+
async def bulk_restore_classification_accounting_class(self, ids: str) -> dict[str, Any]:
|
|
704
577
|
"""
|
|
705
578
|
Restore multiple accounting classes
|
|
706
579
|
|
|
@@ -719,15 +592,10 @@ class BillApp(APIApplication):
|
|
|
719
592
|
request_body_data = None
|
|
720
593
|
url = f"{self.base_url}/v3/classifications/accounting-classes/bulk/restore"
|
|
721
594
|
query_params = {k: v for k, v in [("ids", ids)] if v is not None}
|
|
722
|
-
response = self._post(
|
|
723
|
-
url,
|
|
724
|
-
data=request_body_data,
|
|
725
|
-
params=query_params,
|
|
726
|
-
content_type="application/json",
|
|
727
|
-
)
|
|
595
|
+
response = self._post(url, data=request_body_data, params=query_params, content_type="application/json")
|
|
728
596
|
return self._handle_response(response)
|
|
729
597
|
|
|
730
|
-
def get_classification_accounting_class(self, id: str) -> dict[str, Any]:
|
|
598
|
+
async def get_classification_accounting_class(self, id: str) -> dict[str, Any]:
|
|
731
599
|
"""
|
|
732
600
|
Get accounting class details
|
|
733
601
|
|
|
@@ -750,13 +618,8 @@ class BillApp(APIApplication):
|
|
|
750
618
|
response = self._get(url, params=query_params)
|
|
751
619
|
return self._handle_response(response)
|
|
752
620
|
|
|
753
|
-
def update_classification_accounting_class(
|
|
754
|
-
self,
|
|
755
|
-
id: str,
|
|
756
|
-
name: str | None = None,
|
|
757
|
-
shortName: str | None = None,
|
|
758
|
-
description: str | None = None,
|
|
759
|
-
parentId: str | None = None,
|
|
621
|
+
async def update_classification_accounting_class(
|
|
622
|
+
self, id: str, name: str | None = None, shortName: str | None = None, description: str | None = None, parentId: str | None = None
|
|
760
623
|
) -> dict[str, Any]:
|
|
761
624
|
"""
|
|
762
625
|
Update an accounting class
|
|
@@ -780,21 +643,14 @@ class BillApp(APIApplication):
|
|
|
780
643
|
if id is None:
|
|
781
644
|
raise ValueError("Missing required parameter 'id'.")
|
|
782
645
|
request_body_data = None
|
|
783
|
-
request_body_data = {
|
|
784
|
-
|
|
785
|
-
"shortName": shortName,
|
|
786
|
-
"description": description,
|
|
787
|
-
"parentId": parentId,
|
|
788
|
-
}
|
|
789
|
-
request_body_data = {
|
|
790
|
-
k: v for k, v in request_body_data.items() if v is not None
|
|
791
|
-
}
|
|
646
|
+
request_body_data = {"name": name, "shortName": shortName, "description": description, "parentId": parentId}
|
|
647
|
+
request_body_data = {k: v for k, v in request_body_data.items() if v is not None}
|
|
792
648
|
url = f"{self.base_url}/v3/classifications/accounting-classes/{id}"
|
|
793
649
|
query_params = {}
|
|
794
650
|
response = self._patch(url, data=request_body_data, params=query_params)
|
|
795
651
|
return self._handle_response(response)
|
|
796
652
|
|
|
797
|
-
def archive_classification_accounting_class(self, id: str) -> dict[str, Any]:
|
|
653
|
+
async def archive_classification_accounting_class(self, id: str) -> dict[str, Any]:
|
|
798
654
|
"""
|
|
799
655
|
Archive an accounting class
|
|
800
656
|
|
|
@@ -815,15 +671,10 @@ class BillApp(APIApplication):
|
|
|
815
671
|
request_body_data = None
|
|
816
672
|
url = f"{self.base_url}/v3/classifications/accounting-classes/{id}/archive"
|
|
817
673
|
query_params = {}
|
|
818
|
-
response = self._post(
|
|
819
|
-
url,
|
|
820
|
-
data=request_body_data,
|
|
821
|
-
params=query_params,
|
|
822
|
-
content_type="application/json",
|
|
823
|
-
)
|
|
674
|
+
response = self._post(url, data=request_body_data, params=query_params, content_type="application/json")
|
|
824
675
|
return self._handle_response(response)
|
|
825
676
|
|
|
826
|
-
def restore_classification_accounting_class(self, id: str) -> dict[str, Any]:
|
|
677
|
+
async def restore_classification_accounting_class(self, id: str) -> dict[str, Any]:
|
|
827
678
|
"""
|
|
828
679
|
Restore an archived accounting class
|
|
829
680
|
|
|
@@ -844,20 +695,11 @@ class BillApp(APIApplication):
|
|
|
844
695
|
request_body_data = None
|
|
845
696
|
url = f"{self.base_url}/v3/classifications/accounting-classes/{id}/restore"
|
|
846
697
|
query_params = {}
|
|
847
|
-
response = self._post(
|
|
848
|
-
url,
|
|
849
|
-
data=request_body_data,
|
|
850
|
-
params=query_params,
|
|
851
|
-
content_type="application/json",
|
|
852
|
-
)
|
|
698
|
+
response = self._post(url, data=request_body_data, params=query_params, content_type="application/json")
|
|
853
699
|
return self._handle_response(response)
|
|
854
700
|
|
|
855
|
-
def list_classification_chart_of_accounts(
|
|
856
|
-
self,
|
|
857
|
-
max: int | None = None,
|
|
858
|
-
sort: str | None = None,
|
|
859
|
-
filters: str | None = None,
|
|
860
|
-
page: str | None = None,
|
|
701
|
+
async def list_classification_chart_of_accounts(
|
|
702
|
+
self, max: int | None = None, sort: str | None = None, filters: str | None = None, page: str | None = None
|
|
861
703
|
) -> dict[str, Any]:
|
|
862
704
|
"""
|
|
863
705
|
Get list of chart of accounts
|
|
@@ -878,25 +720,12 @@ class BillApp(APIApplication):
|
|
|
878
720
|
classifications
|
|
879
721
|
"""
|
|
880
722
|
url = f"{self.base_url}/v3/classifications/chart-of-accounts"
|
|
881
|
-
query_params = {
|
|
882
|
-
k: v
|
|
883
|
-
for k, v in [
|
|
884
|
-
("max", max),
|
|
885
|
-
("sort", sort),
|
|
886
|
-
("filters", filters),
|
|
887
|
-
("page", page),
|
|
888
|
-
]
|
|
889
|
-
if v is not None
|
|
890
|
-
}
|
|
723
|
+
query_params = {k: v for k, v in [("max", max), ("sort", sort), ("filters", filters), ("page", page)] if v is not None}
|
|
891
724
|
response = self._get(url, params=query_params)
|
|
892
725
|
return self._handle_response(response)
|
|
893
726
|
|
|
894
|
-
def create_classification_chart_of_accounts(
|
|
895
|
-
self,
|
|
896
|
-
name: str,
|
|
897
|
-
description: str | None = None,
|
|
898
|
-
parentId: str | None = None,
|
|
899
|
-
account: Any | None = None,
|
|
727
|
+
async def create_classification_chart_of_accounts(
|
|
728
|
+
self, name: str, description: str | None = None, parentId: str | None = None, account: Any | None = None
|
|
900
729
|
) -> dict[str, Any]:
|
|
901
730
|
"""
|
|
902
731
|
Create a chart of accounts
|
|
@@ -917,28 +746,14 @@ class BillApp(APIApplication):
|
|
|
917
746
|
classifications
|
|
918
747
|
"""
|
|
919
748
|
request_body_data = None
|
|
920
|
-
request_body_data = {
|
|
921
|
-
|
|
922
|
-
"description": description,
|
|
923
|
-
"parentId": parentId,
|
|
924
|
-
"account": account,
|
|
925
|
-
}
|
|
926
|
-
request_body_data = {
|
|
927
|
-
k: v for k, v in request_body_data.items() if v is not None
|
|
928
|
-
}
|
|
749
|
+
request_body_data = {"name": name, "description": description, "parentId": parentId, "account": account}
|
|
750
|
+
request_body_data = {k: v for k, v in request_body_data.items() if v is not None}
|
|
929
751
|
url = f"{self.base_url}/v3/classifications/chart-of-accounts"
|
|
930
752
|
query_params = {}
|
|
931
|
-
response = self._post(
|
|
932
|
-
url,
|
|
933
|
-
data=request_body_data,
|
|
934
|
-
params=query_params,
|
|
935
|
-
content_type="application/json",
|
|
936
|
-
)
|
|
753
|
+
response = self._post(url, data=request_body_data, params=query_params, content_type="application/json")
|
|
937
754
|
return self._handle_response(response)
|
|
938
755
|
|
|
939
|
-
def bulk_create_classification_chart_of_accounts(
|
|
940
|
-
self, items: list[dict[str, Any]]
|
|
941
|
-
) -> dict[str, Any]:
|
|
756
|
+
async def bulk_create_classification_chart_of_accounts(self, items: list[dict[str, Any]]) -> dict[str, Any]:
|
|
942
757
|
"""
|
|
943
758
|
Create multiple chart of accounts
|
|
944
759
|
|
|
@@ -954,21 +769,13 @@ class BillApp(APIApplication):
|
|
|
954
769
|
classifications
|
|
955
770
|
"""
|
|
956
771
|
request_body_data = None
|
|
957
|
-
# Using array parameter 'items' directly as request body
|
|
958
772
|
request_body_data = items
|
|
959
773
|
url = f"{self.base_url}/v3/classifications/chart-of-accounts/bulk"
|
|
960
774
|
query_params = {}
|
|
961
|
-
response = self._post(
|
|
962
|
-
url,
|
|
963
|
-
data=request_body_data,
|
|
964
|
-
params=query_params,
|
|
965
|
-
content_type="application/json",
|
|
966
|
-
)
|
|
775
|
+
response = self._post(url, data=request_body_data, params=query_params, content_type="application/json")
|
|
967
776
|
return self._handle_response(response)
|
|
968
777
|
|
|
969
|
-
def bulk_update_classification_chart_of_accounts(
|
|
970
|
-
self, items: list[dict[str, Any]]
|
|
971
|
-
) -> dict[str, Any]:
|
|
778
|
+
async def bulk_update_classification_chart_of_accounts(self, items: list[dict[str, Any]]) -> dict[str, Any]:
|
|
972
779
|
"""
|
|
973
780
|
Update multiple chart of accounts
|
|
974
781
|
|
|
@@ -984,14 +791,13 @@ class BillApp(APIApplication):
|
|
|
984
791
|
classifications
|
|
985
792
|
"""
|
|
986
793
|
request_body_data = None
|
|
987
|
-
# Using array parameter 'items' directly as request body
|
|
988
794
|
request_body_data = items
|
|
989
795
|
url = f"{self.base_url}/v3/classifications/chart-of-accounts/bulk"
|
|
990
796
|
query_params = {}
|
|
991
797
|
response = self._patch(url, data=request_body_data, params=query_params)
|
|
992
798
|
return self._handle_response(response)
|
|
993
799
|
|
|
994
|
-
def bulk_archive_classification_chart_of_accounts(self, ids: str) -> dict[str, Any]:
|
|
800
|
+
async def bulk_archive_classification_chart_of_accounts(self, ids: str) -> dict[str, Any]:
|
|
995
801
|
"""
|
|
996
802
|
Archive mutliple chart of accounts
|
|
997
803
|
|
|
@@ -1010,15 +816,10 @@ class BillApp(APIApplication):
|
|
|
1010
816
|
request_body_data = None
|
|
1011
817
|
url = f"{self.base_url}/v3/classifications/chart-of-accounts/bulk/archive"
|
|
1012
818
|
query_params = {k: v for k, v in [("ids", ids)] if v is not None}
|
|
1013
|
-
response = self._post(
|
|
1014
|
-
url,
|
|
1015
|
-
data=request_body_data,
|
|
1016
|
-
params=query_params,
|
|
1017
|
-
content_type="application/json",
|
|
1018
|
-
)
|
|
819
|
+
response = self._post(url, data=request_body_data, params=query_params, content_type="application/json")
|
|
1019
820
|
return self._handle_response(response)
|
|
1020
821
|
|
|
1021
|
-
def bulk_restore_classification_chart_of_accounts(self, ids: str) -> dict[str, Any]:
|
|
822
|
+
async def bulk_restore_classification_chart_of_accounts(self, ids: str) -> dict[str, Any]:
|
|
1022
823
|
"""
|
|
1023
824
|
Restore multiple chart of accounts
|
|
1024
825
|
|
|
@@ -1037,15 +838,10 @@ class BillApp(APIApplication):
|
|
|
1037
838
|
request_body_data = None
|
|
1038
839
|
url = f"{self.base_url}/v3/classifications/chart-of-accounts/bulk/restore"
|
|
1039
840
|
query_params = {k: v for k, v in [("ids", ids)] if v is not None}
|
|
1040
|
-
response = self._post(
|
|
1041
|
-
url,
|
|
1042
|
-
data=request_body_data,
|
|
1043
|
-
params=query_params,
|
|
1044
|
-
content_type="application/json",
|
|
1045
|
-
)
|
|
841
|
+
response = self._post(url, data=request_body_data, params=query_params, content_type="application/json")
|
|
1046
842
|
return self._handle_response(response)
|
|
1047
843
|
|
|
1048
|
-
def get_classification_chart_of_accounts(self, id: str) -> dict[str, Any]:
|
|
844
|
+
async def get_classification_chart_of_accounts(self, id: str) -> dict[str, Any]:
|
|
1049
845
|
"""
|
|
1050
846
|
Get chart of accounts details
|
|
1051
847
|
|
|
@@ -1068,13 +864,8 @@ class BillApp(APIApplication):
|
|
|
1068
864
|
response = self._get(url, params=query_params)
|
|
1069
865
|
return self._handle_response(response)
|
|
1070
866
|
|
|
1071
|
-
def update_classification_chart_of_accounts(
|
|
1072
|
-
self,
|
|
1073
|
-
id: str,
|
|
1074
|
-
name: str | None = None,
|
|
1075
|
-
description: str | None = None,
|
|
1076
|
-
parentId: str | None = None,
|
|
1077
|
-
account: Any | None = None,
|
|
867
|
+
async def update_classification_chart_of_accounts(
|
|
868
|
+
self, id: str, name: str | None = None, description: str | None = None, parentId: str | None = None, account: Any | None = None
|
|
1078
869
|
) -> dict[str, Any]:
|
|
1079
870
|
"""
|
|
1080
871
|
Update a chart of accounts
|
|
@@ -1098,21 +889,14 @@ class BillApp(APIApplication):
|
|
|
1098
889
|
if id is None:
|
|
1099
890
|
raise ValueError("Missing required parameter 'id'.")
|
|
1100
891
|
request_body_data = None
|
|
1101
|
-
request_body_data = {
|
|
1102
|
-
|
|
1103
|
-
"description": description,
|
|
1104
|
-
"parentId": parentId,
|
|
1105
|
-
"account": account,
|
|
1106
|
-
}
|
|
1107
|
-
request_body_data = {
|
|
1108
|
-
k: v for k, v in request_body_data.items() if v is not None
|
|
1109
|
-
}
|
|
892
|
+
request_body_data = {"name": name, "description": description, "parentId": parentId, "account": account}
|
|
893
|
+
request_body_data = {k: v for k, v in request_body_data.items() if v is not None}
|
|
1110
894
|
url = f"{self.base_url}/v3/classifications/chart-of-accounts/{id}"
|
|
1111
895
|
query_params = {}
|
|
1112
896
|
response = self._patch(url, data=request_body_data, params=query_params)
|
|
1113
897
|
return self._handle_response(response)
|
|
1114
898
|
|
|
1115
|
-
def archive_classification_chart_of_accounts(self, id: str) -> dict[str, Any]:
|
|
899
|
+
async def archive_classification_chart_of_accounts(self, id: str) -> dict[str, Any]:
|
|
1116
900
|
"""
|
|
1117
901
|
Archive a chart of accounts
|
|
1118
902
|
|
|
@@ -1133,15 +917,10 @@ class BillApp(APIApplication):
|
|
|
1133
917
|
request_body_data = None
|
|
1134
918
|
url = f"{self.base_url}/v3/classifications/chart-of-accounts/{id}/archive"
|
|
1135
919
|
query_params = {}
|
|
1136
|
-
response = self._post(
|
|
1137
|
-
url,
|
|
1138
|
-
data=request_body_data,
|
|
1139
|
-
params=query_params,
|
|
1140
|
-
content_type="application/json",
|
|
1141
|
-
)
|
|
920
|
+
response = self._post(url, data=request_body_data, params=query_params, content_type="application/json")
|
|
1142
921
|
return self._handle_response(response)
|
|
1143
922
|
|
|
1144
|
-
def restore_classification_chart_of_accounts(self, id: str) -> dict[str, Any]:
|
|
923
|
+
async def restore_classification_chart_of_accounts(self, id: str) -> dict[str, Any]:
|
|
1145
924
|
"""
|
|
1146
925
|
Restore an archived chart of accounts
|
|
1147
926
|
|
|
@@ -1162,20 +941,11 @@ class BillApp(APIApplication):
|
|
|
1162
941
|
request_body_data = None
|
|
1163
942
|
url = f"{self.base_url}/v3/classifications/chart-of-accounts/{id}/restore"
|
|
1164
943
|
query_params = {}
|
|
1165
|
-
response = self._post(
|
|
1166
|
-
url,
|
|
1167
|
-
data=request_body_data,
|
|
1168
|
-
params=query_params,
|
|
1169
|
-
content_type="application/json",
|
|
1170
|
-
)
|
|
944
|
+
response = self._post(url, data=request_body_data, params=query_params, content_type="application/json")
|
|
1171
945
|
return self._handle_response(response)
|
|
1172
946
|
|
|
1173
|
-
def list_classification_departments(
|
|
1174
|
-
self,
|
|
1175
|
-
max: int | None = None,
|
|
1176
|
-
sort: str | None = None,
|
|
1177
|
-
filters: str | None = None,
|
|
1178
|
-
page: str | None = None,
|
|
947
|
+
async def list_classification_departments(
|
|
948
|
+
self, max: int | None = None, sort: str | None = None, filters: str | None = None, page: str | None = None
|
|
1179
949
|
) -> dict[str, Any]:
|
|
1180
950
|
"""
|
|
1181
951
|
Get list of departments
|
|
@@ -1196,25 +966,12 @@ class BillApp(APIApplication):
|
|
|
1196
966
|
classifications
|
|
1197
967
|
"""
|
|
1198
968
|
url = f"{self.base_url}/v3/classifications/departments"
|
|
1199
|
-
query_params = {
|
|
1200
|
-
k: v
|
|
1201
|
-
for k, v in [
|
|
1202
|
-
("max", max),
|
|
1203
|
-
("sort", sort),
|
|
1204
|
-
("filters", filters),
|
|
1205
|
-
("page", page),
|
|
1206
|
-
]
|
|
1207
|
-
if v is not None
|
|
1208
|
-
}
|
|
969
|
+
query_params = {k: v for k, v in [("max", max), ("sort", sort), ("filters", filters), ("page", page)] if v is not None}
|
|
1209
970
|
response = self._get(url, params=query_params)
|
|
1210
971
|
return self._handle_response(response)
|
|
1211
972
|
|
|
1212
|
-
def create_classification_department(
|
|
1213
|
-
self,
|
|
1214
|
-
name: str,
|
|
1215
|
-
shortName: str | None = None,
|
|
1216
|
-
description: str | None = None,
|
|
1217
|
-
parentId: str | None = None,
|
|
973
|
+
async def create_classification_department(
|
|
974
|
+
self, name: str, shortName: str | None = None, description: str | None = None, parentId: str | None = None
|
|
1218
975
|
) -> dict[str, Any]:
|
|
1219
976
|
"""
|
|
1220
977
|
Create a department
|
|
@@ -1235,28 +992,14 @@ class BillApp(APIApplication):
|
|
|
1235
992
|
classifications
|
|
1236
993
|
"""
|
|
1237
994
|
request_body_data = None
|
|
1238
|
-
request_body_data = {
|
|
1239
|
-
|
|
1240
|
-
"shortName": shortName,
|
|
1241
|
-
"description": description,
|
|
1242
|
-
"parentId": parentId,
|
|
1243
|
-
}
|
|
1244
|
-
request_body_data = {
|
|
1245
|
-
k: v for k, v in request_body_data.items() if v is not None
|
|
1246
|
-
}
|
|
995
|
+
request_body_data = {"name": name, "shortName": shortName, "description": description, "parentId": parentId}
|
|
996
|
+
request_body_data = {k: v for k, v in request_body_data.items() if v is not None}
|
|
1247
997
|
url = f"{self.base_url}/v3/classifications/departments"
|
|
1248
998
|
query_params = {}
|
|
1249
|
-
response = self._post(
|
|
1250
|
-
url,
|
|
1251
|
-
data=request_body_data,
|
|
1252
|
-
params=query_params,
|
|
1253
|
-
content_type="application/json",
|
|
1254
|
-
)
|
|
999
|
+
response = self._post(url, data=request_body_data, params=query_params, content_type="application/json")
|
|
1255
1000
|
return self._handle_response(response)
|
|
1256
1001
|
|
|
1257
|
-
def bulk_create_classification_department(
|
|
1258
|
-
self, items: list[dict[str, Any]]
|
|
1259
|
-
) -> dict[str, Any]:
|
|
1002
|
+
async def bulk_create_classification_department(self, items: list[dict[str, Any]]) -> dict[str, Any]:
|
|
1260
1003
|
"""
|
|
1261
1004
|
Create multiple departments
|
|
1262
1005
|
|
|
@@ -1272,21 +1015,13 @@ class BillApp(APIApplication):
|
|
|
1272
1015
|
classifications
|
|
1273
1016
|
"""
|
|
1274
1017
|
request_body_data = None
|
|
1275
|
-
# Using array parameter 'items' directly as request body
|
|
1276
1018
|
request_body_data = items
|
|
1277
1019
|
url = f"{self.base_url}/v3/classifications/departments/bulk"
|
|
1278
1020
|
query_params = {}
|
|
1279
|
-
response = self._post(
|
|
1280
|
-
url,
|
|
1281
|
-
data=request_body_data,
|
|
1282
|
-
params=query_params,
|
|
1283
|
-
content_type="application/json",
|
|
1284
|
-
)
|
|
1021
|
+
response = self._post(url, data=request_body_data, params=query_params, content_type="application/json")
|
|
1285
1022
|
return self._handle_response(response)
|
|
1286
1023
|
|
|
1287
|
-
def bulk_update_classification_department(
|
|
1288
|
-
self, items: list[dict[str, Any]]
|
|
1289
|
-
) -> dict[str, Any]:
|
|
1024
|
+
async def bulk_update_classification_department(self, items: list[dict[str, Any]]) -> dict[str, Any]:
|
|
1290
1025
|
"""
|
|
1291
1026
|
Update multiple departments
|
|
1292
1027
|
|
|
@@ -1302,14 +1037,13 @@ class BillApp(APIApplication):
|
|
|
1302
1037
|
classifications
|
|
1303
1038
|
"""
|
|
1304
1039
|
request_body_data = None
|
|
1305
|
-
# Using array parameter 'items' directly as request body
|
|
1306
1040
|
request_body_data = items
|
|
1307
1041
|
url = f"{self.base_url}/v3/classifications/departments/bulk"
|
|
1308
1042
|
query_params = {}
|
|
1309
1043
|
response = self._patch(url, data=request_body_data, params=query_params)
|
|
1310
1044
|
return self._handle_response(response)
|
|
1311
1045
|
|
|
1312
|
-
def bulk_archive_classification_department(self, ids: str) -> dict[str, Any]:
|
|
1046
|
+
async def bulk_archive_classification_department(self, ids: str) -> dict[str, Any]:
|
|
1313
1047
|
"""
|
|
1314
1048
|
Archive multiple departments
|
|
1315
1049
|
|
|
@@ -1328,15 +1062,10 @@ class BillApp(APIApplication):
|
|
|
1328
1062
|
request_body_data = None
|
|
1329
1063
|
url = f"{self.base_url}/v3/classifications/departments/bulk/archive"
|
|
1330
1064
|
query_params = {k: v for k, v in [("ids", ids)] if v is not None}
|
|
1331
|
-
response = self._post(
|
|
1332
|
-
url,
|
|
1333
|
-
data=request_body_data,
|
|
1334
|
-
params=query_params,
|
|
1335
|
-
content_type="application/json",
|
|
1336
|
-
)
|
|
1065
|
+
response = self._post(url, data=request_body_data, params=query_params, content_type="application/json")
|
|
1337
1066
|
return self._handle_response(response)
|
|
1338
1067
|
|
|
1339
|
-
def bulk_restore_classification_department(self, ids: str) -> dict[str, Any]:
|
|
1068
|
+
async def bulk_restore_classification_department(self, ids: str) -> dict[str, Any]:
|
|
1340
1069
|
"""
|
|
1341
1070
|
Restore multiple departments
|
|
1342
1071
|
|
|
@@ -1355,15 +1084,10 @@ class BillApp(APIApplication):
|
|
|
1355
1084
|
request_body_data = None
|
|
1356
1085
|
url = f"{self.base_url}/v3/classifications/departments/bulk/restore"
|
|
1357
1086
|
query_params = {k: v for k, v in [("ids", ids)] if v is not None}
|
|
1358
|
-
response = self._post(
|
|
1359
|
-
url,
|
|
1360
|
-
data=request_body_data,
|
|
1361
|
-
params=query_params,
|
|
1362
|
-
content_type="application/json",
|
|
1363
|
-
)
|
|
1087
|
+
response = self._post(url, data=request_body_data, params=query_params, content_type="application/json")
|
|
1364
1088
|
return self._handle_response(response)
|
|
1365
1089
|
|
|
1366
|
-
def get_classification_department(self, id: str) -> dict[str, Any]:
|
|
1090
|
+
async def get_classification_department(self, id: str) -> dict[str, Any]:
|
|
1367
1091
|
"""
|
|
1368
1092
|
Get department details
|
|
1369
1093
|
|
|
@@ -1386,13 +1110,8 @@ class BillApp(APIApplication):
|
|
|
1386
1110
|
response = self._get(url, params=query_params)
|
|
1387
1111
|
return self._handle_response(response)
|
|
1388
1112
|
|
|
1389
|
-
def update_classification_department(
|
|
1390
|
-
self,
|
|
1391
|
-
id: str,
|
|
1392
|
-
name: str | None = None,
|
|
1393
|
-
shortName: str | None = None,
|
|
1394
|
-
description: str | None = None,
|
|
1395
|
-
parentId: str | None = None,
|
|
1113
|
+
async def update_classification_department(
|
|
1114
|
+
self, id: str, name: str | None = None, shortName: str | None = None, description: str | None = None, parentId: str | None = None
|
|
1396
1115
|
) -> dict[str, Any]:
|
|
1397
1116
|
"""
|
|
1398
1117
|
Update a department
|
|
@@ -1416,21 +1135,14 @@ class BillApp(APIApplication):
|
|
|
1416
1135
|
if id is None:
|
|
1417
1136
|
raise ValueError("Missing required parameter 'id'.")
|
|
1418
1137
|
request_body_data = None
|
|
1419
|
-
request_body_data = {
|
|
1420
|
-
|
|
1421
|
-
"shortName": shortName,
|
|
1422
|
-
"description": description,
|
|
1423
|
-
"parentId": parentId,
|
|
1424
|
-
}
|
|
1425
|
-
request_body_data = {
|
|
1426
|
-
k: v for k, v in request_body_data.items() if v is not None
|
|
1427
|
-
}
|
|
1138
|
+
request_body_data = {"name": name, "shortName": shortName, "description": description, "parentId": parentId}
|
|
1139
|
+
request_body_data = {k: v for k, v in request_body_data.items() if v is not None}
|
|
1428
1140
|
url = f"{self.base_url}/v3/classifications/departments/{id}"
|
|
1429
1141
|
query_params = {}
|
|
1430
1142
|
response = self._patch(url, data=request_body_data, params=query_params)
|
|
1431
1143
|
return self._handle_response(response)
|
|
1432
1144
|
|
|
1433
|
-
def archive_classification_department(self, id: str) -> dict[str, Any]:
|
|
1145
|
+
async def archive_classification_department(self, id: str) -> dict[str, Any]:
|
|
1434
1146
|
"""
|
|
1435
1147
|
Archive a department
|
|
1436
1148
|
|
|
@@ -1451,15 +1163,10 @@ class BillApp(APIApplication):
|
|
|
1451
1163
|
request_body_data = None
|
|
1452
1164
|
url = f"{self.base_url}/v3/classifications/departments/{id}/archive"
|
|
1453
1165
|
query_params = {}
|
|
1454
|
-
response = self._post(
|
|
1455
|
-
url,
|
|
1456
|
-
data=request_body_data,
|
|
1457
|
-
params=query_params,
|
|
1458
|
-
content_type="application/json",
|
|
1459
|
-
)
|
|
1166
|
+
response = self._post(url, data=request_body_data, params=query_params, content_type="application/json")
|
|
1460
1167
|
return self._handle_response(response)
|
|
1461
1168
|
|
|
1462
|
-
def restore_classification_department(self, id: str) -> dict[str, Any]:
|
|
1169
|
+
async def restore_classification_department(self, id: str) -> dict[str, Any]:
|
|
1463
1170
|
"""
|
|
1464
1171
|
Restore an archived department
|
|
1465
1172
|
|
|
@@ -1480,20 +1187,11 @@ class BillApp(APIApplication):
|
|
|
1480
1187
|
request_body_data = None
|
|
1481
1188
|
url = f"{self.base_url}/v3/classifications/departments/{id}/restore"
|
|
1482
1189
|
query_params = {}
|
|
1483
|
-
response = self._post(
|
|
1484
|
-
url,
|
|
1485
|
-
data=request_body_data,
|
|
1486
|
-
params=query_params,
|
|
1487
|
-
content_type="application/json",
|
|
1488
|
-
)
|
|
1190
|
+
response = self._post(url, data=request_body_data, params=query_params, content_type="application/json")
|
|
1489
1191
|
return self._handle_response(response)
|
|
1490
1192
|
|
|
1491
|
-
def list_classification_employees(
|
|
1492
|
-
self,
|
|
1493
|
-
max: int | None = None,
|
|
1494
|
-
sort: str | None = None,
|
|
1495
|
-
filters: str | None = None,
|
|
1496
|
-
page: str | None = None,
|
|
1193
|
+
async def list_classification_employees(
|
|
1194
|
+
self, max: int | None = None, sort: str | None = None, filters: str | None = None, page: str | None = None
|
|
1497
1195
|
) -> dict[str, Any]:
|
|
1498
1196
|
"""
|
|
1499
1197
|
Get list of employees
|
|
@@ -1514,25 +1212,12 @@ class BillApp(APIApplication):
|
|
|
1514
1212
|
classifications
|
|
1515
1213
|
"""
|
|
1516
1214
|
url = f"{self.base_url}/v3/classifications/employees"
|
|
1517
|
-
query_params = {
|
|
1518
|
-
k: v
|
|
1519
|
-
for k, v in [
|
|
1520
|
-
("max", max),
|
|
1521
|
-
("sort", sort),
|
|
1522
|
-
("filters", filters),
|
|
1523
|
-
("page", page),
|
|
1524
|
-
]
|
|
1525
|
-
if v is not None
|
|
1526
|
-
}
|
|
1215
|
+
query_params = {k: v for k, v in [("max", max), ("sort", sort), ("filters", filters), ("page", page)] if v is not None}
|
|
1527
1216
|
response = self._get(url, params=query_params)
|
|
1528
1217
|
return self._handle_response(response)
|
|
1529
1218
|
|
|
1530
|
-
def create_classification_employee(
|
|
1531
|
-
self,
|
|
1532
|
-
firstName: str | None = None,
|
|
1533
|
-
lastName: str | None = None,
|
|
1534
|
-
shortName: str | None = None,
|
|
1535
|
-
parentId: str | None = None,
|
|
1219
|
+
async def create_classification_employee(
|
|
1220
|
+
self, firstName: str | None = None, lastName: str | None = None, shortName: str | None = None, parentId: str | None = None
|
|
1536
1221
|
) -> dict[str, Any]:
|
|
1537
1222
|
"""
|
|
1538
1223
|
Create an employee
|
|
@@ -1553,28 +1238,14 @@ class BillApp(APIApplication):
|
|
|
1553
1238
|
classifications
|
|
1554
1239
|
"""
|
|
1555
1240
|
request_body_data = None
|
|
1556
|
-
request_body_data = {
|
|
1557
|
-
|
|
1558
|
-
"lastName": lastName,
|
|
1559
|
-
"shortName": shortName,
|
|
1560
|
-
"parentId": parentId,
|
|
1561
|
-
}
|
|
1562
|
-
request_body_data = {
|
|
1563
|
-
k: v for k, v in request_body_data.items() if v is not None
|
|
1564
|
-
}
|
|
1241
|
+
request_body_data = {"firstName": firstName, "lastName": lastName, "shortName": shortName, "parentId": parentId}
|
|
1242
|
+
request_body_data = {k: v for k, v in request_body_data.items() if v is not None}
|
|
1565
1243
|
url = f"{self.base_url}/v3/classifications/employees"
|
|
1566
1244
|
query_params = {}
|
|
1567
|
-
response = self._post(
|
|
1568
|
-
url,
|
|
1569
|
-
data=request_body_data,
|
|
1570
|
-
params=query_params,
|
|
1571
|
-
content_type="application/json",
|
|
1572
|
-
)
|
|
1245
|
+
response = self._post(url, data=request_body_data, params=query_params, content_type="application/json")
|
|
1573
1246
|
return self._handle_response(response)
|
|
1574
1247
|
|
|
1575
|
-
def bulk_create_classification_employee(
|
|
1576
|
-
self, items: list[dict[str, Any]]
|
|
1577
|
-
) -> dict[str, Any]:
|
|
1248
|
+
async def bulk_create_classification_employee(self, items: list[dict[str, Any]]) -> dict[str, Any]:
|
|
1578
1249
|
"""
|
|
1579
1250
|
Create multiple employees
|
|
1580
1251
|
|
|
@@ -1590,21 +1261,13 @@ class BillApp(APIApplication):
|
|
|
1590
1261
|
classifications
|
|
1591
1262
|
"""
|
|
1592
1263
|
request_body_data = None
|
|
1593
|
-
# Using array parameter 'items' directly as request body
|
|
1594
1264
|
request_body_data = items
|
|
1595
1265
|
url = f"{self.base_url}/v3/classifications/employees/bulk"
|
|
1596
1266
|
query_params = {}
|
|
1597
|
-
response = self._post(
|
|
1598
|
-
url,
|
|
1599
|
-
data=request_body_data,
|
|
1600
|
-
params=query_params,
|
|
1601
|
-
content_type="application/json",
|
|
1602
|
-
)
|
|
1267
|
+
response = self._post(url, data=request_body_data, params=query_params, content_type="application/json")
|
|
1603
1268
|
return self._handle_response(response)
|
|
1604
1269
|
|
|
1605
|
-
def bulk_update_classification_employee(
|
|
1606
|
-
self, items: list[dict[str, Any]]
|
|
1607
|
-
) -> dict[str, Any]:
|
|
1270
|
+
async def bulk_update_classification_employee(self, items: list[dict[str, Any]]) -> dict[str, Any]:
|
|
1608
1271
|
"""
|
|
1609
1272
|
Update multiple employees
|
|
1610
1273
|
|
|
@@ -1620,14 +1283,13 @@ class BillApp(APIApplication):
|
|
|
1620
1283
|
classifications
|
|
1621
1284
|
"""
|
|
1622
1285
|
request_body_data = None
|
|
1623
|
-
# Using array parameter 'items' directly as request body
|
|
1624
1286
|
request_body_data = items
|
|
1625
1287
|
url = f"{self.base_url}/v3/classifications/employees/bulk"
|
|
1626
1288
|
query_params = {}
|
|
1627
1289
|
response = self._patch(url, data=request_body_data, params=query_params)
|
|
1628
1290
|
return self._handle_response(response)
|
|
1629
1291
|
|
|
1630
|
-
def bulk_archive_classification_employee(self, ids: str) -> dict[str, Any]:
|
|
1292
|
+
async def bulk_archive_classification_employee(self, ids: str) -> dict[str, Any]:
|
|
1631
1293
|
"""
|
|
1632
1294
|
Archive multiple employees
|
|
1633
1295
|
|
|
@@ -1646,15 +1308,10 @@ class BillApp(APIApplication):
|
|
|
1646
1308
|
request_body_data = None
|
|
1647
1309
|
url = f"{self.base_url}/v3/classifications/employees/bulk/archive"
|
|
1648
1310
|
query_params = {k: v for k, v in [("ids", ids)] if v is not None}
|
|
1649
|
-
response = self._post(
|
|
1650
|
-
url,
|
|
1651
|
-
data=request_body_data,
|
|
1652
|
-
params=query_params,
|
|
1653
|
-
content_type="application/json",
|
|
1654
|
-
)
|
|
1311
|
+
response = self._post(url, data=request_body_data, params=query_params, content_type="application/json")
|
|
1655
1312
|
return self._handle_response(response)
|
|
1656
1313
|
|
|
1657
|
-
def bulk_restore_classification_employee(self, ids: str) -> dict[str, Any]:
|
|
1314
|
+
async def bulk_restore_classification_employee(self, ids: str) -> dict[str, Any]:
|
|
1658
1315
|
"""
|
|
1659
1316
|
Restore multiple employees
|
|
1660
1317
|
|
|
@@ -1673,15 +1330,10 @@ class BillApp(APIApplication):
|
|
|
1673
1330
|
request_body_data = None
|
|
1674
1331
|
url = f"{self.base_url}/v3/classifications/employees/bulk/restore"
|
|
1675
1332
|
query_params = {k: v for k, v in [("ids", ids)] if v is not None}
|
|
1676
|
-
response = self._post(
|
|
1677
|
-
url,
|
|
1678
|
-
data=request_body_data,
|
|
1679
|
-
params=query_params,
|
|
1680
|
-
content_type="application/json",
|
|
1681
|
-
)
|
|
1333
|
+
response = self._post(url, data=request_body_data, params=query_params, content_type="application/json")
|
|
1682
1334
|
return self._handle_response(response)
|
|
1683
1335
|
|
|
1684
|
-
def get_classification_employee(self, id: str) -> dict[str, Any]:
|
|
1336
|
+
async def get_classification_employee(self, id: str) -> dict[str, Any]:
|
|
1685
1337
|
"""
|
|
1686
1338
|
Get employee details
|
|
1687
1339
|
|
|
@@ -1704,13 +1356,8 @@ class BillApp(APIApplication):
|
|
|
1704
1356
|
response = self._get(url, params=query_params)
|
|
1705
1357
|
return self._handle_response(response)
|
|
1706
1358
|
|
|
1707
|
-
def update_classification_employee(
|
|
1708
|
-
self,
|
|
1709
|
-
id: str,
|
|
1710
|
-
firstName: str | None = None,
|
|
1711
|
-
lastName: str | None = None,
|
|
1712
|
-
shortName: str | None = None,
|
|
1713
|
-
parentId: str | None = None,
|
|
1359
|
+
async def update_classification_employee(
|
|
1360
|
+
self, id: str, firstName: str | None = None, lastName: str | None = None, shortName: str | None = None, parentId: str | None = None
|
|
1714
1361
|
) -> dict[str, Any]:
|
|
1715
1362
|
"""
|
|
1716
1363
|
Update an employee
|
|
@@ -1734,21 +1381,14 @@ class BillApp(APIApplication):
|
|
|
1734
1381
|
if id is None:
|
|
1735
1382
|
raise ValueError("Missing required parameter 'id'.")
|
|
1736
1383
|
request_body_data = None
|
|
1737
|
-
request_body_data = {
|
|
1738
|
-
|
|
1739
|
-
"lastName": lastName,
|
|
1740
|
-
"shortName": shortName,
|
|
1741
|
-
"parentId": parentId,
|
|
1742
|
-
}
|
|
1743
|
-
request_body_data = {
|
|
1744
|
-
k: v for k, v in request_body_data.items() if v is not None
|
|
1745
|
-
}
|
|
1384
|
+
request_body_data = {"firstName": firstName, "lastName": lastName, "shortName": shortName, "parentId": parentId}
|
|
1385
|
+
request_body_data = {k: v for k, v in request_body_data.items() if v is not None}
|
|
1746
1386
|
url = f"{self.base_url}/v3/classifications/employees/{id}"
|
|
1747
1387
|
query_params = {}
|
|
1748
1388
|
response = self._patch(url, data=request_body_data, params=query_params)
|
|
1749
1389
|
return self._handle_response(response)
|
|
1750
1390
|
|
|
1751
|
-
def archive_classification_employee(self, id: str) -> dict[str, Any]:
|
|
1391
|
+
async def archive_classification_employee(self, id: str) -> dict[str, Any]:
|
|
1752
1392
|
"""
|
|
1753
1393
|
Archive an employee
|
|
1754
1394
|
|
|
@@ -1769,15 +1409,10 @@ class BillApp(APIApplication):
|
|
|
1769
1409
|
request_body_data = None
|
|
1770
1410
|
url = f"{self.base_url}/v3/classifications/employees/{id}/archive"
|
|
1771
1411
|
query_params = {}
|
|
1772
|
-
response = self._post(
|
|
1773
|
-
url,
|
|
1774
|
-
data=request_body_data,
|
|
1775
|
-
params=query_params,
|
|
1776
|
-
content_type="application/json",
|
|
1777
|
-
)
|
|
1412
|
+
response = self._post(url, data=request_body_data, params=query_params, content_type="application/json")
|
|
1778
1413
|
return self._handle_response(response)
|
|
1779
1414
|
|
|
1780
|
-
def restore_classification_employee(self, id: str) -> dict[str, Any]:
|
|
1415
|
+
async def restore_classification_employee(self, id: str) -> dict[str, Any]:
|
|
1781
1416
|
"""
|
|
1782
1417
|
Restore an archived employee
|
|
1783
1418
|
|
|
@@ -1798,20 +1433,11 @@ class BillApp(APIApplication):
|
|
|
1798
1433
|
request_body_data = None
|
|
1799
1434
|
url = f"{self.base_url}/v3/classifications/employees/{id}/restore"
|
|
1800
1435
|
query_params = {}
|
|
1801
|
-
response = self._post(
|
|
1802
|
-
url,
|
|
1803
|
-
data=request_body_data,
|
|
1804
|
-
params=query_params,
|
|
1805
|
-
content_type="application/json",
|
|
1806
|
-
)
|
|
1436
|
+
response = self._post(url, data=request_body_data, params=query_params, content_type="application/json")
|
|
1807
1437
|
return self._handle_response(response)
|
|
1808
1438
|
|
|
1809
|
-
def list_classification_items(
|
|
1810
|
-
self,
|
|
1811
|
-
max: int | None = None,
|
|
1812
|
-
sort: str | None = None,
|
|
1813
|
-
filters: str | None = None,
|
|
1814
|
-
page: str | None = None,
|
|
1439
|
+
async def list_classification_items(
|
|
1440
|
+
self, max: int | None = None, sort: str | None = None, filters: str | None = None, page: str | None = None
|
|
1815
1441
|
) -> dict[str, Any]:
|
|
1816
1442
|
"""
|
|
1817
1443
|
Get list of items
|
|
@@ -1832,20 +1458,11 @@ class BillApp(APIApplication):
|
|
|
1832
1458
|
classifications
|
|
1833
1459
|
"""
|
|
1834
1460
|
url = f"{self.base_url}/v3/classifications/items"
|
|
1835
|
-
query_params = {
|
|
1836
|
-
k: v
|
|
1837
|
-
for k, v in [
|
|
1838
|
-
("max", max),
|
|
1839
|
-
("sort", sort),
|
|
1840
|
-
("filters", filters),
|
|
1841
|
-
("page", page),
|
|
1842
|
-
]
|
|
1843
|
-
if v is not None
|
|
1844
|
-
}
|
|
1461
|
+
query_params = {k: v for k, v in [("max", max), ("sort", sort), ("filters", filters), ("page", page)] if v is not None}
|
|
1845
1462
|
response = self._get(url, params=query_params)
|
|
1846
1463
|
return self._handle_response(response)
|
|
1847
1464
|
|
|
1848
|
-
def create_classification_item(
|
|
1465
|
+
async def create_classification_item(
|
|
1849
1466
|
self,
|
|
1850
1467
|
type: Any,
|
|
1851
1468
|
name: str,
|
|
@@ -1898,22 +1515,13 @@ class BillApp(APIApplication):
|
|
|
1898
1515
|
"chartOfAccountId": chartOfAccountId,
|
|
1899
1516
|
"taxable": taxable,
|
|
1900
1517
|
}
|
|
1901
|
-
request_body_data = {
|
|
1902
|
-
k: v for k, v in request_body_data.items() if v is not None
|
|
1903
|
-
}
|
|
1518
|
+
request_body_data = {k: v for k, v in request_body_data.items() if v is not None}
|
|
1904
1519
|
url = f"{self.base_url}/v3/classifications/items"
|
|
1905
1520
|
query_params = {}
|
|
1906
|
-
response = self._post(
|
|
1907
|
-
url,
|
|
1908
|
-
data=request_body_data,
|
|
1909
|
-
params=query_params,
|
|
1910
|
-
content_type="application/json",
|
|
1911
|
-
)
|
|
1521
|
+
response = self._post(url, data=request_body_data, params=query_params, content_type="application/json")
|
|
1912
1522
|
return self._handle_response(response)
|
|
1913
1523
|
|
|
1914
|
-
def bulk_create_classification_item(
|
|
1915
|
-
self, items: list[dict[str, Any]]
|
|
1916
|
-
) -> dict[str, Any]:
|
|
1524
|
+
async def bulk_create_classification_item(self, items: list[dict[str, Any]]) -> dict[str, Any]:
|
|
1917
1525
|
"""
|
|
1918
1526
|
Create multiple items
|
|
1919
1527
|
|
|
@@ -1929,21 +1537,13 @@ class BillApp(APIApplication):
|
|
|
1929
1537
|
classifications
|
|
1930
1538
|
"""
|
|
1931
1539
|
request_body_data = None
|
|
1932
|
-
# Using array parameter 'items' directly as request body
|
|
1933
1540
|
request_body_data = items
|
|
1934
1541
|
url = f"{self.base_url}/v3/classifications/items/bulk"
|
|
1935
1542
|
query_params = {}
|
|
1936
|
-
response = self._post(
|
|
1937
|
-
url,
|
|
1938
|
-
data=request_body_data,
|
|
1939
|
-
params=query_params,
|
|
1940
|
-
content_type="application/json",
|
|
1941
|
-
)
|
|
1543
|
+
response = self._post(url, data=request_body_data, params=query_params, content_type="application/json")
|
|
1942
1544
|
return self._handle_response(response)
|
|
1943
1545
|
|
|
1944
|
-
def bulk_update_classification_item(
|
|
1945
|
-
self, items: list[dict[str, Any]]
|
|
1946
|
-
) -> dict[str, Any]:
|
|
1546
|
+
async def bulk_update_classification_item(self, items: list[dict[str, Any]]) -> dict[str, Any]:
|
|
1947
1547
|
"""
|
|
1948
1548
|
Update multiple items
|
|
1949
1549
|
|
|
@@ -1959,14 +1559,13 @@ class BillApp(APIApplication):
|
|
|
1959
1559
|
classifications
|
|
1960
1560
|
"""
|
|
1961
1561
|
request_body_data = None
|
|
1962
|
-
# Using array parameter 'items' directly as request body
|
|
1963
1562
|
request_body_data = items
|
|
1964
1563
|
url = f"{self.base_url}/v3/classifications/items/bulk"
|
|
1965
1564
|
query_params = {}
|
|
1966
1565
|
response = self._patch(url, data=request_body_data, params=query_params)
|
|
1967
1566
|
return self._handle_response(response)
|
|
1968
1567
|
|
|
1969
|
-
def bulk_archive_classification_item(self, ids: str) -> dict[str, Any]:
|
|
1568
|
+
async def bulk_archive_classification_item(self, ids: str) -> dict[str, Any]:
|
|
1970
1569
|
"""
|
|
1971
1570
|
Archive multiple items
|
|
1972
1571
|
|
|
@@ -1985,15 +1584,10 @@ class BillApp(APIApplication):
|
|
|
1985
1584
|
request_body_data = None
|
|
1986
1585
|
url = f"{self.base_url}/v3/classifications/items/bulk/archive"
|
|
1987
1586
|
query_params = {k: v for k, v in [("ids", ids)] if v is not None}
|
|
1988
|
-
response = self._post(
|
|
1989
|
-
url,
|
|
1990
|
-
data=request_body_data,
|
|
1991
|
-
params=query_params,
|
|
1992
|
-
content_type="application/json",
|
|
1993
|
-
)
|
|
1587
|
+
response = self._post(url, data=request_body_data, params=query_params, content_type="application/json")
|
|
1994
1588
|
return self._handle_response(response)
|
|
1995
1589
|
|
|
1996
|
-
def bulk_restore_classification_item(self, ids: str) -> dict[str, Any]:
|
|
1590
|
+
async def bulk_restore_classification_item(self, ids: str) -> dict[str, Any]:
|
|
1997
1591
|
"""
|
|
1998
1592
|
Restore multiple items
|
|
1999
1593
|
|
|
@@ -2012,15 +1606,10 @@ class BillApp(APIApplication):
|
|
|
2012
1606
|
request_body_data = None
|
|
2013
1607
|
url = f"{self.base_url}/v3/classifications/items/bulk/restore"
|
|
2014
1608
|
query_params = {k: v for k, v in [("ids", ids)] if v is not None}
|
|
2015
|
-
response = self._post(
|
|
2016
|
-
url,
|
|
2017
|
-
data=request_body_data,
|
|
2018
|
-
params=query_params,
|
|
2019
|
-
content_type="application/json",
|
|
2020
|
-
)
|
|
1609
|
+
response = self._post(url, data=request_body_data, params=query_params, content_type="application/json")
|
|
2021
1610
|
return self._handle_response(response)
|
|
2022
1611
|
|
|
2023
|
-
def get_classification_item(self, id: str) -> dict[str, Any]:
|
|
1612
|
+
async def get_classification_item(self, id: str) -> dict[str, Any]:
|
|
2024
1613
|
"""
|
|
2025
1614
|
Get item details
|
|
2026
1615
|
|
|
@@ -2043,7 +1632,7 @@ class BillApp(APIApplication):
|
|
|
2043
1632
|
response = self._get(url, params=query_params)
|
|
2044
1633
|
return self._handle_response(response)
|
|
2045
1634
|
|
|
2046
|
-
def update_classification_item(
|
|
1635
|
+
async def update_classification_item(
|
|
2047
1636
|
self,
|
|
2048
1637
|
id: str,
|
|
2049
1638
|
type: Any | None = None,
|
|
@@ -2100,15 +1689,13 @@ class BillApp(APIApplication):
|
|
|
2100
1689
|
"chartOfAccountId": chartOfAccountId,
|
|
2101
1690
|
"taxable": taxable,
|
|
2102
1691
|
}
|
|
2103
|
-
request_body_data = {
|
|
2104
|
-
k: v for k, v in request_body_data.items() if v is not None
|
|
2105
|
-
}
|
|
1692
|
+
request_body_data = {k: v for k, v in request_body_data.items() if v is not None}
|
|
2106
1693
|
url = f"{self.base_url}/v3/classifications/items/{id}"
|
|
2107
1694
|
query_params = {}
|
|
2108
1695
|
response = self._patch(url, data=request_body_data, params=query_params)
|
|
2109
1696
|
return self._handle_response(response)
|
|
2110
1697
|
|
|
2111
|
-
def archive_classification_item(self, id: str) -> dict[str, Any]:
|
|
1698
|
+
async def archive_classification_item(self, id: str) -> dict[str, Any]:
|
|
2112
1699
|
"""
|
|
2113
1700
|
Archive an item
|
|
2114
1701
|
|
|
@@ -2129,15 +1716,10 @@ class BillApp(APIApplication):
|
|
|
2129
1716
|
request_body_data = None
|
|
2130
1717
|
url = f"{self.base_url}/v3/classifications/items/{id}/archive"
|
|
2131
1718
|
query_params = {}
|
|
2132
|
-
response = self._post(
|
|
2133
|
-
url,
|
|
2134
|
-
data=request_body_data,
|
|
2135
|
-
params=query_params,
|
|
2136
|
-
content_type="application/json",
|
|
2137
|
-
)
|
|
1719
|
+
response = self._post(url, data=request_body_data, params=query_params, content_type="application/json")
|
|
2138
1720
|
return self._handle_response(response)
|
|
2139
1721
|
|
|
2140
|
-
def restore_classification_item(self, id: str) -> dict[str, Any]:
|
|
1722
|
+
async def restore_classification_item(self, id: str) -> dict[str, Any]:
|
|
2141
1723
|
"""
|
|
2142
1724
|
Restore an archived item
|
|
2143
1725
|
|
|
@@ -2158,20 +1740,11 @@ class BillApp(APIApplication):
|
|
|
2158
1740
|
request_body_data = None
|
|
2159
1741
|
url = f"{self.base_url}/v3/classifications/items/{id}/restore"
|
|
2160
1742
|
query_params = {}
|
|
2161
|
-
response = self._post(
|
|
2162
|
-
url,
|
|
2163
|
-
data=request_body_data,
|
|
2164
|
-
params=query_params,
|
|
2165
|
-
content_type="application/json",
|
|
2166
|
-
)
|
|
1743
|
+
response = self._post(url, data=request_body_data, params=query_params, content_type="application/json")
|
|
2167
1744
|
return self._handle_response(response)
|
|
2168
1745
|
|
|
2169
|
-
def list_classification_jobs(
|
|
2170
|
-
self,
|
|
2171
|
-
max: int | None = None,
|
|
2172
|
-
sort: str | None = None,
|
|
2173
|
-
filters: str | None = None,
|
|
2174
|
-
page: str | None = None,
|
|
1746
|
+
async def list_classification_jobs(
|
|
1747
|
+
self, max: int | None = None, sort: str | None = None, filters: str | None = None, page: str | None = None
|
|
2175
1748
|
) -> dict[str, Any]:
|
|
2176
1749
|
"""
|
|
2177
1750
|
Get list of jobs
|
|
@@ -2192,25 +1765,12 @@ class BillApp(APIApplication):
|
|
|
2192
1765
|
classifications
|
|
2193
1766
|
"""
|
|
2194
1767
|
url = f"{self.base_url}/v3/classifications/jobs"
|
|
2195
|
-
query_params = {
|
|
2196
|
-
k: v
|
|
2197
|
-
for k, v in [
|
|
2198
|
-
("max", max),
|
|
2199
|
-
("sort", sort),
|
|
2200
|
-
("filters", filters),
|
|
2201
|
-
("page", page),
|
|
2202
|
-
]
|
|
2203
|
-
if v is not None
|
|
2204
|
-
}
|
|
1768
|
+
query_params = {k: v for k, v in [("max", max), ("sort", sort), ("filters", filters), ("page", page)] if v is not None}
|
|
2205
1769
|
response = self._get(url, params=query_params)
|
|
2206
1770
|
return self._handle_response(response)
|
|
2207
1771
|
|
|
2208
|
-
def create_classification_job(
|
|
2209
|
-
self,
|
|
2210
|
-
name: str | None = None,
|
|
2211
|
-
shortName: str | None = None,
|
|
2212
|
-
description: str | None = None,
|
|
2213
|
-
parentId: str | None = None,
|
|
1772
|
+
async def create_classification_job(
|
|
1773
|
+
self, name: str | None = None, shortName: str | None = None, description: str | None = None, parentId: str | None = None
|
|
2214
1774
|
) -> dict[str, Any]:
|
|
2215
1775
|
"""
|
|
2216
1776
|
Create a job
|
|
@@ -2231,28 +1791,14 @@ class BillApp(APIApplication):
|
|
|
2231
1791
|
classifications
|
|
2232
1792
|
"""
|
|
2233
1793
|
request_body_data = None
|
|
2234
|
-
request_body_data = {
|
|
2235
|
-
|
|
2236
|
-
"shortName": shortName,
|
|
2237
|
-
"description": description,
|
|
2238
|
-
"parentId": parentId,
|
|
2239
|
-
}
|
|
2240
|
-
request_body_data = {
|
|
2241
|
-
k: v for k, v in request_body_data.items() if v is not None
|
|
2242
|
-
}
|
|
1794
|
+
request_body_data = {"name": name, "shortName": shortName, "description": description, "parentId": parentId}
|
|
1795
|
+
request_body_data = {k: v for k, v in request_body_data.items() if v is not None}
|
|
2243
1796
|
url = f"{self.base_url}/v3/classifications/jobs"
|
|
2244
1797
|
query_params = {}
|
|
2245
|
-
response = self._post(
|
|
2246
|
-
url,
|
|
2247
|
-
data=request_body_data,
|
|
2248
|
-
params=query_params,
|
|
2249
|
-
content_type="application/json",
|
|
2250
|
-
)
|
|
1798
|
+
response = self._post(url, data=request_body_data, params=query_params, content_type="application/json")
|
|
2251
1799
|
return self._handle_response(response)
|
|
2252
1800
|
|
|
2253
|
-
def bulk_create_classification_job(
|
|
2254
|
-
self, items: list[dict[str, Any]]
|
|
2255
|
-
) -> dict[str, Any]:
|
|
1801
|
+
async def bulk_create_classification_job(self, items: list[dict[str, Any]]) -> dict[str, Any]:
|
|
2256
1802
|
"""
|
|
2257
1803
|
Create multiple jobs
|
|
2258
1804
|
|
|
@@ -2268,21 +1814,13 @@ class BillApp(APIApplication):
|
|
|
2268
1814
|
classifications
|
|
2269
1815
|
"""
|
|
2270
1816
|
request_body_data = None
|
|
2271
|
-
# Using array parameter 'items' directly as request body
|
|
2272
1817
|
request_body_data = items
|
|
2273
1818
|
url = f"{self.base_url}/v3/classifications/jobs/bulk"
|
|
2274
1819
|
query_params = {}
|
|
2275
|
-
response = self._post(
|
|
2276
|
-
url,
|
|
2277
|
-
data=request_body_data,
|
|
2278
|
-
params=query_params,
|
|
2279
|
-
content_type="application/json",
|
|
2280
|
-
)
|
|
1820
|
+
response = self._post(url, data=request_body_data, params=query_params, content_type="application/json")
|
|
2281
1821
|
return self._handle_response(response)
|
|
2282
1822
|
|
|
2283
|
-
def bulk_update_classification_job(
|
|
2284
|
-
self, items: list[dict[str, Any]]
|
|
2285
|
-
) -> dict[str, Any]:
|
|
1823
|
+
async def bulk_update_classification_job(self, items: list[dict[str, Any]]) -> dict[str, Any]:
|
|
2286
1824
|
"""
|
|
2287
1825
|
Update multiple jobs
|
|
2288
1826
|
|
|
@@ -2298,14 +1836,13 @@ class BillApp(APIApplication):
|
|
|
2298
1836
|
classifications
|
|
2299
1837
|
"""
|
|
2300
1838
|
request_body_data = None
|
|
2301
|
-
# Using array parameter 'items' directly as request body
|
|
2302
1839
|
request_body_data = items
|
|
2303
1840
|
url = f"{self.base_url}/v3/classifications/jobs/bulk"
|
|
2304
1841
|
query_params = {}
|
|
2305
1842
|
response = self._patch(url, data=request_body_data, params=query_params)
|
|
2306
1843
|
return self._handle_response(response)
|
|
2307
1844
|
|
|
2308
|
-
def bulk_archive_classification_job(self, ids: str) -> dict[str, Any]:
|
|
1845
|
+
async def bulk_archive_classification_job(self, ids: str) -> dict[str, Any]:
|
|
2309
1846
|
"""
|
|
2310
1847
|
Archive multiple jobs
|
|
2311
1848
|
|
|
@@ -2324,15 +1861,10 @@ class BillApp(APIApplication):
|
|
|
2324
1861
|
request_body_data = None
|
|
2325
1862
|
url = f"{self.base_url}/v3/classifications/jobs/bulk/archive"
|
|
2326
1863
|
query_params = {k: v for k, v in [("ids", ids)] if v is not None}
|
|
2327
|
-
response = self._post(
|
|
2328
|
-
url,
|
|
2329
|
-
data=request_body_data,
|
|
2330
|
-
params=query_params,
|
|
2331
|
-
content_type="application/json",
|
|
2332
|
-
)
|
|
1864
|
+
response = self._post(url, data=request_body_data, params=query_params, content_type="application/json")
|
|
2333
1865
|
return self._handle_response(response)
|
|
2334
1866
|
|
|
2335
|
-
def bulk_restore_classification_job(self, ids: str) -> dict[str, Any]:
|
|
1867
|
+
async def bulk_restore_classification_job(self, ids: str) -> dict[str, Any]:
|
|
2336
1868
|
"""
|
|
2337
1869
|
Restore multiple jobs
|
|
2338
1870
|
|
|
@@ -2351,15 +1883,10 @@ class BillApp(APIApplication):
|
|
|
2351
1883
|
request_body_data = None
|
|
2352
1884
|
url = f"{self.base_url}/v3/classifications/jobs/bulk/restore"
|
|
2353
1885
|
query_params = {k: v for k, v in [("ids", ids)] if v is not None}
|
|
2354
|
-
response = self._post(
|
|
2355
|
-
url,
|
|
2356
|
-
data=request_body_data,
|
|
2357
|
-
params=query_params,
|
|
2358
|
-
content_type="application/json",
|
|
2359
|
-
)
|
|
1886
|
+
response = self._post(url, data=request_body_data, params=query_params, content_type="application/json")
|
|
2360
1887
|
return self._handle_response(response)
|
|
2361
1888
|
|
|
2362
|
-
def get_classification_job(self, id: str) -> dict[str, Any]:
|
|
1889
|
+
async def get_classification_job(self, id: str) -> dict[str, Any]:
|
|
2363
1890
|
"""
|
|
2364
1891
|
Get job details
|
|
2365
1892
|
|
|
@@ -2382,13 +1909,8 @@ class BillApp(APIApplication):
|
|
|
2382
1909
|
response = self._get(url, params=query_params)
|
|
2383
1910
|
return self._handle_response(response)
|
|
2384
1911
|
|
|
2385
|
-
def update_classification_job(
|
|
2386
|
-
self,
|
|
2387
|
-
id: str,
|
|
2388
|
-
name: str | None = None,
|
|
2389
|
-
shortName: str | None = None,
|
|
2390
|
-
description: str | None = None,
|
|
2391
|
-
parentId: str | None = None,
|
|
1912
|
+
async def update_classification_job(
|
|
1913
|
+
self, id: str, name: str | None = None, shortName: str | None = None, description: str | None = None, parentId: str | None = None
|
|
2392
1914
|
) -> dict[str, Any]:
|
|
2393
1915
|
"""
|
|
2394
1916
|
Update a job
|
|
@@ -2412,21 +1934,14 @@ class BillApp(APIApplication):
|
|
|
2412
1934
|
if id is None:
|
|
2413
1935
|
raise ValueError("Missing required parameter 'id'.")
|
|
2414
1936
|
request_body_data = None
|
|
2415
|
-
request_body_data = {
|
|
2416
|
-
|
|
2417
|
-
"shortName": shortName,
|
|
2418
|
-
"description": description,
|
|
2419
|
-
"parentId": parentId,
|
|
2420
|
-
}
|
|
2421
|
-
request_body_data = {
|
|
2422
|
-
k: v for k, v in request_body_data.items() if v is not None
|
|
2423
|
-
}
|
|
1937
|
+
request_body_data = {"name": name, "shortName": shortName, "description": description, "parentId": parentId}
|
|
1938
|
+
request_body_data = {k: v for k, v in request_body_data.items() if v is not None}
|
|
2424
1939
|
url = f"{self.base_url}/v3/classifications/jobs/{id}"
|
|
2425
1940
|
query_params = {}
|
|
2426
1941
|
response = self._patch(url, data=request_body_data, params=query_params)
|
|
2427
1942
|
return self._handle_response(response)
|
|
2428
1943
|
|
|
2429
|
-
def archive_classification_job(self, id: str) -> dict[str, Any]:
|
|
1944
|
+
async def archive_classification_job(self, id: str) -> dict[str, Any]:
|
|
2430
1945
|
"""
|
|
2431
1946
|
Archive a job
|
|
2432
1947
|
|
|
@@ -2447,15 +1962,10 @@ class BillApp(APIApplication):
|
|
|
2447
1962
|
request_body_data = None
|
|
2448
1963
|
url = f"{self.base_url}/v3/classifications/jobs/{id}/archive"
|
|
2449
1964
|
query_params = {}
|
|
2450
|
-
response = self._post(
|
|
2451
|
-
url,
|
|
2452
|
-
data=request_body_data,
|
|
2453
|
-
params=query_params,
|
|
2454
|
-
content_type="application/json",
|
|
2455
|
-
)
|
|
1965
|
+
response = self._post(url, data=request_body_data, params=query_params, content_type="application/json")
|
|
2456
1966
|
return self._handle_response(response)
|
|
2457
1967
|
|
|
2458
|
-
def restore_classification_job(self, id: str) -> dict[str, Any]:
|
|
1968
|
+
async def restore_classification_job(self, id: str) -> dict[str, Any]:
|
|
2459
1969
|
"""
|
|
2460
1970
|
Restore an archived job
|
|
2461
1971
|
|
|
@@ -2476,20 +1986,11 @@ class BillApp(APIApplication):
|
|
|
2476
1986
|
request_body_data = None
|
|
2477
1987
|
url = f"{self.base_url}/v3/classifications/jobs/{id}/restore"
|
|
2478
1988
|
query_params = {}
|
|
2479
|
-
response = self._post(
|
|
2480
|
-
url,
|
|
2481
|
-
data=request_body_data,
|
|
2482
|
-
params=query_params,
|
|
2483
|
-
content_type="application/json",
|
|
2484
|
-
)
|
|
1989
|
+
response = self._post(url, data=request_body_data, params=query_params, content_type="application/json")
|
|
2485
1990
|
return self._handle_response(response)
|
|
2486
1991
|
|
|
2487
|
-
def list_classification_locations(
|
|
2488
|
-
self,
|
|
2489
|
-
max: int | None = None,
|
|
2490
|
-
sort: str | None = None,
|
|
2491
|
-
filters: str | None = None,
|
|
2492
|
-
page: str | None = None,
|
|
1992
|
+
async def list_classification_locations(
|
|
1993
|
+
self, max: int | None = None, sort: str | None = None, filters: str | None = None, page: str | None = None
|
|
2493
1994
|
) -> dict[str, Any]:
|
|
2494
1995
|
"""
|
|
2495
1996
|
Get list of locations
|
|
@@ -2510,25 +2011,12 @@ class BillApp(APIApplication):
|
|
|
2510
2011
|
classifications
|
|
2511
2012
|
"""
|
|
2512
2013
|
url = f"{self.base_url}/v3/classifications/locations"
|
|
2513
|
-
query_params = {
|
|
2514
|
-
k: v
|
|
2515
|
-
for k, v in [
|
|
2516
|
-
("max", max),
|
|
2517
|
-
("sort", sort),
|
|
2518
|
-
("filters", filters),
|
|
2519
|
-
("page", page),
|
|
2520
|
-
]
|
|
2521
|
-
if v is not None
|
|
2522
|
-
}
|
|
2014
|
+
query_params = {k: v for k, v in [("max", max), ("sort", sort), ("filters", filters), ("page", page)] if v is not None}
|
|
2523
2015
|
response = self._get(url, params=query_params)
|
|
2524
2016
|
return self._handle_response(response)
|
|
2525
2017
|
|
|
2526
|
-
def create_classification_location(
|
|
2527
|
-
self,
|
|
2528
|
-
name: str | None = None,
|
|
2529
|
-
shortName: str | None = None,
|
|
2530
|
-
description: str | None = None,
|
|
2531
|
-
parentId: str | None = None,
|
|
2018
|
+
async def create_classification_location(
|
|
2019
|
+
self, name: str | None = None, shortName: str | None = None, description: str | None = None, parentId: str | None = None
|
|
2532
2020
|
) -> dict[str, Any]:
|
|
2533
2021
|
"""
|
|
2534
2022
|
Create a location
|
|
@@ -2549,28 +2037,14 @@ class BillApp(APIApplication):
|
|
|
2549
2037
|
classifications
|
|
2550
2038
|
"""
|
|
2551
2039
|
request_body_data = None
|
|
2552
|
-
request_body_data = {
|
|
2553
|
-
|
|
2554
|
-
"shortName": shortName,
|
|
2555
|
-
"description": description,
|
|
2556
|
-
"parentId": parentId,
|
|
2557
|
-
}
|
|
2558
|
-
request_body_data = {
|
|
2559
|
-
k: v for k, v in request_body_data.items() if v is not None
|
|
2560
|
-
}
|
|
2040
|
+
request_body_data = {"name": name, "shortName": shortName, "description": description, "parentId": parentId}
|
|
2041
|
+
request_body_data = {k: v for k, v in request_body_data.items() if v is not None}
|
|
2561
2042
|
url = f"{self.base_url}/v3/classifications/locations"
|
|
2562
2043
|
query_params = {}
|
|
2563
|
-
response = self._post(
|
|
2564
|
-
url,
|
|
2565
|
-
data=request_body_data,
|
|
2566
|
-
params=query_params,
|
|
2567
|
-
content_type="application/json",
|
|
2568
|
-
)
|
|
2044
|
+
response = self._post(url, data=request_body_data, params=query_params, content_type="application/json")
|
|
2569
2045
|
return self._handle_response(response)
|
|
2570
2046
|
|
|
2571
|
-
def bulk_create_classification_location(
|
|
2572
|
-
self, items: list[dict[str, Any]]
|
|
2573
|
-
) -> dict[str, Any]:
|
|
2047
|
+
async def bulk_create_classification_location(self, items: list[dict[str, Any]]) -> dict[str, Any]:
|
|
2574
2048
|
"""
|
|
2575
2049
|
Create multiple locations
|
|
2576
2050
|
|
|
@@ -2586,21 +2060,13 @@ class BillApp(APIApplication):
|
|
|
2586
2060
|
classifications
|
|
2587
2061
|
"""
|
|
2588
2062
|
request_body_data = None
|
|
2589
|
-
# Using array parameter 'items' directly as request body
|
|
2590
2063
|
request_body_data = items
|
|
2591
2064
|
url = f"{self.base_url}/v3/classifications/locations/bulk"
|
|
2592
2065
|
query_params = {}
|
|
2593
|
-
response = self._post(
|
|
2594
|
-
url,
|
|
2595
|
-
data=request_body_data,
|
|
2596
|
-
params=query_params,
|
|
2597
|
-
content_type="application/json",
|
|
2598
|
-
)
|
|
2066
|
+
response = self._post(url, data=request_body_data, params=query_params, content_type="application/json")
|
|
2599
2067
|
return self._handle_response(response)
|
|
2600
2068
|
|
|
2601
|
-
def bulk_update_classification_location(
|
|
2602
|
-
self, items: list[dict[str, Any]]
|
|
2603
|
-
) -> dict[str, Any]:
|
|
2069
|
+
async def bulk_update_classification_location(self, items: list[dict[str, Any]]) -> dict[str, Any]:
|
|
2604
2070
|
"""
|
|
2605
2071
|
Update multiple locations
|
|
2606
2072
|
|
|
@@ -2616,14 +2082,13 @@ class BillApp(APIApplication):
|
|
|
2616
2082
|
classifications
|
|
2617
2083
|
"""
|
|
2618
2084
|
request_body_data = None
|
|
2619
|
-
# Using array parameter 'items' directly as request body
|
|
2620
2085
|
request_body_data = items
|
|
2621
2086
|
url = f"{self.base_url}/v3/classifications/locations/bulk"
|
|
2622
2087
|
query_params = {}
|
|
2623
2088
|
response = self._patch(url, data=request_body_data, params=query_params)
|
|
2624
2089
|
return self._handle_response(response)
|
|
2625
2090
|
|
|
2626
|
-
def bulk_archive_classification_location(self, ids: str) -> dict[str, Any]:
|
|
2091
|
+
async def bulk_archive_classification_location(self, ids: str) -> dict[str, Any]:
|
|
2627
2092
|
"""
|
|
2628
2093
|
Archive multiple locations
|
|
2629
2094
|
|
|
@@ -2642,15 +2107,10 @@ class BillApp(APIApplication):
|
|
|
2642
2107
|
request_body_data = None
|
|
2643
2108
|
url = f"{self.base_url}/v3/classifications/locations/bulk/archive"
|
|
2644
2109
|
query_params = {k: v for k, v in [("ids", ids)] if v is not None}
|
|
2645
|
-
response = self._post(
|
|
2646
|
-
url,
|
|
2647
|
-
data=request_body_data,
|
|
2648
|
-
params=query_params,
|
|
2649
|
-
content_type="application/json",
|
|
2650
|
-
)
|
|
2110
|
+
response = self._post(url, data=request_body_data, params=query_params, content_type="application/json")
|
|
2651
2111
|
return self._handle_response(response)
|
|
2652
2112
|
|
|
2653
|
-
def bulk_restore_classification_location(self, ids: str) -> dict[str, Any]:
|
|
2113
|
+
async def bulk_restore_classification_location(self, ids: str) -> dict[str, Any]:
|
|
2654
2114
|
"""
|
|
2655
2115
|
Restore multiple locations
|
|
2656
2116
|
|
|
@@ -2669,15 +2129,10 @@ class BillApp(APIApplication):
|
|
|
2669
2129
|
request_body_data = None
|
|
2670
2130
|
url = f"{self.base_url}/v3/classifications/locations/bulk/restore"
|
|
2671
2131
|
query_params = {k: v for k, v in [("ids", ids)] if v is not None}
|
|
2672
|
-
response = self._post(
|
|
2673
|
-
url,
|
|
2674
|
-
data=request_body_data,
|
|
2675
|
-
params=query_params,
|
|
2676
|
-
content_type="application/json",
|
|
2677
|
-
)
|
|
2132
|
+
response = self._post(url, data=request_body_data, params=query_params, content_type="application/json")
|
|
2678
2133
|
return self._handle_response(response)
|
|
2679
2134
|
|
|
2680
|
-
def get_classification_location(self, id: str) -> dict[str, Any]:
|
|
2135
|
+
async def get_classification_location(self, id: str) -> dict[str, Any]:
|
|
2681
2136
|
"""
|
|
2682
2137
|
Get location details
|
|
2683
2138
|
|
|
@@ -2700,13 +2155,8 @@ class BillApp(APIApplication):
|
|
|
2700
2155
|
response = self._get(url, params=query_params)
|
|
2701
2156
|
return self._handle_response(response)
|
|
2702
2157
|
|
|
2703
|
-
def update_classification_location(
|
|
2704
|
-
self,
|
|
2705
|
-
id: str,
|
|
2706
|
-
name: str | None = None,
|
|
2707
|
-
shortName: str | None = None,
|
|
2708
|
-
description: str | None = None,
|
|
2709
|
-
parentId: str | None = None,
|
|
2158
|
+
async def update_classification_location(
|
|
2159
|
+
self, id: str, name: str | None = None, shortName: str | None = None, description: str | None = None, parentId: str | None = None
|
|
2710
2160
|
) -> dict[str, Any]:
|
|
2711
2161
|
"""
|
|
2712
2162
|
Update a location
|
|
@@ -2730,21 +2180,14 @@ class BillApp(APIApplication):
|
|
|
2730
2180
|
if id is None:
|
|
2731
2181
|
raise ValueError("Missing required parameter 'id'.")
|
|
2732
2182
|
request_body_data = None
|
|
2733
|
-
request_body_data = {
|
|
2734
|
-
|
|
2735
|
-
"shortName": shortName,
|
|
2736
|
-
"description": description,
|
|
2737
|
-
"parentId": parentId,
|
|
2738
|
-
}
|
|
2739
|
-
request_body_data = {
|
|
2740
|
-
k: v for k, v in request_body_data.items() if v is not None
|
|
2741
|
-
}
|
|
2183
|
+
request_body_data = {"name": name, "shortName": shortName, "description": description, "parentId": parentId}
|
|
2184
|
+
request_body_data = {k: v for k, v in request_body_data.items() if v is not None}
|
|
2742
2185
|
url = f"{self.base_url}/v3/classifications/locations/{id}"
|
|
2743
2186
|
query_params = {}
|
|
2744
2187
|
response = self._patch(url, data=request_body_data, params=query_params)
|
|
2745
2188
|
return self._handle_response(response)
|
|
2746
2189
|
|
|
2747
|
-
def archive_classification_location(self, id: str) -> dict[str, Any]:
|
|
2190
|
+
async def archive_classification_location(self, id: str) -> dict[str, Any]:
|
|
2748
2191
|
"""
|
|
2749
2192
|
Archive a location
|
|
2750
2193
|
|
|
@@ -2765,15 +2208,10 @@ class BillApp(APIApplication):
|
|
|
2765
2208
|
request_body_data = None
|
|
2766
2209
|
url = f"{self.base_url}/v3/classifications/locations/{id}/archive"
|
|
2767
2210
|
query_params = {}
|
|
2768
|
-
response = self._post(
|
|
2769
|
-
url,
|
|
2770
|
-
data=request_body_data,
|
|
2771
|
-
params=query_params,
|
|
2772
|
-
content_type="application/json",
|
|
2773
|
-
)
|
|
2211
|
+
response = self._post(url, data=request_body_data, params=query_params, content_type="application/json")
|
|
2774
2212
|
return self._handle_response(response)
|
|
2775
2213
|
|
|
2776
|
-
def restore_classification_location(self, id: str) -> dict[str, Any]:
|
|
2214
|
+
async def restore_classification_location(self, id: str) -> dict[str, Any]:
|
|
2777
2215
|
"""
|
|
2778
2216
|
Restore an archived location
|
|
2779
2217
|
|
|
@@ -2794,20 +2232,11 @@ class BillApp(APIApplication):
|
|
|
2794
2232
|
request_body_data = None
|
|
2795
2233
|
url = f"{self.base_url}/v3/classifications/locations/{id}/restore"
|
|
2796
2234
|
query_params = {}
|
|
2797
|
-
response = self._post(
|
|
2798
|
-
|
|
2799
|
-
|
|
2800
|
-
|
|
2801
|
-
|
|
2802
|
-
)
|
|
2803
|
-
return self._handle_response(response)
|
|
2804
|
-
|
|
2805
|
-
def list_customers(
|
|
2806
|
-
self,
|
|
2807
|
-
max: int | None = None,
|
|
2808
|
-
sort: str | None = None,
|
|
2809
|
-
filters: str | None = None,
|
|
2810
|
-
page: str | None = None,
|
|
2235
|
+
response = self._post(url, data=request_body_data, params=query_params, content_type="application/json")
|
|
2236
|
+
return self._handle_response(response)
|
|
2237
|
+
|
|
2238
|
+
async def list_customers(
|
|
2239
|
+
self, max: int | None = None, sort: str | None = None, filters: str | None = None, page: str | None = None
|
|
2811
2240
|
) -> dict[str, Any]:
|
|
2812
2241
|
"""
|
|
2813
2242
|
Get list of customers
|
|
@@ -2828,20 +2257,11 @@ class BillApp(APIApplication):
|
|
|
2828
2257
|
customers
|
|
2829
2258
|
"""
|
|
2830
2259
|
url = f"{self.base_url}/v3/customers"
|
|
2831
|
-
query_params = {
|
|
2832
|
-
k: v
|
|
2833
|
-
for k, v in [
|
|
2834
|
-
("max", max),
|
|
2835
|
-
("sort", sort),
|
|
2836
|
-
("filters", filters),
|
|
2837
|
-
("page", page),
|
|
2838
|
-
]
|
|
2839
|
-
if v is not None
|
|
2840
|
-
}
|
|
2260
|
+
query_params = {k: v for k, v in [("max", max), ("sort", sort), ("filters", filters), ("page", page)] if v is not None}
|
|
2841
2261
|
response = self._get(url, params=query_params)
|
|
2842
2262
|
return self._handle_response(response)
|
|
2843
2263
|
|
|
2844
|
-
def create_customer(
|
|
2264
|
+
async def create_customer(
|
|
2845
2265
|
self,
|
|
2846
2266
|
name: str,
|
|
2847
2267
|
email: str,
|
|
@@ -2900,20 +2320,13 @@ class BillApp(APIApplication):
|
|
|
2900
2320
|
"billingAddress": billingAddress,
|
|
2901
2321
|
"shippingAddress": shippingAddress,
|
|
2902
2322
|
}
|
|
2903
|
-
request_body_data = {
|
|
2904
|
-
k: v for k, v in request_body_data.items() if v is not None
|
|
2905
|
-
}
|
|
2323
|
+
request_body_data = {k: v for k, v in request_body_data.items() if v is not None}
|
|
2906
2324
|
url = f"{self.base_url}/v3/customers"
|
|
2907
2325
|
query_params = {}
|
|
2908
|
-
response = self._post(
|
|
2909
|
-
url,
|
|
2910
|
-
data=request_body_data,
|
|
2911
|
-
params=query_params,
|
|
2912
|
-
content_type="application/json",
|
|
2913
|
-
)
|
|
2326
|
+
response = self._post(url, data=request_body_data, params=query_params, content_type="application/json")
|
|
2914
2327
|
return self._handle_response(response)
|
|
2915
2328
|
|
|
2916
|
-
def get_customer(self, customerId: str) -> dict[str, Any]:
|
|
2329
|
+
async def get_customer(self, customerId: str) -> dict[str, Any]:
|
|
2917
2330
|
"""
|
|
2918
2331
|
Get customer details
|
|
2919
2332
|
|
|
@@ -2936,7 +2349,7 @@ class BillApp(APIApplication):
|
|
|
2936
2349
|
response = self._get(url, params=query_params)
|
|
2937
2350
|
return self._handle_response(response)
|
|
2938
2351
|
|
|
2939
|
-
def update_customer(
|
|
2352
|
+
async def update_customer(
|
|
2940
2353
|
self,
|
|
2941
2354
|
customerId: str,
|
|
2942
2355
|
name: str | None = None,
|
|
@@ -2999,15 +2412,13 @@ class BillApp(APIApplication):
|
|
|
2999
2412
|
"billingAddress": billingAddress,
|
|
3000
2413
|
"shippingAddress": shippingAddress,
|
|
3001
2414
|
}
|
|
3002
|
-
request_body_data = {
|
|
3003
|
-
k: v for k, v in request_body_data.items() if v is not None
|
|
3004
|
-
}
|
|
2415
|
+
request_body_data = {k: v for k, v in request_body_data.items() if v is not None}
|
|
3005
2416
|
url = f"{self.base_url}/v3/customers/{customerId}"
|
|
3006
2417
|
query_params = {}
|
|
3007
2418
|
response = self._patch(url, data=request_body_data, params=query_params)
|
|
3008
2419
|
return self._handle_response(response)
|
|
3009
2420
|
|
|
3010
|
-
def archive_customer(self, customerId: str) -> dict[str, Any]:
|
|
2421
|
+
async def archive_customer(self, customerId: str) -> dict[str, Any]:
|
|
3011
2422
|
"""
|
|
3012
2423
|
Archive a customer
|
|
3013
2424
|
|
|
@@ -3028,15 +2439,10 @@ class BillApp(APIApplication):
|
|
|
3028
2439
|
request_body_data = None
|
|
3029
2440
|
url = f"{self.base_url}/v3/customers/{customerId}/archive"
|
|
3030
2441
|
query_params = {}
|
|
3031
|
-
response = self._post(
|
|
3032
|
-
url,
|
|
3033
|
-
data=request_body_data,
|
|
3034
|
-
params=query_params,
|
|
3035
|
-
content_type="application/json",
|
|
3036
|
-
)
|
|
2442
|
+
response = self._post(url, data=request_body_data, params=query_params, content_type="application/json")
|
|
3037
2443
|
return self._handle_response(response)
|
|
3038
2444
|
|
|
3039
|
-
def restore_customer(self, customerId: str) -> dict[str, Any]:
|
|
2445
|
+
async def restore_customer(self, customerId: str) -> dict[str, Any]:
|
|
3040
2446
|
"""
|
|
3041
2447
|
Restore an archived customer
|
|
3042
2448
|
|
|
@@ -3057,17 +2463,10 @@ class BillApp(APIApplication):
|
|
|
3057
2463
|
request_body_data = None
|
|
3058
2464
|
url = f"{self.base_url}/v3/customers/{customerId}/restore"
|
|
3059
2465
|
query_params = {}
|
|
3060
|
-
response = self._post(
|
|
3061
|
-
url,
|
|
3062
|
-
data=request_body_data,
|
|
3063
|
-
params=query_params,
|
|
3064
|
-
content_type="application/json",
|
|
3065
|
-
)
|
|
2466
|
+
response = self._post(url, data=request_body_data, params=query_params, content_type="application/json")
|
|
3066
2467
|
return self._handle_response(response)
|
|
3067
2468
|
|
|
3068
|
-
def list_documents(
|
|
3069
|
-
self, billId: str, max: int | None = None, page: str | None = None
|
|
3070
|
-
) -> dict[str, Any]:
|
|
2469
|
+
async def list_documents(self, billId: str, max: int | None = None, page: str | None = None) -> dict[str, Any]:
|
|
3071
2470
|
"""
|
|
3072
2471
|
Get list of documents
|
|
3073
2472
|
|
|
@@ -3088,15 +2487,11 @@ class BillApp(APIApplication):
|
|
|
3088
2487
|
if billId is None:
|
|
3089
2488
|
raise ValueError("Missing required parameter 'billId'.")
|
|
3090
2489
|
url = f"{self.base_url}/v3/documents/bills/{billId}"
|
|
3091
|
-
query_params = {
|
|
3092
|
-
k: v for k, v in [("max", max), ("page", page)] if v is not None
|
|
3093
|
-
}
|
|
2490
|
+
query_params = {k: v for k, v in [("max", max), ("page", page)] if v is not None}
|
|
3094
2491
|
response = self._get(url, params=query_params)
|
|
3095
2492
|
return self._handle_response(response)
|
|
3096
2493
|
|
|
3097
|
-
def create_bill_document(
|
|
3098
|
-
self, billId: str, name: str, items: list[bytes]
|
|
3099
|
-
) -> dict[str, Any]:
|
|
2494
|
+
async def create_bill_document(self, billId: str, name: str, items: list[bytes]) -> dict[str, Any]:
|
|
3100
2495
|
"""
|
|
3101
2496
|
Upload bill document
|
|
3102
2497
|
|
|
@@ -3116,19 +2511,13 @@ class BillApp(APIApplication):
|
|
|
3116
2511
|
if billId is None:
|
|
3117
2512
|
raise ValueError("Missing required parameter 'billId'.")
|
|
3118
2513
|
request_body_data = None
|
|
3119
|
-
# Using array parameter 'items' directly as request body
|
|
3120
2514
|
request_body_data = items
|
|
3121
2515
|
url = f"{self.base_url}/v3/documents/bills/{billId}"
|
|
3122
2516
|
query_params = {k: v for k, v in [("name", name)] if v is not None}
|
|
3123
|
-
response = self._post(
|
|
3124
|
-
url,
|
|
3125
|
-
data=request_body_data,
|
|
3126
|
-
params=query_params,
|
|
3127
|
-
content_type="application/octet-stream",
|
|
3128
|
-
)
|
|
2517
|
+
response = self._post(url, data=request_body_data, params=query_params, content_type="application/octet-stream")
|
|
3129
2518
|
return self._handle_response(response)
|
|
3130
2519
|
|
|
3131
|
-
def upload_status(self, ids: str) -> list[Any]:
|
|
2520
|
+
async def upload_status(self, ids: str) -> list[Any]:
|
|
3132
2521
|
"""
|
|
3133
2522
|
Get document upload status
|
|
3134
2523
|
|
|
@@ -3149,7 +2538,7 @@ class BillApp(APIApplication):
|
|
|
3149
2538
|
response = self._get(url, params=query_params)
|
|
3150
2539
|
return self._handle_response(response)
|
|
3151
2540
|
|
|
3152
|
-
def get_document(self, documentId: str) -> dict[str, Any]:
|
|
2541
|
+
async def get_document(self, documentId: str) -> dict[str, Any]:
|
|
3153
2542
|
"""
|
|
3154
2543
|
Get document details
|
|
3155
2544
|
|
|
@@ -3172,7 +2561,7 @@ class BillApp(APIApplication):
|
|
|
3172
2561
|
response = self._get(url, params=query_params)
|
|
3173
2562
|
return self._handle_response(response)
|
|
3174
2563
|
|
|
3175
|
-
def list_payable_apcards(self) -> list[Any]:
|
|
2564
|
+
async def list_payable_apcards(self) -> list[Any]:
|
|
3176
2565
|
"""
|
|
3177
2566
|
Get list of AP Cards
|
|
3178
2567
|
|
|
@@ -3190,12 +2579,8 @@ class BillApp(APIApplication):
|
|
|
3190
2579
|
response = self._get(url, params=query_params)
|
|
3191
2580
|
return self._handle_response(response)
|
|
3192
2581
|
|
|
3193
|
-
def list_bank_accounts(
|
|
3194
|
-
self,
|
|
3195
|
-
max: int | None = None,
|
|
3196
|
-
sort: str | None = None,
|
|
3197
|
-
filters: str | None = None,
|
|
3198
|
-
page: str | None = None,
|
|
2582
|
+
async def list_bank_accounts(
|
|
2583
|
+
self, max: int | None = None, sort: str | None = None, filters: str | None = None, page: str | None = None
|
|
3199
2584
|
) -> dict[str, Any]:
|
|
3200
2585
|
"""
|
|
3201
2586
|
Get list of bank accounts
|
|
@@ -3216,20 +2601,11 @@ class BillApp(APIApplication):
|
|
|
3216
2601
|
funding accounts
|
|
3217
2602
|
"""
|
|
3218
2603
|
url = f"{self.base_url}/v3/funding-accounts/banks"
|
|
3219
|
-
query_params = {
|
|
3220
|
-
k: v
|
|
3221
|
-
for k, v in [
|
|
3222
|
-
("max", max),
|
|
3223
|
-
("sort", sort),
|
|
3224
|
-
("filters", filters),
|
|
3225
|
-
("page", page),
|
|
3226
|
-
]
|
|
3227
|
-
if v is not None
|
|
3228
|
-
}
|
|
2604
|
+
query_params = {k: v for k, v in [("max", max), ("sort", sort), ("filters", filters), ("page", page)] if v is not None}
|
|
3229
2605
|
response = self._get(url, params=query_params)
|
|
3230
2606
|
return self._handle_response(response)
|
|
3231
2607
|
|
|
3232
|
-
def create_bank_account(
|
|
2608
|
+
async def create_bank_account(
|
|
3233
2609
|
self,
|
|
3234
2610
|
nameOnAccount: str,
|
|
3235
2611
|
type: Any,
|
|
@@ -3273,20 +2649,13 @@ class BillApp(APIApplication):
|
|
|
3273
2649
|
"accessToAdmins": accessToAdmins,
|
|
3274
2650
|
"chartOfAccountId": chartOfAccountId,
|
|
3275
2651
|
}
|
|
3276
|
-
request_body_data = {
|
|
3277
|
-
k: v for k, v in request_body_data.items() if v is not None
|
|
3278
|
-
}
|
|
2652
|
+
request_body_data = {k: v for k, v in request_body_data.items() if v is not None}
|
|
3279
2653
|
url = f"{self.base_url}/v3/funding-accounts/banks"
|
|
3280
2654
|
query_params = {}
|
|
3281
|
-
response = self._post(
|
|
3282
|
-
url,
|
|
3283
|
-
data=request_body_data,
|
|
3284
|
-
params=query_params,
|
|
3285
|
-
content_type="application/json",
|
|
3286
|
-
)
|
|
2655
|
+
response = self._post(url, data=request_body_data, params=query_params, content_type="application/json")
|
|
3287
2656
|
return self._handle_response(response)
|
|
3288
2657
|
|
|
3289
|
-
def list_bank_account_users(
|
|
2658
|
+
async def list_bank_account_users(
|
|
3290
2659
|
self,
|
|
3291
2660
|
max: int | None = None,
|
|
3292
2661
|
sort: str | None = None,
|
|
@@ -3316,21 +2685,13 @@ class BillApp(APIApplication):
|
|
|
3316
2685
|
url = f"{self.base_url}/v3/funding-accounts/banks/users"
|
|
3317
2686
|
query_params = {
|
|
3318
2687
|
k: v
|
|
3319
|
-
for k, v in [
|
|
3320
|
-
("max", max),
|
|
3321
|
-
("sort", sort),
|
|
3322
|
-
("filters", filters),
|
|
3323
|
-
("page", page),
|
|
3324
|
-
("currentUser", currentUser),
|
|
3325
|
-
]
|
|
2688
|
+
for k, v in [("max", max), ("sort", sort), ("filters", filters), ("page", page), ("currentUser", currentUser)]
|
|
3326
2689
|
if v is not None
|
|
3327
2690
|
}
|
|
3328
2691
|
response = self._get(url, params=query_params)
|
|
3329
2692
|
return self._handle_response(response)
|
|
3330
2693
|
|
|
3331
|
-
def nominate_bank_account_user(
|
|
3332
|
-
self, userId: str, bankAccountId: str
|
|
3333
|
-
) -> dict[str, Any]:
|
|
2694
|
+
async def nominate_bank_account_user(self, userId: str, bankAccountId: str) -> dict[str, Any]:
|
|
3334
2695
|
"""
|
|
3335
2696
|
Nominate a bank account user
|
|
3336
2697
|
|
|
@@ -3351,24 +2712,14 @@ class BillApp(APIApplication):
|
|
|
3351
2712
|
funding accounts
|
|
3352
2713
|
"""
|
|
3353
2714
|
request_body_data = None
|
|
3354
|
-
request_body_data = {
|
|
3355
|
-
|
|
3356
|
-
"bankAccountId": bankAccountId,
|
|
3357
|
-
}
|
|
3358
|
-
request_body_data = {
|
|
3359
|
-
k: v for k, v in request_body_data.items() if v is not None
|
|
3360
|
-
}
|
|
2715
|
+
request_body_data = {"userId": userId, "bankAccountId": bankAccountId}
|
|
2716
|
+
request_body_data = {k: v for k, v in request_body_data.items() if v is not None}
|
|
3361
2717
|
url = f"{self.base_url}/v3/funding-accounts/banks/users/nominate"
|
|
3362
2718
|
query_params = {}
|
|
3363
|
-
response = self._post(
|
|
3364
|
-
url,
|
|
3365
|
-
data=request_body_data,
|
|
3366
|
-
params=query_params,
|
|
3367
|
-
content_type="application/json",
|
|
3368
|
-
)
|
|
2719
|
+
response = self._post(url, data=request_body_data, params=query_params, content_type="application/json")
|
|
3369
2720
|
return self._handle_response(response)
|
|
3370
2721
|
|
|
3371
|
-
def archive_bank_account_user(self, bankAccountUserId: str) -> dict[str, Any]:
|
|
2722
|
+
async def archive_bank_account_user(self, bankAccountUserId: str) -> dict[str, Any]:
|
|
3372
2723
|
"""
|
|
3373
2724
|
Archive a bank account user
|
|
3374
2725
|
|
|
@@ -3389,15 +2740,10 @@ class BillApp(APIApplication):
|
|
|
3389
2740
|
request_body_data = None
|
|
3390
2741
|
url = f"{self.base_url}/v3/funding-accounts/banks/users/{bankAccountUserId}/archive"
|
|
3391
2742
|
query_params = {}
|
|
3392
|
-
response = self._post(
|
|
3393
|
-
url,
|
|
3394
|
-
data=request_body_data,
|
|
3395
|
-
params=query_params,
|
|
3396
|
-
content_type="application/json",
|
|
3397
|
-
)
|
|
2743
|
+
response = self._post(url, data=request_body_data, params=query_params, content_type="application/json")
|
|
3398
2744
|
return self._handle_response(response)
|
|
3399
2745
|
|
|
3400
|
-
def get_bank_account(self, bankAccountId: str) -> dict[str, Any]:
|
|
2746
|
+
async def get_bank_account(self, bankAccountId: str) -> dict[str, Any]:
|
|
3401
2747
|
"""
|
|
3402
2748
|
Get bank account details
|
|
3403
2749
|
|
|
@@ -3420,7 +2766,7 @@ class BillApp(APIApplication):
|
|
|
3420
2766
|
response = self._get(url, params=query_params)
|
|
3421
2767
|
return self._handle_response(response)
|
|
3422
2768
|
|
|
3423
|
-
def update_bank_account(
|
|
2769
|
+
async def update_bank_account(
|
|
3424
2770
|
self,
|
|
3425
2771
|
bankAccountId: str,
|
|
3426
2772
|
nameOnAccount: str | None = None,
|
|
@@ -3462,15 +2808,13 @@ class BillApp(APIApplication):
|
|
|
3462
2808
|
"default": default,
|
|
3463
2809
|
"chartOfAccountId": chartOfAccountId,
|
|
3464
2810
|
}
|
|
3465
|
-
request_body_data = {
|
|
3466
|
-
k: v for k, v in request_body_data.items() if v is not None
|
|
3467
|
-
}
|
|
2811
|
+
request_body_data = {k: v for k, v in request_body_data.items() if v is not None}
|
|
3468
2812
|
url = f"{self.base_url}/v3/funding-accounts/banks/{bankAccountId}"
|
|
3469
2813
|
query_params = {}
|
|
3470
2814
|
response = self._patch(url, data=request_body_data, params=query_params)
|
|
3471
2815
|
return self._handle_response(response)
|
|
3472
2816
|
|
|
3473
|
-
def archive_bank_account(self, bankAccountId: str) -> dict[str, Any]:
|
|
2817
|
+
async def archive_bank_account(self, bankAccountId: str) -> dict[str, Any]:
|
|
3474
2818
|
"""
|
|
3475
2819
|
Archive a bank account
|
|
3476
2820
|
|
|
@@ -3491,17 +2835,10 @@ class BillApp(APIApplication):
|
|
|
3491
2835
|
request_body_data = None
|
|
3492
2836
|
url = f"{self.base_url}/v3/funding-accounts/banks/{bankAccountId}/archive"
|
|
3493
2837
|
query_params = {}
|
|
3494
|
-
response = self._post(
|
|
3495
|
-
url,
|
|
3496
|
-
data=request_body_data,
|
|
3497
|
-
params=query_params,
|
|
3498
|
-
content_type="application/json",
|
|
3499
|
-
)
|
|
2838
|
+
response = self._post(url, data=request_body_data, params=query_params, content_type="application/json")
|
|
3500
2839
|
return self._handle_response(response)
|
|
3501
2840
|
|
|
3502
|
-
def verify_bank_account(
|
|
3503
|
-
self, bankAccountId: str, depositAmount: float
|
|
3504
|
-
) -> dict[str, Any]:
|
|
2841
|
+
async def verify_bank_account(self, bankAccountId: str, depositAmount: float) -> dict[str, Any]:
|
|
3505
2842
|
"""
|
|
3506
2843
|
Verify a bank account
|
|
3507
2844
|
|
|
@@ -3523,23 +2860,14 @@ class BillApp(APIApplication):
|
|
|
3523
2860
|
if bankAccountId is None:
|
|
3524
2861
|
raise ValueError("Missing required parameter 'bankAccountId'.")
|
|
3525
2862
|
request_body_data = None
|
|
3526
|
-
request_body_data = {
|
|
3527
|
-
|
|
3528
|
-
}
|
|
3529
|
-
request_body_data = {
|
|
3530
|
-
k: v for k, v in request_body_data.items() if v is not None
|
|
3531
|
-
}
|
|
2863
|
+
request_body_data = {"depositAmount": depositAmount}
|
|
2864
|
+
request_body_data = {k: v for k, v in request_body_data.items() if v is not None}
|
|
3532
2865
|
url = f"{self.base_url}/v3/funding-accounts/banks/{bankAccountId}/verify"
|
|
3533
2866
|
query_params = {}
|
|
3534
|
-
response = self._post(
|
|
3535
|
-
url,
|
|
3536
|
-
data=request_body_data,
|
|
3537
|
-
params=query_params,
|
|
3538
|
-
content_type="application/json",
|
|
3539
|
-
)
|
|
2867
|
+
response = self._post(url, data=request_body_data, params=query_params, content_type="application/json")
|
|
3540
2868
|
return self._handle_response(response)
|
|
3541
2869
|
|
|
3542
|
-
def list_payable_card_accounts(self, cardUserStatus: Any) -> dict[str, Any]:
|
|
2870
|
+
async def list_payable_card_accounts(self, cardUserStatus: Any) -> dict[str, Any]:
|
|
3543
2871
|
"""
|
|
3544
2872
|
Get list of card accounts
|
|
3545
2873
|
|
|
@@ -3556,13 +2884,11 @@ class BillApp(APIApplication):
|
|
|
3556
2884
|
funding accounts
|
|
3557
2885
|
"""
|
|
3558
2886
|
url = f"{self.base_url}/v3/funding-accounts/cards"
|
|
3559
|
-
query_params = {
|
|
3560
|
-
k: v for k, v in [("cardUserStatus", cardUserStatus)] if v is not None
|
|
3561
|
-
}
|
|
2887
|
+
query_params = {k: v for k, v in [("cardUserStatus", cardUserStatus)] if v is not None}
|
|
3562
2888
|
response = self._get(url, params=query_params)
|
|
3563
2889
|
return self._handle_response(response)
|
|
3564
2890
|
|
|
3565
|
-
def list_card_funding_purposes(self, vendorId: str, brand: str) -> dict[str, Any]:
|
|
2891
|
+
async def list_card_funding_purposes(self, vendorId: str, brand: str) -> dict[str, Any]:
|
|
3566
2892
|
"""
|
|
3567
2893
|
Get card funding purpose
|
|
3568
2894
|
|
|
@@ -3580,13 +2906,11 @@ class BillApp(APIApplication):
|
|
|
3580
2906
|
funding accounts
|
|
3581
2907
|
"""
|
|
3582
2908
|
url = f"{self.base_url}/v3/funding-accounts/cards/funding-purposes"
|
|
3583
|
-
query_params = {
|
|
3584
|
-
k: v for k, v in [("vendorId", vendorId), ("brand", brand)] if v is not None
|
|
3585
|
-
}
|
|
2909
|
+
query_params = {k: v for k, v in [("vendorId", vendorId), ("brand", brand)] if v is not None}
|
|
3586
2910
|
response = self._get(url, params=query_params)
|
|
3587
2911
|
return self._handle_response(response)
|
|
3588
2912
|
|
|
3589
|
-
def list_card_account_users(
|
|
2913
|
+
async def list_card_account_users(
|
|
3590
2914
|
self,
|
|
3591
2915
|
max: int | None = None,
|
|
3592
2916
|
sort: str | None = None,
|
|
@@ -3616,19 +2940,13 @@ class BillApp(APIApplication):
|
|
|
3616
2940
|
url = f"{self.base_url}/v3/funding-accounts/cards/users"
|
|
3617
2941
|
query_params = {
|
|
3618
2942
|
k: v
|
|
3619
|
-
for k, v in [
|
|
3620
|
-
("max", max),
|
|
3621
|
-
("sort", sort),
|
|
3622
|
-
("filters", filters),
|
|
3623
|
-
("page", page),
|
|
3624
|
-
("currentUser", currentUser),
|
|
3625
|
-
]
|
|
2943
|
+
for k, v in [("max", max), ("sort", sort), ("filters", filters), ("page", page), ("currentUser", currentUser)]
|
|
3626
2944
|
if v is not None
|
|
3627
2945
|
}
|
|
3628
2946
|
response = self._get(url, params=query_params)
|
|
3629
2947
|
return self._handle_response(response)
|
|
3630
2948
|
|
|
3631
|
-
def get_card_account(self, cardAccountId: str) -> dict[str, Any]:
|
|
2949
|
+
async def get_card_account(self, cardAccountId: str) -> dict[str, Any]:
|
|
3632
2950
|
"""
|
|
3633
2951
|
Get card account details
|
|
3634
2952
|
|
|
@@ -3651,7 +2969,7 @@ class BillApp(APIApplication):
|
|
|
3651
2969
|
response = self._get(url, params=query_params)
|
|
3652
2970
|
return self._handle_response(response)
|
|
3653
2971
|
|
|
3654
|
-
def get_funding_account_permission(self) -> dict[str, Any]:
|
|
2972
|
+
async def get_funding_account_permission(self) -> dict[str, Any]:
|
|
3655
2973
|
"""
|
|
3656
2974
|
Get funding account permissions
|
|
3657
2975
|
|
|
@@ -3669,7 +2987,7 @@ class BillApp(APIApplication):
|
|
|
3669
2987
|
response = self._get(url, params=query_params)
|
|
3670
2988
|
return self._handle_response(response)
|
|
3671
2989
|
|
|
3672
|
-
def get_health_check(self) -> dict[str, Any]:
|
|
2990
|
+
async def get_health_check(self) -> dict[str, Any]:
|
|
3673
2991
|
"""
|
|
3674
2992
|
Check app health
|
|
3675
2993
|
|
|
@@ -3687,12 +3005,8 @@ class BillApp(APIApplication):
|
|
|
3687
3005
|
response = self._get(url, params=query_params)
|
|
3688
3006
|
return self._handle_response(response)
|
|
3689
3007
|
|
|
3690
|
-
def list_invoices(
|
|
3691
|
-
self,
|
|
3692
|
-
max: int | None = None,
|
|
3693
|
-
sort: str | None = None,
|
|
3694
|
-
filters: str | None = None,
|
|
3695
|
-
page: str | None = None,
|
|
3008
|
+
async def list_invoices(
|
|
3009
|
+
self, max: int | None = None, sort: str | None = None, filters: str | None = None, page: str | None = None
|
|
3696
3010
|
) -> dict[str, Any]:
|
|
3697
3011
|
"""
|
|
3698
3012
|
Get list of invoices
|
|
@@ -3713,20 +3027,11 @@ class BillApp(APIApplication):
|
|
|
3713
3027
|
invoices
|
|
3714
3028
|
"""
|
|
3715
3029
|
url = f"{self.base_url}/v3/invoices"
|
|
3716
|
-
query_params = {
|
|
3717
|
-
k: v
|
|
3718
|
-
for k, v in [
|
|
3719
|
-
("max", max),
|
|
3720
|
-
("sort", sort),
|
|
3721
|
-
("filters", filters),
|
|
3722
|
-
("page", page),
|
|
3723
|
-
]
|
|
3724
|
-
if v is not None
|
|
3725
|
-
}
|
|
3030
|
+
query_params = {k: v for k, v in [("max", max), ("sort", sort), ("filters", filters), ("page", page)] if v is not None}
|
|
3726
3031
|
response = self._get(url, params=query_params)
|
|
3727
3032
|
return self._handle_response(response)
|
|
3728
3033
|
|
|
3729
|
-
def create_invoice(
|
|
3034
|
+
async def create_invoice(
|
|
3730
3035
|
self,
|
|
3731
3036
|
customer: Any,
|
|
3732
3037
|
invoiceLineItems: list[dict[str, Any]],
|
|
@@ -3776,20 +3081,13 @@ class BillApp(APIApplication):
|
|
|
3776
3081
|
"payToChartOfAccountId": payToChartOfAccountId,
|
|
3777
3082
|
"classifications": classifications,
|
|
3778
3083
|
}
|
|
3779
|
-
request_body_data = {
|
|
3780
|
-
k: v for k, v in request_body_data.items() if v is not None
|
|
3781
|
-
}
|
|
3084
|
+
request_body_data = {k: v for k, v in request_body_data.items() if v is not None}
|
|
3782
3085
|
url = f"{self.base_url}/v3/invoices"
|
|
3783
3086
|
query_params = {}
|
|
3784
|
-
response = self._post(
|
|
3785
|
-
url,
|
|
3786
|
-
data=request_body_data,
|
|
3787
|
-
params=query_params,
|
|
3788
|
-
content_type="application/json",
|
|
3789
|
-
)
|
|
3087
|
+
response = self._post(url, data=request_body_data, params=query_params, content_type="application/json")
|
|
3790
3088
|
return self._handle_response(response)
|
|
3791
3089
|
|
|
3792
|
-
def record_invoice(
|
|
3090
|
+
async def record_invoice(
|
|
3793
3091
|
self,
|
|
3794
3092
|
paymentDate: str,
|
|
3795
3093
|
paymentType: Any,
|
|
@@ -3827,20 +3125,13 @@ class BillApp(APIApplication):
|
|
|
3827
3125
|
"description": description,
|
|
3828
3126
|
"invoices": invoices,
|
|
3829
3127
|
}
|
|
3830
|
-
request_body_data = {
|
|
3831
|
-
k: v for k, v in request_body_data.items() if v is not None
|
|
3832
|
-
}
|
|
3128
|
+
request_body_data = {k: v for k, v in request_body_data.items() if v is not None}
|
|
3833
3129
|
url = f"{self.base_url}/v3/invoices/record-payment"
|
|
3834
3130
|
query_params = {}
|
|
3835
|
-
response = self._post(
|
|
3836
|
-
url,
|
|
3837
|
-
data=request_body_data,
|
|
3838
|
-
params=query_params,
|
|
3839
|
-
content_type="application/json",
|
|
3840
|
-
)
|
|
3131
|
+
response = self._post(url, data=request_body_data, params=query_params, content_type="application/json")
|
|
3841
3132
|
return self._handle_response(response)
|
|
3842
3133
|
|
|
3843
|
-
def get_invoice(self, invoiceId: str) -> dict[str, Any]:
|
|
3134
|
+
async def get_invoice(self, invoiceId: str) -> dict[str, Any]:
|
|
3844
3135
|
"""
|
|
3845
3136
|
Get invoice details
|
|
3846
3137
|
|
|
@@ -3863,7 +3154,7 @@ class BillApp(APIApplication):
|
|
|
3863
3154
|
response = self._get(url, params=query_params)
|
|
3864
3155
|
return self._handle_response(response)
|
|
3865
3156
|
|
|
3866
|
-
def replace_invoice(
|
|
3157
|
+
async def replace_invoice(
|
|
3867
3158
|
self,
|
|
3868
3159
|
invoiceId: str,
|
|
3869
3160
|
customer: Any,
|
|
@@ -3917,20 +3208,13 @@ class BillApp(APIApplication):
|
|
|
3917
3208
|
"payToChartOfAccountId": payToChartOfAccountId,
|
|
3918
3209
|
"classifications": classifications,
|
|
3919
3210
|
}
|
|
3920
|
-
request_body_data = {
|
|
3921
|
-
k: v for k, v in request_body_data.items() if v is not None
|
|
3922
|
-
}
|
|
3211
|
+
request_body_data = {k: v for k, v in request_body_data.items() if v is not None}
|
|
3923
3212
|
url = f"{self.base_url}/v3/invoices/{invoiceId}"
|
|
3924
3213
|
query_params = {}
|
|
3925
|
-
response = self._put(
|
|
3926
|
-
url,
|
|
3927
|
-
data=request_body_data,
|
|
3928
|
-
params=query_params,
|
|
3929
|
-
content_type="application/json",
|
|
3930
|
-
)
|
|
3214
|
+
response = self._put(url, data=request_body_data, params=query_params, content_type="application/json")
|
|
3931
3215
|
return self._handle_response(response)
|
|
3932
3216
|
|
|
3933
|
-
def update_invoice(
|
|
3217
|
+
async def update_invoice(
|
|
3934
3218
|
self,
|
|
3935
3219
|
invoiceId: str,
|
|
3936
3220
|
invoiceNumber: str | None = None,
|
|
@@ -3984,15 +3268,13 @@ class BillApp(APIApplication):
|
|
|
3984
3268
|
"payToChartOfAccountId": payToChartOfAccountId,
|
|
3985
3269
|
"classifications": classifications,
|
|
3986
3270
|
}
|
|
3987
|
-
request_body_data = {
|
|
3988
|
-
k: v for k, v in request_body_data.items() if v is not None
|
|
3989
|
-
}
|
|
3271
|
+
request_body_data = {k: v for k, v in request_body_data.items() if v is not None}
|
|
3990
3272
|
url = f"{self.base_url}/v3/invoices/{invoiceId}"
|
|
3991
3273
|
query_params = {}
|
|
3992
3274
|
response = self._patch(url, data=request_body_data, params=query_params)
|
|
3993
3275
|
return self._handle_response(response)
|
|
3994
3276
|
|
|
3995
|
-
def archive_invoice(self, invoiceId: str) -> dict[str, Any]:
|
|
3277
|
+
async def archive_invoice(self, invoiceId: str) -> dict[str, Any]:
|
|
3996
3278
|
"""
|
|
3997
3279
|
Archive an invoice
|
|
3998
3280
|
|
|
@@ -4013,15 +3295,10 @@ class BillApp(APIApplication):
|
|
|
4013
3295
|
request_body_data = None
|
|
4014
3296
|
url = f"{self.base_url}/v3/invoices/{invoiceId}/archive"
|
|
4015
3297
|
query_params = {}
|
|
4016
|
-
response = self._post(
|
|
4017
|
-
url,
|
|
4018
|
-
data=request_body_data,
|
|
4019
|
-
params=query_params,
|
|
4020
|
-
content_type="application/json",
|
|
4021
|
-
)
|
|
3298
|
+
response = self._post(url, data=request_body_data, params=query_params, content_type="application/json")
|
|
4022
3299
|
return self._handle_response(response)
|
|
4023
3300
|
|
|
4024
|
-
def send_invoice(self, invoiceId: str, replyTo: Any, recipient: Any) -> Any:
|
|
3301
|
+
async def send_invoice(self, invoiceId: str, replyTo: Any, recipient: Any) -> Any:
|
|
4025
3302
|
"""
|
|
4026
3303
|
Send an invoice
|
|
4027
3304
|
|
|
@@ -4042,24 +3319,14 @@ class BillApp(APIApplication):
|
|
|
4042
3319
|
if invoiceId is None:
|
|
4043
3320
|
raise ValueError("Missing required parameter 'invoiceId'.")
|
|
4044
3321
|
request_body_data = None
|
|
4045
|
-
request_body_data = {
|
|
4046
|
-
|
|
4047
|
-
"recipient": recipient,
|
|
4048
|
-
}
|
|
4049
|
-
request_body_data = {
|
|
4050
|
-
k: v for k, v in request_body_data.items() if v is not None
|
|
4051
|
-
}
|
|
3322
|
+
request_body_data = {"replyTo": replyTo, "recipient": recipient}
|
|
3323
|
+
request_body_data = {k: v for k, v in request_body_data.items() if v is not None}
|
|
4052
3324
|
url = f"{self.base_url}/v3/invoices/{invoiceId}/email"
|
|
4053
3325
|
query_params = {}
|
|
4054
|
-
response = self._post(
|
|
4055
|
-
url,
|
|
4056
|
-
data=request_body_data,
|
|
4057
|
-
params=query_params,
|
|
4058
|
-
content_type="application/json",
|
|
4059
|
-
)
|
|
3326
|
+
response = self._post(url, data=request_body_data, params=query_params, content_type="application/json")
|
|
4060
3327
|
return self._handle_response(response)
|
|
4061
3328
|
|
|
4062
|
-
def restore_invoice(self, invoiceId: str) -> dict[str, Any]:
|
|
3329
|
+
async def restore_invoice(self, invoiceId: str) -> dict[str, Any]:
|
|
4063
3330
|
"""
|
|
4064
3331
|
Restore an archived invoice
|
|
4065
3332
|
|
|
@@ -4080,22 +3347,11 @@ class BillApp(APIApplication):
|
|
|
4080
3347
|
request_body_data = None
|
|
4081
3348
|
url = f"{self.base_url}/v3/invoices/{invoiceId}/restore"
|
|
4082
3349
|
query_params = {}
|
|
4083
|
-
response = self._post(
|
|
4084
|
-
url,
|
|
4085
|
-
data=request_body_data,
|
|
4086
|
-
params=query_params,
|
|
4087
|
-
content_type="application/json",
|
|
4088
|
-
)
|
|
3350
|
+
response = self._post(url, data=request_body_data, params=query_params, content_type="application/json")
|
|
4089
3351
|
return self._handle_response(response)
|
|
4090
3352
|
|
|
4091
|
-
def login(
|
|
4092
|
-
self,
|
|
4093
|
-
devKey: str,
|
|
4094
|
-
username: str,
|
|
4095
|
-
password: str,
|
|
4096
|
-
organizationId: str,
|
|
4097
|
-
rememberMeId: str | None = None,
|
|
4098
|
-
device: str | None = None,
|
|
3353
|
+
async def login(
|
|
3354
|
+
self, devKey: str, username: str, password: str, organizationId: str, rememberMeId: str | None = None, device: str | None = None
|
|
4099
3355
|
) -> dict[str, Any]:
|
|
4100
3356
|
"""
|
|
4101
3357
|
API login
|
|
@@ -4130,20 +3386,13 @@ class BillApp(APIApplication):
|
|
|
4130
3386
|
"rememberMeId": rememberMeId,
|
|
4131
3387
|
"device": device,
|
|
4132
3388
|
}
|
|
4133
|
-
request_body_data = {
|
|
4134
|
-
k: v for k, v in request_body_data.items() if v is not None
|
|
4135
|
-
}
|
|
3389
|
+
request_body_data = {k: v for k, v in request_body_data.items() if v is not None}
|
|
4136
3390
|
url = f"{self.base_url}/v3/login"
|
|
4137
3391
|
query_params = {}
|
|
4138
|
-
response = self._post(
|
|
4139
|
-
url,
|
|
4140
|
-
data=request_body_data,
|
|
4141
|
-
params=query_params,
|
|
4142
|
-
content_type="application/json",
|
|
4143
|
-
)
|
|
3392
|
+
response = self._post(url, data=request_body_data, params=query_params, content_type="application/json")
|
|
4144
3393
|
return self._handle_response(response)
|
|
4145
3394
|
|
|
4146
|
-
def get_session_info(self) -> dict[str, Any]:
|
|
3395
|
+
async def get_session_info(self) -> dict[str, Any]:
|
|
4147
3396
|
"""
|
|
4148
3397
|
Get API session details
|
|
4149
3398
|
|
|
@@ -4161,7 +3410,7 @@ class BillApp(APIApplication):
|
|
|
4161
3410
|
response = self._get(url, params=query_params)
|
|
4162
3411
|
return self._handle_response(response)
|
|
4163
3412
|
|
|
4164
|
-
def logout(self) -> Any:
|
|
3413
|
+
async def logout(self) -> Any:
|
|
4165
3414
|
"""
|
|
4166
3415
|
API logout
|
|
4167
3416
|
|
|
@@ -4177,15 +3426,10 @@ class BillApp(APIApplication):
|
|
|
4177
3426
|
request_body_data = None
|
|
4178
3427
|
url = f"{self.base_url}/v3/logout"
|
|
4179
3428
|
query_params = {}
|
|
4180
|
-
response = self._post(
|
|
4181
|
-
url,
|
|
4182
|
-
data=request_body_data,
|
|
4183
|
-
params=query_params,
|
|
4184
|
-
content_type="application/json",
|
|
4185
|
-
)
|
|
3429
|
+
response = self._post(url, data=request_body_data, params=query_params, content_type="application/json")
|
|
4186
3430
|
return self._handle_response(response)
|
|
4187
3431
|
|
|
4188
|
-
def generate_challenge(self, useBackup: bool | None = None) -> dict[str, Any]:
|
|
3432
|
+
async def generate_challenge(self, useBackup: bool | None = None) -> dict[str, Any]:
|
|
4189
3433
|
"""
|
|
4190
3434
|
Generate MFA challenge
|
|
4191
3435
|
|
|
@@ -4202,29 +3446,15 @@ class BillApp(APIApplication):
|
|
|
4202
3446
|
mfa
|
|
4203
3447
|
"""
|
|
4204
3448
|
request_body_data = None
|
|
4205
|
-
request_body_data = {
|
|
4206
|
-
|
|
4207
|
-
}
|
|
4208
|
-
request_body_data = {
|
|
4209
|
-
k: v for k, v in request_body_data.items() if v is not None
|
|
4210
|
-
}
|
|
3449
|
+
request_body_data = {"useBackup": useBackup}
|
|
3450
|
+
request_body_data = {k: v for k, v in request_body_data.items() if v is not None}
|
|
4211
3451
|
url = f"{self.base_url}/v3/mfa/challenge"
|
|
4212
3452
|
query_params = {}
|
|
4213
|
-
response = self._post(
|
|
4214
|
-
url,
|
|
4215
|
-
data=request_body_data,
|
|
4216
|
-
params=query_params,
|
|
4217
|
-
content_type="application/json",
|
|
4218
|
-
)
|
|
3453
|
+
response = self._post(url, data=request_body_data, params=query_params, content_type="application/json")
|
|
4219
3454
|
return self._handle_response(response)
|
|
4220
3455
|
|
|
4221
|
-
def validate_challenge(
|
|
4222
|
-
self,
|
|
4223
|
-
challengeId: str,
|
|
4224
|
-
token: str,
|
|
4225
|
-
device: str | None = None,
|
|
4226
|
-
machineName: str | None = None,
|
|
4227
|
-
rememberMe: bool | None = None,
|
|
3456
|
+
async def validate_challenge(
|
|
3457
|
+
self, challengeId: str, token: str, device: str | None = None, machineName: str | None = None, rememberMe: bool | None = None
|
|
4228
3458
|
) -> dict[str, Any]:
|
|
4229
3459
|
"""
|
|
4230
3460
|
Validate MFA challenge
|
|
@@ -4253,20 +3483,13 @@ class BillApp(APIApplication):
|
|
|
4253
3483
|
"machineName": machineName,
|
|
4254
3484
|
"rememberMe": rememberMe,
|
|
4255
3485
|
}
|
|
4256
|
-
request_body_data = {
|
|
4257
|
-
k: v for k, v in request_body_data.items() if v is not None
|
|
4258
|
-
}
|
|
3486
|
+
request_body_data = {k: v for k, v in request_body_data.items() if v is not None}
|
|
4259
3487
|
url = f"{self.base_url}/v3/mfa/challenge/validate"
|
|
4260
3488
|
query_params = {}
|
|
4261
|
-
response = self._post(
|
|
4262
|
-
url,
|
|
4263
|
-
data=request_body_data,
|
|
4264
|
-
params=query_params,
|
|
4265
|
-
content_type="application/json",
|
|
4266
|
-
)
|
|
3489
|
+
response = self._post(url, data=request_body_data, params=query_params, content_type="application/json")
|
|
4267
3490
|
return self._handle_response(response)
|
|
4268
3491
|
|
|
4269
|
-
def list_mfa_phones(self) -> dict[str, Any]:
|
|
3492
|
+
async def list_mfa_phones(self) -> dict[str, Any]:
|
|
4270
3493
|
"""
|
|
4271
3494
|
Get list of MFA phone numbers
|
|
4272
3495
|
|
|
@@ -4284,7 +3507,7 @@ class BillApp(APIApplication):
|
|
|
4284
3507
|
response = self._get(url, params=query_params)
|
|
4285
3508
|
return self._handle_response(response)
|
|
4286
3509
|
|
|
4287
|
-
def setup(self, phone: str, type: Any, primary: bool) -> dict[str, Any]:
|
|
3510
|
+
async def setup(self, phone: str, type: Any, primary: bool) -> dict[str, Any]:
|
|
4288
3511
|
"""
|
|
4289
3512
|
Add phone for MFA setup
|
|
4290
3513
|
|
|
@@ -4304,25 +3527,14 @@ class BillApp(APIApplication):
|
|
|
4304
3527
|
mfa
|
|
4305
3528
|
"""
|
|
4306
3529
|
request_body_data = None
|
|
4307
|
-
request_body_data = {
|
|
4308
|
-
|
|
4309
|
-
"type": type,
|
|
4310
|
-
"primary": primary,
|
|
4311
|
-
}
|
|
4312
|
-
request_body_data = {
|
|
4313
|
-
k: v for k, v in request_body_data.items() if v is not None
|
|
4314
|
-
}
|
|
3530
|
+
request_body_data = {"phone": phone, "type": type, "primary": primary}
|
|
3531
|
+
request_body_data = {k: v for k, v in request_body_data.items() if v is not None}
|
|
4315
3532
|
url = f"{self.base_url}/v3/mfa/setup"
|
|
4316
3533
|
query_params = {}
|
|
4317
|
-
response = self._post(
|
|
4318
|
-
url,
|
|
4319
|
-
data=request_body_data,
|
|
4320
|
-
params=query_params,
|
|
4321
|
-
content_type="application/json",
|
|
4322
|
-
)
|
|
3534
|
+
response = self._post(url, data=request_body_data, params=query_params, content_type="application/json")
|
|
4323
3535
|
return self._handle_response(response)
|
|
4324
3536
|
|
|
4325
|
-
def validate(self, setupId: str, type: Any, token: str) -> dict[str, Any]:
|
|
3537
|
+
async def validate(self, setupId: str, type: Any, token: str) -> dict[str, Any]:
|
|
4326
3538
|
"""
|
|
4327
3539
|
Validate phone for MFA setup
|
|
4328
3540
|
|
|
@@ -4341,27 +3553,14 @@ class BillApp(APIApplication):
|
|
|
4341
3553
|
mfa
|
|
4342
3554
|
"""
|
|
4343
3555
|
request_body_data = None
|
|
4344
|
-
request_body_data = {
|
|
4345
|
-
|
|
4346
|
-
"type": type,
|
|
4347
|
-
"token": token,
|
|
4348
|
-
}
|
|
4349
|
-
request_body_data = {
|
|
4350
|
-
k: v for k, v in request_body_data.items() if v is not None
|
|
4351
|
-
}
|
|
3556
|
+
request_body_data = {"setupId": setupId, "type": type, "token": token}
|
|
3557
|
+
request_body_data = {k: v for k, v in request_body_data.items() if v is not None}
|
|
4352
3558
|
url = f"{self.base_url}/v3/mfa/setup/validate"
|
|
4353
3559
|
query_params = {}
|
|
4354
|
-
response = self._post(
|
|
4355
|
-
url,
|
|
4356
|
-
data=request_body_data,
|
|
4357
|
-
params=query_params,
|
|
4358
|
-
content_type="application/json",
|
|
4359
|
-
)
|
|
3560
|
+
response = self._post(url, data=request_body_data, params=query_params, content_type="application/json")
|
|
4360
3561
|
return self._handle_response(response)
|
|
4361
3562
|
|
|
4362
|
-
def step_up_session(
|
|
4363
|
-
self, rememberMeId: str | None = None, device: str | None = None
|
|
4364
|
-
) -> dict[str, Any]:
|
|
3563
|
+
async def step_up_session(self, rememberMeId: str | None = None, device: str | None = None) -> dict[str, Any]:
|
|
4365
3564
|
"""
|
|
4366
3565
|
MFA step-up for API session
|
|
4367
3566
|
|
|
@@ -4383,29 +3582,15 @@ class BillApp(APIApplication):
|
|
|
4383
3582
|
mfa
|
|
4384
3583
|
"""
|
|
4385
3584
|
request_body_data = None
|
|
4386
|
-
request_body_data = {
|
|
4387
|
-
|
|
4388
|
-
"device": device,
|
|
4389
|
-
}
|
|
4390
|
-
request_body_data = {
|
|
4391
|
-
k: v for k, v in request_body_data.items() if v is not None
|
|
4392
|
-
}
|
|
3585
|
+
request_body_data = {"rememberMeId": rememberMeId, "device": device}
|
|
3586
|
+
request_body_data = {k: v for k, v in request_body_data.items() if v is not None}
|
|
4393
3587
|
url = f"{self.base_url}/v3/mfa/step-up"
|
|
4394
3588
|
query_params = {}
|
|
4395
|
-
response = self._post(
|
|
4396
|
-
url,
|
|
4397
|
-
data=request_body_data,
|
|
4398
|
-
params=query_params,
|
|
4399
|
-
content_type="application/json",
|
|
4400
|
-
)
|
|
3589
|
+
response = self._post(url, data=request_body_data, params=query_params, content_type="application/json")
|
|
4401
3590
|
return self._handle_response(response)
|
|
4402
3591
|
|
|
4403
|
-
def search(
|
|
4404
|
-
self,
|
|
4405
|
-
name: str,
|
|
4406
|
-
scope: Any | None = None,
|
|
4407
|
-
zipOrPostalCode: str | None = None,
|
|
4408
|
-
accountNumber: str | None = None,
|
|
3592
|
+
async def search(
|
|
3593
|
+
self, name: str, scope: Any | None = None, zipOrPostalCode: str | None = None, accountNumber: str | None = None
|
|
4409
3594
|
) -> dict[str, Any]:
|
|
4410
3595
|
"""
|
|
4411
3596
|
Search for an organization in the BILL networks
|
|
@@ -4428,24 +3613,13 @@ class BillApp(APIApplication):
|
|
|
4428
3613
|
url = f"{self.base_url}/v3/network"
|
|
4429
3614
|
query_params = {
|
|
4430
3615
|
k: v
|
|
4431
|
-
for k, v in [
|
|
4432
|
-
("name", name),
|
|
4433
|
-
("scope", scope),
|
|
4434
|
-
("zipOrPostalCode", zipOrPostalCode),
|
|
4435
|
-
("accountNumber", accountNumber),
|
|
4436
|
-
]
|
|
3616
|
+
for k, v in [("name", name), ("scope", scope), ("zipOrPostalCode", zipOrPostalCode), ("accountNumber", accountNumber)]
|
|
4437
3617
|
if v is not None
|
|
4438
3618
|
}
|
|
4439
3619
|
response = self._get(url, params=query_params)
|
|
4440
3620
|
return self._handle_response(response)
|
|
4441
3621
|
|
|
4442
|
-
def accept_invitation(
|
|
4443
|
-
self,
|
|
4444
|
-
networkId: str,
|
|
4445
|
-
type: Any,
|
|
4446
|
-
id: str | None = None,
|
|
4447
|
-
name: str | None = None,
|
|
4448
|
-
) -> Any:
|
|
3622
|
+
async def accept_invitation(self, networkId: str, type: Any, id: str | None = None, name: str | None = None) -> Any:
|
|
4449
3623
|
"""
|
|
4450
3624
|
Accept network invitation
|
|
4451
3625
|
|
|
@@ -4471,26 +3645,14 @@ class BillApp(APIApplication):
|
|
|
4471
3645
|
network
|
|
4472
3646
|
"""
|
|
4473
3647
|
request_body_data = None
|
|
4474
|
-
request_body_data = {
|
|
4475
|
-
|
|
4476
|
-
"type": type,
|
|
4477
|
-
"id": id,
|
|
4478
|
-
"name": name,
|
|
4479
|
-
}
|
|
4480
|
-
request_body_data = {
|
|
4481
|
-
k: v for k, v in request_body_data.items() if v is not None
|
|
4482
|
-
}
|
|
3648
|
+
request_body_data = {"networkId": networkId, "type": type, "id": id, "name": name}
|
|
3649
|
+
request_body_data = {k: v for k, v in request_body_data.items() if v is not None}
|
|
4483
3650
|
url = f"{self.base_url}/v3/network/invitation/accept"
|
|
4484
3651
|
query_params = {}
|
|
4485
|
-
response = self._post(
|
|
4486
|
-
url,
|
|
4487
|
-
data=request_body_data,
|
|
4488
|
-
params=query_params,
|
|
4489
|
-
content_type="application/json",
|
|
4490
|
-
)
|
|
3652
|
+
response = self._post(url, data=request_body_data, params=query_params, content_type="application/json")
|
|
4491
3653
|
return self._handle_response(response)
|
|
4492
3654
|
|
|
4493
|
-
def get_customer_invitation(self, customerId: str) -> dict[str, Any]:
|
|
3655
|
+
async def get_customer_invitation(self, customerId: str) -> dict[str, Any]:
|
|
4494
3656
|
"""
|
|
4495
3657
|
Get customer invitation status
|
|
4496
3658
|
|
|
@@ -4513,12 +3675,8 @@ class BillApp(APIApplication):
|
|
|
4513
3675
|
response = self._get(url, params=query_params)
|
|
4514
3676
|
return self._handle_response(response)
|
|
4515
3677
|
|
|
4516
|
-
def create_customer_invitation(
|
|
4517
|
-
self,
|
|
4518
|
-
customerId: str,
|
|
4519
|
-
networkId: str,
|
|
4520
|
-
networkType: Any,
|
|
4521
|
-
rppsInformation: Any | None = None,
|
|
3678
|
+
async def create_customer_invitation(
|
|
3679
|
+
self, customerId: str, networkId: str, networkType: Any, rppsInformation: Any | None = None
|
|
4522
3680
|
) -> Any:
|
|
4523
3681
|
"""
|
|
4524
3682
|
Invite a customer in the BILL network
|
|
@@ -4543,25 +3701,14 @@ class BillApp(APIApplication):
|
|
|
4543
3701
|
if customerId is None:
|
|
4544
3702
|
raise ValueError("Missing required parameter 'customerId'.")
|
|
4545
3703
|
request_body_data = None
|
|
4546
|
-
request_body_data = {
|
|
4547
|
-
|
|
4548
|
-
"networkType": networkType,
|
|
4549
|
-
"rppsInformation": rppsInformation,
|
|
4550
|
-
}
|
|
4551
|
-
request_body_data = {
|
|
4552
|
-
k: v for k, v in request_body_data.items() if v is not None
|
|
4553
|
-
}
|
|
3704
|
+
request_body_data = {"networkId": networkId, "networkType": networkType, "rppsInformation": rppsInformation}
|
|
3705
|
+
request_body_data = {k: v for k, v in request_body_data.items() if v is not None}
|
|
4554
3706
|
url = f"{self.base_url}/v3/network/invitation/customer/{customerId}"
|
|
4555
3707
|
query_params = {}
|
|
4556
|
-
response = self._post(
|
|
4557
|
-
url,
|
|
4558
|
-
data=request_body_data,
|
|
4559
|
-
params=query_params,
|
|
4560
|
-
content_type="application/json",
|
|
4561
|
-
)
|
|
3708
|
+
response = self._post(url, data=request_body_data, params=query_params, content_type="application/json")
|
|
4562
3709
|
return self._handle_response(response)
|
|
4563
3710
|
|
|
4564
|
-
def delete_customer_invitation(self, customerId: str) -> Any:
|
|
3711
|
+
async def delete_customer_invitation(self, customerId: str) -> Any:
|
|
4565
3712
|
"""
|
|
4566
3713
|
Delete customer connection
|
|
4567
3714
|
|
|
@@ -4584,7 +3731,7 @@ class BillApp(APIApplication):
|
|
|
4584
3731
|
response = self._delete(url, params=query_params)
|
|
4585
3732
|
return self._handle_response(response)
|
|
4586
3733
|
|
|
4587
|
-
def get_vendor_invitation(self, vendorId: str) -> dict[str, Any]:
|
|
3734
|
+
async def get_vendor_invitation(self, vendorId: str) -> dict[str, Any]:
|
|
4588
3735
|
"""
|
|
4589
3736
|
Get vendor invitation status
|
|
4590
3737
|
|
|
@@ -4607,13 +3754,7 @@ class BillApp(APIApplication):
|
|
|
4607
3754
|
response = self._get(url, params=query_params)
|
|
4608
3755
|
return self._handle_response(response)
|
|
4609
3756
|
|
|
4610
|
-
def create_vendor_invitation(
|
|
4611
|
-
self,
|
|
4612
|
-
vendorId: str,
|
|
4613
|
-
networkId: str,
|
|
4614
|
-
networkType: Any,
|
|
4615
|
-
rppsInformation: Any | None = None,
|
|
4616
|
-
) -> Any:
|
|
3757
|
+
async def create_vendor_invitation(self, vendorId: str, networkId: str, networkType: Any, rppsInformation: Any | None = None) -> Any:
|
|
4617
3758
|
"""
|
|
4618
3759
|
Invite a vendor in the BILL network
|
|
4619
3760
|
|
|
@@ -4637,25 +3778,14 @@ class BillApp(APIApplication):
|
|
|
4637
3778
|
if vendorId is None:
|
|
4638
3779
|
raise ValueError("Missing required parameter 'vendorId'.")
|
|
4639
3780
|
request_body_data = None
|
|
4640
|
-
request_body_data = {
|
|
4641
|
-
|
|
4642
|
-
"networkType": networkType,
|
|
4643
|
-
"rppsInformation": rppsInformation,
|
|
4644
|
-
}
|
|
4645
|
-
request_body_data = {
|
|
4646
|
-
k: v for k, v in request_body_data.items() if v is not None
|
|
4647
|
-
}
|
|
3781
|
+
request_body_data = {"networkId": networkId, "networkType": networkType, "rppsInformation": rppsInformation}
|
|
3782
|
+
request_body_data = {k: v for k, v in request_body_data.items() if v is not None}
|
|
4648
3783
|
url = f"{self.base_url}/v3/network/invitation/vendor/{vendorId}"
|
|
4649
3784
|
query_params = {}
|
|
4650
|
-
response = self._post(
|
|
4651
|
-
url,
|
|
4652
|
-
data=request_body_data,
|
|
4653
|
-
params=query_params,
|
|
4654
|
-
content_type="application/json",
|
|
4655
|
-
)
|
|
3785
|
+
response = self._post(url, data=request_body_data, params=query_params, content_type="application/json")
|
|
4656
3786
|
return self._handle_response(response)
|
|
4657
3787
|
|
|
4658
|
-
def delete_vendor_invitation(self, vendorId: str) -> Any:
|
|
3788
|
+
async def delete_vendor_invitation(self, vendorId: str) -> Any:
|
|
4659
3789
|
"""
|
|
4660
3790
|
Delete vendor connection
|
|
4661
3791
|
|
|
@@ -4678,7 +3808,7 @@ class BillApp(APIApplication):
|
|
|
4678
3808
|
response = self._delete(url, params=query_params)
|
|
4679
3809
|
return self._handle_response(response)
|
|
4680
3810
|
|
|
4681
|
-
def list_industries(self) -> dict[str, Any]:
|
|
3811
|
+
async def list_industries(self) -> dict[str, Any]:
|
|
4682
3812
|
"""
|
|
4683
3813
|
Get list of organization industries
|
|
4684
3814
|
|
|
@@ -4696,7 +3826,7 @@ class BillApp(APIApplication):
|
|
|
4696
3826
|
response = self._get(url, params=query_params)
|
|
4697
3827
|
return self._handle_response(response)
|
|
4698
3828
|
|
|
4699
|
-
def get_organization(self, organizationId: str) -> dict[str, Any]:
|
|
3829
|
+
async def get_organization(self, organizationId: str) -> dict[str, Any]:
|
|
4700
3830
|
"""
|
|
4701
3831
|
Get organization details
|
|
4702
3832
|
|
|
@@ -4719,7 +3849,7 @@ class BillApp(APIApplication):
|
|
|
4719
3849
|
response = self._get(url, params=query_params)
|
|
4720
3850
|
return self._handle_response(response)
|
|
4721
3851
|
|
|
4722
|
-
def update_organization(
|
|
3852
|
+
async def update_organization(
|
|
4723
3853
|
self,
|
|
4724
3854
|
organizationId: str,
|
|
4725
3855
|
name: str | None = None,
|
|
@@ -4776,15 +3906,13 @@ class BillApp(APIApplication):
|
|
|
4776
3906
|
"accountType": accountType,
|
|
4777
3907
|
"processingOptions": processingOptions,
|
|
4778
3908
|
}
|
|
4779
|
-
request_body_data = {
|
|
4780
|
-
k: v for k, v in request_body_data.items() if v is not None
|
|
4781
|
-
}
|
|
3909
|
+
request_body_data = {k: v for k, v in request_body_data.items() if v is not None}
|
|
4782
3910
|
url = f"{self.base_url}/v3/organizations/{organizationId}"
|
|
4783
3911
|
query_params = {}
|
|
4784
3912
|
response = self._patch(url, data=request_body_data, params=query_params)
|
|
4785
3913
|
return self._handle_response(response)
|
|
4786
3914
|
|
|
4787
|
-
def get_price_plan(self, organizationId: str) -> dict[str, Any]:
|
|
3915
|
+
async def get_price_plan(self, organizationId: str) -> dict[str, Any]:
|
|
4788
3916
|
"""
|
|
4789
3917
|
Get organization price plan details
|
|
4790
3918
|
|
|
@@ -4807,9 +3935,7 @@ class BillApp(APIApplication):
|
|
|
4807
3935
|
response = self._get(url, params=query_params)
|
|
4808
3936
|
return self._handle_response(response)
|
|
4809
3937
|
|
|
4810
|
-
def partner_login(
|
|
4811
|
-
self, appKey: str, username: str, password: str
|
|
4812
|
-
) -> dict[str, Any]:
|
|
3938
|
+
async def partner_login(self, appKey: str, username: str, password: str) -> dict[str, Any]:
|
|
4813
3939
|
"""
|
|
4814
3940
|
API partner login
|
|
4815
3941
|
|
|
@@ -4828,30 +3954,15 @@ class BillApp(APIApplication):
|
|
|
4828
3954
|
partner
|
|
4829
3955
|
"""
|
|
4830
3956
|
request_body_data = None
|
|
4831
|
-
request_body_data = {
|
|
4832
|
-
|
|
4833
|
-
"username": username,
|
|
4834
|
-
"password": password,
|
|
4835
|
-
}
|
|
4836
|
-
request_body_data = {
|
|
4837
|
-
k: v for k, v in request_body_data.items() if v is not None
|
|
4838
|
-
}
|
|
3957
|
+
request_body_data = {"appKey": appKey, "username": username, "password": password}
|
|
3958
|
+
request_body_data = {k: v for k, v in request_body_data.items() if v is not None}
|
|
4839
3959
|
url = f"{self.base_url}/v3/partner/login"
|
|
4840
3960
|
query_params = {}
|
|
4841
|
-
response = self._post(
|
|
4842
|
-
url,
|
|
4843
|
-
data=request_body_data,
|
|
4844
|
-
params=query_params,
|
|
4845
|
-
content_type="application/json",
|
|
4846
|
-
)
|
|
3961
|
+
response = self._post(url, data=request_body_data, params=query_params, content_type="application/json")
|
|
4847
3962
|
return self._handle_response(response)
|
|
4848
3963
|
|
|
4849
|
-
def login_as_user(
|
|
4850
|
-
self,
|
|
4851
|
-
userId: str,
|
|
4852
|
-
organizationId: str,
|
|
4853
|
-
rememberMeId: str | None = None,
|
|
4854
|
-
device: str | None = None,
|
|
3964
|
+
async def login_as_user(
|
|
3965
|
+
self, userId: str, organizationId: str, rememberMeId: str | None = None, device: str | None = None
|
|
4855
3966
|
) -> dict[str, Any]:
|
|
4856
3967
|
"""
|
|
4857
3968
|
API login as user
|
|
@@ -4876,31 +3987,15 @@ class BillApp(APIApplication):
|
|
|
4876
3987
|
partner
|
|
4877
3988
|
"""
|
|
4878
3989
|
request_body_data = None
|
|
4879
|
-
request_body_data = {
|
|
4880
|
-
|
|
4881
|
-
"organizationId": organizationId,
|
|
4882
|
-
"rememberMeId": rememberMeId,
|
|
4883
|
-
"device": device,
|
|
4884
|
-
}
|
|
4885
|
-
request_body_data = {
|
|
4886
|
-
k: v for k, v in request_body_data.items() if v is not None
|
|
4887
|
-
}
|
|
3990
|
+
request_body_data = {"userId": userId, "organizationId": organizationId, "rememberMeId": rememberMeId, "device": device}
|
|
3991
|
+
request_body_data = {k: v for k, v in request_body_data.items() if v is not None}
|
|
4888
3992
|
url = f"{self.base_url}/v3/partner/login-as-user"
|
|
4889
3993
|
query_params = {}
|
|
4890
|
-
response = self._post(
|
|
4891
|
-
url,
|
|
4892
|
-
data=request_body_data,
|
|
4893
|
-
params=query_params,
|
|
4894
|
-
content_type="application/json",
|
|
4895
|
-
)
|
|
3994
|
+
response = self._post(url, data=request_body_data, params=query_params, content_type="application/json")
|
|
4896
3995
|
return self._handle_response(response)
|
|
4897
3996
|
|
|
4898
|
-
def list_partner_organizations(
|
|
4899
|
-
self,
|
|
4900
|
-
max: int | None = None,
|
|
4901
|
-
sort: str | None = None,
|
|
4902
|
-
filters: str | None = None,
|
|
4903
|
-
page: str | None = None,
|
|
3997
|
+
async def list_partner_organizations(
|
|
3998
|
+
self, max: int | None = None, sort: str | None = None, filters: str | None = None, page: str | None = None
|
|
4904
3999
|
) -> dict[str, Any]:
|
|
4905
4000
|
"""
|
|
4906
4001
|
Get list of organizations
|
|
@@ -4921,20 +4016,11 @@ class BillApp(APIApplication):
|
|
|
4921
4016
|
partner
|
|
4922
4017
|
"""
|
|
4923
4018
|
url = f"{self.base_url}/v3/partner/organizations"
|
|
4924
|
-
query_params = {
|
|
4925
|
-
k: v
|
|
4926
|
-
for k, v in [
|
|
4927
|
-
("max", max),
|
|
4928
|
-
("sort", sort),
|
|
4929
|
-
("filters", filters),
|
|
4930
|
-
("page", page),
|
|
4931
|
-
]
|
|
4932
|
-
if v is not None
|
|
4933
|
-
}
|
|
4019
|
+
query_params = {k: v for k, v in [("max", max), ("sort", sort), ("filters", filters), ("page", page)] if v is not None}
|
|
4934
4020
|
response = self._get(url, params=query_params)
|
|
4935
4021
|
return self._handle_response(response)
|
|
4936
4022
|
|
|
4937
|
-
def create_organization(
|
|
4023
|
+
async def create_organization(
|
|
4938
4024
|
self,
|
|
4939
4025
|
name: str,
|
|
4940
4026
|
address: Any,
|
|
@@ -4987,20 +4073,13 @@ class BillApp(APIApplication):
|
|
|
4987
4073
|
"accountType": accountType,
|
|
4988
4074
|
"processingOptions": processingOptions,
|
|
4989
4075
|
}
|
|
4990
|
-
request_body_data = {
|
|
4991
|
-
k: v for k, v in request_body_data.items() if v is not None
|
|
4992
|
-
}
|
|
4076
|
+
request_body_data = {k: v for k, v in request_body_data.items() if v is not None}
|
|
4993
4077
|
url = f"{self.base_url}/v3/partner/organizations"
|
|
4994
4078
|
query_params = {}
|
|
4995
|
-
response = self._post(
|
|
4996
|
-
url,
|
|
4997
|
-
data=request_body_data,
|
|
4998
|
-
params=query_params,
|
|
4999
|
-
content_type="application/json",
|
|
5000
|
-
)
|
|
4079
|
+
response = self._post(url, data=request_body_data, params=query_params, content_type="application/json")
|
|
5001
4080
|
return self._handle_response(response)
|
|
5002
4081
|
|
|
5003
|
-
def create_phone(self, userId: str, phoneNumber: str, phoneType: Any) -> Any:
|
|
4082
|
+
async def create_phone(self, userId: str, phoneNumber: str, phoneType: Any) -> Any:
|
|
5004
4083
|
"""
|
|
5005
4084
|
Add phone for risk verification
|
|
5006
4085
|
|
|
@@ -5021,29 +4100,15 @@ class BillApp(APIApplication):
|
|
|
5021
4100
|
if userId is None:
|
|
5022
4101
|
raise ValueError("Missing required parameter 'userId'.")
|
|
5023
4102
|
request_body_data = None
|
|
5024
|
-
request_body_data = {
|
|
5025
|
-
|
|
5026
|
-
"phoneType": phoneType,
|
|
5027
|
-
}
|
|
5028
|
-
request_body_data = {
|
|
5029
|
-
k: v for k, v in request_body_data.items() if v is not None
|
|
5030
|
-
}
|
|
4103
|
+
request_body_data = {"phoneNumber": phoneNumber, "phoneType": phoneType}
|
|
4104
|
+
request_body_data = {k: v for k, v in request_body_data.items() if v is not None}
|
|
5031
4105
|
url = f"{self.base_url}/v3/partner/risk-verifications/{userId}/phone"
|
|
5032
4106
|
query_params = {}
|
|
5033
|
-
response = self._post(
|
|
5034
|
-
url,
|
|
5035
|
-
data=request_body_data,
|
|
5036
|
-
params=query_params,
|
|
5037
|
-
content_type="application/json",
|
|
5038
|
-
)
|
|
4107
|
+
response = self._post(url, data=request_body_data, params=query_params, content_type="application/json")
|
|
5039
4108
|
return self._handle_response(response)
|
|
5040
4109
|
|
|
5041
|
-
def list_partner_user_roles(
|
|
5042
|
-
self,
|
|
5043
|
-
max: int | None = None,
|
|
5044
|
-
sort: str | None = None,
|
|
5045
|
-
filters: str | None = None,
|
|
5046
|
-
page: str | None = None,
|
|
4110
|
+
async def list_partner_user_roles(
|
|
4111
|
+
self, max: int | None = None, sort: str | None = None, filters: str | None = None, page: str | None = None
|
|
5047
4112
|
) -> dict[str, Any]:
|
|
5048
4113
|
"""
|
|
5049
4114
|
Get list of user roles
|
|
@@ -5064,20 +4129,11 @@ class BillApp(APIApplication):
|
|
|
5064
4129
|
partner
|
|
5065
4130
|
"""
|
|
5066
4131
|
url = f"{self.base_url}/v3/partner/roles"
|
|
5067
|
-
query_params = {
|
|
5068
|
-
k: v
|
|
5069
|
-
for k, v in [
|
|
5070
|
-
("max", max),
|
|
5071
|
-
("sort", sort),
|
|
5072
|
-
("filters", filters),
|
|
5073
|
-
("page", page),
|
|
5074
|
-
]
|
|
5075
|
-
if v is not None
|
|
5076
|
-
}
|
|
4132
|
+
query_params = {k: v for k, v in [("max", max), ("sort", sort), ("filters", filters), ("page", page)] if v is not None}
|
|
5077
4133
|
response = self._get(url, params=query_params)
|
|
5078
4134
|
return self._handle_response(response)
|
|
5079
4135
|
|
|
5080
|
-
def get_partner_user_role(self, roleId: str) -> dict[str, Any]:
|
|
4136
|
+
async def get_partner_user_role(self, roleId: str) -> dict[str, Any]:
|
|
5081
4137
|
"""
|
|
5082
4138
|
Get user role details
|
|
5083
4139
|
|
|
@@ -5100,12 +4156,8 @@ class BillApp(APIApplication):
|
|
|
5100
4156
|
response = self._get(url, params=query_params)
|
|
5101
4157
|
return self._handle_response(response)
|
|
5102
4158
|
|
|
5103
|
-
def list_partner_users(
|
|
5104
|
-
self,
|
|
5105
|
-
max: int | None = None,
|
|
5106
|
-
sort: str | None = None,
|
|
5107
|
-
filters: str | None = None,
|
|
5108
|
-
page: str | None = None,
|
|
4159
|
+
async def list_partner_users(
|
|
4160
|
+
self, max: int | None = None, sort: str | None = None, filters: str | None = None, page: str | None = None
|
|
5109
4161
|
) -> dict[str, Any]:
|
|
5110
4162
|
"""
|
|
5111
4163
|
Get list of users
|
|
@@ -5126,20 +4178,11 @@ class BillApp(APIApplication):
|
|
|
5126
4178
|
partner
|
|
5127
4179
|
"""
|
|
5128
4180
|
url = f"{self.base_url}/v3/partner/users"
|
|
5129
|
-
query_params = {
|
|
5130
|
-
k: v
|
|
5131
|
-
for k, v in [
|
|
5132
|
-
("max", max),
|
|
5133
|
-
("sort", sort),
|
|
5134
|
-
("filters", filters),
|
|
5135
|
-
("page", page),
|
|
5136
|
-
]
|
|
5137
|
-
if v is not None
|
|
5138
|
-
}
|
|
4181
|
+
query_params = {k: v for k, v in [("max", max), ("sort", sort), ("filters", filters), ("page", page)] if v is not None}
|
|
5139
4182
|
response = self._get(url, params=query_params)
|
|
5140
4183
|
return self._handle_response(response)
|
|
5141
4184
|
|
|
5142
|
-
def create_partner_user(
|
|
4185
|
+
async def create_partner_user(
|
|
5143
4186
|
self,
|
|
5144
4187
|
firstName: str,
|
|
5145
4188
|
email: str,
|
|
@@ -5184,20 +4227,13 @@ class BillApp(APIApplication):
|
|
|
5184
4227
|
"externalReferenceId": externalReferenceId,
|
|
5185
4228
|
"acceptTermsOfService": acceptTermsOfService,
|
|
5186
4229
|
}
|
|
5187
|
-
request_body_data = {
|
|
5188
|
-
k: v for k, v in request_body_data.items() if v is not None
|
|
5189
|
-
}
|
|
4230
|
+
request_body_data = {k: v for k, v in request_body_data.items() if v is not None}
|
|
5190
4231
|
url = f"{self.base_url}/v3/partner/users"
|
|
5191
4232
|
query_params = {}
|
|
5192
|
-
response = self._post(
|
|
5193
|
-
url,
|
|
5194
|
-
data=request_body_data,
|
|
5195
|
-
params=query_params,
|
|
5196
|
-
content_type="application/json",
|
|
5197
|
-
)
|
|
4233
|
+
response = self._post(url, data=request_body_data, params=query_params, content_type="application/json")
|
|
5198
4234
|
return self._handle_response(response)
|
|
5199
4235
|
|
|
5200
|
-
def get_partner_user(self, userId: str) -> dict[str, Any]:
|
|
4236
|
+
async def get_partner_user(self, userId: str) -> dict[str, Any]:
|
|
5201
4237
|
"""
|
|
5202
4238
|
Get user details
|
|
5203
4239
|
|
|
@@ -5220,13 +4256,8 @@ class BillApp(APIApplication):
|
|
|
5220
4256
|
response = self._get(url, params=query_params)
|
|
5221
4257
|
return self._handle_response(response)
|
|
5222
4258
|
|
|
5223
|
-
def update_partner_user(
|
|
5224
|
-
self,
|
|
5225
|
-
userId: str,
|
|
5226
|
-
firstName: str | None = None,
|
|
5227
|
-
lastName: str | None = None,
|
|
5228
|
-
email: str | None = None,
|
|
5229
|
-
roleId: str | None = None,
|
|
4259
|
+
async def update_partner_user(
|
|
4260
|
+
self, userId: str, firstName: str | None = None, lastName: str | None = None, email: str | None = None, roleId: str | None = None
|
|
5230
4261
|
) -> dict[str, Any]:
|
|
5231
4262
|
"""
|
|
5232
4263
|
Update a user
|
|
@@ -5252,21 +4283,14 @@ class BillApp(APIApplication):
|
|
|
5252
4283
|
if userId is None:
|
|
5253
4284
|
raise ValueError("Missing required parameter 'userId'.")
|
|
5254
4285
|
request_body_data = None
|
|
5255
|
-
request_body_data = {
|
|
5256
|
-
|
|
5257
|
-
"lastName": lastName,
|
|
5258
|
-
"email": email,
|
|
5259
|
-
"roleId": roleId,
|
|
5260
|
-
}
|
|
5261
|
-
request_body_data = {
|
|
5262
|
-
k: v for k, v in request_body_data.items() if v is not None
|
|
5263
|
-
}
|
|
4286
|
+
request_body_data = {"firstName": firstName, "lastName": lastName, "email": email, "roleId": roleId}
|
|
4287
|
+
request_body_data = {k: v for k, v in request_body_data.items() if v is not None}
|
|
5264
4288
|
url = f"{self.base_url}/v3/partner/users/{userId}"
|
|
5265
4289
|
query_params = {}
|
|
5266
4290
|
response = self._patch(url, data=request_body_data, params=query_params)
|
|
5267
4291
|
return self._handle_response(response)
|
|
5268
4292
|
|
|
5269
|
-
def archive_partner_user(self, userId: str) -> dict[str, Any]:
|
|
4293
|
+
async def archive_partner_user(self, userId: str) -> dict[str, Any]:
|
|
5270
4294
|
"""
|
|
5271
4295
|
Archive a user
|
|
5272
4296
|
|
|
@@ -5287,15 +4311,10 @@ class BillApp(APIApplication):
|
|
|
5287
4311
|
request_body_data = None
|
|
5288
4312
|
url = f"{self.base_url}/v3/partner/users/{userId}/archive"
|
|
5289
4313
|
query_params = {}
|
|
5290
|
-
response = self._post(
|
|
5291
|
-
url,
|
|
5292
|
-
data=request_body_data,
|
|
5293
|
-
params=query_params,
|
|
5294
|
-
content_type="application/json",
|
|
5295
|
-
)
|
|
4314
|
+
response = self._post(url, data=request_body_data, params=query_params, content_type="application/json")
|
|
5296
4315
|
return self._handle_response(response)
|
|
5297
4316
|
|
|
5298
|
-
def restore_partner_user(self, userId: str) -> dict[str, Any]:
|
|
4317
|
+
async def restore_partner_user(self, userId: str) -> dict[str, Any]:
|
|
5299
4318
|
"""
|
|
5300
4319
|
Restore an archived user
|
|
5301
4320
|
|
|
@@ -5316,20 +4335,11 @@ class BillApp(APIApplication):
|
|
|
5316
4335
|
request_body_data = None
|
|
5317
4336
|
url = f"{self.base_url}/v3/partner/users/{userId}/restore"
|
|
5318
4337
|
query_params = {}
|
|
5319
|
-
response = self._post(
|
|
5320
|
-
url,
|
|
5321
|
-
data=request_body_data,
|
|
5322
|
-
params=query_params,
|
|
5323
|
-
content_type="application/json",
|
|
5324
|
-
)
|
|
4338
|
+
response = self._post(url, data=request_body_data, params=query_params, content_type="application/json")
|
|
5325
4339
|
return self._handle_response(response)
|
|
5326
4340
|
|
|
5327
|
-
def list_payments(
|
|
5328
|
-
self,
|
|
5329
|
-
max: int | None = None,
|
|
5330
|
-
sort: str | None = None,
|
|
5331
|
-
filters: str | None = None,
|
|
5332
|
-
page: str | None = None,
|
|
4341
|
+
async def list_payments(
|
|
4342
|
+
self, max: int | None = None, sort: str | None = None, filters: str | None = None, page: str | None = None
|
|
5333
4343
|
) -> dict[str, Any]:
|
|
5334
4344
|
"""
|
|
5335
4345
|
Get list of payments
|
|
@@ -5350,20 +4360,11 @@ class BillApp(APIApplication):
|
|
|
5350
4360
|
payments
|
|
5351
4361
|
"""
|
|
5352
4362
|
url = f"{self.base_url}/v3/payments"
|
|
5353
|
-
query_params = {
|
|
5354
|
-
k: v
|
|
5355
|
-
for k, v in [
|
|
5356
|
-
("max", max),
|
|
5357
|
-
("sort", sort),
|
|
5358
|
-
("filters", filters),
|
|
5359
|
-
("page", page),
|
|
5360
|
-
]
|
|
5361
|
-
if v is not None
|
|
5362
|
-
}
|
|
4363
|
+
query_params = {k: v for k, v in [("max", max), ("sort", sort), ("filters", filters), ("page", page)] if v is not None}
|
|
5363
4364
|
response = self._get(url, params=query_params)
|
|
5364
4365
|
return self._handle_response(response)
|
|
5365
4366
|
|
|
5366
|
-
def create_payment(
|
|
4367
|
+
async def create_payment(
|
|
5367
4368
|
self,
|
|
5368
4369
|
fundingAccount: Any,
|
|
5369
4370
|
amount: float,
|
|
@@ -5421,20 +4422,13 @@ class BillApp(APIApplication):
|
|
|
5421
4422
|
"transactionNumber": transactionNumber,
|
|
5422
4423
|
"cardFundingPurpose": cardFundingPurpose,
|
|
5423
4424
|
}
|
|
5424
|
-
request_body_data = {
|
|
5425
|
-
k: v for k, v in request_body_data.items() if v is not None
|
|
5426
|
-
}
|
|
4425
|
+
request_body_data = {k: v for k, v in request_body_data.items() if v is not None}
|
|
5427
4426
|
url = f"{self.base_url}/v3/payments"
|
|
5428
4427
|
query_params = {}
|
|
5429
|
-
response = self._post(
|
|
5430
|
-
url,
|
|
5431
|
-
data=request_body_data,
|
|
5432
|
-
params=query_params,
|
|
5433
|
-
content_type="application/json",
|
|
5434
|
-
)
|
|
4428
|
+
response = self._post(url, data=request_body_data, params=query_params, content_type="application/json")
|
|
5435
4429
|
return self._handle_response(response)
|
|
5436
4430
|
|
|
5437
|
-
def create_bulk_payment(
|
|
4431
|
+
async def create_bulk_payment(
|
|
5438
4432
|
self,
|
|
5439
4433
|
fundingAccount: Any,
|
|
5440
4434
|
payments: list[dict[str, Any]],
|
|
@@ -5486,20 +4480,13 @@ class BillApp(APIApplication):
|
|
|
5486
4480
|
"transactionNumber": transactionNumber,
|
|
5487
4481
|
"cardFundingPurpose": cardFundingPurpose,
|
|
5488
4482
|
}
|
|
5489
|
-
request_body_data = {
|
|
5490
|
-
k: v for k, v in request_body_data.items() if v is not None
|
|
5491
|
-
}
|
|
4483
|
+
request_body_data = {k: v for k, v in request_body_data.items() if v is not None}
|
|
5492
4484
|
url = f"{self.base_url}/v3/payments/bulk"
|
|
5493
4485
|
query_params = {}
|
|
5494
|
-
response = self._post(
|
|
5495
|
-
url,
|
|
5496
|
-
data=request_body_data,
|
|
5497
|
-
params=query_params,
|
|
5498
|
-
content_type="application/json",
|
|
5499
|
-
)
|
|
4486
|
+
response = self._post(url, data=request_body_data, params=query_params, content_type="application/json")
|
|
5500
4487
|
return self._handle_response(response)
|
|
5501
4488
|
|
|
5502
|
-
def list_payment_options(self, vendorId: str, amount: float) -> dict[str, Any]:
|
|
4489
|
+
async def list_payment_options(self, vendorId: str, amount: float) -> dict[str, Any]:
|
|
5503
4490
|
"""
|
|
5504
4491
|
Get list of vendor payment options
|
|
5505
4492
|
|
|
@@ -5514,18 +4501,14 @@ class BillApp(APIApplication):
|
|
|
5514
4501
|
HTTPStatusError: Raised when the API request fails with detailed error information including status code and response body.
|
|
5515
4502
|
|
|
5516
4503
|
Tags:
|
|
5517
|
-
payments
|
|
5518
|
-
"""
|
|
5519
|
-
url = f"{self.base_url}/v3/payments/options"
|
|
5520
|
-
query_params = {
|
|
5521
|
-
k: v
|
|
5522
|
-
for k, v in [("vendorId", vendorId), ("amount", amount)]
|
|
5523
|
-
if v is not None
|
|
5524
|
-
}
|
|
4504
|
+
payments
|
|
4505
|
+
"""
|
|
4506
|
+
url = f"{self.base_url}/v3/payments/options"
|
|
4507
|
+
query_params = {k: v for k, v in [("vendorId", vendorId), ("amount", amount)] if v is not None}
|
|
5525
4508
|
response = self._get(url, params=query_params)
|
|
5526
4509
|
return self._handle_response(response)
|
|
5527
4510
|
|
|
5528
|
-
def get_payment(self, paymentId: str) -> dict[str, Any]:
|
|
4511
|
+
async def get_payment(self, paymentId: str) -> dict[str, Any]:
|
|
5529
4512
|
"""
|
|
5530
4513
|
Get payment details
|
|
5531
4514
|
|
|
@@ -5548,7 +4531,7 @@ class BillApp(APIApplication):
|
|
|
5548
4531
|
response = self._get(url, params=query_params)
|
|
5549
4532
|
return self._handle_response(response)
|
|
5550
4533
|
|
|
5551
|
-
def cancel_payment(self, paymentId: str) -> dict[str, Any]:
|
|
4534
|
+
async def cancel_payment(self, paymentId: str) -> dict[str, Any]:
|
|
5552
4535
|
"""
|
|
5553
4536
|
Cancel a payment
|
|
5554
4537
|
|
|
@@ -5569,15 +4552,10 @@ class BillApp(APIApplication):
|
|
|
5569
4552
|
request_body_data = None
|
|
5570
4553
|
url = f"{self.base_url}/v3/payments/{paymentId}/cancel"
|
|
5571
4554
|
query_params = {}
|
|
5572
|
-
response = self._post(
|
|
5573
|
-
url,
|
|
5574
|
-
data=request_body_data,
|
|
5575
|
-
params=query_params,
|
|
5576
|
-
content_type="application/json",
|
|
5577
|
-
)
|
|
4555
|
+
response = self._post(url, data=request_body_data, params=query_params, content_type="application/json")
|
|
5578
4556
|
return self._handle_response(response)
|
|
5579
4557
|
|
|
5580
|
-
def get_check_image_data(self, paymentId: str) -> dict[str, Any]:
|
|
4558
|
+
async def get_check_image_data(self, paymentId: str) -> dict[str, Any]:
|
|
5581
4559
|
"""
|
|
5582
4560
|
Get check image data
|
|
5583
4561
|
|
|
@@ -5600,7 +4578,7 @@ class BillApp(APIApplication):
|
|
|
5600
4578
|
response = self._get(url, params=query_params)
|
|
5601
4579
|
return self._handle_response(response)
|
|
5602
4580
|
|
|
5603
|
-
def void_payment(self, paymentId: str, type: Any, reason: str) -> dict[str, Any]:
|
|
4581
|
+
async def void_payment(self, paymentId: str, type: Any, reason: str) -> dict[str, Any]:
|
|
5604
4582
|
"""
|
|
5605
4583
|
Void a payment
|
|
5606
4584
|
|
|
@@ -5621,29 +4599,15 @@ class BillApp(APIApplication):
|
|
|
5621
4599
|
if paymentId is None:
|
|
5622
4600
|
raise ValueError("Missing required parameter 'paymentId'.")
|
|
5623
4601
|
request_body_data = None
|
|
5624
|
-
request_body_data = {
|
|
5625
|
-
|
|
5626
|
-
"reason": reason,
|
|
5627
|
-
}
|
|
5628
|
-
request_body_data = {
|
|
5629
|
-
k: v for k, v in request_body_data.items() if v is not None
|
|
5630
|
-
}
|
|
4602
|
+
request_body_data = {"type": type, "reason": reason}
|
|
4603
|
+
request_body_data = {k: v for k, v in request_body_data.items() if v is not None}
|
|
5631
4604
|
url = f"{self.base_url}/v3/payments/{paymentId}/void"
|
|
5632
4605
|
query_params = {}
|
|
5633
|
-
response = self._post(
|
|
5634
|
-
url,
|
|
5635
|
-
data=request_body_data,
|
|
5636
|
-
params=query_params,
|
|
5637
|
-
content_type="application/json",
|
|
5638
|
-
)
|
|
4606
|
+
response = self._post(url, data=request_body_data, params=query_params, content_type="application/json")
|
|
5639
4607
|
return self._handle_response(response)
|
|
5640
4608
|
|
|
5641
|
-
def list_recurring_bills(
|
|
5642
|
-
self,
|
|
5643
|
-
max: int | None = None,
|
|
5644
|
-
sort: str | None = None,
|
|
5645
|
-
filters: str | None = None,
|
|
5646
|
-
page: str | None = None,
|
|
4609
|
+
async def list_recurring_bills(
|
|
4610
|
+
self, max: int | None = None, sort: str | None = None, filters: str | None = None, page: str | None = None
|
|
5647
4611
|
) -> dict[str, Any]:
|
|
5648
4612
|
"""
|
|
5649
4613
|
Get list of recurring bills
|
|
@@ -5664,20 +4628,11 @@ class BillApp(APIApplication):
|
|
|
5664
4628
|
recurringbills
|
|
5665
4629
|
"""
|
|
5666
4630
|
url = f"{self.base_url}/v3/recurringbills"
|
|
5667
|
-
query_params = {
|
|
5668
|
-
k: v
|
|
5669
|
-
for k, v in [
|
|
5670
|
-
("max", max),
|
|
5671
|
-
("sort", sort),
|
|
5672
|
-
("filters", filters),
|
|
5673
|
-
("page", page),
|
|
5674
|
-
]
|
|
5675
|
-
if v is not None
|
|
5676
|
-
}
|
|
4631
|
+
query_params = {k: v for k, v in [("max", max), ("sort", sort), ("filters", filters), ("page", page)] if v is not None}
|
|
5677
4632
|
response = self._get(url, params=query_params)
|
|
5678
4633
|
return self._handle_response(response)
|
|
5679
4634
|
|
|
5680
|
-
def create_recurring_bill(
|
|
4635
|
+
async def create_recurring_bill(
|
|
5681
4636
|
self,
|
|
5682
4637
|
vendorId: str,
|
|
5683
4638
|
schedule: Any,
|
|
@@ -5715,20 +4670,13 @@ class BillApp(APIApplication):
|
|
|
5715
4670
|
"processingOptions": processingOptions,
|
|
5716
4671
|
"paymentInformation": paymentInformation,
|
|
5717
4672
|
}
|
|
5718
|
-
request_body_data = {
|
|
5719
|
-
k: v for k, v in request_body_data.items() if v is not None
|
|
5720
|
-
}
|
|
4673
|
+
request_body_data = {k: v for k, v in request_body_data.items() if v is not None}
|
|
5721
4674
|
url = f"{self.base_url}/v3/recurringbills"
|
|
5722
4675
|
query_params = {}
|
|
5723
|
-
response = self._post(
|
|
5724
|
-
url,
|
|
5725
|
-
data=request_body_data,
|
|
5726
|
-
params=query_params,
|
|
5727
|
-
content_type="application/json",
|
|
5728
|
-
)
|
|
4676
|
+
response = self._post(url, data=request_body_data, params=query_params, content_type="application/json")
|
|
5729
4677
|
return self._handle_response(response)
|
|
5730
4678
|
|
|
5731
|
-
def get_recurring_bill(self, recurringBillId: str) -> dict[str, Any]:
|
|
4679
|
+
async def get_recurring_bill(self, recurringBillId: str) -> dict[str, Any]:
|
|
5732
4680
|
"""
|
|
5733
4681
|
Get recurring bill details
|
|
5734
4682
|
|
|
@@ -5751,7 +4699,7 @@ class BillApp(APIApplication):
|
|
|
5751
4699
|
response = self._get(url, params=query_params)
|
|
5752
4700
|
return self._handle_response(response)
|
|
5753
4701
|
|
|
5754
|
-
def replace_recurring_bill(
|
|
4702
|
+
async def replace_recurring_bill(
|
|
5755
4703
|
self,
|
|
5756
4704
|
recurringBillId: str,
|
|
5757
4705
|
vendorId: str,
|
|
@@ -5793,20 +4741,13 @@ class BillApp(APIApplication):
|
|
|
5793
4741
|
"processingOptions": processingOptions,
|
|
5794
4742
|
"paymentInformation": paymentInformation,
|
|
5795
4743
|
}
|
|
5796
|
-
request_body_data = {
|
|
5797
|
-
k: v for k, v in request_body_data.items() if v is not None
|
|
5798
|
-
}
|
|
4744
|
+
request_body_data = {k: v for k, v in request_body_data.items() if v is not None}
|
|
5799
4745
|
url = f"{self.base_url}/v3/recurringbills/{recurringBillId}"
|
|
5800
4746
|
query_params = {}
|
|
5801
|
-
response = self._put(
|
|
5802
|
-
url,
|
|
5803
|
-
data=request_body_data,
|
|
5804
|
-
params=query_params,
|
|
5805
|
-
content_type="application/json",
|
|
5806
|
-
)
|
|
4747
|
+
response = self._put(url, data=request_body_data, params=query_params, content_type="application/json")
|
|
5807
4748
|
return self._handle_response(response)
|
|
5808
4749
|
|
|
5809
|
-
def update_recurring_bill(
|
|
4750
|
+
async def update_recurring_bill(
|
|
5810
4751
|
self,
|
|
5811
4752
|
recurringBillId: str,
|
|
5812
4753
|
vendorId: str | None = None,
|
|
@@ -5848,15 +4789,13 @@ class BillApp(APIApplication):
|
|
|
5848
4789
|
"processingOptions": processingOptions,
|
|
5849
4790
|
"paymentInformation": paymentInformation,
|
|
5850
4791
|
}
|
|
5851
|
-
request_body_data = {
|
|
5852
|
-
k: v for k, v in request_body_data.items() if v is not None
|
|
5853
|
-
}
|
|
4792
|
+
request_body_data = {k: v for k, v in request_body_data.items() if v is not None}
|
|
5854
4793
|
url = f"{self.base_url}/v3/recurringbills/{recurringBillId}"
|
|
5855
4794
|
query_params = {}
|
|
5856
4795
|
response = self._patch(url, data=request_body_data, params=query_params)
|
|
5857
4796
|
return self._handle_response(response)
|
|
5858
4797
|
|
|
5859
|
-
def archive_recurring_bill(self, recurringBillId: str) -> dict[str, Any]:
|
|
4798
|
+
async def archive_recurring_bill(self, recurringBillId: str) -> dict[str, Any]:
|
|
5860
4799
|
"""
|
|
5861
4800
|
Archive a recurring bill
|
|
5862
4801
|
|
|
@@ -5877,15 +4816,10 @@ class BillApp(APIApplication):
|
|
|
5877
4816
|
request_body_data = None
|
|
5878
4817
|
url = f"{self.base_url}/v3/recurringbills/{recurringBillId}/archive"
|
|
5879
4818
|
query_params = {}
|
|
5880
|
-
response = self._post(
|
|
5881
|
-
url,
|
|
5882
|
-
data=request_body_data,
|
|
5883
|
-
params=query_params,
|
|
5884
|
-
content_type="application/json",
|
|
5885
|
-
)
|
|
4819
|
+
response = self._post(url, data=request_body_data, params=query_params, content_type="application/json")
|
|
5886
4820
|
return self._handle_response(response)
|
|
5887
4821
|
|
|
5888
|
-
def restore_recurring_bill(self, recurringBillId: str) -> dict[str, Any]:
|
|
4822
|
+
async def restore_recurring_bill(self, recurringBillId: str) -> dict[str, Any]:
|
|
5889
4823
|
"""
|
|
5890
4824
|
Restore an archived recurring bill
|
|
5891
4825
|
|
|
@@ -5906,20 +4840,11 @@ class BillApp(APIApplication):
|
|
|
5906
4840
|
request_body_data = None
|
|
5907
4841
|
url = f"{self.base_url}/v3/recurringbills/{recurringBillId}/restore"
|
|
5908
4842
|
query_params = {}
|
|
5909
|
-
response = self._post(
|
|
5910
|
-
url,
|
|
5911
|
-
data=request_body_data,
|
|
5912
|
-
params=query_params,
|
|
5913
|
-
content_type="application/json",
|
|
5914
|
-
)
|
|
4843
|
+
response = self._post(url, data=request_body_data, params=query_params, content_type="application/json")
|
|
5915
4844
|
return self._handle_response(response)
|
|
5916
4845
|
|
|
5917
|
-
def get_vendor_audit_trail(
|
|
5918
|
-
self,
|
|
5919
|
-
vendorId: str,
|
|
5920
|
-
includeArchived: bool | None = None,
|
|
5921
|
-
start: int | None = None,
|
|
5922
|
-
max: int | None = None,
|
|
4846
|
+
async def get_vendor_audit_trail(
|
|
4847
|
+
self, vendorId: str, includeArchived: bool | None = None, start: int | None = None, max: int | None = None
|
|
5923
4848
|
) -> list[Any]:
|
|
5924
4849
|
"""
|
|
5925
4850
|
Get audit trail details for a vendor
|
|
@@ -5942,19 +4867,11 @@ class BillApp(APIApplication):
|
|
|
5942
4867
|
if vendorId is None:
|
|
5943
4868
|
raise ValueError("Missing required parameter 'vendorId'.")
|
|
5944
4869
|
url = f"{self.base_url}/v3/reports/audit-trail/vendor/{vendorId}"
|
|
5945
|
-
query_params = {
|
|
5946
|
-
k: v
|
|
5947
|
-
for k, v in [
|
|
5948
|
-
("includeArchived", includeArchived),
|
|
5949
|
-
("start", start),
|
|
5950
|
-
("max", max),
|
|
5951
|
-
]
|
|
5952
|
-
if v is not None
|
|
5953
|
-
}
|
|
4870
|
+
query_params = {k: v for k, v in [("includeArchived", includeArchived), ("start", start), ("max", max)] if v is not None}
|
|
5954
4871
|
response = self._get(url, params=query_params)
|
|
5955
4872
|
return self._handle_response(response)
|
|
5956
4873
|
|
|
5957
|
-
def get_risk_verifications(self) -> dict[str, Any]:
|
|
4874
|
+
async def get_risk_verifications(self) -> dict[str, Any]:
|
|
5958
4875
|
"""
|
|
5959
4876
|
Get risk verification details
|
|
5960
4877
|
|
|
@@ -5972,7 +4889,7 @@ class BillApp(APIApplication):
|
|
|
5972
4889
|
response = self._get(url, params=query_params)
|
|
5973
4890
|
return self._handle_response(response)
|
|
5974
4891
|
|
|
5975
|
-
def initiate_risk_verifications(self) -> dict[str, Any]:
|
|
4892
|
+
async def initiate_risk_verifications(self) -> dict[str, Any]:
|
|
5976
4893
|
"""
|
|
5977
4894
|
Initiate risk verification for an organization
|
|
5978
4895
|
|
|
@@ -5988,15 +4905,10 @@ class BillApp(APIApplication):
|
|
|
5988
4905
|
request_body_data = None
|
|
5989
4906
|
url = f"{self.base_url}/v3/risk-verifications"
|
|
5990
4907
|
query_params = {}
|
|
5991
|
-
response = self._post(
|
|
5992
|
-
url,
|
|
5993
|
-
data=request_body_data,
|
|
5994
|
-
params=query_params,
|
|
5995
|
-
content_type="application/json",
|
|
5996
|
-
)
|
|
4908
|
+
response = self._post(url, data=request_body_data, params=query_params, content_type="application/json")
|
|
5997
4909
|
return self._handle_response(response)
|
|
5998
4910
|
|
|
5999
|
-
def get_risk_verification_phone(self) -> dict[str, Any]:
|
|
4911
|
+
async def get_risk_verification_phone(self) -> dict[str, Any]:
|
|
6000
4912
|
"""
|
|
6001
4913
|
Get phone status for risk verification
|
|
6002
4914
|
|
|
@@ -6014,7 +4926,7 @@ class BillApp(APIApplication):
|
|
|
6014
4926
|
response = self._get(url, params=query_params)
|
|
6015
4927
|
return self._handle_response(response)
|
|
6016
4928
|
|
|
6017
|
-
def create_risk_verification_phone(self, phoneNumber: str, phoneType: Any) -> Any:
|
|
4929
|
+
async def create_risk_verification_phone(self, phoneNumber: str, phoneType: Any) -> Any:
|
|
6018
4930
|
"""
|
|
6019
4931
|
Add phone for risk verification
|
|
6020
4932
|
|
|
@@ -6032,29 +4944,15 @@ class BillApp(APIApplication):
|
|
|
6032
4944
|
risk verifications
|
|
6033
4945
|
"""
|
|
6034
4946
|
request_body_data = None
|
|
6035
|
-
request_body_data = {
|
|
6036
|
-
|
|
6037
|
-
"phoneType": phoneType,
|
|
6038
|
-
}
|
|
6039
|
-
request_body_data = {
|
|
6040
|
-
k: v for k, v in request_body_data.items() if v is not None
|
|
6041
|
-
}
|
|
4947
|
+
request_body_data = {"phoneNumber": phoneNumber, "phoneType": phoneType}
|
|
4948
|
+
request_body_data = {k: v for k, v in request_body_data.items() if v is not None}
|
|
6042
4949
|
url = f"{self.base_url}/v3/risk-verifications/phone"
|
|
6043
4950
|
query_params = {}
|
|
6044
|
-
response = self._post(
|
|
6045
|
-
url,
|
|
6046
|
-
data=request_body_data,
|
|
6047
|
-
params=query_params,
|
|
6048
|
-
content_type="application/json",
|
|
6049
|
-
)
|
|
4951
|
+
response = self._post(url, data=request_body_data, params=query_params, content_type="application/json")
|
|
6050
4952
|
return self._handle_response(response)
|
|
6051
4953
|
|
|
6052
|
-
def list_organization_user_roles(
|
|
6053
|
-
self,
|
|
6054
|
-
max: int | None = None,
|
|
6055
|
-
sort: str | None = None,
|
|
6056
|
-
filters: str | None = None,
|
|
6057
|
-
page: str | None = None,
|
|
4954
|
+
async def list_organization_user_roles(
|
|
4955
|
+
self, max: int | None = None, sort: str | None = None, filters: str | None = None, page: str | None = None
|
|
6058
4956
|
) -> dict[str, Any]:
|
|
6059
4957
|
"""
|
|
6060
4958
|
Get list of user roles
|
|
@@ -6075,20 +4973,11 @@ class BillApp(APIApplication):
|
|
|
6075
4973
|
roles
|
|
6076
4974
|
"""
|
|
6077
4975
|
url = f"{self.base_url}/v3/roles"
|
|
6078
|
-
query_params = {
|
|
6079
|
-
k: v
|
|
6080
|
-
for k, v in [
|
|
6081
|
-
("max", max),
|
|
6082
|
-
("sort", sort),
|
|
6083
|
-
("filters", filters),
|
|
6084
|
-
("page", page),
|
|
6085
|
-
]
|
|
6086
|
-
if v is not None
|
|
6087
|
-
}
|
|
4976
|
+
query_params = {k: v for k, v in [("max", max), ("sort", sort), ("filters", filters), ("page", page)] if v is not None}
|
|
6088
4977
|
response = self._get(url, params=query_params)
|
|
6089
4978
|
return self._handle_response(response)
|
|
6090
4979
|
|
|
6091
|
-
def get_organization_user_role(self, roleId: str) -> dict[str, Any]:
|
|
4980
|
+
async def get_organization_user_role(self, roleId: str) -> dict[str, Any]:
|
|
6092
4981
|
"""
|
|
6093
4982
|
Get user role details
|
|
6094
4983
|
|
|
@@ -6111,7 +5000,7 @@ class BillApp(APIApplication):
|
|
|
6111
5000
|
response = self._get(url, params=query_params)
|
|
6112
5001
|
return self._handle_response(response)
|
|
6113
5002
|
|
|
6114
|
-
def list_budgets(
|
|
5003
|
+
async def list_budgets(
|
|
6115
5004
|
self,
|
|
6116
5005
|
nextPage: str | None = None,
|
|
6117
5006
|
prevPage: str | None = None,
|
|
@@ -6141,19 +5030,13 @@ class BillApp(APIApplication):
|
|
|
6141
5030
|
url = f"{self.base_url}/v3/spend/budgets"
|
|
6142
5031
|
query_params = {
|
|
6143
5032
|
k: v
|
|
6144
|
-
for k, v in [
|
|
6145
|
-
("nextPage", nextPage),
|
|
6146
|
-
("prevPage", prevPage),
|
|
6147
|
-
("max", max),
|
|
6148
|
-
("sort", sort),
|
|
6149
|
-
("filters", filters),
|
|
6150
|
-
]
|
|
5033
|
+
for k, v in [("nextPage", nextPage), ("prevPage", prevPage), ("max", max), ("sort", sort), ("filters", filters)]
|
|
6151
5034
|
if v is not None
|
|
6152
5035
|
}
|
|
6153
5036
|
response = self._get(url, params=query_params)
|
|
6154
5037
|
return self._handle_response(response)
|
|
6155
5038
|
|
|
6156
|
-
def create_budget(
|
|
5039
|
+
async def create_budget(
|
|
6157
5040
|
self,
|
|
6158
5041
|
name: str,
|
|
6159
5042
|
owners: list[str],
|
|
@@ -6236,20 +5119,13 @@ class BillApp(APIApplication):
|
|
|
6236
5119
|
"overspendBuffer": overspendBuffer,
|
|
6237
5120
|
"shareFunds": shareFunds,
|
|
6238
5121
|
}
|
|
6239
|
-
request_body_data = {
|
|
6240
|
-
k: v for k, v in request_body_data.items() if v is not None
|
|
6241
|
-
}
|
|
5122
|
+
request_body_data = {k: v for k, v in request_body_data.items() if v is not None}
|
|
6242
5123
|
url = f"{self.base_url}/v3/spend/budgets"
|
|
6243
5124
|
query_params = {}
|
|
6244
|
-
response = self._post(
|
|
6245
|
-
url,
|
|
6246
|
-
data=request_body_data,
|
|
6247
|
-
params=query_params,
|
|
6248
|
-
content_type="application/json",
|
|
6249
|
-
)
|
|
5125
|
+
response = self._post(url, data=request_body_data, params=query_params, content_type="application/json")
|
|
6250
5126
|
return self._handle_response(response)
|
|
6251
5127
|
|
|
6252
|
-
def get_budget(self, budgetId: str) -> dict[str, Any]:
|
|
5128
|
+
async def get_budget(self, budgetId: str) -> dict[str, Any]:
|
|
6253
5129
|
"""
|
|
6254
5130
|
Get budget details
|
|
6255
5131
|
|
|
@@ -6272,7 +5148,7 @@ class BillApp(APIApplication):
|
|
|
6272
5148
|
response = self._get(url, params=query_params)
|
|
6273
5149
|
return self._handle_response(response)
|
|
6274
5150
|
|
|
6275
|
-
def delete_budget(self, budgetId: str) -> Any:
|
|
5151
|
+
async def delete_budget(self, budgetId: str) -> Any:
|
|
6276
5152
|
"""
|
|
6277
5153
|
Delete a budget
|
|
6278
5154
|
|
|
@@ -6295,7 +5171,7 @@ class BillApp(APIApplication):
|
|
|
6295
5171
|
response = self._delete(url, params=query_params)
|
|
6296
5172
|
return self._handle_response(response)
|
|
6297
5173
|
|
|
6298
|
-
def update_budget(
|
|
5174
|
+
async def update_budget(
|
|
6299
5175
|
self,
|
|
6300
5176
|
budgetId: str,
|
|
6301
5177
|
name: str | None = None,
|
|
@@ -6367,15 +5243,13 @@ class BillApp(APIApplication):
|
|
|
6367
5243
|
"overspendBuffer": overspendBuffer,
|
|
6368
5244
|
"shareFunds": shareFunds,
|
|
6369
5245
|
}
|
|
6370
|
-
request_body_data = {
|
|
6371
|
-
k: v for k, v in request_body_data.items() if v is not None
|
|
6372
|
-
}
|
|
5246
|
+
request_body_data = {k: v for k, v in request_body_data.items() if v is not None}
|
|
6373
5247
|
url = f"{self.base_url}/v3/spend/budgets/{budgetId}"
|
|
6374
5248
|
query_params = {}
|
|
6375
5249
|
response = self._patch(url, data=request_body_data, params=query_params)
|
|
6376
5250
|
return self._handle_response(response)
|
|
6377
5251
|
|
|
6378
|
-
def list_budget_members(
|
|
5252
|
+
async def list_budget_members(
|
|
6379
5253
|
self,
|
|
6380
5254
|
budgetId: str,
|
|
6381
5255
|
max: int | None = None,
|
|
@@ -6409,21 +5283,13 @@ class BillApp(APIApplication):
|
|
|
6409
5283
|
url = f"{self.base_url}/v3/spend/budgets/{budgetId}/members"
|
|
6410
5284
|
query_params = {
|
|
6411
5285
|
k: v
|
|
6412
|
-
for k, v in [
|
|
6413
|
-
("max", max),
|
|
6414
|
-
("nextPage", nextPage),
|
|
6415
|
-
("prevPage", prevPage),
|
|
6416
|
-
("sort", sort),
|
|
6417
|
-
("filters", filters),
|
|
6418
|
-
]
|
|
5286
|
+
for k, v in [("max", max), ("nextPage", nextPage), ("prevPage", prevPage), ("sort", sort), ("filters", filters)]
|
|
6419
5287
|
if v is not None
|
|
6420
5288
|
}
|
|
6421
5289
|
response = self._get(url, params=query_params)
|
|
6422
5290
|
return self._handle_response(response)
|
|
6423
5291
|
|
|
6424
|
-
def upsert_bulk_budget_users(
|
|
6425
|
-
self, budgetId: str, members: list[dict[str, Any]]
|
|
6426
|
-
) -> Any:
|
|
5292
|
+
async def upsert_bulk_budget_users(self, budgetId: str, members: list[dict[str, Any]]) -> Any:
|
|
6427
5293
|
"""
|
|
6428
5294
|
Update a list of budget members in a budget
|
|
6429
5295
|
|
|
@@ -6443,23 +5309,14 @@ class BillApp(APIApplication):
|
|
|
6443
5309
|
if budgetId is None:
|
|
6444
5310
|
raise ValueError("Missing required parameter 'budgetId'.")
|
|
6445
5311
|
request_body_data = None
|
|
6446
|
-
request_body_data = {
|
|
6447
|
-
|
|
6448
|
-
}
|
|
6449
|
-
request_body_data = {
|
|
6450
|
-
k: v for k, v in request_body_data.items() if v is not None
|
|
6451
|
-
}
|
|
5312
|
+
request_body_data = {"members": members}
|
|
5313
|
+
request_body_data = {k: v for k, v in request_body_data.items() if v is not None}
|
|
6452
5314
|
url = f"{self.base_url}/v3/spend/budgets/{budgetId}/members/bulk"
|
|
6453
5315
|
query_params = {}
|
|
6454
|
-
response = self._put(
|
|
6455
|
-
url,
|
|
6456
|
-
data=request_body_data,
|
|
6457
|
-
params=query_params,
|
|
6458
|
-
content_type="application/json",
|
|
6459
|
-
)
|
|
5316
|
+
response = self._put(url, data=request_body_data, params=query_params, content_type="application/json")
|
|
6460
5317
|
return self._handle_response(response)
|
|
6461
5318
|
|
|
6462
|
-
def get_budget_member(self, budgetId: str, userId: str) -> dict[str, Any]:
|
|
5319
|
+
async def get_budget_member(self, budgetId: str, userId: str) -> dict[str, Any]:
|
|
6463
5320
|
"""
|
|
6464
5321
|
Get a single member for a budget
|
|
6465
5322
|
|
|
@@ -6485,7 +5342,7 @@ class BillApp(APIApplication):
|
|
|
6485
5342
|
response = self._get(url, params=query_params)
|
|
6486
5343
|
return self._handle_response(response)
|
|
6487
5344
|
|
|
6488
|
-
def upsert_budget_member(
|
|
5345
|
+
async def upsert_budget_member(
|
|
6489
5346
|
self,
|
|
6490
5347
|
budgetId: str,
|
|
6491
5348
|
userId: str,
|
|
@@ -6519,26 +5376,14 @@ class BillApp(APIApplication):
|
|
|
6519
5376
|
if userId is None:
|
|
6520
5377
|
raise ValueError("Missing required parameter 'userId'.")
|
|
6521
5378
|
request_body_data = None
|
|
6522
|
-
request_body_data = {
|
|
6523
|
-
|
|
6524
|
-
"recurringLimit": recurringLimit,
|
|
6525
|
-
"role": role,
|
|
6526
|
-
"shareBudgetFunds": shareBudgetFunds,
|
|
6527
|
-
}
|
|
6528
|
-
request_body_data = {
|
|
6529
|
-
k: v for k, v in request_body_data.items() if v is not None
|
|
6530
|
-
}
|
|
5379
|
+
request_body_data = {"limit": limit, "recurringLimit": recurringLimit, "role": role, "shareBudgetFunds": shareBudgetFunds}
|
|
5380
|
+
request_body_data = {k: v for k, v in request_body_data.items() if v is not None}
|
|
6531
5381
|
url = f"{self.base_url}/v3/spend/budgets/{budgetId}/members/{userId}"
|
|
6532
5382
|
query_params = {}
|
|
6533
|
-
response = self._put(
|
|
6534
|
-
url,
|
|
6535
|
-
data=request_body_data,
|
|
6536
|
-
params=query_params,
|
|
6537
|
-
content_type="application/json",
|
|
6538
|
-
)
|
|
5383
|
+
response = self._put(url, data=request_body_data, params=query_params, content_type="application/json")
|
|
6539
5384
|
return self._handle_response(response)
|
|
6540
5385
|
|
|
6541
|
-
def delete_budget_member(self, budgetId: str, userId: str) -> Any:
|
|
5386
|
+
async def delete_budget_member(self, budgetId: str, userId: str) -> Any:
|
|
6542
5387
|
"""
|
|
6543
5388
|
Delete a member from a budget
|
|
6544
5389
|
|
|
@@ -6564,7 +5409,7 @@ class BillApp(APIApplication):
|
|
|
6564
5409
|
response = self._delete(url, params=query_params)
|
|
6565
5410
|
return self._handle_response(response)
|
|
6566
5411
|
|
|
6567
|
-
def list_cards(
|
|
5412
|
+
async def list_cards(
|
|
6568
5413
|
self,
|
|
6569
5414
|
nextPage: str | None = None,
|
|
6570
5415
|
prevPage: str | None = None,
|
|
@@ -6594,19 +5439,13 @@ class BillApp(APIApplication):
|
|
|
6594
5439
|
url = f"{self.base_url}/v3/spend/cards"
|
|
6595
5440
|
query_params = {
|
|
6596
5441
|
k: v
|
|
6597
|
-
for k, v in [
|
|
6598
|
-
("nextPage", nextPage),
|
|
6599
|
-
("prevPage", prevPage),
|
|
6600
|
-
("max", max),
|
|
6601
|
-
("sort", sort),
|
|
6602
|
-
("filters", filters),
|
|
6603
|
-
]
|
|
5442
|
+
for k, v in [("nextPage", nextPage), ("prevPage", prevPage), ("max", max), ("sort", sort), ("filters", filters)]
|
|
6604
5443
|
if v is not None
|
|
6605
5444
|
}
|
|
6606
5445
|
response = self._get(url, params=query_params)
|
|
6607
5446
|
return self._handle_response(response)
|
|
6608
5447
|
|
|
6609
|
-
def create_budget_card(
|
|
5448
|
+
async def create_budget_card(
|
|
6610
5449
|
self,
|
|
6611
5450
|
name: str,
|
|
6612
5451
|
userId: str,
|
|
@@ -6647,20 +5486,13 @@ class BillApp(APIApplication):
|
|
|
6647
5486
|
"expirationDate": expirationDate,
|
|
6648
5487
|
"shareBudgetFunds": shareBudgetFunds,
|
|
6649
5488
|
}
|
|
6650
|
-
request_body_data = {
|
|
6651
|
-
k: v for k, v in request_body_data.items() if v is not None
|
|
6652
|
-
}
|
|
5489
|
+
request_body_data = {k: v for k, v in request_body_data.items() if v is not None}
|
|
6653
5490
|
url = f"{self.base_url}/v3/spend/cards"
|
|
6654
5491
|
query_params = {}
|
|
6655
|
-
response = self._post(
|
|
6656
|
-
url,
|
|
6657
|
-
data=request_body_data,
|
|
6658
|
-
params=query_params,
|
|
6659
|
-
content_type="application/json",
|
|
6660
|
-
)
|
|
5492
|
+
response = self._post(url, data=request_body_data, params=query_params, content_type="application/json")
|
|
6661
5493
|
return self._handle_response(response)
|
|
6662
5494
|
|
|
6663
|
-
def get_card(self, cardId: str) -> dict[str, Any]:
|
|
5495
|
+
async def get_card(self, cardId: str) -> dict[str, Any]:
|
|
6664
5496
|
"""
|
|
6665
5497
|
Get card details
|
|
6666
5498
|
|
|
@@ -6683,7 +5515,7 @@ class BillApp(APIApplication):
|
|
|
6683
5515
|
response = self._get(url, params=query_params)
|
|
6684
5516
|
return self._handle_response(response)
|
|
6685
5517
|
|
|
6686
|
-
def delete_card(self, cardId: str, reason: Any | None = None) -> Any:
|
|
5518
|
+
async def delete_card(self, cardId: str, reason: Any | None = None) -> Any:
|
|
6687
5519
|
"""
|
|
6688
5520
|
Delete a card
|
|
6689
5521
|
|
|
@@ -6707,7 +5539,7 @@ class BillApp(APIApplication):
|
|
|
6707
5539
|
response = self._delete(url, params=query_params)
|
|
6708
5540
|
return self._handle_response(response)
|
|
6709
5541
|
|
|
6710
|
-
def update_card(
|
|
5542
|
+
async def update_card(
|
|
6711
5543
|
self,
|
|
6712
5544
|
cardId: str,
|
|
6713
5545
|
name: str | None = None,
|
|
@@ -6752,15 +5584,13 @@ class BillApp(APIApplication):
|
|
|
6752
5584
|
"shareBudgetFunds": shareBudgetFunds,
|
|
6753
5585
|
"recurring": recurring,
|
|
6754
5586
|
}
|
|
6755
|
-
request_body_data = {
|
|
6756
|
-
k: v for k, v in request_body_data.items() if v is not None
|
|
6757
|
-
}
|
|
5587
|
+
request_body_data = {k: v for k, v in request_body_data.items() if v is not None}
|
|
6758
5588
|
url = f"{self.base_url}/v3/spend/cards/{cardId}"
|
|
6759
5589
|
query_params = {}
|
|
6760
5590
|
response = self._patch(url, data=request_body_data, params=query_params)
|
|
6761
5591
|
return self._handle_response(response)
|
|
6762
5592
|
|
|
6763
|
-
def get_pan_jwt(self, cardId: str) -> dict[str, Any]:
|
|
5593
|
+
async def get_pan_jwt(self, cardId: str) -> dict[str, Any]:
|
|
6764
5594
|
"""
|
|
6765
5595
|
Get PAN JWT
|
|
6766
5596
|
|
|
@@ -6783,7 +5613,7 @@ class BillApp(APIApplication):
|
|
|
6783
5613
|
response = self._get(url, params=query_params)
|
|
6784
5614
|
return self._handle_response(response)
|
|
6785
5615
|
|
|
6786
|
-
def list_custom_fields(
|
|
5616
|
+
async def list_custom_fields(
|
|
6787
5617
|
self,
|
|
6788
5618
|
max: int | None = None,
|
|
6789
5619
|
nextPage: str | None = None,
|
|
@@ -6813,19 +5643,13 @@ class BillApp(APIApplication):
|
|
|
6813
5643
|
url = f"{self.base_url}/v3/spend/custom-fields"
|
|
6814
5644
|
query_params = {
|
|
6815
5645
|
k: v
|
|
6816
|
-
for k, v in [
|
|
6817
|
-
("max", max),
|
|
6818
|
-
("nextPage", nextPage),
|
|
6819
|
-
("prevPage", prevPage),
|
|
6820
|
-
("sort", sort),
|
|
6821
|
-
("filters", filters),
|
|
6822
|
-
]
|
|
5646
|
+
for k, v in [("max", max), ("nextPage", nextPage), ("prevPage", prevPage), ("sort", sort), ("filters", filters)]
|
|
6823
5647
|
if v is not None
|
|
6824
5648
|
}
|
|
6825
5649
|
response = self._get(url, params=query_params)
|
|
6826
5650
|
return self._handle_response(response)
|
|
6827
5651
|
|
|
6828
|
-
def create_custom_field(
|
|
5652
|
+
async def create_custom_field(
|
|
6829
5653
|
self,
|
|
6830
5654
|
name: str,
|
|
6831
5655
|
allowCustomValues: bool,
|
|
@@ -6875,20 +5699,13 @@ class BillApp(APIApplication):
|
|
|
6875
5699
|
"selectedBudgetIds": selectedBudgetIds,
|
|
6876
5700
|
"requiredBudgetIds": requiredBudgetIds,
|
|
6877
5701
|
}
|
|
6878
|
-
request_body_data = {
|
|
6879
|
-
k: v for k, v in request_body_data.items() if v is not None
|
|
6880
|
-
}
|
|
5702
|
+
request_body_data = {k: v for k, v in request_body_data.items() if v is not None}
|
|
6881
5703
|
url = f"{self.base_url}/v3/spend/custom-fields"
|
|
6882
5704
|
query_params = {}
|
|
6883
|
-
response = self._post(
|
|
6884
|
-
url,
|
|
6885
|
-
data=request_body_data,
|
|
6886
|
-
params=query_params,
|
|
6887
|
-
content_type="application/json",
|
|
6888
|
-
)
|
|
5705
|
+
response = self._post(url, data=request_body_data, params=query_params, content_type="application/json")
|
|
6889
5706
|
return self._handle_response(response)
|
|
6890
5707
|
|
|
6891
|
-
def get_custom_field(self, customFieldId: str) -> dict[str, Any]:
|
|
5708
|
+
async def get_custom_field(self, customFieldId: str) -> dict[str, Any]:
|
|
6892
5709
|
"""
|
|
6893
5710
|
Get custom field details
|
|
6894
5711
|
|
|
@@ -6911,7 +5728,7 @@ class BillApp(APIApplication):
|
|
|
6911
5728
|
response = self._get(url, params=query_params)
|
|
6912
5729
|
return self._handle_response(response)
|
|
6913
5730
|
|
|
6914
|
-
def delete_custom_field(self, customFieldId: str) -> Any:
|
|
5731
|
+
async def delete_custom_field(self, customFieldId: str) -> Any:
|
|
6915
5732
|
"""
|
|
6916
5733
|
Delete a custom field
|
|
6917
5734
|
|
|
@@ -6934,7 +5751,7 @@ class BillApp(APIApplication):
|
|
|
6934
5751
|
response = self._delete(url, params=query_params)
|
|
6935
5752
|
return self._handle_response(response)
|
|
6936
5753
|
|
|
6937
|
-
def update_custom_field(
|
|
5754
|
+
async def update_custom_field(
|
|
6938
5755
|
self,
|
|
6939
5756
|
customFieldId: str,
|
|
6940
5757
|
name: str | None = None,
|
|
@@ -6982,15 +5799,13 @@ class BillApp(APIApplication):
|
|
|
6982
5799
|
"selectedBudgetIds": selectedBudgetIds,
|
|
6983
5800
|
"requiredBudgetIds": requiredBudgetIds,
|
|
6984
5801
|
}
|
|
6985
|
-
request_body_data = {
|
|
6986
|
-
k: v for k, v in request_body_data.items() if v is not None
|
|
6987
|
-
}
|
|
5802
|
+
request_body_data = {k: v for k, v in request_body_data.items() if v is not None}
|
|
6988
5803
|
url = f"{self.base_url}/v3/spend/custom-fields/{customFieldId}"
|
|
6989
5804
|
query_params = {}
|
|
6990
5805
|
response = self._patch(url, data=request_body_data, params=query_params)
|
|
6991
5806
|
return self._handle_response(response)
|
|
6992
5807
|
|
|
6993
|
-
def list_custom_field_values(
|
|
5808
|
+
async def list_custom_field_values(
|
|
6994
5809
|
self,
|
|
6995
5810
|
customFieldId: str,
|
|
6996
5811
|
max: int | None = None,
|
|
@@ -7021,21 +5836,12 @@ class BillApp(APIApplication):
|
|
|
7021
5836
|
raise ValueError("Missing required parameter 'customFieldId'.")
|
|
7022
5837
|
url = f"{self.base_url}/v3/spend/custom-fields/{customFieldId}/values"
|
|
7023
5838
|
query_params = {
|
|
7024
|
-
k: v
|
|
7025
|
-
for k, v in [
|
|
7026
|
-
("max", max),
|
|
7027
|
-
("nextPage", nextPage),
|
|
7028
|
-
("prevPage", prevPage),
|
|
7029
|
-
("filters", filters),
|
|
7030
|
-
]
|
|
7031
|
-
if v is not None
|
|
5839
|
+
k: v for k, v in [("max", max), ("nextPage", nextPage), ("prevPage", prevPage), ("filters", filters)] if v is not None
|
|
7032
5840
|
}
|
|
7033
5841
|
response = self._get(url, params=query_params)
|
|
7034
5842
|
return self._handle_response(response)
|
|
7035
5843
|
|
|
7036
|
-
def create_custom_field_values(
|
|
7037
|
-
self, customFieldId: str, values: list[str]
|
|
7038
|
-
) -> dict[str, Any]:
|
|
5844
|
+
async def create_custom_field_values(self, customFieldId: str, values: list[str]) -> dict[str, Any]:
|
|
7039
5845
|
"""
|
|
7040
5846
|
Create custom field values
|
|
7041
5847
|
|
|
@@ -7055,23 +5861,14 @@ class BillApp(APIApplication):
|
|
|
7055
5861
|
if customFieldId is None:
|
|
7056
5862
|
raise ValueError("Missing required parameter 'customFieldId'.")
|
|
7057
5863
|
request_body_data = None
|
|
7058
|
-
request_body_data = {
|
|
7059
|
-
|
|
7060
|
-
}
|
|
7061
|
-
request_body_data = {
|
|
7062
|
-
k: v for k, v in request_body_data.items() if v is not None
|
|
7063
|
-
}
|
|
5864
|
+
request_body_data = {"values": values}
|
|
5865
|
+
request_body_data = {k: v for k, v in request_body_data.items() if v is not None}
|
|
7064
5866
|
url = f"{self.base_url}/v3/spend/custom-fields/{customFieldId}/values"
|
|
7065
5867
|
query_params = {}
|
|
7066
|
-
response = self._post(
|
|
7067
|
-
url,
|
|
7068
|
-
data=request_body_data,
|
|
7069
|
-
params=query_params,
|
|
7070
|
-
content_type="application/json",
|
|
7071
|
-
)
|
|
5868
|
+
response = self._post(url, data=request_body_data, params=query_params, content_type="application/json")
|
|
7072
5869
|
return self._handle_response(response)
|
|
7073
5870
|
|
|
7074
|
-
def delete_custom_field_value(self, customFieldId: str) -> Any:
|
|
5871
|
+
async def delete_custom_field_value(self, customFieldId: str) -> Any:
|
|
7075
5872
|
"""
|
|
7076
5873
|
Delete custom field values
|
|
7077
5874
|
|
|
@@ -7094,9 +5891,7 @@ class BillApp(APIApplication):
|
|
|
7094
5891
|
response = self._delete(url, params=query_params)
|
|
7095
5892
|
return self._handle_response(response)
|
|
7096
5893
|
|
|
7097
|
-
def get_custom_field_values(
|
|
7098
|
-
self, customFieldId: str, customFieldValueId: str
|
|
7099
|
-
) -> dict[str, Any]:
|
|
5894
|
+
async def get_custom_field_values(self, customFieldId: str, customFieldValueId: str) -> dict[str, Any]:
|
|
7100
5895
|
"""
|
|
7101
5896
|
Get custom field value
|
|
7102
5897
|
|
|
@@ -7122,7 +5917,7 @@ class BillApp(APIApplication):
|
|
|
7122
5917
|
response = self._get(url, params=query_params)
|
|
7123
5918
|
return self._handle_response(response)
|
|
7124
5919
|
|
|
7125
|
-
def list_reimbursements(
|
|
5920
|
+
async def list_reimbursements(
|
|
7126
5921
|
self,
|
|
7127
5922
|
nextPage: str | None = None,
|
|
7128
5923
|
prevPage: str | None = None,
|
|
@@ -7152,19 +5947,13 @@ class BillApp(APIApplication):
|
|
|
7152
5947
|
url = f"{self.base_url}/v3/spend/reimbursements"
|
|
7153
5948
|
query_params = {
|
|
7154
5949
|
k: v
|
|
7155
|
-
for k, v in [
|
|
7156
|
-
("nextPage", nextPage),
|
|
7157
|
-
("prevPage", prevPage),
|
|
7158
|
-
("max", max),
|
|
7159
|
-
("sort", sort),
|
|
7160
|
-
("filters", filters),
|
|
7161
|
-
]
|
|
5950
|
+
for k, v in [("nextPage", nextPage), ("prevPage", prevPage), ("max", max), ("sort", sort), ("filters", filters)]
|
|
7162
5951
|
if v is not None
|
|
7163
5952
|
}
|
|
7164
5953
|
response = self._get(url, params=query_params)
|
|
7165
5954
|
return self._handle_response(response)
|
|
7166
5955
|
|
|
7167
|
-
def create_reimbursement(
|
|
5956
|
+
async def create_reimbursement(
|
|
7168
5957
|
self,
|
|
7169
5958
|
userId: str,
|
|
7170
5959
|
budgetId: str,
|
|
@@ -7208,20 +5997,13 @@ class BillApp(APIApplication):
|
|
|
7208
5997
|
"receipts": receipts,
|
|
7209
5998
|
"customFields": customFields,
|
|
7210
5999
|
}
|
|
7211
|
-
request_body_data = {
|
|
7212
|
-
k: v for k, v in request_body_data.items() if v is not None
|
|
7213
|
-
}
|
|
6000
|
+
request_body_data = {k: v for k, v in request_body_data.items() if v is not None}
|
|
7214
6001
|
url = f"{self.base_url}/v3/spend/reimbursements"
|
|
7215
6002
|
query_params = {}
|
|
7216
|
-
response = self._post(
|
|
7217
|
-
url,
|
|
7218
|
-
data=request_body_data,
|
|
7219
|
-
params=query_params,
|
|
7220
|
-
content_type="application/json",
|
|
7221
|
-
)
|
|
6003
|
+
response = self._post(url, data=request_body_data, params=query_params, content_type="application/json")
|
|
7222
6004
|
return self._handle_response(response)
|
|
7223
6005
|
|
|
7224
|
-
def create_image_upload_url(self) -> dict[str, Any]:
|
|
6006
|
+
async def create_image_upload_url(self) -> dict[str, Any]:
|
|
7225
6007
|
"""
|
|
7226
6008
|
Create an image upload URL for a reimbursement.
|
|
7227
6009
|
|
|
@@ -7237,15 +6019,10 @@ class BillApp(APIApplication):
|
|
|
7237
6019
|
request_body_data = None
|
|
7238
6020
|
url = f"{self.base_url}/v3/spend/reimbursements/image-upload-url"
|
|
7239
6021
|
query_params = {}
|
|
7240
|
-
response = self._post(
|
|
7241
|
-
url,
|
|
7242
|
-
data=request_body_data,
|
|
7243
|
-
params=query_params,
|
|
7244
|
-
content_type="application/json",
|
|
7245
|
-
)
|
|
6022
|
+
response = self._post(url, data=request_body_data, params=query_params, content_type="application/json")
|
|
7246
6023
|
return self._handle_response(response)
|
|
7247
6024
|
|
|
7248
|
-
def get_reimbursement(self, reimbursementId: str) -> dict[str, Any]:
|
|
6025
|
+
async def get_reimbursement(self, reimbursementId: str) -> dict[str, Any]:
|
|
7249
6026
|
"""
|
|
7250
6027
|
Get reimbursement details
|
|
7251
6028
|
|
|
@@ -7268,7 +6045,7 @@ class BillApp(APIApplication):
|
|
|
7268
6045
|
response = self._get(url, params=query_params)
|
|
7269
6046
|
return self._handle_response(response)
|
|
7270
6047
|
|
|
7271
|
-
def delete_reimbursement(self, reimbursementId: str) -> Any:
|
|
6048
|
+
async def delete_reimbursement(self, reimbursementId: str) -> Any:
|
|
7272
6049
|
"""
|
|
7273
6050
|
Delete a reimbursement
|
|
7274
6051
|
|
|
@@ -7291,7 +6068,7 @@ class BillApp(APIApplication):
|
|
|
7291
6068
|
response = self._delete(url, params=query_params)
|
|
7292
6069
|
return self._handle_response(response)
|
|
7293
6070
|
|
|
7294
|
-
def update_reimbursement(
|
|
6071
|
+
async def update_reimbursement(
|
|
7295
6072
|
self,
|
|
7296
6073
|
reimbursementId: str,
|
|
7297
6074
|
userId: str | None = None,
|
|
@@ -7339,17 +6116,13 @@ class BillApp(APIApplication):
|
|
|
7339
6116
|
"receipts": receipts,
|
|
7340
6117
|
"customFields": customFields,
|
|
7341
6118
|
}
|
|
7342
|
-
request_body_data = {
|
|
7343
|
-
k: v for k, v in request_body_data.items() if v is not None
|
|
7344
|
-
}
|
|
6119
|
+
request_body_data = {k: v for k, v in request_body_data.items() if v is not None}
|
|
7345
6120
|
url = f"{self.base_url}/v3/spend/reimbursements/{reimbursementId}"
|
|
7346
6121
|
query_params = {}
|
|
7347
6122
|
response = self._patch(url, data=request_body_data, params=query_params)
|
|
7348
6123
|
return self._handle_response(response)
|
|
7349
6124
|
|
|
7350
|
-
def approve_or_deny_reimbursement(
|
|
7351
|
-
self, reimbursementId: str, action: Any, note: str | None = None
|
|
7352
|
-
) -> dict[str, Any]:
|
|
6125
|
+
async def approve_or_deny_reimbursement(self, reimbursementId: str, action: Any, note: str | None = None) -> dict[str, Any]:
|
|
7353
6126
|
"""
|
|
7354
6127
|
Approve or deny a reimbursement
|
|
7355
6128
|
|
|
@@ -7370,24 +6143,14 @@ class BillApp(APIApplication):
|
|
|
7370
6143
|
if reimbursementId is None:
|
|
7371
6144
|
raise ValueError("Missing required parameter 'reimbursementId'.")
|
|
7372
6145
|
request_body_data = None
|
|
7373
|
-
request_body_data = {
|
|
7374
|
-
|
|
7375
|
-
"note": note,
|
|
7376
|
-
}
|
|
7377
|
-
request_body_data = {
|
|
7378
|
-
k: v for k, v in request_body_data.items() if v is not None
|
|
7379
|
-
}
|
|
6146
|
+
request_body_data = {"action": action, "note": note}
|
|
6147
|
+
request_body_data = {k: v for k, v in request_body_data.items() if v is not None}
|
|
7380
6148
|
url = f"{self.base_url}/v3/spend/reimbursements/{reimbursementId}/action"
|
|
7381
6149
|
query_params = {}
|
|
7382
|
-
response = self._post(
|
|
7383
|
-
url,
|
|
7384
|
-
data=request_body_data,
|
|
7385
|
-
params=query_params,
|
|
7386
|
-
content_type="application/json",
|
|
7387
|
-
)
|
|
6150
|
+
response = self._post(url, data=request_body_data, params=query_params, content_type="application/json")
|
|
7388
6151
|
return self._handle_response(response)
|
|
7389
6152
|
|
|
7390
|
-
def list_transactions(
|
|
6153
|
+
async def list_transactions(
|
|
7391
6154
|
self,
|
|
7392
6155
|
max: int | None = None,
|
|
7393
6156
|
nextPage: str | None = None,
|
|
@@ -7432,9 +6195,7 @@ class BillApp(APIApplication):
|
|
|
7432
6195
|
response = self._get(url, params=query_params)
|
|
7433
6196
|
return self._handle_response(response)
|
|
7434
6197
|
|
|
7435
|
-
def get_transaction(
|
|
7436
|
-
self, transactionId: str, showCustomFieldIds: str | None = None
|
|
7437
|
-
) -> dict[str, Any]:
|
|
6198
|
+
async def get_transaction(self, transactionId: str, showCustomFieldIds: str | None = None) -> dict[str, Any]:
|
|
7438
6199
|
"""
|
|
7439
6200
|
Get transaction details
|
|
7440
6201
|
|
|
@@ -7454,15 +6215,11 @@ class BillApp(APIApplication):
|
|
|
7454
6215
|
if transactionId is None:
|
|
7455
6216
|
raise ValueError("Missing required parameter 'transactionId'.")
|
|
7456
6217
|
url = f"{self.base_url}/v3/spend/transactions/{transactionId}"
|
|
7457
|
-
query_params = {
|
|
7458
|
-
k: v
|
|
7459
|
-
for k, v in [("showCustomFieldIds", showCustomFieldIds)]
|
|
7460
|
-
if v is not None
|
|
7461
|
-
}
|
|
6218
|
+
query_params = {k: v for k, v in [("showCustomFieldIds", showCustomFieldIds)] if v is not None}
|
|
7462
6219
|
response = self._get(url, params=query_params)
|
|
7463
6220
|
return self._handle_response(response)
|
|
7464
6221
|
|
|
7465
|
-
def update_transaction(self, transactionId: str, budgetId: str) -> dict[str, Any]:
|
|
6222
|
+
async def update_transaction(self, transactionId: str, budgetId: str) -> dict[str, Any]:
|
|
7466
6223
|
"""
|
|
7467
6224
|
Update transaction
|
|
7468
6225
|
|
|
@@ -7482,25 +6239,14 @@ class BillApp(APIApplication):
|
|
|
7482
6239
|
if transactionId is None:
|
|
7483
6240
|
raise ValueError("Missing required parameter 'transactionId'.")
|
|
7484
6241
|
request_body_data = None
|
|
7485
|
-
request_body_data = {
|
|
7486
|
-
|
|
7487
|
-
}
|
|
7488
|
-
request_body_data = {
|
|
7489
|
-
k: v for k, v in request_body_data.items() if v is not None
|
|
7490
|
-
}
|
|
6242
|
+
request_body_data = {"budgetId": budgetId}
|
|
6243
|
+
request_body_data = {k: v for k, v in request_body_data.items() if v is not None}
|
|
7491
6244
|
url = f"{self.base_url}/v3/spend/transactions/{transactionId}"
|
|
7492
6245
|
query_params = {}
|
|
7493
|
-
response = self._put(
|
|
7494
|
-
url,
|
|
7495
|
-
data=request_body_data,
|
|
7496
|
-
params=query_params,
|
|
7497
|
-
content_type="application/json",
|
|
7498
|
-
)
|
|
6246
|
+
response = self._put(url, data=request_body_data, params=query_params, content_type="application/json")
|
|
7499
6247
|
return self._handle_response(response)
|
|
7500
6248
|
|
|
7501
|
-
def list_transaction_custom_fields(
|
|
7502
|
-
self, transactionId: str, filters: str | None = None
|
|
7503
|
-
) -> dict[str, Any]:
|
|
6249
|
+
async def list_transaction_custom_fields(self, transactionId: str, filters: str | None = None) -> dict[str, Any]:
|
|
7504
6250
|
"""
|
|
7505
6251
|
Get transaction custom field details
|
|
7506
6252
|
|
|
@@ -7524,9 +6270,7 @@ class BillApp(APIApplication):
|
|
|
7524
6270
|
response = self._get(url, params=query_params)
|
|
7525
6271
|
return self._handle_response(response)
|
|
7526
6272
|
|
|
7527
|
-
def update_transaction_custom_fields(
|
|
7528
|
-
self, transactionId: str, customFields: list[dict[str, Any]]
|
|
7529
|
-
) -> dict[str, Any]:
|
|
6273
|
+
async def update_transaction_custom_fields(self, transactionId: str, customFields: list[dict[str, Any]]) -> dict[str, Any]:
|
|
7530
6274
|
"""
|
|
7531
6275
|
Update a custom field and values on a transaction
|
|
7532
6276
|
|
|
@@ -7546,29 +6290,15 @@ class BillApp(APIApplication):
|
|
|
7546
6290
|
if transactionId is None:
|
|
7547
6291
|
raise ValueError("Missing required parameter 'transactionId'.")
|
|
7548
6292
|
request_body_data = None
|
|
7549
|
-
request_body_data = {
|
|
7550
|
-
|
|
7551
|
-
}
|
|
7552
|
-
request_body_data = {
|
|
7553
|
-
k: v for k, v in request_body_data.items() if v is not None
|
|
7554
|
-
}
|
|
6293
|
+
request_body_data = {"customFields": customFields}
|
|
6294
|
+
request_body_data = {k: v for k, v in request_body_data.items() if v is not None}
|
|
7555
6295
|
url = f"{self.base_url}/v3/spend/transactions/{transactionId}/custom-fields"
|
|
7556
6296
|
query_params = {}
|
|
7557
|
-
response = self._put(
|
|
7558
|
-
url,
|
|
7559
|
-
data=request_body_data,
|
|
7560
|
-
params=query_params,
|
|
7561
|
-
content_type="application/json",
|
|
7562
|
-
)
|
|
6297
|
+
response = self._put(url, data=request_body_data, params=query_params, content_type="application/json")
|
|
7563
6298
|
return self._handle_response(response)
|
|
7564
6299
|
|
|
7565
|
-
def list_transaction_custom_field_values(
|
|
7566
|
-
self,
|
|
7567
|
-
transactionId: str,
|
|
7568
|
-
customFieldId: str,
|
|
7569
|
-
max: int | None = None,
|
|
7570
|
-
nextPage: str | None = None,
|
|
7571
|
-
prevPage: str | None = None,
|
|
6300
|
+
async def list_transaction_custom_field_values(
|
|
6301
|
+
self, transactionId: str, customFieldId: str, max: int | None = None, nextPage: str | None = None, prevPage: str | None = None
|
|
7572
6302
|
) -> dict[str, Any]:
|
|
7573
6303
|
"""
|
|
7574
6304
|
Get transaction custom field value details
|
|
@@ -7594,20 +6324,12 @@ class BillApp(APIApplication):
|
|
|
7594
6324
|
if customFieldId is None:
|
|
7595
6325
|
raise ValueError("Missing required parameter 'customFieldId'.")
|
|
7596
6326
|
url = f"{self.base_url}/v3/spend/transactions/{transactionId}/custom-fields/{customFieldId}/values"
|
|
7597
|
-
query_params = {
|
|
7598
|
-
k: v
|
|
7599
|
-
for k, v in [("max", max), ("nextPage", nextPage), ("prevPage", prevPage)]
|
|
7600
|
-
if v is not None
|
|
7601
|
-
}
|
|
6327
|
+
query_params = {k: v for k, v in [("max", max), ("nextPage", nextPage), ("prevPage", prevPage)] if v is not None}
|
|
7602
6328
|
response = self._get(url, params=query_params)
|
|
7603
6329
|
return self._handle_response(response)
|
|
7604
6330
|
|
|
7605
|
-
def list_users(
|
|
7606
|
-
self,
|
|
7607
|
-
nextPage: str | None = None,
|
|
7608
|
-
prevPage: str | None = None,
|
|
7609
|
-
max: int | None = None,
|
|
7610
|
-
filters: str | None = None,
|
|
6331
|
+
async def list_users(
|
|
6332
|
+
self, nextPage: str | None = None, prevPage: str | None = None, max: int | None = None, filters: str | None = None
|
|
7611
6333
|
) -> dict[str, Any]:
|
|
7612
6334
|
"""
|
|
7613
6335
|
Get list of users
|
|
@@ -7629,26 +6351,12 @@ class BillApp(APIApplication):
|
|
|
7629
6351
|
"""
|
|
7630
6352
|
url = f"{self.base_url}/v3/spend/users"
|
|
7631
6353
|
query_params = {
|
|
7632
|
-
k: v
|
|
7633
|
-
for k, v in [
|
|
7634
|
-
("nextPage", nextPage),
|
|
7635
|
-
("prevPage", prevPage),
|
|
7636
|
-
("max", max),
|
|
7637
|
-
("filters", filters),
|
|
7638
|
-
]
|
|
7639
|
-
if v is not None
|
|
6354
|
+
k: v for k, v in [("nextPage", nextPage), ("prevPage", prevPage), ("max", max), ("filters", filters)] if v is not None
|
|
7640
6355
|
}
|
|
7641
6356
|
response = self._get(url, params=query_params)
|
|
7642
6357
|
return self._handle_response(response)
|
|
7643
6358
|
|
|
7644
|
-
def create_user(
|
|
7645
|
-
self,
|
|
7646
|
-
firstName: str,
|
|
7647
|
-
lastName: str,
|
|
7648
|
-
email: str,
|
|
7649
|
-
role: Any,
|
|
7650
|
-
dateOfBirth: str | None = None,
|
|
7651
|
-
) -> dict[str, Any]:
|
|
6359
|
+
async def create_user(self, firstName: str, lastName: str, email: str, role: Any, dateOfBirth: str | None = None) -> dict[str, Any]:
|
|
7652
6360
|
"""
|
|
7653
6361
|
Create a user
|
|
7654
6362
|
|
|
@@ -7669,27 +6377,14 @@ class BillApp(APIApplication):
|
|
|
7669
6377
|
users
|
|
7670
6378
|
"""
|
|
7671
6379
|
request_body_data = None
|
|
7672
|
-
request_body_data = {
|
|
7673
|
-
|
|
7674
|
-
"lastName": lastName,
|
|
7675
|
-
"email": email,
|
|
7676
|
-
"role": role,
|
|
7677
|
-
"dateOfBirth": dateOfBirth,
|
|
7678
|
-
}
|
|
7679
|
-
request_body_data = {
|
|
7680
|
-
k: v for k, v in request_body_data.items() if v is not None
|
|
7681
|
-
}
|
|
6380
|
+
request_body_data = {"firstName": firstName, "lastName": lastName, "email": email, "role": role, "dateOfBirth": dateOfBirth}
|
|
6381
|
+
request_body_data = {k: v for k, v in request_body_data.items() if v is not None}
|
|
7682
6382
|
url = f"{self.base_url}/v3/spend/users"
|
|
7683
6383
|
query_params = {}
|
|
7684
|
-
response = self._post(
|
|
7685
|
-
url,
|
|
7686
|
-
data=request_body_data,
|
|
7687
|
-
params=query_params,
|
|
7688
|
-
content_type="application/json",
|
|
7689
|
-
)
|
|
6384
|
+
response = self._post(url, data=request_body_data, params=query_params, content_type="application/json")
|
|
7690
6385
|
return self._handle_response(response)
|
|
7691
6386
|
|
|
7692
|
-
def get_current_user(self) -> dict[str, Any]:
|
|
6387
|
+
async def get_current_user(self) -> dict[str, Any]:
|
|
7693
6388
|
"""
|
|
7694
6389
|
Get current user details
|
|
7695
6390
|
|
|
@@ -7707,7 +6402,7 @@ class BillApp(APIApplication):
|
|
|
7707
6402
|
response = self._get(url, params=query_params)
|
|
7708
6403
|
return self._handle_response(response)
|
|
7709
6404
|
|
|
7710
|
-
def get_user(self, userId: str) -> dict[str, Any]:
|
|
6405
|
+
async def get_user(self, userId: str) -> dict[str, Any]:
|
|
7711
6406
|
"""
|
|
7712
6407
|
Get user details
|
|
7713
6408
|
|
|
@@ -7730,7 +6425,7 @@ class BillApp(APIApplication):
|
|
|
7730
6425
|
response = self._get(url, params=query_params)
|
|
7731
6426
|
return self._handle_response(response)
|
|
7732
6427
|
|
|
7733
|
-
def delete_user(self, userId: str) -> Any:
|
|
6428
|
+
async def delete_user(self, userId: str) -> Any:
|
|
7734
6429
|
"""
|
|
7735
6430
|
Delete a user
|
|
7736
6431
|
|
|
@@ -7753,7 +6448,7 @@ class BillApp(APIApplication):
|
|
|
7753
6448
|
response = self._delete(url, params=query_params)
|
|
7754
6449
|
return self._handle_response(response)
|
|
7755
6450
|
|
|
7756
|
-
def update_user(
|
|
6451
|
+
async def update_user(
|
|
7757
6452
|
self,
|
|
7758
6453
|
userId: str,
|
|
7759
6454
|
firstName: str | None = None,
|
|
@@ -7785,27 +6480,15 @@ class BillApp(APIApplication):
|
|
|
7785
6480
|
if userId is None:
|
|
7786
6481
|
raise ValueError("Missing required parameter 'userId'.")
|
|
7787
6482
|
request_body_data = None
|
|
7788
|
-
request_body_data = {
|
|
7789
|
-
|
|
7790
|
-
"lastName": lastName,
|
|
7791
|
-
"email": email,
|
|
7792
|
-
"role": role,
|
|
7793
|
-
"dateOfBirth": dateOfBirth,
|
|
7794
|
-
}
|
|
7795
|
-
request_body_data = {
|
|
7796
|
-
k: v for k, v in request_body_data.items() if v is not None
|
|
7797
|
-
}
|
|
6483
|
+
request_body_data = {"firstName": firstName, "lastName": lastName, "email": email, "role": role, "dateOfBirth": dateOfBirth}
|
|
6484
|
+
request_body_data = {k: v for k, v in request_body_data.items() if v is not None}
|
|
7798
6485
|
url = f"{self.base_url}/v3/spend/users/{userId}"
|
|
7799
6486
|
query_params = {}
|
|
7800
6487
|
response = self._patch(url, data=request_body_data, params=query_params)
|
|
7801
6488
|
return self._handle_response(response)
|
|
7802
6489
|
|
|
7803
|
-
def list_organization_users(
|
|
7804
|
-
self,
|
|
7805
|
-
max: int | None = None,
|
|
7806
|
-
sort: str | None = None,
|
|
7807
|
-
filters: str | None = None,
|
|
7808
|
-
page: str | None = None,
|
|
6490
|
+
async def list_organization_users(
|
|
6491
|
+
self, max: int | None = None, sort: str | None = None, filters: str | None = None, page: str | None = None
|
|
7809
6492
|
) -> dict[str, Any]:
|
|
7810
6493
|
"""
|
|
7811
6494
|
Get list of users
|
|
@@ -7826,26 +6509,12 @@ class BillApp(APIApplication):
|
|
|
7826
6509
|
organization users
|
|
7827
6510
|
"""
|
|
7828
6511
|
url = f"{self.base_url}/v3/users"
|
|
7829
|
-
query_params = {
|
|
7830
|
-
k: v
|
|
7831
|
-
for k, v in [
|
|
7832
|
-
("max", max),
|
|
7833
|
-
("sort", sort),
|
|
7834
|
-
("filters", filters),
|
|
7835
|
-
("page", page),
|
|
7836
|
-
]
|
|
7837
|
-
if v is not None
|
|
7838
|
-
}
|
|
6512
|
+
query_params = {k: v for k, v in [("max", max), ("sort", sort), ("filters", filters), ("page", page)] if v is not None}
|
|
7839
6513
|
response = self._get(url, params=query_params)
|
|
7840
6514
|
return self._handle_response(response)
|
|
7841
6515
|
|
|
7842
|
-
def create_organization_user(
|
|
7843
|
-
self,
|
|
7844
|
-
firstName: str,
|
|
7845
|
-
lastName: str,
|
|
7846
|
-
email: str,
|
|
7847
|
-
roleId: str,
|
|
7848
|
-
acceptTermsOfService: bool,
|
|
6516
|
+
async def create_organization_user(
|
|
6517
|
+
self, firstName: str, lastName: str, email: str, roleId: str, acceptTermsOfService: bool
|
|
7849
6518
|
) -> dict[str, Any]:
|
|
7850
6519
|
"""
|
|
7851
6520
|
Create a user
|
|
@@ -7876,20 +6545,13 @@ class BillApp(APIApplication):
|
|
|
7876
6545
|
"roleId": roleId,
|
|
7877
6546
|
"acceptTermsOfService": acceptTermsOfService,
|
|
7878
6547
|
}
|
|
7879
|
-
request_body_data = {
|
|
7880
|
-
k: v for k, v in request_body_data.items() if v is not None
|
|
7881
|
-
}
|
|
6548
|
+
request_body_data = {k: v for k, v in request_body_data.items() if v is not None}
|
|
7882
6549
|
url = f"{self.base_url}/v3/users"
|
|
7883
6550
|
query_params = {}
|
|
7884
|
-
response = self._post(
|
|
7885
|
-
url,
|
|
7886
|
-
data=request_body_data,
|
|
7887
|
-
params=query_params,
|
|
7888
|
-
content_type="application/json",
|
|
7889
|
-
)
|
|
6551
|
+
response = self._post(url, data=request_body_data, params=query_params, content_type="application/json")
|
|
7890
6552
|
return self._handle_response(response)
|
|
7891
6553
|
|
|
7892
|
-
def get_organization_user(self, userId: str) -> dict[str, Any]:
|
|
6554
|
+
async def get_organization_user(self, userId: str) -> dict[str, Any]:
|
|
7893
6555
|
"""
|
|
7894
6556
|
Get user details
|
|
7895
6557
|
|
|
@@ -7912,12 +6574,8 @@ class BillApp(APIApplication):
|
|
|
7912
6574
|
response = self._get(url, params=query_params)
|
|
7913
6575
|
return self._handle_response(response)
|
|
7914
6576
|
|
|
7915
|
-
def update_organization_user(
|
|
7916
|
-
self,
|
|
7917
|
-
userId: str,
|
|
7918
|
-
firstName: str | None = None,
|
|
7919
|
-
lastName: str | None = None,
|
|
7920
|
-
roleId: str | None = None,
|
|
6577
|
+
async def update_organization_user(
|
|
6578
|
+
self, userId: str, firstName: str | None = None, lastName: str | None = None, roleId: str | None = None
|
|
7921
6579
|
) -> dict[str, Any]:
|
|
7922
6580
|
"""
|
|
7923
6581
|
Update a user
|
|
@@ -7942,20 +6600,14 @@ class BillApp(APIApplication):
|
|
|
7942
6600
|
if userId is None:
|
|
7943
6601
|
raise ValueError("Missing required parameter 'userId'.")
|
|
7944
6602
|
request_body_data = None
|
|
7945
|
-
request_body_data = {
|
|
7946
|
-
|
|
7947
|
-
"lastName": lastName,
|
|
7948
|
-
"roleId": roleId,
|
|
7949
|
-
}
|
|
7950
|
-
request_body_data = {
|
|
7951
|
-
k: v for k, v in request_body_data.items() if v is not None
|
|
7952
|
-
}
|
|
6603
|
+
request_body_data = {"firstName": firstName, "lastName": lastName, "roleId": roleId}
|
|
6604
|
+
request_body_data = {k: v for k, v in request_body_data.items() if v is not None}
|
|
7953
6605
|
url = f"{self.base_url}/v3/users/{userId}"
|
|
7954
6606
|
query_params = {}
|
|
7955
6607
|
response = self._patch(url, data=request_body_data, params=query_params)
|
|
7956
6608
|
return self._handle_response(response)
|
|
7957
6609
|
|
|
7958
|
-
def archive_organization_user(self, userId: str) -> dict[str, Any]:
|
|
6610
|
+
async def archive_organization_user(self, userId: str) -> dict[str, Any]:
|
|
7959
6611
|
"""
|
|
7960
6612
|
Archive a user
|
|
7961
6613
|
|
|
@@ -7976,15 +6628,10 @@ class BillApp(APIApplication):
|
|
|
7976
6628
|
request_body_data = None
|
|
7977
6629
|
url = f"{self.base_url}/v3/users/{userId}/archive"
|
|
7978
6630
|
query_params = {}
|
|
7979
|
-
response = self._post(
|
|
7980
|
-
url,
|
|
7981
|
-
data=request_body_data,
|
|
7982
|
-
params=query_params,
|
|
7983
|
-
content_type="application/json",
|
|
7984
|
-
)
|
|
6631
|
+
response = self._post(url, data=request_body_data, params=query_params, content_type="application/json")
|
|
7985
6632
|
return self._handle_response(response)
|
|
7986
6633
|
|
|
7987
|
-
def restore_organization_user(self, userId: str) -> dict[str, Any]:
|
|
6634
|
+
async def restore_organization_user(self, userId: str) -> dict[str, Any]:
|
|
7988
6635
|
"""
|
|
7989
6636
|
Restore an archived user
|
|
7990
6637
|
|
|
@@ -8005,20 +6652,11 @@ class BillApp(APIApplication):
|
|
|
8005
6652
|
request_body_data = None
|
|
8006
6653
|
url = f"{self.base_url}/v3/users/{userId}/restore"
|
|
8007
6654
|
query_params = {}
|
|
8008
|
-
response = self._post(
|
|
8009
|
-
url,
|
|
8010
|
-
data=request_body_data,
|
|
8011
|
-
params=query_params,
|
|
8012
|
-
content_type="application/json",
|
|
8013
|
-
)
|
|
6655
|
+
response = self._post(url, data=request_body_data, params=query_params, content_type="application/json")
|
|
8014
6656
|
return self._handle_response(response)
|
|
8015
6657
|
|
|
8016
|
-
def list_vendors(
|
|
8017
|
-
self,
|
|
8018
|
-
max: int | None = None,
|
|
8019
|
-
sort: str | None = None,
|
|
8020
|
-
filters: str | None = None,
|
|
8021
|
-
page: str | None = None,
|
|
6658
|
+
async def list_vendors(
|
|
6659
|
+
self, max: int | None = None, sort: str | None = None, filters: str | None = None, page: str | None = None
|
|
8022
6660
|
) -> dict[str, Any]:
|
|
8023
6661
|
"""
|
|
8024
6662
|
Get list of vendors
|
|
@@ -8039,20 +6677,11 @@ class BillApp(APIApplication):
|
|
|
8039
6677
|
vendors
|
|
8040
6678
|
"""
|
|
8041
6679
|
url = f"{self.base_url}/v3/vendors"
|
|
8042
|
-
query_params = {
|
|
8043
|
-
k: v
|
|
8044
|
-
for k, v in [
|
|
8045
|
-
("max", max),
|
|
8046
|
-
("sort", sort),
|
|
8047
|
-
("filters", filters),
|
|
8048
|
-
("page", page),
|
|
8049
|
-
]
|
|
8050
|
-
if v is not None
|
|
8051
|
-
}
|
|
6680
|
+
query_params = {k: v for k, v in [("max", max), ("sort", sort), ("filters", filters), ("page", page)] if v is not None}
|
|
8052
6681
|
response = self._get(url, params=query_params)
|
|
8053
6682
|
return self._handle_response(response)
|
|
8054
6683
|
|
|
8055
|
-
def create_vendor(
|
|
6684
|
+
async def create_vendor(
|
|
8056
6685
|
self,
|
|
8057
6686
|
name: str,
|
|
8058
6687
|
address: Any,
|
|
@@ -8107,20 +6736,13 @@ class BillApp(APIApplication):
|
|
|
8107
6736
|
"billCurrency": billCurrency,
|
|
8108
6737
|
"autoPay": autoPay,
|
|
8109
6738
|
}
|
|
8110
|
-
request_body_data = {
|
|
8111
|
-
k: v for k, v in request_body_data.items() if v is not None
|
|
8112
|
-
}
|
|
6739
|
+
request_body_data = {k: v for k, v in request_body_data.items() if v is not None}
|
|
8113
6740
|
url = f"{self.base_url}/v3/vendors"
|
|
8114
6741
|
query_params = {}
|
|
8115
|
-
response = self._post(
|
|
8116
|
-
url,
|
|
8117
|
-
data=request_body_data,
|
|
8118
|
-
params=query_params,
|
|
8119
|
-
content_type="application/json",
|
|
8120
|
-
)
|
|
6742
|
+
response = self._post(url, data=request_body_data, params=query_params, content_type="application/json")
|
|
8121
6743
|
return self._handle_response(response)
|
|
8122
6744
|
|
|
8123
|
-
def create_bulk_vendor(self, items: list[dict[str, Any]]) -> dict[str, Any]:
|
|
6745
|
+
async def create_bulk_vendor(self, items: list[dict[str, Any]]) -> dict[str, Any]:
|
|
8124
6746
|
"""
|
|
8125
6747
|
Create multiple vendors
|
|
8126
6748
|
|
|
@@ -8136,21 +6758,13 @@ class BillApp(APIApplication):
|
|
|
8136
6758
|
vendors
|
|
8137
6759
|
"""
|
|
8138
6760
|
request_body_data = None
|
|
8139
|
-
# Using array parameter 'items' directly as request body
|
|
8140
6761
|
request_body_data = items
|
|
8141
6762
|
url = f"{self.base_url}/v3/vendors/bulk"
|
|
8142
6763
|
query_params = {}
|
|
8143
|
-
response = self._post(
|
|
8144
|
-
url,
|
|
8145
|
-
data=request_body_data,
|
|
8146
|
-
params=query_params,
|
|
8147
|
-
content_type="application/json",
|
|
8148
|
-
)
|
|
6764
|
+
response = self._post(url, data=request_body_data, params=query_params, content_type="application/json")
|
|
8149
6765
|
return self._handle_response(response)
|
|
8150
6766
|
|
|
8151
|
-
def get_intl_config(
|
|
8152
|
-
self, country: Any, billCurrency: Any, accountType: Any
|
|
8153
|
-
) -> dict[str, Any]:
|
|
6767
|
+
async def get_intl_config(self, country: Any, billCurrency: Any, accountType: Any) -> dict[str, Any]:
|
|
8154
6768
|
"""
|
|
8155
6769
|
Get international payments configuration
|
|
8156
6770
|
|
|
@@ -8170,18 +6784,12 @@ class BillApp(APIApplication):
|
|
|
8170
6784
|
"""
|
|
8171
6785
|
url = f"{self.base_url}/v3/vendors/configuration/international-payments"
|
|
8172
6786
|
query_params = {
|
|
8173
|
-
k: v
|
|
8174
|
-
for k, v in [
|
|
8175
|
-
("country", country),
|
|
8176
|
-
("billCurrency", billCurrency),
|
|
8177
|
-
("accountType", accountType),
|
|
8178
|
-
]
|
|
8179
|
-
if v is not None
|
|
6787
|
+
k: v for k, v in [("country", country), ("billCurrency", billCurrency), ("accountType", accountType)] if v is not None
|
|
8180
6788
|
}
|
|
8181
6789
|
response = self._get(url, params=query_params)
|
|
8182
6790
|
return self._handle_response(response)
|
|
8183
6791
|
|
|
8184
|
-
def get_vendor(self, vendorId: str) -> dict[str, Any]:
|
|
6792
|
+
async def get_vendor(self, vendorId: str) -> dict[str, Any]:
|
|
8185
6793
|
"""
|
|
8186
6794
|
Get vendor details
|
|
8187
6795
|
|
|
@@ -8204,7 +6812,7 @@ class BillApp(APIApplication):
|
|
|
8204
6812
|
response = self._get(url, params=query_params)
|
|
8205
6813
|
return self._handle_response(response)
|
|
8206
6814
|
|
|
8207
|
-
def update_vendor(
|
|
6815
|
+
async def update_vendor(
|
|
8208
6816
|
self,
|
|
8209
6817
|
vendorId: str,
|
|
8210
6818
|
name: str | None = None,
|
|
@@ -8263,15 +6871,13 @@ class BillApp(APIApplication):
|
|
|
8263
6871
|
"billCurrency": billCurrency,
|
|
8264
6872
|
"autoPay": autoPay,
|
|
8265
6873
|
}
|
|
8266
|
-
request_body_data = {
|
|
8267
|
-
k: v for k, v in request_body_data.items() if v is not None
|
|
8268
|
-
}
|
|
6874
|
+
request_body_data = {k: v for k, v in request_body_data.items() if v is not None}
|
|
8269
6875
|
url = f"{self.base_url}/v3/vendors/{vendorId}"
|
|
8270
6876
|
query_params = {}
|
|
8271
6877
|
response = self._patch(url, data=request_body_data, params=query_params)
|
|
8272
6878
|
return self._handle_response(response)
|
|
8273
6879
|
|
|
8274
|
-
def archive_vendor(self, vendorId: str) -> dict[str, Any]:
|
|
6880
|
+
async def archive_vendor(self, vendorId: str) -> dict[str, Any]:
|
|
8275
6881
|
"""
|
|
8276
6882
|
Archive a vendor
|
|
8277
6883
|
|
|
@@ -8292,15 +6898,10 @@ class BillApp(APIApplication):
|
|
|
8292
6898
|
request_body_data = None
|
|
8293
6899
|
url = f"{self.base_url}/v3/vendors/{vendorId}/archive"
|
|
8294
6900
|
query_params = {}
|
|
8295
|
-
response = self._post(
|
|
8296
|
-
url,
|
|
8297
|
-
data=request_body_data,
|
|
8298
|
-
params=query_params,
|
|
8299
|
-
content_type="application/json",
|
|
8300
|
-
)
|
|
6901
|
+
response = self._post(url, data=request_body_data, params=query_params, content_type="application/json")
|
|
8301
6902
|
return self._handle_response(response)
|
|
8302
6903
|
|
|
8303
|
-
def get_vendor_bank_account(self, vendorId: str) -> dict[str, Any]:
|
|
6904
|
+
async def get_vendor_bank_account(self, vendorId: str) -> dict[str, Any]:
|
|
8304
6905
|
"""
|
|
8305
6906
|
Get vendor bank account details
|
|
8306
6907
|
|
|
@@ -8323,7 +6924,7 @@ class BillApp(APIApplication):
|
|
|
8323
6924
|
response = self._get(url, params=query_params)
|
|
8324
6925
|
return self._handle_response(response)
|
|
8325
6926
|
|
|
8326
|
-
def create_vendor_bank_account(
|
|
6927
|
+
async def create_vendor_bank_account(
|
|
8327
6928
|
self,
|
|
8328
6929
|
vendorId: str,
|
|
8329
6930
|
accountNumber: str,
|
|
@@ -8374,20 +6975,13 @@ class BillApp(APIApplication):
|
|
|
8374
6975
|
"regulatoryFields": regulatoryFields,
|
|
8375
6976
|
"paymentCurrency": paymentCurrency,
|
|
8376
6977
|
}
|
|
8377
|
-
request_body_data = {
|
|
8378
|
-
k: v for k, v in request_body_data.items() if v is not None
|
|
8379
|
-
}
|
|
6978
|
+
request_body_data = {k: v for k, v in request_body_data.items() if v is not None}
|
|
8380
6979
|
url = f"{self.base_url}/v3/vendors/{vendorId}/bank-account"
|
|
8381
6980
|
query_params = {}
|
|
8382
|
-
response = self._post(
|
|
8383
|
-
url,
|
|
8384
|
-
data=request_body_data,
|
|
8385
|
-
params=query_params,
|
|
8386
|
-
content_type="application/json",
|
|
8387
|
-
)
|
|
6981
|
+
response = self._post(url, data=request_body_data, params=query_params, content_type="application/json")
|
|
8388
6982
|
return self._handle_response(response)
|
|
8389
6983
|
|
|
8390
|
-
def delete_vendor_bank_account(self, vendorId: str) -> Any:
|
|
6984
|
+
async def delete_vendor_bank_account(self, vendorId: str) -> Any:
|
|
8391
6985
|
"""
|
|
8392
6986
|
Delete a vendor bank account
|
|
8393
6987
|
|
|
@@ -8410,7 +7004,7 @@ class BillApp(APIApplication):
|
|
|
8410
7004
|
response = self._delete(url, params=query_params)
|
|
8411
7005
|
return self._handle_response(response)
|
|
8412
7006
|
|
|
8413
|
-
def get_configuration_by_vendor_id(self, vendorId: str) -> dict[str, Any]:
|
|
7007
|
+
async def get_configuration_by_vendor_id(self, vendorId: str) -> dict[str, Any]:
|
|
8414
7008
|
"""
|
|
8415
7009
|
Get vendor configuration
|
|
8416
7010
|
|
|
@@ -8433,7 +7027,7 @@ class BillApp(APIApplication):
|
|
|
8433
7027
|
response = self._get(url, params=query_params)
|
|
8434
7028
|
return self._handle_response(response)
|
|
8435
7029
|
|
|
8436
|
-
def restore_vendor(self, vendorId: str) -> dict[str, Any]:
|
|
7030
|
+
async def restore_vendor(self, vendorId: str) -> dict[str, Any]:
|
|
8437
7031
|
"""
|
|
8438
7032
|
Restore an archived vendor
|
|
8439
7033
|
|
|
@@ -8454,12 +7048,7 @@ class BillApp(APIApplication):
|
|
|
8454
7048
|
request_body_data = None
|
|
8455
7049
|
url = f"{self.base_url}/v3/vendors/{vendorId}/restore"
|
|
8456
7050
|
query_params = {}
|
|
8457
|
-
response = self._post(
|
|
8458
|
-
url,
|
|
8459
|
-
data=request_body_data,
|
|
8460
|
-
params=query_params,
|
|
8461
|
-
content_type="application/json",
|
|
8462
|
-
)
|
|
7051
|
+
response = self._post(url, data=request_body_data, params=query_params, content_type="application/json")
|
|
8463
7052
|
return self._handle_response(response)
|
|
8464
7053
|
|
|
8465
7054
|
def list_tools(self):
|