|
| 1 | +<!-- Start SDK Example Usage --> |
| 2 | + |
| 3 | + |
| 4 | +```python |
| 5 | +import codatsyncpayables |
| 6 | +from codatsyncpayables.models import operations, shared |
| 7 | + |
| 8 | +s = codatsyncpayables.CodatSyncPayables( |
| 9 | + security=shared.Security( |
| 10 | + auth_header="Basic BASE_64_ENCODED(API_KEY)", |
| 11 | + ), |
| 12 | +) |
| 13 | + |
| 14 | +req = operations.CreateAccountRequest( |
| 15 | + account=shared.Account( |
| 16 | + currency='USD', |
| 17 | + current_balance=0, |
| 18 | + description='Invoices the business has issued but has not yet collected payment on.', |
| 19 | + fully_qualified_category='Asset.Current', |
| 20 | + fully_qualified_name='Fixed Asset', |
| 21 | + id='1b6266d1-1e44-46c5-8eb5-a8f98e03124e', |
| 22 | + is_bank_account=False, |
| 23 | + metadata=shared.Metadata( |
| 24 | + is_deleted=False, |
| 25 | + ), |
| 26 | + modified_date='2022-10-23T00:00:00.000Z', |
| 27 | + name='Accounts Receivable', |
| 28 | + nominal_code='610', |
| 29 | + source_modified_date='2022-10-23T00:00:00.000Z', |
| 30 | + status=shared.AccountStatus.ACTIVE, |
| 31 | + type=shared.AccountType.ASSET, |
| 32 | + valid_datatype_links=[ |
| 33 | + shared.AccountValidDataTypeLinks( |
| 34 | + links=[ |
| 35 | + 'corrupti', |
| 36 | + 'illum', |
| 37 | + 'vel', |
| 38 | + 'error', |
| 39 | + ], |
| 40 | + property='deserunt', |
| 41 | + ), |
| 42 | + shared.AccountValidDataTypeLinks( |
| 43 | + links=[ |
| 44 | + 'iure', |
| 45 | + 'magnam', |
| 46 | + ], |
| 47 | + property='debitis', |
| 48 | + ), |
| 49 | + shared.AccountValidDataTypeLinks( |
| 50 | + links=[ |
| 51 | + 'delectus', |
| 52 | + ], |
| 53 | + property='tempora', |
| 54 | + ), |
| 55 | + ], |
| 56 | + ), |
| 57 | + company_id='8a210b68-6988-11ed-a1eb-0242ac120002', |
| 58 | + connection_id='2e9d2c44-f675-40ba-8049-353bfcb5e171', |
| 59 | + timeout_in_minutes=383441, |
| 60 | +) |
| 61 | + |
| 62 | +res = s.accounts.create(req) |
| 63 | + |
| 64 | +if res.create_account_response is not None: |
| 65 | + # handle response |
| 66 | +``` |
| 67 | +<!-- End SDK Example Usage --> |
0 commit comments