|
| 1 | +# files |
| 2 | + |
| 3 | +## Overview |
| 4 | + |
| 5 | +Endpoints to manage uploaded files. |
| 6 | + |
| 7 | +### Available Operations |
| 8 | + |
| 9 | +* [download_files](#download_files) - Download all files for a company |
| 10 | +* [list_files](#list_files) - List all files uploaded by a company |
| 11 | +* [upload_files](#upload_files) - Upload files for a company |
| 12 | + |
| 13 | +## download_files |
| 14 | + |
| 15 | +You can specify a date to download specific files for. |
| 16 | + |
| 17 | +### Example Usage |
| 18 | + |
| 19 | +```python |
| 20 | +import codatfiles |
| 21 | +from codatfiles.models import operations |
| 22 | + |
| 23 | +s = codatfiles.CodatFiles( |
| 24 | + security=shared.Security( |
| 25 | + auth_header="YOUR_API_KEY_HERE", |
| 26 | + ), |
| 27 | +) |
| 28 | + |
| 29 | + |
| 30 | +req = operations.DownloadFilesRequest( |
| 31 | + company_id="8a210b68-6988-11ed-a1eb-0242ac120002", |
| 32 | + date_="provident", |
| 33 | +) |
| 34 | + |
| 35 | +res = s.files.download_files(req) |
| 36 | + |
| 37 | +if res.data is not None: |
| 38 | + # handle response |
| 39 | +``` |
| 40 | + |
| 41 | +## list_files |
| 42 | + |
| 43 | +Returns an array of files that have been uploaded for a given company. |
| 44 | + |
| 45 | +### Example Usage |
| 46 | + |
| 47 | +```python |
| 48 | +import codatfiles |
| 49 | +from codatfiles.models import operations |
| 50 | + |
| 51 | +s = codatfiles.CodatFiles( |
| 52 | + security=shared.Security( |
| 53 | + auth_header="YOUR_API_KEY_HERE", |
| 54 | + ), |
| 55 | +) |
| 56 | + |
| 57 | + |
| 58 | +req = operations.ListFilesRequest( |
| 59 | + company_id="8a210b68-6988-11ed-a1eb-0242ac120002", |
| 60 | +) |
| 61 | + |
| 62 | +res = s.files.list_files(req) |
| 63 | + |
| 64 | +if res.files is not None: |
| 65 | + # handle response |
| 66 | +``` |
| 67 | + |
| 68 | +## upload_files |
| 69 | + |
| 70 | +Upload files |
| 71 | + |
| 72 | +### Example Usage |
| 73 | + |
| 74 | +```python |
| 75 | +import codatfiles |
| 76 | +from codatfiles.models import operations |
| 77 | + |
| 78 | +s = codatfiles.CodatFiles( |
| 79 | + security=shared.Security( |
| 80 | + auth_header="YOUR_API_KEY_HERE", |
| 81 | + ), |
| 82 | +) |
| 83 | + |
| 84 | + |
| 85 | +req = operations.UploadFilesRequest( |
| 86 | + request_body=operations.UploadFilesRequestBody( |
| 87 | + content="distinctio".encode(), |
| 88 | + request_body="quibusdam", |
| 89 | + ), |
| 90 | + company_id="8a210b68-6988-11ed-a1eb-0242ac120002", |
| 91 | + connection_id="2e9d2c44-f675-40ba-8049-353bfcb5e171", |
| 92 | +) |
| 93 | + |
| 94 | +res = s.files.upload_files(req) |
| 95 | + |
| 96 | +if res.status_code == 200: |
| 97 | + # handle response |
| 98 | +``` |
0 commit comments