Skip to main content

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',
        metadata=shared.AccountMetadata(),
        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,
        supplemental_data=shared.SupplementalData(
            content={
                "Money": {
                    "blue": 'shred',
                },
            },
        ),
        type=shared.AccountType.ASSET,
        valid_datatype_links=[
            shared.AccountValidDataTypeLinks(
                links=[
                    'abnormally',
                ],
            ),
        ],
    ),
    company_id='8a210b68-6988-11ed-a1eb-0242ac120002',
    connection_id='2e9d2c44-f675-40ba-8049-353bfcb5e171',
)

res = s.accounts.create(req)

if res.create_account_response is not None:
    # handle response
    pass

Available Resources and Operations

accounts

companies

configuration

connections

customers

expenses

manage_data

push_operations

  • get - Get push operation
  • list - List push operations

suppliers

sync

transaction_status

  • get - Get sync transaction
  • list - List sync transactions

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

codat-sync-for-expenses-4.0.0.tar.gz (51.7 kB view details)

Uploaded Source

Built Distribution

codat_sync_for_expenses-4.0.0-py3-none-any.whl (147.4 kB view details)

Uploaded Python 3

File details

Details for the file codat-sync-for-expenses-4.0.0.tar.gz.

File metadata

  • Download URL: codat-sync-for-expenses-4.0.0.tar.gz
  • Upload date:
  • Size: 51.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.8.18

File hashes

Hashes for codat-sync-for-expenses-4.0.0.tar.gz
Algorithm Hash digest
SHA256 38f453ab85d2f8c6edcc58d1b3184b92c84b1a61a0d5b81488b9ff96252f6815
MD5 b5a9a41b6808e1fd87a23bfa1ce618b0
BLAKE2b-256 dee650c6782aeda410432ddc6221b1ce71619d31fdcda4e2db393947c978bf23

See more details on using hashes here.

File details

Details for the file codat_sync_for_expenses-4.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for codat_sync_for_expenses-4.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 fb60bb6a89bc1c304e541b571f8ccae48469bd86e9e1eda8a246efb09e7654b3
MD5 24d01fde999d1577783d45af0068dc2b
BLAKE2b-256 26181274396ac15fdf521eb27940c2dac6b79ddd0d3f944060e5ff9e97df3bed

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page