Push expenses to accounting platforms.
Project description
Sync for Expenses
Embedded accounting integrations for corporate card providers.
SDK Installation
pip install codat-sync-for-expenses
Example Usage
import codatsyncexpenses
from codatsyncexpenses.models import operations, shared
from decimal import Decimal
s = codatsyncexpenses.CodatSyncExpenses(
security=shared.Security(
auth_header="Basic BASE_64_ENCODED(API_KEY)",
),
)
req = operations.CreateAccountRequest(
account=shared.Account(
currency='USD',
current_balance=Decimal('0'),
description='Invoices the business has issued but has not yet collected payment on.',
fully_qualified_category='Asset.Current',
fully_qualified_name='Cash On Hand',
id='1b6266d1-1e44-46c5-8eb5-a8f98e03124e',
is_bank_account=False,
metadata=shared.AccountMetadata(
is_deleted=False,
),
modified_date='2022-10-23T00:00:00.000Z',
name='Accounts Receivable',
nominal_code='610',
source_modified_date='2022-10-23T00:00:00.000Z',
status=shared.AccountStatus.ACTIVE,
type=shared.AccountType.ASSET,
valid_datatype_links=[
shared.AccountValidDataTypeLinks(
links=[
'Money',
],
property='Cambridgeshire grey technology',
),
],
),
allow_sync_on_push_complete=False,
company_id='8a210b68-6988-11ed-a1eb-0242ac120002',
connection_id='2e9d2c44-f675-40ba-8049-353bfcb5e171',
timeout_in_minutes=86,
)
res = s.accounts.create(req)
if res.create_account_response is not None:
# handle response
Available Resources and Operations
accounts
- create - Create account
- get_create_model - Get create account model
companies
- create - Create company
- delete - Delete a company
- get - Get company
- list - List companies
- update - Update company
configuration
- get - Get company configuration
- get_mapping_options - Mapping options
- set - Set company configuration
connections
- create - Create connection
- create_partner_expense_connection - Create partner expense connection
- delete - Delete connection
- get - Get connection
- list - List connections
- unlink - Unlink connection
customers
expenses
- create - Create expense transaction
- update - Update expense-transactions
- upload_attachment - Upload attachment
manage_data
- get - Get data status
- get_pull_operation - Get pull operation
- list_pull_operations - List pull operations
- refresh_all_data_types - Refresh all data
- refresh_data_type - Refresh data type
push_operations
suppliers
sync
- get - Get sync status
- get_last_successful_sync - Last successful sync
- get_latest_sync - Latest sync status
- initiate_sync - Initiate sync
- list - List sync statuses
transaction_status
Pagination
Some of the endpoints in this SDK support pagination. To use pagination, you make your SDK calls as usual, but the
returned response object will have a Next
method that can be called to pull down the next group of results. If the
return value of Next
is None
, then there are no more pages to be fetched.
Here's an example of one such pagination call:
Library generated by Speakeasy
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for codat-sync-for-expenses-3.1.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 87188507e09ca00368bd636c5e7b35f51f541380c5f6c8d115c81576a7890e0a |
|
MD5 | 84e1173118fbd0985f3c7a825fd0585e |
|
BLAKE2b-256 | 107b63fdaba016f5f4476df24cd678921e40b53889ebaef40d3a1998731cfab1 |
Close
Hashes for codat_sync_for_expenses-3.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6c5c6015ecdbdb3d8687fb409f13585e05c885198d8408694580419c79d0aa37 |
|
MD5 | 4ebdd8b015864ff49a840c0ca207ce4a |
|
BLAKE2b-256 | 311a5809df05752510419d194564986f4b6ed864679dfe097a63ece3bc78765b |