From 0f097807a3fa9f7c1417a6611d8ba9cd5e3ef7e6 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 2 May 2024 11:30:03 +0100 Subject: [PATCH] ci: regenerated with OpenAPI Doc 3.0.0, Speakeasy CLI 1.277.6 (#265) Co-authored-by: speakeasybot --- sync-for-payroll/.speakeasy/gen.lock | 392 +++++----- ...SyncPayroll.sln => Codat.Sync.Payroll.sln} | 2 +- .../Codat/Sync/Payroll/Accounts.cs | 482 ++++++++++++ .../Sync/Payroll/Codat.Sync.Payroll.csproj} | 2 +- .../Sync/Payroll}/CodatSyncPayroll.cs | 135 ++-- .../Codat/Sync/Payroll/Companies.cs | 568 ++++++++++++++ .../Codat/Sync/Payroll/CompanyInfo.cs | 153 ++++ .../Codat/Sync/Payroll/Connections.cs | 550 +++++++++++++ .../Sync/Payroll/Hooks/HookRegistration.cs | 36 + .../Codat/Sync/Payroll/Hooks/HookTypes.cs | 99 +++ .../Codat/Sync/Payroll/Hooks/SDKHooks.cs | 130 +++ .../Codat/Sync/Payroll/JournalEntries.cs | 610 +++++++++++++++ .../Codat/Sync/Payroll/Journals.cs | 483 ++++++++++++ .../Codat/Sync/Payroll/ManageData.cs | 737 ++++++++++++++++++ .../Payroll/Models/Errors}/ErrorMessage.cs | 10 +- .../Payroll/Models/Errors/SDKException.cs | 42 + .../Models/Operations/CreateAccountRequest.cs | 2 +- .../Operations/CreateAccountResponse.cs | 6 +- .../Operations/CreateCompanyResponse.cs | 6 +- .../Operations/CreateConnectionRequest.cs | 1 + .../Operations/CreateConnectionRequestBody.cs | 1 + .../Operations/CreateConnectionResponse.cs | 6 +- .../Operations/CreateJournalEntryRequest.cs | 4 +- .../Operations/CreateJournalEntryResponse.cs | 6 +- .../Models/Operations/CreateJournalRequest.cs | 2 +- .../Operations/CreateJournalResponse.cs | 6 +- .../Models/Operations/DeleteCompanyRequest.cs | 0 .../Operations/DeleteCompanyResponse.cs | 7 +- .../Operations/DeleteConnectionRequest.cs | 0 .../Operations/DeleteConnectionResponse.cs | 7 +- .../Operations/DeleteJournalEntryRequest.cs | 2 +- .../Operations/DeleteJournalEntryResponse.cs | 6 +- .../Models/Operations/GetAccountRequest.cs | 0 .../Models/Operations/GetAccountResponse.cs | 8 +- .../Operations/GetAccountingProfileRequest.cs | 0 .../GetAccountingProfileResponse.cs | 6 +- .../Models/Operations/GetCompanyRequest.cs | 0 .../Models/Operations/GetCompanyResponse.cs | 6 +- .../Models/Operations/GetConnectionRequest.cs | 0 .../Operations/GetConnectionResponse.cs | 6 +- .../GetCreateAccountsModelRequest.cs | 0 .../GetCreateAccountsModelResponse.cs | 6 +- .../GetCreateJournalEntryModelRequest.cs | 0 .../GetCreateJournalEntryModelResponse.cs | 6 +- .../GetCreateJournalModelRequest.cs | 0 .../GetCreateJournalModelResponse.cs | 6 +- .../Operations/GetDataStatusDataStatuses.cs | 281 +++++++ .../Models/Operations/GetDataStatusRequest.cs | 0 .../Operations/GetDataStatusResponse.cs | 11 +- .../Operations/GetJournalEntryRequest.cs | 0 .../Operations/GetJournalEntryResponse.cs | 8 +- .../Models/Operations/GetJournalRequest.cs | 0 .../Models/Operations/GetJournalResponse.cs | 8 +- .../Operations/GetPullOperationRequest.cs | 0 .../Operations/GetPullOperationResponse.cs | 6 +- .../Operations/GetPushOperationRequest.cs | 0 .../Operations/GetPushOperationResponse.cs | 6 +- .../Operations/GetTrackingCategoryRequest.cs | 0 .../Operations/GetTrackingCategoryResponse.cs | 8 +- .../Models/Operations/ListAccountsRequest.cs | 4 +- .../Models/Operations/ListAccountsResponse.cs | 6 +- .../Models/Operations/ListCompaniesRequest.cs | 4 +- .../Operations/ListCompaniesResponse.cs | 6 +- .../Operations/ListConnectionsRequest.cs | 4 +- .../Operations/ListConnectionsResponse.cs | 6 +- .../Operations/ListJournalEntriesRequest.cs | 4 +- .../Operations/ListJournalEntriesResponse.cs | 6 +- .../Models/Operations/ListJournalsRequest.cs | 4 +- .../Models/Operations/ListJournalsResponse.cs | 6 +- .../Operations/ListPullOperationsRequest.cs | 4 +- .../Operations/ListPullOperationsResponse.cs | 6 +- .../Operations/ListPushOperationsRequest.cs | 4 +- .../Operations/ListPushOperationsResponse.cs | 6 +- .../ListTrackingCategoriesRequest.cs | 4 +- .../ListTrackingCategoriesResponse.cs | 6 +- .../Operations/RefreshAllDataTypesRequest.cs | 0 .../Operations/RefreshAllDataTypesResponse.cs | 7 +- .../Operations/RefreshDataTypeRequest.cs | 0 .../Operations/RefreshDataTypeResponse.cs | 6 +- .../Operations/UnlinkConnectionRequest.cs | 1 + .../Operations/UnlinkConnectionResponse.cs | 6 +- .../UnlinkConnectionUpdateConnection.cs | 1 + .../Models/Operations/UpdateCompanyRequest.cs | 0 .../Operations/UpdateCompanyResponse.cs | 6 +- .../Sync/Payroll}/Models/Shared/Account.cs | 16 +- .../Payroll}/Models/Shared/AccountMetadata.cs | 3 +- .../Models/Shared/AccountPrototype.cs | 16 +- .../Sync/Payroll}/Models/Shared/AccountRef.cs | 1 + .../Payroll}/Models/Shared/AccountStatus.cs | 1 + .../Payroll}/Models/Shared/AccountType.cs | 1 + .../Shared/AccountValidDataTypeLinks.cs | 5 +- .../Models/Shared/AccountingAccount.cs | 16 +- .../Models/Shared/AccountingAddressType.cs | 1 + .../Models/Shared/AccountingJournal.cs | 10 +- .../Models/Shared/AccountingJournalEntry.cs | 6 +- .../Sync/Payroll}/Models/Shared/Accounts.cs | 2 + .../Sync/Payroll}/Models/Shared/Address.cs | 14 +- .../Shared/ClientRateLimitReachedWebhook.cs | 6 +- .../ClientRateLimitReachedWebhookData.cs | 1 + .../Shared/ClientRateLimitResetWebhook.cs | 6 +- .../Shared/ClientRateLimitResetWebhookData.cs | 5 +- .../Sync/Payroll}/Models/Shared/Companies.cs | 2 + .../Sync/Payroll}/Models/Shared/Company.cs | 2 + .../Payroll}/Models/Shared/CompanyInfo.cs | 22 +- .../Models/Shared/CompanyRequestBody.cs | 2 + .../Sync/Payroll}/Models/Shared/Connection.cs | 2 + .../Payroll}/Models/Shared/Connections.cs | 2 + .../Models/Shared/CreateAccountResponse.cs | 14 +- .../Shared/CreateAccountResponseMetadata.cs | 3 +- ...CreateAccountResponseValidDataTypeLinks.cs | 5 +- .../Shared/CreateJournalEntryResponse.cs | 14 +- .../Models/Shared/CreateJournalResponse.cs | 14 +- .../Models/Shared/DataConnectionError.cs | 1 + .../Models/Shared/DataConnectionStatus.cs | 1 + .../Sync/Payroll}/Models/Shared/DataStatus.cs | 8 +- .../Sync/Payroll}/Models/Shared/DataType.cs | 3 +- .../Sync/Payroll}/Models/Shared/DataTypes.cs | 3 +- .../Payroll/Models/Shared/DatasetStatus.cs} | 23 +- .../Payroll}/Models/Shared/ErrorValidation.cs | 6 +- .../Models/Shared/ErrorValidationItem.cs | 7 +- .../Payroll}/Models/Shared/GroupReference.cs | 1 + .../Sync/Payroll}/Models/Shared/HalRef.cs | 1 + .../Sync/Payroll}/Models/Shared/Items.cs | 1 + .../Sync/Payroll}/Models/Shared/Journal.cs | 10 +- .../Payroll}/Models/Shared/JournalEntries.cs | 2 + .../Payroll}/Models/Shared/JournalEntry.cs | 6 +- .../Models/Shared/JournalEntryRecordRef.cs | 2 + .../Shared/JournalEntryRecordRefDataType.cs | 1 + .../Payroll}/Models/Shared/JournalLine.cs | 6 +- .../Models/Shared/JournalPrototype.cs | 10 +- .../Sync/Payroll}/Models/Shared/JournalRef.cs | 3 +- .../Payroll}/Models/Shared/JournalStatus.cs | 1 + .../Sync/Payroll}/Models/Shared/Journals.cs | 2 + .../Sync/Payroll}/Models/Shared/Links.cs | 2 + .../Sync/Payroll}/Models/Shared/Metadata.cs | 3 +- .../Payroll}/Models/Shared/PhoneNumber.cs | 4 +- .../Payroll}/Models/Shared/PhoneNumberType.cs | 1 + .../Payroll/Models/Shared/PropertieStatus.cs | 99 +++ .../Payroll}/Models/Shared/PullOperation.cs | 10 +- .../Payroll}/Models/Shared/PullOperations.cs | 2 + .../Payroll}/Models/Shared/PushChangeType.cs | 1 + .../Models/Shared/PushFieldValidation.cs | 3 +- .../Payroll}/Models/Shared/PushOperation.cs | 12 +- .../Models/Shared/PushOperationChange.cs | 4 +- .../Models/Shared/PushOperationRef.cs | 4 +- .../Models/Shared/PushOperationStatus.cs | 1 + .../Payroll}/Models/Shared/PushOperations.cs | 2 + .../Sync/Payroll}/Models/Shared/PushOption.cs | 6 +- .../Models/Shared/PushOptionChoice.cs | 2 + .../Models/Shared/PushOptionProperty.cs | 6 +- .../Payroll}/Models/Shared/PushOptionType.cs | 1 + .../Models/Shared/PushValidationInfo.cs | 6 +- .../Payroll}/Models/Shared/SchemaDataType.cs | 3 +- .../Sync/Payroll}/Models/Shared/Security.cs | 0 .../Sync/Payroll}/Models/Shared/SourceType.cs | 1 + .../Sync/Payroll}/Models/Shared/Status.cs | 1 + .../Models/Shared/SupplementalData.cs | 3 +- .../Sync/Payroll}/Models/Shared/Tracking.cs | 4 +- .../Models/Shared/TrackingCategories.cs | 2 + .../Models/Shared/TrackingCategory.cs | 8 +- .../Models/Shared/TrackingCategoryTree.cs | 10 +- .../Models/Shared/TrackingRecordRef.cs | 2 + .../Shared/TrackingRecordRefDataType.cs | 1 + .../Sync/Payroll}/Models/Shared/Type.cs | 1 + .../Models/Shared/ValidDataTypeLinks.cs | 5 +- .../Sync/Payroll}/Models/Shared/Validation.cs | 6 +- .../Payroll}/Models/Shared/ValidationItem.cs | 7 +- .../Sync/Payroll}/Models/Shared/WebLink.cs | 2 + .../ClientRateLimitReachedResponse.cs | 1 + .../Webhooks/ClientRateLimitResetResponse.cs | 1 + .../Codat/Sync/Payroll/TrackingCategories.cs | 263 +++++++ .../Sync/Payroll/Utils/AnyDeserializer.cs | 95 +++ .../Sync/Payroll/Utils/BigIntStrConverter.cs} | 20 +- .../Payroll/Utils/DecimalStrConverter.cs} | 20 +- .../Sync/Payroll/Utils/EnumConverter.cs} | 25 +- .../Utils/FlexibleObjectDeserializer.cs | 0 .../Sync/Payroll}/Utils/HeaderSerializer.cs | 0 .../Payroll}/Utils/IsoDateTimeSerializer.cs | 12 +- .../Payroll}/Utils/RequestBodySerializer.cs | 13 + .../Payroll/Utils/ResponseBodyDeserializer.cs | 30 + .../Sync/Payroll/Utils/SecurityMetadata.cs} | 152 ++-- .../Sync/Payroll/Utils/SpeakeasyHttpClient.cs | 57 ++ .../Sync/Payroll}/Utils/SpeakeasyMetadata.cs | 0 .../Sync/Payroll}/Utils/URLBuilder.cs | 0 .../Sync/Payroll}/Utils/Utilities.cs | 77 +- sync-for-payroll/CodatSyncPayroll/Accounts.cs | 319 -------- .../CodatSyncPayroll/Companies.cs | 369 --------- .../CodatSyncPayroll/CompanyInfo.cs | 111 --- .../CodatSyncPayroll/Connections.cs | 352 --------- .../CodatSyncPayroll/JournalEntries.cs | 407 ---------- sync-for-payroll/CodatSyncPayroll/Journals.cs | 320 -------- .../CodatSyncPayroll/ManageData.cs | 462 ----------- .../CodatSyncPayroll/TrackingCategories.cs | 181 ----- .../Utils/SpeakeasyHttpClient.cs | 96 --- sync-for-payroll/README.md | 67 +- sync-for-payroll/RELEASES.md | 12 +- sync-for-payroll/USAGE.md | 5 + .../Models/{Shared => Errors}/ErrorMessage.md | 2 + .../Operations/CreateAccountResponse.md | 1 - .../Operations/CreateCompanyResponse.md | 13 +- .../Operations/CreateConnectionResponse.md | 13 +- .../Operations/CreateJournalEntryResponse.md | 1 - .../Operations/CreateJournalResponse.md | 1 - .../Operations/DeleteCompanyResponse.md | 1 - .../Operations/DeleteConnectionResponse.md | 1 - .../Operations/DeleteJournalEntryResponse.md | 1 - .../Models/Operations/GetAccountResponse.md | 1 - .../GetAccountingProfileResponse.md | 13 +- .../Models/Operations/GetCompanyResponse.md | 13 +- .../Operations/GetConnectionResponse.md | 13 +- .../GetCreateAccountsModelResponse.md | 1 - .../GetCreateJournalEntryModelResponse.md | 1 - .../GetCreateJournalModelResponse.md | 1 - .../Operations/GetDataStatusDataStatuses.md | 52 ++ .../Operations/GetDataStatusResponse.md | 3 +- .../Operations/GetJournalEntryResponse.md | 1 - .../Models/Operations/GetJournalResponse.md | 1 - .../Operations/GetPullOperationResponse.md | 13 +- .../Operations/GetPushOperationResponse.md | 1 - .../Operations/GetTrackingCategoryResponse.md | 1 - .../Models/Operations/ListAccountsResponse.md | 13 +- .../Operations/ListCompaniesResponse.md | 13 +- .../Operations/ListConnectionsResponse.md | 13 +- .../Operations/ListJournalEntriesResponse.md | 13 +- .../Models/Operations/ListJournalsResponse.md | 13 +- .../Operations/ListPullOperationsResponse.md | 13 +- .../Operations/ListPushOperationsResponse.md | 13 +- .../ListTrackingCategoriesResponse.md | 13 +- .../Operations/RefreshAllDataTypesResponse.md | 1 - .../Operations/RefreshDataTypeResponse.md | 13 +- .../Operations/UnlinkConnectionResponse.md | 13 +- .../Operations/UpdateCompanyResponse.md | 13 +- .../docs/Models/Shared/Accounts.md | 14 +- .../Shared/ClientRateLimitReachedWebhook.md | 18 +- .../Shared/ClientRateLimitResetWebhook.md | 18 +- .../Shared/ClientRateLimitResetWebhookData.md | 2 +- .../docs/Models/Shared/Companies.md | 14 +- .../docs/Models/Shared/Connections.md | 14 +- .../Models/Shared/CreateAccountResponse.md | 2 +- .../Shared/CreateJournalEntryResponse.md | 2 +- .../Models/Shared/CreateJournalResponse.md | 2 +- .../docs/Models/Shared/DataStatus.md | 4 +- .../docs/Models/Shared/DataType.md | 2 +- .../docs/Models/Shared/DataTypes.md | 2 +- ...ullOperationStatus.md => DatasetStatus.md} | 6 +- .../docs/Models/Shared/JournalEntries.md | 14 +- .../docs/Models/Shared/Journals.md | 14 +- .../docs/Models/Shared/PhoneNumber.md | 2 +- .../docs/Models/Shared/PropertieStatus.md | 30 + .../docs/Models/Shared/PullOperation.md | 2 +- .../docs/Models/Shared/PullOperations.md | 14 +- .../docs/Models/Shared/PushOperation.md | 2 +- .../docs/Models/Shared/PushOperationRef.md | 2 +- .../docs/Models/Shared/PushOperations.md | 14 +- .../docs/Models/Shared/SchemaDataType.md | 2 +- .../docs/Models/Shared/TrackingCategories.md | 14 +- sync-for-payroll/docs/sdks/accounts/README.md | 33 +- .../docs/sdks/codatsyncpayroll/README.md | 22 +- .../docs/sdks/companies/README.md | 41 +- .../docs/sdks/companyinfo/README.md | 7 +- .../docs/sdks/connections/README.md | 30 +- .../docs/sdks/journalentries/README.md | 49 +- sync-for-payroll/docs/sdks/journals/README.md | 25 +- .../docs/sdks/managedata/README.md | 39 +- .../docs/sdks/trackingcategories/README.md | 12 +- sync-for-payroll/gen.yaml | 8 +- sync-for-payroll/global.json | 6 + 267 files changed, 6183 insertions(+), 3546 deletions(-) rename sync-for-payroll/{CodatSyncPayroll.sln => Codat.Sync.Payroll.sln} (87%) create mode 100644 sync-for-payroll/Codat/Sync/Payroll/Accounts.cs rename sync-for-payroll/{CodatSyncPayroll/CodatSyncPayroll.csproj => Codat/Sync/Payroll/Codat.Sync.Payroll.csproj} (96%) rename sync-for-payroll/{CodatSyncPayroll => Codat/Sync/Payroll}/CodatSyncPayroll.cs (59%) create mode 100644 sync-for-payroll/Codat/Sync/Payroll/Companies.cs create mode 100644 sync-for-payroll/Codat/Sync/Payroll/CompanyInfo.cs create mode 100644 sync-for-payroll/Codat/Sync/Payroll/Connections.cs create mode 100644 sync-for-payroll/Codat/Sync/Payroll/Hooks/HookRegistration.cs create mode 100644 sync-for-payroll/Codat/Sync/Payroll/Hooks/HookTypes.cs create mode 100644 sync-for-payroll/Codat/Sync/Payroll/Hooks/SDKHooks.cs create mode 100644 sync-for-payroll/Codat/Sync/Payroll/JournalEntries.cs create mode 100644 sync-for-payroll/Codat/Sync/Payroll/Journals.cs create mode 100644 sync-for-payroll/Codat/Sync/Payroll/ManageData.cs rename sync-for-payroll/{CodatSyncPayroll/Models/Shared => Codat/Sync/Payroll/Models/Errors}/ErrorMessage.cs (88%) create mode 100644 sync-for-payroll/Codat/Sync/Payroll/Models/Errors/SDKException.cs rename sync-for-payroll/{CodatSyncPayroll => Codat/Sync/Payroll}/Models/Operations/CreateAccountRequest.cs (96%) rename sync-for-payroll/{CodatSyncPayroll => Codat/Sync/Payroll}/Models/Operations/CreateAccountResponse.cs (89%) rename sync-for-payroll/{CodatSyncPayroll => Codat/Sync/Payroll}/Models/Operations/CreateCompanyResponse.cs (89%) rename sync-for-payroll/{CodatSyncPayroll => Codat/Sync/Payroll}/Models/Operations/CreateConnectionRequest.cs (95%) rename sync-for-payroll/{CodatSyncPayroll => Codat/Sync/Payroll}/Models/Operations/CreateConnectionRequestBody.cs (96%) rename sync-for-payroll/{CodatSyncPayroll => Codat/Sync/Payroll}/Models/Operations/CreateConnectionResponse.cs (88%) rename sync-for-payroll/{CodatSyncPayroll => Codat/Sync/Payroll}/Models/Operations/CreateJournalEntryRequest.cs (92%) rename sync-for-payroll/{CodatSyncPayroll => Codat/Sync/Payroll}/Models/Operations/CreateJournalEntryResponse.cs (89%) rename sync-for-payroll/{CodatSyncPayroll => Codat/Sync/Payroll}/Models/Operations/CreateJournalRequest.cs (96%) rename sync-for-payroll/{CodatSyncPayroll => Codat/Sync/Payroll}/Models/Operations/CreateJournalResponse.cs (89%) rename sync-for-payroll/{CodatSyncPayroll => Codat/Sync/Payroll}/Models/Operations/DeleteCompanyRequest.cs (100%) rename sync-for-payroll/{CodatSyncPayroll => Codat/Sync/Payroll}/Models/Operations/DeleteCompanyResponse.cs (83%) rename sync-for-payroll/{CodatSyncPayroll => Codat/Sync/Payroll}/Models/Operations/DeleteConnectionRequest.cs (100%) rename sync-for-payroll/{CodatSyncPayroll => Codat/Sync/Payroll}/Models/Operations/DeleteConnectionResponse.cs (84%) rename sync-for-payroll/{CodatSyncPayroll => Codat/Sync/Payroll}/Models/Operations/DeleteJournalEntryRequest.cs (96%) rename sync-for-payroll/{CodatSyncPayroll => Codat/Sync/Payroll}/Models/Operations/DeleteJournalEntryResponse.cs (88%) rename sync-for-payroll/{CodatSyncPayroll => Codat/Sync/Payroll}/Models/Operations/GetAccountRequest.cs (100%) rename sync-for-payroll/{CodatSyncPayroll => Codat/Sync/Payroll}/Models/Operations/GetAccountResponse.cs (85%) rename sync-for-payroll/{CodatSyncPayroll => Codat/Sync/Payroll}/Models/Operations/GetAccountingProfileRequest.cs (100%) rename sync-for-payroll/{CodatSyncPayroll => Codat/Sync/Payroll}/Models/Operations/GetAccountingProfileResponse.cs (88%) rename sync-for-payroll/{CodatSyncPayroll => Codat/Sync/Payroll}/Models/Operations/GetCompanyRequest.cs (100%) rename sync-for-payroll/{CodatSyncPayroll => Codat/Sync/Payroll}/Models/Operations/GetCompanyResponse.cs (88%) rename sync-for-payroll/{CodatSyncPayroll => Codat/Sync/Payroll}/Models/Operations/GetConnectionRequest.cs (100%) rename sync-for-payroll/{CodatSyncPayroll => Codat/Sync/Payroll}/Models/Operations/GetConnectionResponse.cs (88%) rename sync-for-payroll/{CodatSyncPayroll => Codat/Sync/Payroll}/Models/Operations/GetCreateAccountsModelRequest.cs (100%) rename sync-for-payroll/{CodatSyncPayroll => Codat/Sync/Payroll}/Models/Operations/GetCreateAccountsModelResponse.cs (88%) rename sync-for-payroll/{CodatSyncPayroll => Codat/Sync/Payroll}/Models/Operations/GetCreateJournalEntryModelRequest.cs (100%) rename sync-for-payroll/{CodatSyncPayroll => Codat/Sync/Payroll}/Models/Operations/GetCreateJournalEntryModelResponse.cs (88%) rename sync-for-payroll/{CodatSyncPayroll => Codat/Sync/Payroll}/Models/Operations/GetCreateJournalModelRequest.cs (100%) rename sync-for-payroll/{CodatSyncPayroll => Codat/Sync/Payroll}/Models/Operations/GetCreateJournalModelResponse.cs (88%) create mode 100644 sync-for-payroll/Codat/Sync/Payroll/Models/Operations/GetDataStatusDataStatuses.cs rename sync-for-payroll/{CodatSyncPayroll => Codat/Sync/Payroll}/Models/Operations/GetDataStatusRequest.cs (100%) rename sync-for-payroll/{CodatSyncPayroll => Codat/Sync/Payroll}/Models/Operations/GetDataStatusResponse.cs (78%) rename sync-for-payroll/{CodatSyncPayroll => Codat/Sync/Payroll}/Models/Operations/GetJournalEntryRequest.cs (100%) rename sync-for-payroll/{CodatSyncPayroll => Codat/Sync/Payroll}/Models/Operations/GetJournalEntryResponse.cs (84%) rename sync-for-payroll/{CodatSyncPayroll => Codat/Sync/Payroll}/Models/Operations/GetJournalRequest.cs (100%) rename sync-for-payroll/{CodatSyncPayroll => Codat/Sync/Payroll}/Models/Operations/GetJournalResponse.cs (85%) rename sync-for-payroll/{CodatSyncPayroll => Codat/Sync/Payroll}/Models/Operations/GetPullOperationRequest.cs (100%) rename sync-for-payroll/{CodatSyncPayroll => Codat/Sync/Payroll}/Models/Operations/GetPullOperationResponse.cs (88%) rename sync-for-payroll/{CodatSyncPayroll => Codat/Sync/Payroll}/Models/Operations/GetPushOperationRequest.cs (100%) rename sync-for-payroll/{CodatSyncPayroll => Codat/Sync/Payroll}/Models/Operations/GetPushOperationResponse.cs (88%) rename sync-for-payroll/{CodatSyncPayroll => Codat/Sync/Payroll}/Models/Operations/GetTrackingCategoryRequest.cs (100%) rename sync-for-payroll/{CodatSyncPayroll => Codat/Sync/Payroll}/Models/Operations/GetTrackingCategoryResponse.cs (88%) rename sync-for-payroll/{CodatSyncPayroll => Codat/Sync/Payroll}/Models/Operations/ListAccountsRequest.cs (95%) rename sync-for-payroll/{CodatSyncPayroll => Codat/Sync/Payroll}/Models/Operations/ListAccountsResponse.cs (88%) rename sync-for-payroll/{CodatSyncPayroll => Codat/Sync/Payroll}/Models/Operations/ListCompaniesRequest.cs (94%) rename sync-for-payroll/{CodatSyncPayroll => Codat/Sync/Payroll}/Models/Operations/ListCompaniesResponse.cs (88%) rename sync-for-payroll/{CodatSyncPayroll => Codat/Sync/Payroll}/Models/Operations/ListConnectionsRequest.cs (95%) rename sync-for-payroll/{CodatSyncPayroll => Codat/Sync/Payroll}/Models/Operations/ListConnectionsResponse.cs (88%) rename sync-for-payroll/{CodatSyncPayroll => Codat/Sync/Payroll}/Models/Operations/ListJournalEntriesRequest.cs (95%) rename sync-for-payroll/{CodatSyncPayroll => Codat/Sync/Payroll}/Models/Operations/ListJournalEntriesResponse.cs (88%) rename sync-for-payroll/{CodatSyncPayroll => Codat/Sync/Payroll}/Models/Operations/ListJournalsRequest.cs (95%) rename sync-for-payroll/{CodatSyncPayroll => Codat/Sync/Payroll}/Models/Operations/ListJournalsResponse.cs (88%) rename sync-for-payroll/{CodatSyncPayroll => Codat/Sync/Payroll}/Models/Operations/ListPullOperationsRequest.cs (95%) rename sync-for-payroll/{CodatSyncPayroll => Codat/Sync/Payroll}/Models/Operations/ListPullOperationsResponse.cs (88%) rename sync-for-payroll/{CodatSyncPayroll => Codat/Sync/Payroll}/Models/Operations/ListPushOperationsRequest.cs (95%) rename sync-for-payroll/{CodatSyncPayroll => Codat/Sync/Payroll}/Models/Operations/ListPushOperationsResponse.cs (88%) rename sync-for-payroll/{CodatSyncPayroll => Codat/Sync/Payroll}/Models/Operations/ListTrackingCategoriesRequest.cs (95%) rename sync-for-payroll/{CodatSyncPayroll => Codat/Sync/Payroll}/Models/Operations/ListTrackingCategoriesResponse.cs (88%) rename sync-for-payroll/{CodatSyncPayroll => Codat/Sync/Payroll}/Models/Operations/RefreshAllDataTypesRequest.cs (100%) rename sync-for-payroll/{CodatSyncPayroll => Codat/Sync/Payroll}/Models/Operations/RefreshAllDataTypesResponse.cs (84%) rename sync-for-payroll/{CodatSyncPayroll => Codat/Sync/Payroll}/Models/Operations/RefreshDataTypeRequest.cs (100%) rename sync-for-payroll/{CodatSyncPayroll => Codat/Sync/Payroll}/Models/Operations/RefreshDataTypeResponse.cs (88%) rename sync-for-payroll/{CodatSyncPayroll => Codat/Sync/Payroll}/Models/Operations/UnlinkConnectionRequest.cs (96%) rename sync-for-payroll/{CodatSyncPayroll => Codat/Sync/Payroll}/Models/Operations/UnlinkConnectionResponse.cs (88%) rename sync-for-payroll/{CodatSyncPayroll => Codat/Sync/Payroll}/Models/Operations/UnlinkConnectionUpdateConnection.cs (95%) rename sync-for-payroll/{CodatSyncPayroll => Codat/Sync/Payroll}/Models/Operations/UpdateCompanyRequest.cs (100%) rename sync-for-payroll/{CodatSyncPayroll => Codat/Sync/Payroll}/Models/Operations/UpdateCompanyResponse.cs (88%) rename sync-for-payroll/{CodatSyncPayroll => Codat/Sync/Payroll}/Models/Shared/Account.cs (93%) rename sync-for-payroll/{CodatSyncPayroll => Codat/Sync/Payroll}/Models/Shared/AccountMetadata.cs (89%) rename sync-for-payroll/{CodatSyncPayroll => Codat/Sync/Payroll}/Models/Shared/AccountPrototype.cs (90%) rename sync-for-payroll/{CodatSyncPayroll => Codat/Sync/Payroll}/Models/Shared/AccountRef.cs (96%) rename sync-for-payroll/{CodatSyncPayroll => Codat/Sync/Payroll}/Models/Shared/AccountStatus.cs (98%) rename sync-for-payroll/{CodatSyncPayroll => Codat/Sync/Payroll}/Models/Shared/AccountType.cs (98%) rename sync-for-payroll/{CodatSyncPayroll => Codat/Sync/Payroll}/Models/Shared/AccountValidDataTypeLinks.cs (96%) rename sync-for-payroll/{CodatSyncPayroll => Codat/Sync/Payroll}/Models/Shared/AccountingAccount.cs (93%) rename sync-for-payroll/{CodatSyncPayroll => Codat/Sync/Payroll}/Models/Shared/AccountingAddressType.cs (98%) rename sync-for-payroll/{CodatSyncPayroll => Codat/Sync/Payroll}/Models/Shared/AccountingJournal.cs (95%) rename sync-for-payroll/{CodatSyncPayroll => Codat/Sync/Payroll}/Models/Shared/AccountingJournalEntry.cs (97%) rename sync-for-payroll/{CodatSyncPayroll => Codat/Sync/Payroll}/Models/Shared/Accounts.cs (94%) rename sync-for-payroll/{CodatSyncPayroll => Codat/Sync/Payroll}/Models/Shared/Address.cs (78%) rename sync-for-payroll/{CodatSyncPayroll => Codat/Sync/Payroll}/Models/Shared/ClientRateLimitReachedWebhook.cs (86%) rename sync-for-payroll/{CodatSyncPayroll => Codat/Sync/Payroll}/Models/Shared/ClientRateLimitReachedWebhookData.cs (98%) rename sync-for-payroll/{CodatSyncPayroll => Codat/Sync/Payroll}/Models/Shared/ClientRateLimitResetWebhook.cs (86%) rename sync-for-payroll/{CodatSyncPayroll => Codat/Sync/Payroll}/Models/Shared/ClientRateLimitResetWebhookData.cs (93%) rename sync-for-payroll/{CodatSyncPayroll => Codat/Sync/Payroll}/Models/Shared/Companies.cs (94%) rename sync-for-payroll/{CodatSyncPayroll => Codat/Sync/Payroll}/Models/Shared/Company.cs (98%) rename sync-for-payroll/{CodatSyncPayroll => Codat/Sync/Payroll}/Models/Shared/CompanyInfo.cs (92%) rename sync-for-payroll/{CodatSyncPayroll => Codat/Sync/Payroll}/Models/Shared/CompanyRequestBody.cs (93%) rename sync-for-payroll/{CodatSyncPayroll => Codat/Sync/Payroll}/Models/Shared/Connection.cs (98%) rename sync-for-payroll/{CodatSyncPayroll => Codat/Sync/Payroll}/Models/Shared/Connections.cs (94%) rename sync-for-payroll/{CodatSyncPayroll => Codat/Sync/Payroll}/Models/Shared/CreateAccountResponse.cs (93%) rename sync-for-payroll/{CodatSyncPayroll => Codat/Sync/Payroll}/Models/Shared/CreateAccountResponseMetadata.cs (89%) rename sync-for-payroll/{CodatSyncPayroll => Codat/Sync/Payroll}/Models/Shared/CreateAccountResponseValidDataTypeLinks.cs (96%) rename sync-for-payroll/{CodatSyncPayroll => Codat/Sync/Payroll}/Models/Shared/CreateJournalEntryResponse.cs (93%) rename sync-for-payroll/{CodatSyncPayroll => Codat/Sync/Payroll}/Models/Shared/CreateJournalResponse.cs (93%) rename sync-for-payroll/{CodatSyncPayroll => Codat/Sync/Payroll}/Models/Shared/DataConnectionError.cs (98%) rename sync-for-payroll/{CodatSyncPayroll => Codat/Sync/Payroll}/Models/Shared/DataConnectionStatus.cs (98%) rename sync-for-payroll/{CodatSyncPayroll => Codat/Sync/Payroll}/Models/Shared/DataStatus.cs (92%) rename sync-for-payroll/{CodatSyncPayroll => Codat/Sync/Payroll}/Models/Shared/DataType.cs (98%) rename sync-for-payroll/{CodatSyncPayroll => Codat/Sync/Payroll}/Models/Shared/DataTypes.cs (98%) rename sync-for-payroll/{CodatSyncPayroll/Models/Shared/PullOperationStatus.cs => Codat/Sync/Payroll/Models/Shared/DatasetStatus.cs} (81%) rename sync-for-payroll/{CodatSyncPayroll => Codat/Sync/Payroll}/Models/Shared/ErrorValidation.cs (84%) rename sync-for-payroll/{CodatSyncPayroll => Codat/Sync/Payroll}/Models/Shared/ErrorValidationItem.cs (82%) rename sync-for-payroll/{CodatSyncPayroll => Codat/Sync/Payroll}/Models/Shared/GroupReference.cs (95%) rename sync-for-payroll/{CodatSyncPayroll => Codat/Sync/Payroll}/Models/Shared/HalRef.cs (94%) rename sync-for-payroll/{CodatSyncPayroll => Codat/Sync/Payroll}/Models/Shared/Items.cs (94%) rename sync-for-payroll/{CodatSyncPayroll => Codat/Sync/Payroll}/Models/Shared/Journal.cs (95%) rename sync-for-payroll/{CodatSyncPayroll => Codat/Sync/Payroll}/Models/Shared/JournalEntries.cs (94%) rename sync-for-payroll/{CodatSyncPayroll => Codat/Sync/Payroll}/Models/Shared/JournalEntry.cs (97%) rename sync-for-payroll/{CodatSyncPayroll => Codat/Sync/Payroll}/Models/Shared/JournalEntryRecordRef.cs (92%) rename sync-for-payroll/{CodatSyncPayroll => Codat/Sync/Payroll}/Models/Shared/JournalEntryRecordRefDataType.cs (98%) rename sync-for-payroll/{CodatSyncPayroll => Codat/Sync/Payroll}/Models/Shared/JournalLine.cs (89%) rename sync-for-payroll/{CodatSyncPayroll => Codat/Sync/Payroll}/Models/Shared/JournalPrototype.cs (91%) rename sync-for-payroll/{CodatSyncPayroll => Codat/Sync/Payroll}/Models/Shared/JournalRef.cs (91%) rename sync-for-payroll/{CodatSyncPayroll => Codat/Sync/Payroll}/Models/Shared/JournalStatus.cs (98%) rename sync-for-payroll/{CodatSyncPayroll => Codat/Sync/Payroll}/Models/Shared/Journals.cs (94%) rename sync-for-payroll/{CodatSyncPayroll => Codat/Sync/Payroll}/Models/Shared/Links.cs (91%) rename sync-for-payroll/{CodatSyncPayroll => Codat/Sync/Payroll}/Models/Shared/Metadata.cs (88%) rename sync-for-payroll/{CodatSyncPayroll => Codat/Sync/Payroll}/Models/Shared/PhoneNumber.cs (85%) rename sync-for-payroll/{CodatSyncPayroll => Codat/Sync/Payroll}/Models/Shared/PhoneNumberType.cs (98%) create mode 100644 sync-for-payroll/Codat/Sync/Payroll/Models/Shared/PropertieStatus.cs rename sync-for-payroll/{CodatSyncPayroll => Codat/Sync/Payroll}/Models/Shared/PullOperation.cs (94%) rename sync-for-payroll/{CodatSyncPayroll => Codat/Sync/Payroll}/Models/Shared/PullOperations.cs (94%) rename sync-for-payroll/{CodatSyncPayroll => Codat/Sync/Payroll}/Models/Shared/PushChangeType.cs (98%) rename sync-for-payroll/{CodatSyncPayroll => Codat/Sync/Payroll}/Models/Shared/PushFieldValidation.cs (92%) rename sync-for-payroll/{CodatSyncPayroll => Codat/Sync/Payroll}/Models/Shared/PushOperation.cs (94%) rename sync-for-payroll/{CodatSyncPayroll => Codat/Sync/Payroll}/Models/Shared/PushOperationChange.cs (87%) rename sync-for-payroll/{CodatSyncPayroll => Codat/Sync/Payroll}/Models/Shared/PushOperationRef.cs (87%) rename sync-for-payroll/{CodatSyncPayroll => Codat/Sync/Payroll}/Models/Shared/PushOperationStatus.cs (98%) rename sync-for-payroll/{CodatSyncPayroll => Codat/Sync/Payroll}/Models/Shared/PushOperations.cs (94%) rename sync-for-payroll/{CodatSyncPayroll => Codat/Sync/Payroll}/Models/Shared/PushOption.cs (89%) rename sync-for-payroll/{CodatSyncPayroll => Codat/Sync/Payroll}/Models/Shared/PushOptionChoice.cs (94%) rename sync-for-payroll/{CodatSyncPayroll => Codat/Sync/Payroll}/Models/Shared/PushOptionProperty.cs (89%) rename sync-for-payroll/{CodatSyncPayroll => Codat/Sync/Payroll}/Models/Shared/PushOptionType.cs (98%) rename sync-for-payroll/{CodatSyncPayroll => Codat/Sync/Payroll}/Models/Shared/PushValidationInfo.cs (88%) rename sync-for-payroll/{CodatSyncPayroll => Codat/Sync/Payroll}/Models/Shared/SchemaDataType.cs (98%) rename sync-for-payroll/{CodatSyncPayroll => Codat/Sync/Payroll}/Models/Shared/Security.cs (100%) rename sync-for-payroll/{CodatSyncPayroll => Codat/Sync/Payroll}/Models/Shared/SourceType.cs (98%) rename sync-for-payroll/{CodatSyncPayroll => Codat/Sync/Payroll}/Models/Shared/Status.cs (98%) rename sync-for-payroll/{CodatSyncPayroll => Codat/Sync/Payroll}/Models/Shared/SupplementalData.cs (94%) rename sync-for-payroll/{CodatSyncPayroll => Codat/Sync/Payroll}/Models/Shared/Tracking.cs (90%) rename sync-for-payroll/{CodatSyncPayroll => Codat/Sync/Payroll}/Models/Shared/TrackingCategories.cs (94%) rename sync-for-payroll/{CodatSyncPayroll => Codat/Sync/Payroll}/Models/Shared/TrackingCategory.cs (97%) rename sync-for-payroll/{CodatSyncPayroll => Codat/Sync/Payroll}/Models/Shared/TrackingCategoryTree.cs (89%) rename sync-for-payroll/{CodatSyncPayroll => Codat/Sync/Payroll}/Models/Shared/TrackingRecordRef.cs (92%) rename sync-for-payroll/{CodatSyncPayroll => Codat/Sync/Payroll}/Models/Shared/TrackingRecordRefDataType.cs (98%) rename sync-for-payroll/{CodatSyncPayroll => Codat/Sync/Payroll}/Models/Shared/Type.cs (98%) rename sync-for-payroll/{CodatSyncPayroll => Codat/Sync/Payroll}/Models/Shared/ValidDataTypeLinks.cs (96%) rename sync-for-payroll/{CodatSyncPayroll => Codat/Sync/Payroll}/Models/Shared/Validation.cs (80%) rename sync-for-payroll/{CodatSyncPayroll => Codat/Sync/Payroll}/Models/Shared/ValidationItem.cs (82%) rename sync-for-payroll/{CodatSyncPayroll => Codat/Sync/Payroll}/Models/Shared/WebLink.cs (91%) rename sync-for-payroll/{CodatSyncPayroll => Codat/Sync/Payroll}/Models/Webhooks/ClientRateLimitReachedResponse.cs (96%) rename sync-for-payroll/{CodatSyncPayroll => Codat/Sync/Payroll}/Models/Webhooks/ClientRateLimitResetResponse.cs (96%) create mode 100644 sync-for-payroll/Codat/Sync/Payroll/TrackingCategories.cs create mode 100644 sync-for-payroll/Codat/Sync/Payroll/Utils/AnyDeserializer.cs rename sync-for-payroll/{CodatSyncPayroll/Utils/BigIntSerializer.cs => Codat/Sync/Payroll/Utils/BigIntStrConverter.cs} (64%) rename sync-for-payroll/{CodatSyncPayroll/Utils/DecimalSerializer.cs => Codat/Sync/Payroll/Utils/DecimalStrConverter.cs} (64%) rename sync-for-payroll/{CodatSyncPayroll/Utils/EnumSerializer.cs => Codat/Sync/Payroll/Utils/EnumConverter.cs} (68%) rename sync-for-payroll/{CodatSyncPayroll => Codat/Sync/Payroll}/Utils/FlexibleObjectDeserializer.cs (100%) rename sync-for-payroll/{CodatSyncPayroll => Codat/Sync/Payroll}/Utils/HeaderSerializer.cs (100%) rename sync-for-payroll/{CodatSyncPayroll => Codat/Sync/Payroll}/Utils/IsoDateTimeSerializer.cs (80%) rename sync-for-payroll/{CodatSyncPayroll => Codat/Sync/Payroll}/Utils/RequestBodySerializer.cs (97%) create mode 100644 sync-for-payroll/Codat/Sync/Payroll/Utils/ResponseBodyDeserializer.cs rename sync-for-payroll/{CodatSyncPayroll/Utils/SecuritySerializer.cs => Codat/Sync/Payroll/Utils/SecurityMetadata.cs} (50%) create mode 100644 sync-for-payroll/Codat/Sync/Payroll/Utils/SpeakeasyHttpClient.cs rename sync-for-payroll/{CodatSyncPayroll => Codat/Sync/Payroll}/Utils/SpeakeasyMetadata.cs (100%) rename sync-for-payroll/{CodatSyncPayroll => Codat/Sync/Payroll}/Utils/URLBuilder.cs (100%) rename sync-for-payroll/{CodatSyncPayroll => Codat/Sync/Payroll}/Utils/Utilities.cs (77%) delete mode 100644 sync-for-payroll/CodatSyncPayroll/Accounts.cs delete mode 100644 sync-for-payroll/CodatSyncPayroll/Companies.cs delete mode 100644 sync-for-payroll/CodatSyncPayroll/CompanyInfo.cs delete mode 100644 sync-for-payroll/CodatSyncPayroll/Connections.cs delete mode 100644 sync-for-payroll/CodatSyncPayroll/JournalEntries.cs delete mode 100644 sync-for-payroll/CodatSyncPayroll/Journals.cs delete mode 100644 sync-for-payroll/CodatSyncPayroll/ManageData.cs delete mode 100644 sync-for-payroll/CodatSyncPayroll/TrackingCategories.cs delete mode 100644 sync-for-payroll/CodatSyncPayroll/Utils/SpeakeasyHttpClient.cs rename sync-for-payroll/docs/Models/{Shared => Errors}/ErrorMessage.md (99%) create mode 100644 sync-for-payroll/docs/Models/Operations/GetDataStatusDataStatuses.md rename sync-for-payroll/docs/Models/Shared/{PullOperationStatus.md => DatasetStatus.md} (87%) create mode 100644 sync-for-payroll/docs/Models/Shared/PropertieStatus.md create mode 100644 sync-for-payroll/global.json diff --git a/sync-for-payroll/.speakeasy/gen.lock b/sync-for-payroll/.speakeasy/gen.lock index acc455532..5704f4a7e 100755 --- a/sync-for-payroll/.speakeasy/gen.lock +++ b/sync-for-payroll/.speakeasy/gen.lock @@ -1,201 +1,211 @@ lockVersion: 2.0.0 id: c60f20d2-c319-4f3b-9b31-8f8b8c99baad management: - docChecksum: a15261c2e04a7bd37f34fe39f6ce446f + docChecksum: ee1fff3698722f577a7d769881607f31 docVersion: 3.0.0 - speakeasyVersion: internal - generationVersion: 2.257.2 - releaseVersion: 3.0.0 - configChecksum: 6964fcff687c8305b0ffb2544a8b0ff6 + speakeasyVersion: 1.277.6 + generationVersion: 2.319.7 + releaseVersion: 3.1.0 + configChecksum: 621a67b94dd36814c30686fd8b86e0c3 repoURL: https://github.com/codatio/client-sdk-csharp.git repoSubDirectory: sync-for-payroll published: true features: csharp: - core: 3.3.2 + constsAndDefaults: 0.0.1 + core: 3.8.2 + decimal: 0.1.0 deprecations: 2.81.2 examples: 2.81.3 - globalSecurity: 2.83.0 - globalServerURLs: 2.82.2 + globalSecurity: 2.83.4 + globalServerURLs: 2.82.3 inputOutputModels: 2.83.0 - nameOverrides: 2.81.1 + nameOverrides: 2.81.2 + responseFormat: 0.0.2 + webhooks: 1.0.0 generatedFiles: - - CodatSyncPayroll/Companies.cs - - CodatSyncPayroll/Connections.cs - - CodatSyncPayroll/Accounts.cs - - CodatSyncPayroll/JournalEntries.cs - - CodatSyncPayroll/Journals.cs - - CodatSyncPayroll/ManageData.cs - - CodatSyncPayroll/CompanyInfo.cs - - CodatSyncPayroll/TrackingCategories.cs - - CodatSyncPayroll/CodatSyncPayroll.cs - - CodatSyncPayroll/Utils/BigIntSerializer.cs - - CodatSyncPayroll/Utils/DecimalSerializer.cs - - CodatSyncPayroll/Utils/EnumSerializer.cs - - CodatSyncPayroll/Utils/FlexibleObjectDeserializer.cs - - CodatSyncPayroll/Utils/HeaderSerializer.cs - - CodatSyncPayroll/Utils/IsoDateTimeSerializer.cs - - CodatSyncPayroll/Utils/RequestBodySerializer.cs - - CodatSyncPayroll/Utils/SecuritySerializer.cs - - CodatSyncPayroll/Utils/SpeakeasyHttpClient.cs - - CodatSyncPayroll/Utils/SpeakeasyMetadata.cs - - CodatSyncPayroll/Utils/URLBuilder.cs - - CodatSyncPayroll/Utils/Utilities.cs - - CodatSyncPayroll/CodatSyncPayroll.csproj - - CodatSyncPayroll.sln - - CodatSyncPayroll/Models/Operations/CreateCompanyResponse.cs - - CodatSyncPayroll/Models/Operations/DeleteCompanyRequest.cs - - CodatSyncPayroll/Models/Operations/DeleteCompanyResponse.cs - - CodatSyncPayroll/Models/Operations/GetCompanyRequest.cs - - CodatSyncPayroll/Models/Operations/GetCompanyResponse.cs - - CodatSyncPayroll/Models/Operations/ListCompaniesRequest.cs - - CodatSyncPayroll/Models/Operations/ListCompaniesResponse.cs - - CodatSyncPayroll/Models/Operations/UpdateCompanyRequest.cs - - CodatSyncPayroll/Models/Operations/UpdateCompanyResponse.cs - - CodatSyncPayroll/Models/Operations/CreateConnectionRequestBody.cs - - CodatSyncPayroll/Models/Operations/CreateConnectionRequest.cs - - CodatSyncPayroll/Models/Operations/CreateConnectionResponse.cs - - CodatSyncPayroll/Models/Operations/DeleteConnectionRequest.cs - - CodatSyncPayroll/Models/Operations/DeleteConnectionResponse.cs - - CodatSyncPayroll/Models/Operations/GetConnectionRequest.cs - - CodatSyncPayroll/Models/Operations/GetConnectionResponse.cs - - CodatSyncPayroll/Models/Operations/ListConnectionsRequest.cs - - CodatSyncPayroll/Models/Operations/ListConnectionsResponse.cs - - CodatSyncPayroll/Models/Operations/UnlinkConnectionUpdateConnection.cs - - CodatSyncPayroll/Models/Operations/UnlinkConnectionRequest.cs - - CodatSyncPayroll/Models/Operations/UnlinkConnectionResponse.cs - - CodatSyncPayroll/Models/Operations/CreateAccountRequest.cs - - CodatSyncPayroll/Models/Operations/CreateAccountResponse.cs - - CodatSyncPayroll/Models/Operations/GetAccountRequest.cs - - CodatSyncPayroll/Models/Operations/GetAccountResponse.cs - - CodatSyncPayroll/Models/Operations/GetCreateAccountsModelRequest.cs - - CodatSyncPayroll/Models/Operations/GetCreateAccountsModelResponse.cs - - CodatSyncPayroll/Models/Operations/ListAccountsRequest.cs - - CodatSyncPayroll/Models/Operations/ListAccountsResponse.cs - - CodatSyncPayroll/Models/Operations/CreateJournalEntryRequest.cs - - CodatSyncPayroll/Models/Operations/CreateJournalEntryResponse.cs - - CodatSyncPayroll/Models/Operations/DeleteJournalEntryRequest.cs - - CodatSyncPayroll/Models/Operations/DeleteJournalEntryResponse.cs - - CodatSyncPayroll/Models/Operations/GetJournalEntryRequest.cs - - CodatSyncPayroll/Models/Operations/GetJournalEntryResponse.cs - - CodatSyncPayroll/Models/Operations/GetCreateJournalEntryModelRequest.cs - - CodatSyncPayroll/Models/Operations/GetCreateJournalEntryModelResponse.cs - - CodatSyncPayroll/Models/Operations/ListJournalEntriesRequest.cs - - CodatSyncPayroll/Models/Operations/ListJournalEntriesResponse.cs - - CodatSyncPayroll/Models/Operations/CreateJournalRequest.cs - - CodatSyncPayroll/Models/Operations/CreateJournalResponse.cs - - CodatSyncPayroll/Models/Operations/GetJournalRequest.cs - - CodatSyncPayroll/Models/Operations/GetJournalResponse.cs - - CodatSyncPayroll/Models/Operations/GetCreateJournalModelRequest.cs - - CodatSyncPayroll/Models/Operations/GetCreateJournalModelResponse.cs - - CodatSyncPayroll/Models/Operations/ListJournalsRequest.cs - - CodatSyncPayroll/Models/Operations/ListJournalsResponse.cs - - CodatSyncPayroll/Models/Operations/GetDataStatusRequest.cs - - CodatSyncPayroll/Models/Operations/GetDataStatusResponse.cs - - CodatSyncPayroll/Models/Operations/GetPullOperationRequest.cs - - CodatSyncPayroll/Models/Operations/GetPullOperationResponse.cs - - CodatSyncPayroll/Models/Operations/GetPushOperationRequest.cs - - CodatSyncPayroll/Models/Operations/GetPushOperationResponse.cs - - CodatSyncPayroll/Models/Operations/ListPushOperationsRequest.cs - - CodatSyncPayroll/Models/Operations/ListPushOperationsResponse.cs - - CodatSyncPayroll/Models/Operations/ListPullOperationsRequest.cs - - CodatSyncPayroll/Models/Operations/ListPullOperationsResponse.cs - - CodatSyncPayroll/Models/Operations/RefreshAllDataTypesRequest.cs - - CodatSyncPayroll/Models/Operations/RefreshAllDataTypesResponse.cs - - CodatSyncPayroll/Models/Operations/RefreshDataTypeRequest.cs - - CodatSyncPayroll/Models/Operations/RefreshDataTypeResponse.cs - - CodatSyncPayroll/Models/Operations/GetAccountingProfileRequest.cs - - CodatSyncPayroll/Models/Operations/GetAccountingProfileResponse.cs - - CodatSyncPayroll/Models/Operations/GetTrackingCategoryRequest.cs - - CodatSyncPayroll/Models/Operations/GetTrackingCategoryResponse.cs - - CodatSyncPayroll/Models/Operations/ListTrackingCategoriesRequest.cs - - CodatSyncPayroll/Models/Operations/ListTrackingCategoriesResponse.cs - - CodatSyncPayroll/Models/Shared/ErrorMessage.cs - - CodatSyncPayroll/Models/Shared/ErrorValidation.cs - - CodatSyncPayroll/Models/Shared/ErrorValidationItem.cs - - CodatSyncPayroll/Models/Shared/GroupReference.cs - - CodatSyncPayroll/Models/Shared/Company.cs - - CodatSyncPayroll/Models/Shared/SourceType.cs - - CodatSyncPayroll/Models/Shared/Connection.cs - - CodatSyncPayroll/Models/Shared/DataConnectionStatus.cs - - CodatSyncPayroll/Models/Shared/DataConnectionError.cs - - CodatSyncPayroll/Models/Shared/CompanyRequestBody.cs - - CodatSyncPayroll/Models/Shared/Items.cs - - CodatSyncPayroll/Models/Shared/Companies.cs - - CodatSyncPayroll/Models/Shared/Links.cs - - CodatSyncPayroll/Models/Shared/HalRef.cs - - CodatSyncPayroll/Models/Shared/Connections.cs - - CodatSyncPayroll/Models/Shared/CreateAccountResponseMetadata.cs - - CodatSyncPayroll/Models/Shared/CreateAccountResponseValidDataTypeLinks.cs - - CodatSyncPayroll/Models/Shared/AccountingAccount.cs - - CodatSyncPayroll/Models/Shared/CreateAccountResponse.cs - - CodatSyncPayroll/Models/Shared/Validation.cs - - CodatSyncPayroll/Models/Shared/ValidationItem.cs - - CodatSyncPayroll/Models/Shared/PushOperationStatus.cs - - CodatSyncPayroll/Models/Shared/DataType.cs - - CodatSyncPayroll/Models/Shared/AccountType.cs - - CodatSyncPayroll/Models/Shared/SupplementalData.cs - - CodatSyncPayroll/Models/Shared/AccountStatus.cs - - CodatSyncPayroll/Models/Shared/PushOperationChange.cs - - CodatSyncPayroll/Models/Shared/PushChangeType.cs - - CodatSyncPayroll/Models/Shared/PushOperationRef.cs - - CodatSyncPayroll/Models/Shared/ValidDataTypeLinks.cs - - CodatSyncPayroll/Models/Shared/AccountPrototype.cs - - CodatSyncPayroll/Models/Shared/AccountMetadata.cs - - CodatSyncPayroll/Models/Shared/AccountValidDataTypeLinks.cs - - CodatSyncPayroll/Models/Shared/Account.cs - - CodatSyncPayroll/Models/Shared/PushOption.cs - - CodatSyncPayroll/Models/Shared/PushValidationInfo.cs - - CodatSyncPayroll/Models/Shared/PushFieldValidation.cs - - CodatSyncPayroll/Models/Shared/PushOptionType.cs - - CodatSyncPayroll/Models/Shared/PushOptionProperty.cs - - CodatSyncPayroll/Models/Shared/PushOptionChoice.cs - - CodatSyncPayroll/Models/Shared/Accounts.cs - - CodatSyncPayroll/Models/Shared/AccountingJournalEntry.cs - - CodatSyncPayroll/Models/Shared/CreateJournalEntryResponse.cs - - CodatSyncPayroll/Models/Shared/JournalEntryRecordRefDataType.cs - - CodatSyncPayroll/Models/Shared/JournalEntryRecordRef.cs - - CodatSyncPayroll/Models/Shared/Metadata.cs - - CodatSyncPayroll/Models/Shared/JournalRef.cs - - CodatSyncPayroll/Models/Shared/Tracking.cs - - CodatSyncPayroll/Models/Shared/JournalLine.cs - - CodatSyncPayroll/Models/Shared/TrackingRecordRefDataType.cs - - CodatSyncPayroll/Models/Shared/TrackingRecordRef.cs - - CodatSyncPayroll/Models/Shared/AccountRef.cs - - CodatSyncPayroll/Models/Shared/JournalEntry.cs - - CodatSyncPayroll/Models/Shared/PushOperation.cs - - CodatSyncPayroll/Models/Shared/JournalEntries.cs - - CodatSyncPayroll/Models/Shared/AccountingJournal.cs - - CodatSyncPayroll/Models/Shared/CreateJournalResponse.cs - - CodatSyncPayroll/Models/Shared/JournalStatus.cs - - CodatSyncPayroll/Models/Shared/JournalPrototype.cs - - CodatSyncPayroll/Models/Shared/Journal.cs - - CodatSyncPayroll/Models/Shared/Journals.cs - - CodatSyncPayroll/Models/Shared/DataTypes.cs - - CodatSyncPayroll/Models/Shared/DataStatus.cs - - CodatSyncPayroll/Models/Shared/PullOperationStatus.cs - - CodatSyncPayroll/Models/Shared/PullOperation.cs - - CodatSyncPayroll/Models/Shared/PushOperations.cs - - CodatSyncPayroll/Models/Shared/PullOperations.cs - - CodatSyncPayroll/Models/Shared/SchemaDataType.cs - - CodatSyncPayroll/Models/Shared/CompanyInfo.cs - - CodatSyncPayroll/Models/Shared/Type.cs - - CodatSyncPayroll/Models/Shared/WebLink.cs - - CodatSyncPayroll/Models/Shared/PhoneNumber.cs - - CodatSyncPayroll/Models/Shared/PhoneNumberType.cs - - CodatSyncPayroll/Models/Shared/Address.cs - - CodatSyncPayroll/Models/Shared/AccountingAddressType.cs - - CodatSyncPayroll/Models/Shared/TrackingCategoryTree.cs - - CodatSyncPayroll/Models/Shared/Status.cs - - CodatSyncPayroll/Models/Shared/TrackingCategories.cs - - CodatSyncPayroll/Models/Shared/TrackingCategory.cs - - CodatSyncPayroll/Models/Shared/Security.cs - - CodatSyncPayroll/Models/Shared/ClientRateLimitReachedWebhook.cs - - CodatSyncPayroll/Models/Shared/ClientRateLimitReachedWebhookData.cs - - CodatSyncPayroll/Models/Shared/ClientRateLimitResetWebhook.cs - - CodatSyncPayroll/Models/Shared/ClientRateLimitResetWebhookData.cs - - CodatSyncPayroll/Models/Webhooks/ClientRateLimitReachedResponse.cs - - CodatSyncPayroll/Models/Webhooks/ClientRateLimitResetResponse.cs + - Codat/Sync/Payroll/Companies.cs + - Codat/Sync/Payroll/Connections.cs + - Codat/Sync/Payroll/Accounts.cs + - Codat/Sync/Payroll/JournalEntries.cs + - Codat/Sync/Payroll/Journals.cs + - Codat/Sync/Payroll/ManageData.cs + - Codat/Sync/Payroll/CompanyInfo.cs + - Codat/Sync/Payroll/TrackingCategories.cs + - Codat/Sync/Payroll/CodatSyncPayroll.cs + - global.json + - Codat.Sync.Payroll.sln + - Codat/Sync/Payroll/Utils/AnyDeserializer.cs + - Codat/Sync/Payroll/Utils/BigIntStrConverter.cs + - Codat/Sync/Payroll/Utils/DecimalStrConverter.cs + - Codat/Sync/Payroll/Utils/EnumConverter.cs + - Codat/Sync/Payroll/Utils/FlexibleObjectDeserializer.cs + - Codat/Sync/Payroll/Utils/HeaderSerializer.cs + - Codat/Sync/Payroll/Utils/IsoDateTimeSerializer.cs + - Codat/Sync/Payroll/Utils/RequestBodySerializer.cs + - Codat/Sync/Payroll/Utils/ResponseBodyDeserializer.cs + - Codat/Sync/Payroll/Utils/SecurityMetadata.cs + - Codat/Sync/Payroll/Utils/SpeakeasyHttpClient.cs + - Codat/Sync/Payroll/Utils/SpeakeasyMetadata.cs + - Codat/Sync/Payroll/Utils/URLBuilder.cs + - Codat/Sync/Payroll/Utils/Utilities.cs + - Codat/Sync/Payroll/Codat.Sync.Payroll.csproj + - Codat/Sync/Payroll/Models/Errors/SDKException.cs + - Codat/Sync/Payroll/Models/Operations/CreateCompanyResponse.cs + - Codat/Sync/Payroll/Models/Operations/DeleteCompanyRequest.cs + - Codat/Sync/Payroll/Models/Operations/DeleteCompanyResponse.cs + - Codat/Sync/Payroll/Models/Operations/GetCompanyRequest.cs + - Codat/Sync/Payroll/Models/Operations/GetCompanyResponse.cs + - Codat/Sync/Payroll/Models/Operations/ListCompaniesRequest.cs + - Codat/Sync/Payroll/Models/Operations/ListCompaniesResponse.cs + - Codat/Sync/Payroll/Models/Operations/UpdateCompanyRequest.cs + - Codat/Sync/Payroll/Models/Operations/UpdateCompanyResponse.cs + - Codat/Sync/Payroll/Models/Operations/CreateConnectionRequestBody.cs + - Codat/Sync/Payroll/Models/Operations/CreateConnectionRequest.cs + - Codat/Sync/Payroll/Models/Operations/CreateConnectionResponse.cs + - Codat/Sync/Payroll/Models/Operations/DeleteConnectionRequest.cs + - Codat/Sync/Payroll/Models/Operations/DeleteConnectionResponse.cs + - Codat/Sync/Payroll/Models/Operations/GetConnectionRequest.cs + - Codat/Sync/Payroll/Models/Operations/GetConnectionResponse.cs + - Codat/Sync/Payroll/Models/Operations/ListConnectionsRequest.cs + - Codat/Sync/Payroll/Models/Operations/ListConnectionsResponse.cs + - Codat/Sync/Payroll/Models/Operations/UnlinkConnectionUpdateConnection.cs + - Codat/Sync/Payroll/Models/Operations/UnlinkConnectionRequest.cs + - Codat/Sync/Payroll/Models/Operations/UnlinkConnectionResponse.cs + - Codat/Sync/Payroll/Models/Operations/CreateAccountRequest.cs + - Codat/Sync/Payroll/Models/Operations/CreateAccountResponse.cs + - Codat/Sync/Payroll/Models/Operations/GetAccountRequest.cs + - Codat/Sync/Payroll/Models/Operations/GetAccountResponse.cs + - Codat/Sync/Payroll/Models/Operations/GetCreateAccountsModelRequest.cs + - Codat/Sync/Payroll/Models/Operations/GetCreateAccountsModelResponse.cs + - Codat/Sync/Payroll/Models/Operations/ListAccountsRequest.cs + - Codat/Sync/Payroll/Models/Operations/ListAccountsResponse.cs + - Codat/Sync/Payroll/Models/Operations/CreateJournalEntryRequest.cs + - Codat/Sync/Payroll/Models/Operations/CreateJournalEntryResponse.cs + - Codat/Sync/Payroll/Models/Operations/DeleteJournalEntryRequest.cs + - Codat/Sync/Payroll/Models/Operations/DeleteJournalEntryResponse.cs + - Codat/Sync/Payroll/Models/Operations/GetJournalEntryRequest.cs + - Codat/Sync/Payroll/Models/Operations/GetJournalEntryResponse.cs + - Codat/Sync/Payroll/Models/Operations/GetCreateJournalEntryModelRequest.cs + - Codat/Sync/Payroll/Models/Operations/GetCreateJournalEntryModelResponse.cs + - Codat/Sync/Payroll/Models/Operations/ListJournalEntriesRequest.cs + - Codat/Sync/Payroll/Models/Operations/ListJournalEntriesResponse.cs + - Codat/Sync/Payroll/Models/Operations/CreateJournalRequest.cs + - Codat/Sync/Payroll/Models/Operations/CreateJournalResponse.cs + - Codat/Sync/Payroll/Models/Operations/GetJournalRequest.cs + - Codat/Sync/Payroll/Models/Operations/GetJournalResponse.cs + - Codat/Sync/Payroll/Models/Operations/GetCreateJournalModelRequest.cs + - Codat/Sync/Payroll/Models/Operations/GetCreateJournalModelResponse.cs + - Codat/Sync/Payroll/Models/Operations/ListJournalsRequest.cs + - Codat/Sync/Payroll/Models/Operations/ListJournalsResponse.cs + - Codat/Sync/Payroll/Models/Operations/GetDataStatusRequest.cs + - Codat/Sync/Payroll/Models/Operations/GetDataStatusDataStatuses.cs + - Codat/Sync/Payroll/Models/Operations/GetDataStatusResponse.cs + - Codat/Sync/Payroll/Models/Operations/GetPullOperationRequest.cs + - Codat/Sync/Payroll/Models/Operations/GetPullOperationResponse.cs + - Codat/Sync/Payroll/Models/Operations/GetPushOperationRequest.cs + - Codat/Sync/Payroll/Models/Operations/GetPushOperationResponse.cs + - Codat/Sync/Payroll/Models/Operations/ListPushOperationsRequest.cs + - Codat/Sync/Payroll/Models/Operations/ListPushOperationsResponse.cs + - Codat/Sync/Payroll/Models/Operations/ListPullOperationsRequest.cs + - Codat/Sync/Payroll/Models/Operations/ListPullOperationsResponse.cs + - Codat/Sync/Payroll/Models/Operations/RefreshAllDataTypesRequest.cs + - Codat/Sync/Payroll/Models/Operations/RefreshAllDataTypesResponse.cs + - Codat/Sync/Payroll/Models/Operations/RefreshDataTypeRequest.cs + - Codat/Sync/Payroll/Models/Operations/RefreshDataTypeResponse.cs + - Codat/Sync/Payroll/Models/Operations/GetAccountingProfileRequest.cs + - Codat/Sync/Payroll/Models/Operations/GetAccountingProfileResponse.cs + - Codat/Sync/Payroll/Models/Operations/GetTrackingCategoryRequest.cs + - Codat/Sync/Payroll/Models/Operations/GetTrackingCategoryResponse.cs + - Codat/Sync/Payroll/Models/Operations/ListTrackingCategoriesRequest.cs + - Codat/Sync/Payroll/Models/Operations/ListTrackingCategoriesResponse.cs + - Codat/Sync/Payroll/Models/Shared/GroupReference.cs + - Codat/Sync/Payroll/Models/Shared/Company.cs + - Codat/Sync/Payroll/Models/Shared/SourceType.cs + - Codat/Sync/Payroll/Models/Shared/Connection.cs + - Codat/Sync/Payroll/Models/Shared/DataConnectionStatus.cs + - Codat/Sync/Payroll/Models/Shared/DataConnectionError.cs + - Codat/Sync/Payroll/Models/Shared/ErrorValidation.cs + - Codat/Sync/Payroll/Models/Shared/ErrorValidationItem.cs + - Codat/Sync/Payroll/Models/Shared/CompanyRequestBody.cs + - Codat/Sync/Payroll/Models/Shared/Items.cs + - Codat/Sync/Payroll/Models/Shared/Companies.cs + - Codat/Sync/Payroll/Models/Shared/Links.cs + - Codat/Sync/Payroll/Models/Shared/HalRef.cs + - Codat/Sync/Payroll/Models/Shared/Connections.cs + - Codat/Sync/Payroll/Models/Shared/CreateAccountResponseMetadata.cs + - Codat/Sync/Payroll/Models/Shared/CreateAccountResponseValidDataTypeLinks.cs + - Codat/Sync/Payroll/Models/Shared/AccountingAccount.cs + - Codat/Sync/Payroll/Models/Shared/CreateAccountResponse.cs + - Codat/Sync/Payroll/Models/Shared/Validation.cs + - Codat/Sync/Payroll/Models/Shared/ValidationItem.cs + - Codat/Sync/Payroll/Models/Shared/PushOperationStatus.cs + - Codat/Sync/Payroll/Models/Shared/DataType.cs + - Codat/Sync/Payroll/Models/Shared/AccountType.cs + - Codat/Sync/Payroll/Models/Shared/SupplementalData.cs + - Codat/Sync/Payroll/Models/Shared/AccountStatus.cs + - Codat/Sync/Payroll/Models/Shared/PushOperationChange.cs + - Codat/Sync/Payroll/Models/Shared/PushChangeType.cs + - Codat/Sync/Payroll/Models/Shared/PushOperationRef.cs + - Codat/Sync/Payroll/Models/Shared/ValidDataTypeLinks.cs + - Codat/Sync/Payroll/Models/Shared/AccountPrototype.cs + - Codat/Sync/Payroll/Models/Shared/AccountMetadata.cs + - Codat/Sync/Payroll/Models/Shared/AccountValidDataTypeLinks.cs + - Codat/Sync/Payroll/Models/Shared/Account.cs + - Codat/Sync/Payroll/Models/Shared/PushOption.cs + - Codat/Sync/Payroll/Models/Shared/PushValidationInfo.cs + - Codat/Sync/Payroll/Models/Shared/PushFieldValidation.cs + - Codat/Sync/Payroll/Models/Shared/PushOptionType.cs + - Codat/Sync/Payroll/Models/Shared/PushOptionProperty.cs + - Codat/Sync/Payroll/Models/Shared/PushOptionChoice.cs + - Codat/Sync/Payroll/Models/Shared/Accounts.cs + - Codat/Sync/Payroll/Models/Shared/AccountingJournalEntry.cs + - Codat/Sync/Payroll/Models/Shared/CreateJournalEntryResponse.cs + - Codat/Sync/Payroll/Models/Shared/JournalEntryRecordRefDataType.cs + - Codat/Sync/Payroll/Models/Shared/JournalEntryRecordRef.cs + - Codat/Sync/Payroll/Models/Shared/Metadata.cs + - Codat/Sync/Payroll/Models/Shared/JournalRef.cs + - Codat/Sync/Payroll/Models/Shared/Tracking.cs + - Codat/Sync/Payroll/Models/Shared/JournalLine.cs + - Codat/Sync/Payroll/Models/Shared/TrackingRecordRefDataType.cs + - Codat/Sync/Payroll/Models/Shared/TrackingRecordRef.cs + - Codat/Sync/Payroll/Models/Shared/AccountRef.cs + - Codat/Sync/Payroll/Models/Shared/JournalEntry.cs + - Codat/Sync/Payroll/Models/Shared/PushOperation.cs + - Codat/Sync/Payroll/Models/Shared/JournalEntries.cs + - Codat/Sync/Payroll/Models/Shared/AccountingJournal.cs + - Codat/Sync/Payroll/Models/Shared/CreateJournalResponse.cs + - Codat/Sync/Payroll/Models/Shared/JournalStatus.cs + - Codat/Sync/Payroll/Models/Shared/JournalPrototype.cs + - Codat/Sync/Payroll/Models/Shared/Journal.cs + - Codat/Sync/Payroll/Models/Shared/Journals.cs + - Codat/Sync/Payroll/Models/Shared/DataTypes.cs + - Codat/Sync/Payroll/Models/Shared/DataStatus.cs + - Codat/Sync/Payroll/Models/Shared/PropertieStatus.cs + - Codat/Sync/Payroll/Models/Shared/DatasetStatus.cs + - Codat/Sync/Payroll/Models/Shared/PullOperation.cs + - Codat/Sync/Payroll/Models/Shared/PushOperations.cs + - Codat/Sync/Payroll/Models/Shared/PullOperations.cs + - Codat/Sync/Payroll/Models/Shared/SchemaDataType.cs + - Codat/Sync/Payroll/Models/Shared/CompanyInfo.cs + - Codat/Sync/Payroll/Models/Shared/Type.cs + - Codat/Sync/Payroll/Models/Shared/WebLink.cs + - Codat/Sync/Payroll/Models/Shared/PhoneNumber.cs + - Codat/Sync/Payroll/Models/Shared/PhoneNumberType.cs + - Codat/Sync/Payroll/Models/Shared/Address.cs + - Codat/Sync/Payroll/Models/Shared/AccountingAddressType.cs + - Codat/Sync/Payroll/Models/Shared/TrackingCategoryTree.cs + - Codat/Sync/Payroll/Models/Shared/Status.cs + - Codat/Sync/Payroll/Models/Shared/TrackingCategories.cs + - Codat/Sync/Payroll/Models/Shared/TrackingCategory.cs + - Codat/Sync/Payroll/Models/Shared/Security.cs + - Codat/Sync/Payroll/Models/Shared/ClientRateLimitReachedWebhook.cs + - Codat/Sync/Payroll/Models/Shared/ClientRateLimitReachedWebhookData.cs + - Codat/Sync/Payroll/Models/Shared/ClientRateLimitResetWebhook.cs + - Codat/Sync/Payroll/Models/Shared/ClientRateLimitResetWebhookData.cs + - Codat/Sync/Payroll/Models/Errors/ErrorMessage.cs + - Codat/Sync/Payroll/Models/Webhooks/ClientRateLimitReachedResponse.cs + - Codat/Sync/Payroll/Models/Webhooks/ClientRateLimitResetResponse.cs - docs/Models/Operations/CreateCompanyResponse.md - docs/Models/Operations/DeleteCompanyRequest.md - docs/Models/Operations/DeleteCompanyResponse.md @@ -244,6 +254,7 @@ generatedFiles: - docs/Models/Operations/ListJournalsRequest.md - docs/Models/Operations/ListJournalsResponse.md - docs/Models/Operations/GetDataStatusRequest.md + - docs/Models/Operations/GetDataStatusDataStatuses.md - docs/Models/Operations/GetDataStatusResponse.md - docs/Models/Operations/GetPullOperationRequest.md - docs/Models/Operations/GetPullOperationResponse.md @@ -263,15 +274,14 @@ generatedFiles: - docs/Models/Operations/GetTrackingCategoryResponse.md - docs/Models/Operations/ListTrackingCategoriesRequest.md - docs/Models/Operations/ListTrackingCategoriesResponse.md - - docs/Models/Shared/ErrorMessage.md - - docs/Models/Shared/ErrorValidation.md - - docs/Models/Shared/ErrorValidationItem.md - docs/Models/Shared/GroupReference.md - docs/Models/Shared/Company.md - docs/Models/Shared/SourceType.md - docs/Models/Shared/Connection.md - docs/Models/Shared/DataConnectionStatus.md - docs/Models/Shared/DataConnectionError.md + - docs/Models/Shared/ErrorValidation.md + - docs/Models/Shared/ErrorValidationItem.md - docs/Models/Shared/CompanyRequestBody.md - docs/Models/Shared/Items.md - docs/Models/Shared/Companies.md @@ -326,7 +336,8 @@ generatedFiles: - docs/Models/Shared/Journals.md - docs/Models/Shared/DataTypes.md - docs/Models/Shared/DataStatus.md - - docs/Models/Shared/PullOperationStatus.md + - docs/Models/Shared/PropertieStatus.md + - docs/Models/Shared/DatasetStatus.md - docs/Models/Shared/PullOperation.md - docs/Models/Shared/PushOperations.md - docs/Models/Shared/PullOperations.md @@ -347,6 +358,7 @@ generatedFiles: - docs/Models/Shared/ClientRateLimitReachedWebhookData.md - docs/Models/Shared/ClientRateLimitResetWebhook.md - docs/Models/Shared/ClientRateLimitResetWebhookData.md + - docs/Models/Errors/ErrorMessage.md - docs/Models/Webhooks/ClientRateLimitReachedResponse.md - docs/Models/Webhooks/ClientRateLimitResetResponse.md - docs/sdks/codatsyncpayroll/README.md @@ -360,3 +372,5 @@ generatedFiles: - docs/sdks/trackingcategories/README.md - USAGE.md - .gitattributes + - Codat/Sync/Payroll/Hooks/SDKHooks.cs + - Codat/Sync/Payroll/Hooks/HookTypes.cs diff --git a/sync-for-payroll/CodatSyncPayroll.sln b/sync-for-payroll/Codat.Sync.Payroll.sln similarity index 87% rename from sync-for-payroll/CodatSyncPayroll.sln rename to sync-for-payroll/Codat.Sync.Payroll.sln index 178ed4af4..02a74b608 100644 --- a/sync-for-payroll/CodatSyncPayroll.sln +++ b/sync-for-payroll/Codat.Sync.Payroll.sln @@ -1,6 +1,6 @@ Microsoft Visual Studio Solution File, Format Version 12.00 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Codat.Sync.Payroll", "CodatSyncPayroll\CodatSyncPayroll.csproj", "{F0CE92B5-F3CC-45A2-AA83-118C38724EB1}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Codat.Sync.Payroll", "Codat\Sync\Payroll\Codat.Sync.Payroll.csproj", "{F0CE92B5-F3CC-45A2-AA83-118C38724EB1}" EndProject Global diff --git a/sync-for-payroll/Codat/Sync/Payroll/Accounts.cs b/sync-for-payroll/Codat/Sync/Payroll/Accounts.cs new file mode 100644 index 000000000..7bb36a8fc --- /dev/null +++ b/sync-for-payroll/Codat/Sync/Payroll/Accounts.cs @@ -0,0 +1,482 @@ + +//------------------------------------------------------------------------------ +// +// This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// +// Changes to this file may cause incorrect behavior and will be lost when +// the code is regenerated. +// +//------------------------------------------------------------------------------ +#nullable enable +namespace Codat.Sync.Payroll +{ + using Codat.Sync.Payroll.Hooks; + using Codat.Sync.Payroll.Models.Errors; + using Codat.Sync.Payroll.Models.Operations; + using Codat.Sync.Payroll.Models.Shared; + using Codat.Sync.Payroll.Utils; + using Newtonsoft.Json; + using System.Collections.Generic; + using System.Net.Http.Headers; + using System.Net.Http; + using System.Threading.Tasks; + using System; + + /// + /// Get, create, and update Accounts. + /// + public interface IAccounts + { + + /// + /// Create account + /// + /// + /// The *Create account* endpoint creates a new account for a given company's connection.
+ ///
+ /// Accounts are the categories a business uses to record accounting transactions.
+ ///
+ /// **Integration-specific behaviour**
+ ///
+ /// Required data may vary by integration. To see what data to post, first call Get create account model.
+ ///
+ /// Check out our coverage explorer for integrations that support creating an account.
+ /// + ///
+ ///
+ Task CreateAsync(CreateAccountRequest request); + + /// + /// Get account + /// + /// + /// The *Get account* endpoint returns a single account for a given `accountId`.
+ ///
+ /// Accounts are the categories a business uses to record accounting transactions.
+ ///
+ /// Check out our coverage explorer for integrations that support getting a specific account.
+ ///
+ /// Before using this endpoint, you must have retrieved data for the company.
+ /// + ///
+ ///
+ Task GetAsync(GetAccountRequest request); + + /// + /// Get create account model + /// + /// + /// The *Get create account model* endpoint returns the expected data for the request payload when creating an account for a given company and integration.
+ ///
+ /// Accounts are the categories a business uses to record accounting transactions.
+ ///
+ /// **Integration-specific behaviour**
+ ///
+ /// See the *response examples* for integration-specific indicative models.
+ ///
+ /// Check out our coverage explorer for integrations that support creating an account.
+ /// + ///
+ ///
+ Task GetCreateModelAsync(GetCreateAccountsModelRequest request); + + /// + /// List accounts + /// + /// + /// The *List accounts* endpoint returns a list of accounts for a given company's connection.
+ ///
+ /// Accounts are the categories a business uses to record accounting transactions.
+ ///
+ /// Before using this endpoint, you must have retrieved data for the company. + ///
+ ///
+ Task ListAsync(ListAccountsRequest request); + } + + /// + /// Get, create, and update Accounts. + /// + public class Accounts: IAccounts + { + public SDKConfig SDKConfiguration { get; private set; } + private const string _language = "csharp"; + private const string _sdkVersion = "3.1.0"; + private const string _sdkGenVersion = "2.319.7"; + private const string _openapiDocVersion = "3.0.0"; + private const string _userAgent = "speakeasy-sdk/csharp 3.1.0 2.319.7 3.0.0 Codat.Sync.Payroll"; + private string _serverUrl = ""; + private ISpeakeasyHttpClient _defaultClient; + private Func? _securitySource; + + public Accounts(ISpeakeasyHttpClient defaultClient, Func? securitySource, string serverUrl, SDKConfig config) + { + _defaultClient = defaultClient; + _securitySource = securitySource; + _serverUrl = serverUrl; + SDKConfiguration = config; + } + + public async Task CreateAsync(CreateAccountRequest request) + { + string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl(); + var urlString = URLBuilder.Build(baseUrl, "/companies/{companyId}/connections/{connectionId}/push/accounts", request); + + var httpRequest = new HttpRequestMessage(HttpMethod.Post, urlString); + httpRequest.Headers.Add("user-agent", _userAgent); + + var serializedBody = RequestBodySerializer.Serialize(request, "AccountPrototype", "json", false, true); + if (serializedBody != null) + { + httpRequest.Content = serializedBody; + } + + if (_securitySource != null) + { + httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest); + } + + var hookCtx = new HookContext("create-account", null, _securitySource); + + httpRequest = await this.SDKConfiguration.hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest); + HttpResponseMessage httpResponse; + try + { + httpResponse = await _defaultClient.SendAsync(httpRequest); + int _statusCode = (int)httpResponse.StatusCode; + + if (_statusCode == 400 || _statusCode == 401 || _statusCode == 402 || _statusCode == 403 || _statusCode == 404 || _statusCode == 429 || _statusCode >= 400 && _statusCode < 500 || _statusCode == 500 || _statusCode == 503 || _statusCode >= 500 && _statusCode < 600) + { + var _httpResponse = await this.SDKConfiguration.hooks.AfterErrorAsync(new AfterErrorContext(hookCtx), httpResponse, null); + if (_httpResponse != null) + { + httpResponse = _httpResponse; + } + } + } + catch (Exception error) + { + var _httpResponse = await this.SDKConfiguration.hooks.AfterErrorAsync(new AfterErrorContext(hookCtx), null, error); + if (_httpResponse != null) + { + httpResponse = _httpResponse; + } + else + { + throw; + } + } + + httpResponse = await this.SDKConfiguration.hooks.AfterSuccessAsync(new AfterSuccessContext(hookCtx), httpResponse); + + var contentType = httpResponse.Content.Headers.ContentType?.MediaType; + int responseStatusCode = (int)httpResponse.StatusCode; + if(responseStatusCode == 200) + { + if(Utilities.IsContentTypeMatch("application/json", contentType)) + { + var obj = ResponseBodyDeserializer.Deserialize(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore); + var response = new Models.Operations.CreateAccountResponse() + { + StatusCode = responseStatusCode, + ContentType = contentType, + RawResponse = httpResponse + }; + response.CreateAccountResponseValue = obj; + return response; + } + else + { + throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + } + else if(new List{400, 401, 402, 403, 404, 429, 500, 503}.Contains(responseStatusCode)) + { + if(Utilities.IsContentTypeMatch("application/json", contentType)) + { + var obj = ResponseBodyDeserializer.Deserialize(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore); + throw obj!; + } + else + { + throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + } + else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600) + { + throw new SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + else + { + throw new SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + } + + public async Task GetAsync(GetAccountRequest request) + { + string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl(); + var urlString = URLBuilder.Build(baseUrl, "/companies/{companyId}/data/accounts/{accountId}", request); + + var httpRequest = new HttpRequestMessage(HttpMethod.Get, urlString); + httpRequest.Headers.Add("user-agent", _userAgent); + + if (_securitySource != null) + { + httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest); + } + + var hookCtx = new HookContext("get-account", null, _securitySource); + + httpRequest = await this.SDKConfiguration.hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest); + HttpResponseMessage httpResponse; + try + { + httpResponse = await _defaultClient.SendAsync(httpRequest); + int _statusCode = (int)httpResponse.StatusCode; + + if (_statusCode == 401 || _statusCode == 402 || _statusCode == 403 || _statusCode == 404 || _statusCode == 409 || _statusCode == 429 || _statusCode >= 400 && _statusCode < 500 || _statusCode == 500 || _statusCode == 503 || _statusCode >= 500 && _statusCode < 600) + { + var _httpResponse = await this.SDKConfiguration.hooks.AfterErrorAsync(new AfterErrorContext(hookCtx), httpResponse, null); + if (_httpResponse != null) + { + httpResponse = _httpResponse; + } + } + } + catch (Exception error) + { + var _httpResponse = await this.SDKConfiguration.hooks.AfterErrorAsync(new AfterErrorContext(hookCtx), null, error); + if (_httpResponse != null) + { + httpResponse = _httpResponse; + } + else + { + throw; + } + } + + httpResponse = await this.SDKConfiguration.hooks.AfterSuccessAsync(new AfterSuccessContext(hookCtx), httpResponse); + + var contentType = httpResponse.Content.Headers.ContentType?.MediaType; + int responseStatusCode = (int)httpResponse.StatusCode; + if(responseStatusCode == 200) + { + if(Utilities.IsContentTypeMatch("application/json", contentType)) + { + var obj = ResponseBodyDeserializer.Deserialize(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore); + var response = new GetAccountResponse() + { + StatusCode = responseStatusCode, + ContentType = contentType, + RawResponse = httpResponse + }; + response.Account = obj; + return response; + } + else + { + throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + } + else if(new List{401, 402, 403, 404, 409, 429, 500, 503}.Contains(responseStatusCode)) + { + if(Utilities.IsContentTypeMatch("application/json", contentType)) + { + var obj = ResponseBodyDeserializer.Deserialize(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore); + throw obj!; + } + else + { + throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + } + else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600) + { + throw new SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + else + { + throw new SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + } + + public async Task GetCreateModelAsync(GetCreateAccountsModelRequest request) + { + string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl(); + var urlString = URLBuilder.Build(baseUrl, "/companies/{companyId}/connections/{connectionId}/options/chartOfAccounts", request); + + var httpRequest = new HttpRequestMessage(HttpMethod.Get, urlString); + httpRequest.Headers.Add("user-agent", _userAgent); + + if (_securitySource != null) + { + httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest); + } + + var hookCtx = new HookContext("get-create-accounts-model", null, _securitySource); + + httpRequest = await this.SDKConfiguration.hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest); + HttpResponseMessage httpResponse; + try + { + httpResponse = await _defaultClient.SendAsync(httpRequest); + int _statusCode = (int)httpResponse.StatusCode; + + if (_statusCode == 401 || _statusCode == 402 || _statusCode == 403 || _statusCode == 404 || _statusCode == 429 || _statusCode >= 400 && _statusCode < 500 || _statusCode == 500 || _statusCode == 503 || _statusCode >= 500 && _statusCode < 600) + { + var _httpResponse = await this.SDKConfiguration.hooks.AfterErrorAsync(new AfterErrorContext(hookCtx), httpResponse, null); + if (_httpResponse != null) + { + httpResponse = _httpResponse; + } + } + } + catch (Exception error) + { + var _httpResponse = await this.SDKConfiguration.hooks.AfterErrorAsync(new AfterErrorContext(hookCtx), null, error); + if (_httpResponse != null) + { + httpResponse = _httpResponse; + } + else + { + throw; + } + } + + httpResponse = await this.SDKConfiguration.hooks.AfterSuccessAsync(new AfterSuccessContext(hookCtx), httpResponse); + + var contentType = httpResponse.Content.Headers.ContentType?.MediaType; + int responseStatusCode = (int)httpResponse.StatusCode; + if(responseStatusCode == 200) + { + if(Utilities.IsContentTypeMatch("application/json", contentType)) + { + var obj = ResponseBodyDeserializer.Deserialize(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore); + var response = new GetCreateAccountsModelResponse() + { + StatusCode = responseStatusCode, + ContentType = contentType, + RawResponse = httpResponse + }; + response.PushOption = obj; + return response; + } + else + { + throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + } + else if(new List{401, 402, 403, 404, 429, 500, 503}.Contains(responseStatusCode)) + { + if(Utilities.IsContentTypeMatch("application/json", contentType)) + { + var obj = ResponseBodyDeserializer.Deserialize(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore); + throw obj!; + } + else + { + throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + } + else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600) + { + throw new SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + else + { + throw new SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + } + + public async Task ListAsync(ListAccountsRequest request) + { + string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl(); + var urlString = URLBuilder.Build(baseUrl, "/companies/{companyId}/data/accounts", request); + + var httpRequest = new HttpRequestMessage(HttpMethod.Get, urlString); + httpRequest.Headers.Add("user-agent", _userAgent); + + if (_securitySource != null) + { + httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest); + } + + var hookCtx = new HookContext("list-accounts", null, _securitySource); + + httpRequest = await this.SDKConfiguration.hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest); + HttpResponseMessage httpResponse; + try + { + httpResponse = await _defaultClient.SendAsync(httpRequest); + int _statusCode = (int)httpResponse.StatusCode; + + if (_statusCode == 400 || _statusCode == 401 || _statusCode == 402 || _statusCode == 403 || _statusCode == 404 || _statusCode == 409 || _statusCode == 429 || _statusCode >= 400 && _statusCode < 500 || _statusCode == 500 || _statusCode == 503 || _statusCode >= 500 && _statusCode < 600) + { + var _httpResponse = await this.SDKConfiguration.hooks.AfterErrorAsync(new AfterErrorContext(hookCtx), httpResponse, null); + if (_httpResponse != null) + { + httpResponse = _httpResponse; + } + } + } + catch (Exception error) + { + var _httpResponse = await this.SDKConfiguration.hooks.AfterErrorAsync(new AfterErrorContext(hookCtx), null, error); + if (_httpResponse != null) + { + httpResponse = _httpResponse; + } + else + { + throw; + } + } + + httpResponse = await this.SDKConfiguration.hooks.AfterSuccessAsync(new AfterSuccessContext(hookCtx), httpResponse); + + var contentType = httpResponse.Content.Headers.ContentType?.MediaType; + int responseStatusCode = (int)httpResponse.StatusCode; + if(responseStatusCode == 200) + { + if(Utilities.IsContentTypeMatch("application/json", contentType)) + { + var obj = ResponseBodyDeserializer.Deserialize(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore); + var response = new ListAccountsResponse() + { + StatusCode = responseStatusCode, + ContentType = contentType, + RawResponse = httpResponse + }; + response.Accounts = obj; + return response; + } + else + { + throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + } + else if(new List{400, 401, 402, 403, 404, 409, 429, 500, 503}.Contains(responseStatusCode)) + { + if(Utilities.IsContentTypeMatch("application/json", contentType)) + { + var obj = ResponseBodyDeserializer.Deserialize(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore); + throw obj!; + } + else + { + throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + } + else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600) + { + throw new SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + else + { + throw new SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + } + } +} \ No newline at end of file diff --git a/sync-for-payroll/CodatSyncPayroll/CodatSyncPayroll.csproj b/sync-for-payroll/Codat/Sync/Payroll/Codat.Sync.Payroll.csproj similarity index 96% rename from sync-for-payroll/CodatSyncPayroll/CodatSyncPayroll.csproj rename to sync-for-payroll/Codat/Sync/Payroll/Codat.Sync.Payroll.csproj index a82f23113..1e6d8880f 100644 --- a/sync-for-payroll/CodatSyncPayroll/CodatSyncPayroll.csproj +++ b/sync-for-payroll/Codat/Sync/Payroll/Codat.Sync.Payroll.csproj @@ -2,7 +2,7 @@ true Codat.Sync.Payroll - 3.0.0 + 3.1.0 Codat net6.0 enable diff --git a/sync-for-payroll/CodatSyncPayroll/CodatSyncPayroll.cs b/sync-for-payroll/Codat/Sync/Payroll/CodatSyncPayroll.cs similarity index 59% rename from sync-for-payroll/CodatSyncPayroll/CodatSyncPayroll.cs rename to sync-for-payroll/Codat/Sync/Payroll/CodatSyncPayroll.cs index e1324311d..14039ff51 100644 --- a/sync-for-payroll/CodatSyncPayroll/CodatSyncPayroll.cs +++ b/sync-for-payroll/Codat/Sync/Payroll/CodatSyncPayroll.cs @@ -10,6 +10,8 @@ #nullable enable namespace Codat.Sync.Payroll { + using Codat.Sync.Payroll.Hooks; + using Codat.Sync.Payroll.Models.Errors; using Codat.Sync.Payroll.Models.Shared; using Codat.Sync.Payroll.Utils; using Newtonsoft.Json; @@ -18,8 +20,6 @@ namespace Codat.Sync.Payroll using System.Threading.Tasks; using System; - - /// /// Sync for Payroll: The API for Sync for Payroll.
/// @@ -31,81 +31,97 @@ namespace Codat.Sync.Payroll ///
/// ---
///
+ /// <!-- Start Codat Tags Table -->
/// ## Endpoints
///
- /// | Endpoints | Description |
- /// |:---------------------|:-----------------------------------------------------------------------------------------------------------|
- /// | Companies | Create and manage your SMB users' companies. |
- /// | Connections | Create new and manage existing data connections for a company. |
- /// | Accounts | Get, create, and update Accounts. |
- /// | Journal entries | Get, create, and update Journal entries. |
- /// | Journals | Get, create, and update Journals. |
- /// | Tracking categories | Get, create, and update Tracking Categories for additional categorization of payroll components. |
- /// | Company info | View company profile from the source platform. |
- /// | Manage data | Control how data is retrieved from an integration. | + /// | Endpoints | Description |
+ /// | :- |:- |
+ /// | Companies | Create and manage your SMB users' companies. |
+ /// | Connections | Create new and manage existing data connections for a company. |
+ /// | Accounts | Get, create, and update Accounts. |
+ /// | Journal entries | Get, create, and update Journal entries. |
+ /// | Journals | Get, create, and update Journals. |
+ /// | Tracking categories | Get, create, and update Tracking Categories for additional categorization of payroll components. |
+ /// | Company info | View company profile from the source platform. |
+ /// | Manage data | Control how data is retrieved from an integration. |
+ /// <!-- End Codat Tags Table --> /// ///
public interface ICodatSyncPayroll { /// - /// Create and manage your Codat companies. + /// Create and manage your SMB users' companies. /// public ICompanies Companies { get; } /// - /// Manage your companies' data connections. + /// Create new and manage existing data connections for a company. /// public IConnections Connections { get; } /// - /// Accounts + /// Get, create, and update Accounts. /// public IAccounts Accounts { get; } /// - /// Journal entries + /// Get, create, and update Journal entries. /// public IJournalEntries JournalEntries { get; } /// - /// Journals + /// Get, create, and update Journals. /// public IJournals Journals { get; } /// - /// Asynchronously retrieve data from an integration to refresh data in Codat. + /// Control how data is retrieved from an integration. /// public IManageData ManageData { get; } /// - /// View company information fetched from the source platform. + /// View company profile from the source platform. /// public ICompanyInfo CompanyInfo { get; } /// - /// Tracking categories + /// Get, create, and update Tracking Categories for additional categorization of payroll components. /// public ITrackingCategories TrackingCategories { get; } } - + public class SDKConfig { - public static string[] ServerList = new string[] - { + /// + /// List of server URLs available to the SDK. + /// + public static readonly string[] ServerList = { "https://api.codat.io", }; - /// Contains the list of servers available to the SDK - public string serverUrl = ""; - public int serverIndex = 0; - public string GetTemplatedServerDetails() + public string ServerUrl = ""; + public int ServerIndex = 0; + public SDKHooks hooks = new SDKHooks(); + + public string GetTemplatedServerUrl() + { + if (!String.IsNullOrEmpty(this.ServerUrl)) + { + return Utilities.TemplateUrl(Utilities.RemoveSuffix(this.ServerUrl, "/"), new Dictionary()); + } + return Utilities.TemplateUrl(SDKConfig.ServerList[this.ServerIndex], new Dictionary()); + } + + public ISpeakeasyHttpClient InitHooks(ISpeakeasyHttpClient client) { - if (!String.IsNullOrEmpty(this.serverUrl)) + string preHooksUrl = GetTemplatedServerUrl(); + var (postHooksUrl, postHooksClient) = this.hooks.SDKInit(preHooksUrl, client); + if (preHooksUrl != postHooksUrl) { - return Utilities.TemplateUrl(Utilities.RemoveSuffix(this.serverUrl, "/"), new Dictionary()); + this.ServerUrl = postHooksUrl; } - return Utilities.TemplateUrl(SDKConfig.ServerList[this.serverIndex], new Dictionary()); + return postHooksClient; } } @@ -120,18 +136,20 @@ public string GetTemplatedServerDetails() ///
/// ---
///
+ /// <!-- Start Codat Tags Table -->
/// ## Endpoints
///
- /// | Endpoints | Description |
- /// |:---------------------|:-----------------------------------------------------------------------------------------------------------|
- /// | Companies | Create and manage your SMB users' companies. |
- /// | Connections | Create new and manage existing data connections for a company. |
- /// | Accounts | Get, create, and update Accounts. |
- /// | Journal entries | Get, create, and update Journal entries. |
- /// | Journals | Get, create, and update Journals. |
- /// | Tracking categories | Get, create, and update Tracking Categories for additional categorization of payroll components. |
- /// | Company info | View company profile from the source platform. |
- /// | Manage data | Control how data is retrieved from an integration. | + /// | Endpoints | Description |
+ /// | :- |:- |
+ /// | Companies | Create and manage your SMB users' companies. |
+ /// | Connections | Create new and manage existing data connections for a company. |
+ /// | Accounts | Get, create, and update Accounts. |
+ /// | Journal entries | Get, create, and update Journal entries. |
+ /// | Journals | Get, create, and update Journals. |
+ /// | Tracking categories | Get, create, and update Tracking Categories for additional categorization of payroll components. |
+ /// | Company info | View company profile from the source platform. |
+ /// | Manage data | Control how data is retrieved from an integration. |
+ /// <!-- End Codat Tags Table --> /// /// public class CodatSyncPayroll: ICodatSyncPayroll @@ -139,10 +157,10 @@ public class CodatSyncPayroll: ICodatSyncPayroll public SDKConfig SDKConfiguration { get; private set; } private const string _language = "csharp"; - private const string _sdkVersion = "3.0.0"; - private const string _sdkGenVersion = "2.257.2"; + private const string _sdkVersion = "3.1.0"; + private const string _sdkGenVersion = "2.319.7"; private const string _openapiDocVersion = "3.0.0"; - private const string _userAgent = "speakeasy-sdk/csharp 3.0.0 2.257.2 3.0.0 Codat.Sync.Payroll"; + private const string _userAgent = "speakeasy-sdk/csharp 3.1.0 2.319.7 3.0.0 Codat.Sync.Payroll"; private string _serverUrl = ""; private int _serverIndex = 0; private ISpeakeasyHttpClient _defaultClient; @@ -160,6 +178,10 @@ public CodatSyncPayroll(Security? security = null, Func? securitySourc { if (serverIndex != null) { + if (serverIndex.Value < 0 || serverIndex.Value >= SDKConfig.ServerList.Length) + { + throw new Exception($"Invalid server index {serverIndex.Value}"); + } _serverIndex = serverIndex.Value; } @@ -182,21 +204,42 @@ public CodatSyncPayroll(Security? security = null, Func? securitySourc { _securitySource = () => security; } + else + { + throw new Exception("security and securitySource cannot both be null"); + } SDKConfiguration = new SDKConfig() { - serverIndex = _serverIndex, - serverUrl = _serverUrl + ServerIndex = _serverIndex, + ServerUrl = _serverUrl }; + _defaultClient = SDKConfiguration.InitHooks(_defaultClient); + + Companies = new Companies(_defaultClient, _securitySource, _serverUrl, SDKConfiguration); + + Connections = new Connections(_defaultClient, _securitySource, _serverUrl, SDKConfiguration); + + Accounts = new Accounts(_defaultClient, _securitySource, _serverUrl, SDKConfiguration); + + JournalEntries = new JournalEntries(_defaultClient, _securitySource, _serverUrl, SDKConfiguration); + + Journals = new Journals(_defaultClient, _securitySource, _serverUrl, SDKConfiguration); + + ManageData = new ManageData(_defaultClient, _securitySource, _serverUrl, SDKConfiguration); + + CompanyInfo = new CompanyInfo(_defaultClient, _securitySource, _serverUrl, SDKConfiguration); + + TrackingCategories = new TrackingCategories(_defaultClient, _securitySource, _serverUrl, SDKConfiguration); } } -} +} \ No newline at end of file diff --git a/sync-for-payroll/Codat/Sync/Payroll/Companies.cs b/sync-for-payroll/Codat/Sync/Payroll/Companies.cs new file mode 100644 index 000000000..0eda32af0 --- /dev/null +++ b/sync-for-payroll/Codat/Sync/Payroll/Companies.cs @@ -0,0 +1,568 @@ + +//------------------------------------------------------------------------------ +// +// This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// +// Changes to this file may cause incorrect behavior and will be lost when +// the code is regenerated. +// +//------------------------------------------------------------------------------ +#nullable enable +namespace Codat.Sync.Payroll +{ + using Codat.Sync.Payroll.Hooks; + using Codat.Sync.Payroll.Models.Errors; + using Codat.Sync.Payroll.Models.Operations; + using Codat.Sync.Payroll.Models.Shared; + using Codat.Sync.Payroll.Utils; + using Newtonsoft.Json; + using System.Collections.Generic; + using System.Net.Http.Headers; + using System.Net.Http; + using System.Threading.Tasks; + using System; + + /// + /// Create and manage your SMB users' companies. + /// + public interface ICompanies + { + + /// + /// Create company + /// + /// + /// Use the *Create company* endpoint to create a new company that represents your customer in Codat.
+ ///
+ /// A company represents a business sharing access to their data.
+ /// Each company can have multiple connections to different data sources, such as one connection to Xero for accounting data, two connections to Plaid for two bank accounts, and a connection to Zettle for POS data.
+ ///
+ /// If forbidden characters (see `name` pattern) are present in the request, a company will be created with the forbidden characters removed. For example, `Company (Codat[1])` with be created as `Company Codat1`. + ///
+ ///
+ Task CreateAsync(CompanyRequestBody? request = null); + + /// + /// Delete a company + /// + /// + /// The *Delete company* endpoint permanently deletes a company, its connections and any cached data. This operation is irreversible.
+ ///
+ /// A company represents a business sharing access to their data.
+ /// Each company can have multiple connections to different data sources, such as one connection to Xero for accounting data, two connections to Plaid for two bank accounts, and a connection to Zettle for POS data.
+ /// + ///
+ ///
+ Task DeleteAsync(DeleteCompanyRequest request); + + /// + /// Get company + /// + /// + /// The *Get company* endpoint returns a single company for a given `companyId`.
+ ///
+ /// A company represents a business sharing access to their data.
+ /// Each company can have multiple connections to different data sources, such as one connection to Xero for accounting data, two connections to Plaid for two bank accounts, and a connection to Zettle for POS data.
+ /// + ///
+ ///
+ Task GetAsync(GetCompanyRequest request); + + /// + /// List companies + /// + /// + /// The *List companies* endpoint returns a list of [companies] associated to your instances.
+ ///
+ /// A company represents a business sharing access to their data.
+ /// Each company can have multiple connections to different data sources, such as one connection to Xero for accounting data, two connections to Plaid for two bank accounts, and a connection to Zettle for POS data. + ///
+ ///
+ Task ListAsync(ListCompaniesRequest request); + + /// + /// Update company + /// + /// + /// Use the *Update company* endpoint to update both the name and description of the company.
+ /// If you use groups to manage a set of companies, use the Add company or Remove company endpoints to add or remove a company from a group.
+ ///
+ /// A company represents a business sharing access to their data.
+ /// Each company can have multiple connections to different data sources, such as one connection to Xero for accounting data, two connections to Plaid for two bank accounts, and a connection to Zettle for POS data. + ///
+ ///
+ Task UpdateAsync(UpdateCompanyRequest request); + } + + /// + /// Create and manage your SMB users' companies. + /// + public class Companies: ICompanies + { + public SDKConfig SDKConfiguration { get; private set; } + private const string _language = "csharp"; + private const string _sdkVersion = "3.1.0"; + private const string _sdkGenVersion = "2.319.7"; + private const string _openapiDocVersion = "3.0.0"; + private const string _userAgent = "speakeasy-sdk/csharp 3.1.0 2.319.7 3.0.0 Codat.Sync.Payroll"; + private string _serverUrl = ""; + private ISpeakeasyHttpClient _defaultClient; + private Func? _securitySource; + + public Companies(ISpeakeasyHttpClient defaultClient, Func? securitySource, string serverUrl, SDKConfig config) + { + _defaultClient = defaultClient; + _securitySource = securitySource; + _serverUrl = serverUrl; + SDKConfiguration = config; + } + + public async Task CreateAsync(CompanyRequestBody? request = null) + { + string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl(); + + var urlString = baseUrl + "/companies"; + + var httpRequest = new HttpRequestMessage(HttpMethod.Post, urlString); + httpRequest.Headers.Add("user-agent", _userAgent); + + var serializedBody = RequestBodySerializer.Serialize(request, "Request", "json", false, true); + if (serializedBody != null) + { + httpRequest.Content = serializedBody; + } + + if (_securitySource != null) + { + httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest); + } + + var hookCtx = new HookContext("create-company", null, _securitySource); + + httpRequest = await this.SDKConfiguration.hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest); + HttpResponseMessage httpResponse; + try + { + httpResponse = await _defaultClient.SendAsync(httpRequest); + int _statusCode = (int)httpResponse.StatusCode; + + if (_statusCode == 400 || _statusCode == 401 || _statusCode == 402 || _statusCode == 403 || _statusCode == 429 || _statusCode >= 400 && _statusCode < 500 || _statusCode == 500 || _statusCode == 503 || _statusCode >= 500 && _statusCode < 600) + { + var _httpResponse = await this.SDKConfiguration.hooks.AfterErrorAsync(new AfterErrorContext(hookCtx), httpResponse, null); + if (_httpResponse != null) + { + httpResponse = _httpResponse; + } + } + } + catch (Exception error) + { + var _httpResponse = await this.SDKConfiguration.hooks.AfterErrorAsync(new AfterErrorContext(hookCtx), null, error); + if (_httpResponse != null) + { + httpResponse = _httpResponse; + } + else + { + throw; + } + } + + httpResponse = await this.SDKConfiguration.hooks.AfterSuccessAsync(new AfterSuccessContext(hookCtx), httpResponse); + + var contentType = httpResponse.Content.Headers.ContentType?.MediaType; + int responseStatusCode = (int)httpResponse.StatusCode; + if(responseStatusCode == 200) + { + if(Utilities.IsContentTypeMatch("application/json", contentType)) + { + var obj = ResponseBodyDeserializer.Deserialize(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Include); + var response = new CreateCompanyResponse() + { + StatusCode = responseStatusCode, + ContentType = contentType, + RawResponse = httpResponse + }; + response.Company = obj; + return response; + } + else + { + throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + } + else if(new List{400, 401, 402, 403, 429, 500, 503}.Contains(responseStatusCode)) + { + if(Utilities.IsContentTypeMatch("application/json", contentType)) + { + var obj = ResponseBodyDeserializer.Deserialize(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Include); + throw obj!; + } + else + { + throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + } + else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600) + { + throw new SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + else + { + throw new SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + } + + public async Task DeleteAsync(DeleteCompanyRequest request) + { + string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl(); + var urlString = URLBuilder.Build(baseUrl, "/companies/{companyId}", request); + + var httpRequest = new HttpRequestMessage(HttpMethod.Delete, urlString); + httpRequest.Headers.Add("user-agent", _userAgent); + + if (_securitySource != null) + { + httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest); + } + + var hookCtx = new HookContext("delete-company", null, _securitySource); + + httpRequest = await this.SDKConfiguration.hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest); + HttpResponseMessage httpResponse; + try + { + httpResponse = await _defaultClient.SendAsync(httpRequest); + int _statusCode = (int)httpResponse.StatusCode; + + if (_statusCode == 401 || _statusCode == 402 || _statusCode == 403 || _statusCode == 404 || _statusCode == 429 || _statusCode >= 400 && _statusCode < 500 || _statusCode == 500 || _statusCode == 503 || _statusCode >= 500 && _statusCode < 600) + { + var _httpResponse = await this.SDKConfiguration.hooks.AfterErrorAsync(new AfterErrorContext(hookCtx), httpResponse, null); + if (_httpResponse != null) + { + httpResponse = _httpResponse; + } + } + } + catch (Exception error) + { + var _httpResponse = await this.SDKConfiguration.hooks.AfterErrorAsync(new AfterErrorContext(hookCtx), null, error); + if (_httpResponse != null) + { + httpResponse = _httpResponse; + } + else + { + throw; + } + } + + httpResponse = await this.SDKConfiguration.hooks.AfterSuccessAsync(new AfterSuccessContext(hookCtx), httpResponse); + + var contentType = httpResponse.Content.Headers.ContentType?.MediaType; + int responseStatusCode = (int)httpResponse.StatusCode; + if(responseStatusCode == 204) + { + return new DeleteCompanyResponse() + { + StatusCode = responseStatusCode, + ContentType = contentType, + RawResponse = httpResponse + };; + } + else if(new List{401, 402, 403, 404, 429, 500, 503}.Contains(responseStatusCode)) + { + if(Utilities.IsContentTypeMatch("application/json", contentType)) + { + var obj = ResponseBodyDeserializer.Deserialize(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore); + throw obj!; + } + else + { + throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + } + else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600) + { + throw new SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + else + { + throw new SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + } + + public async Task GetAsync(GetCompanyRequest request) + { + string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl(); + var urlString = URLBuilder.Build(baseUrl, "/companies/{companyId}", request); + + var httpRequest = new HttpRequestMessage(HttpMethod.Get, urlString); + httpRequest.Headers.Add("user-agent", _userAgent); + + if (_securitySource != null) + { + httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest); + } + + var hookCtx = new HookContext("get-company", null, _securitySource); + + httpRequest = await this.SDKConfiguration.hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest); + HttpResponseMessage httpResponse; + try + { + httpResponse = await _defaultClient.SendAsync(httpRequest); + int _statusCode = (int)httpResponse.StatusCode; + + if (_statusCode == 401 || _statusCode == 402 || _statusCode == 403 || _statusCode == 404 || _statusCode == 429 || _statusCode >= 400 && _statusCode < 500 || _statusCode == 500 || _statusCode == 503 || _statusCode >= 500 && _statusCode < 600) + { + var _httpResponse = await this.SDKConfiguration.hooks.AfterErrorAsync(new AfterErrorContext(hookCtx), httpResponse, null); + if (_httpResponse != null) + { + httpResponse = _httpResponse; + } + } + } + catch (Exception error) + { + var _httpResponse = await this.SDKConfiguration.hooks.AfterErrorAsync(new AfterErrorContext(hookCtx), null, error); + if (_httpResponse != null) + { + httpResponse = _httpResponse; + } + else + { + throw; + } + } + + httpResponse = await this.SDKConfiguration.hooks.AfterSuccessAsync(new AfterSuccessContext(hookCtx), httpResponse); + + var contentType = httpResponse.Content.Headers.ContentType?.MediaType; + int responseStatusCode = (int)httpResponse.StatusCode; + if(responseStatusCode == 200) + { + if(Utilities.IsContentTypeMatch("application/json", contentType)) + { + var obj = ResponseBodyDeserializer.Deserialize(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore); + var response = new GetCompanyResponse() + { + StatusCode = responseStatusCode, + ContentType = contentType, + RawResponse = httpResponse + }; + response.Company = obj; + return response; + } + else + { + throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + } + else if(new List{401, 402, 403, 404, 429, 500, 503}.Contains(responseStatusCode)) + { + if(Utilities.IsContentTypeMatch("application/json", contentType)) + { + var obj = ResponseBodyDeserializer.Deserialize(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore); + throw obj!; + } + else + { + throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + } + else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600) + { + throw new SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + else + { + throw new SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + } + + public async Task ListAsync(ListCompaniesRequest request) + { + string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl(); + var urlString = URLBuilder.Build(baseUrl, "/companies", request); + + var httpRequest = new HttpRequestMessage(HttpMethod.Get, urlString); + httpRequest.Headers.Add("user-agent", _userAgent); + + if (_securitySource != null) + { + httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest); + } + + var hookCtx = new HookContext("list-companies", null, _securitySource); + + httpRequest = await this.SDKConfiguration.hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest); + HttpResponseMessage httpResponse; + try + { + httpResponse = await _defaultClient.SendAsync(httpRequest); + int _statusCode = (int)httpResponse.StatusCode; + + if (_statusCode == 400 || _statusCode == 401 || _statusCode == 402 || _statusCode == 403 || _statusCode == 404 || _statusCode == 429 || _statusCode >= 400 && _statusCode < 500 || _statusCode == 500 || _statusCode == 503 || _statusCode >= 500 && _statusCode < 600) + { + var _httpResponse = await this.SDKConfiguration.hooks.AfterErrorAsync(new AfterErrorContext(hookCtx), httpResponse, null); + if (_httpResponse != null) + { + httpResponse = _httpResponse; + } + } + } + catch (Exception error) + { + var _httpResponse = await this.SDKConfiguration.hooks.AfterErrorAsync(new AfterErrorContext(hookCtx), null, error); + if (_httpResponse != null) + { + httpResponse = _httpResponse; + } + else + { + throw; + } + } + + httpResponse = await this.SDKConfiguration.hooks.AfterSuccessAsync(new AfterSuccessContext(hookCtx), httpResponse); + + var contentType = httpResponse.Content.Headers.ContentType?.MediaType; + int responseStatusCode = (int)httpResponse.StatusCode; + if(responseStatusCode == 200) + { + if(Utilities.IsContentTypeMatch("application/json", contentType)) + { + var obj = ResponseBodyDeserializer.Deserialize(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore); + var response = new ListCompaniesResponse() + { + StatusCode = responseStatusCode, + ContentType = contentType, + RawResponse = httpResponse + }; + response.Companies = obj; + return response; + } + else + { + throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + } + else if(new List{400, 401, 402, 403, 404, 429, 500, 503}.Contains(responseStatusCode)) + { + if(Utilities.IsContentTypeMatch("application/json", contentType)) + { + var obj = ResponseBodyDeserializer.Deserialize(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore); + throw obj!; + } + else + { + throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + } + else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600) + { + throw new SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + else + { + throw new SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + } + + public async Task UpdateAsync(UpdateCompanyRequest request) + { + string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl(); + var urlString = URLBuilder.Build(baseUrl, "/companies/{companyId}", request); + + var httpRequest = new HttpRequestMessage(HttpMethod.Put, urlString); + httpRequest.Headers.Add("user-agent", _userAgent); + + var serializedBody = RequestBodySerializer.Serialize(request, "CompanyRequestBody", "json", false, true); + if (serializedBody != null) + { + httpRequest.Content = serializedBody; + } + + if (_securitySource != null) + { + httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest); + } + + var hookCtx = new HookContext("update-company", null, _securitySource); + + httpRequest = await this.SDKConfiguration.hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest); + HttpResponseMessage httpResponse; + try + { + httpResponse = await _defaultClient.SendAsync(httpRequest); + int _statusCode = (int)httpResponse.StatusCode; + + if (_statusCode == 401 || _statusCode == 402 || _statusCode == 403 || _statusCode == 404 || _statusCode == 429 || _statusCode >= 400 && _statusCode < 500 || _statusCode == 500 || _statusCode == 503 || _statusCode >= 500 && _statusCode < 600) + { + var _httpResponse = await this.SDKConfiguration.hooks.AfterErrorAsync(new AfterErrorContext(hookCtx), httpResponse, null); + if (_httpResponse != null) + { + httpResponse = _httpResponse; + } + } + } + catch (Exception error) + { + var _httpResponse = await this.SDKConfiguration.hooks.AfterErrorAsync(new AfterErrorContext(hookCtx), null, error); + if (_httpResponse != null) + { + httpResponse = _httpResponse; + } + else + { + throw; + } + } + + httpResponse = await this.SDKConfiguration.hooks.AfterSuccessAsync(new AfterSuccessContext(hookCtx), httpResponse); + + var contentType = httpResponse.Content.Headers.ContentType?.MediaType; + int responseStatusCode = (int)httpResponse.StatusCode; + if(responseStatusCode == 200) + { + if(Utilities.IsContentTypeMatch("application/json", contentType)) + { + var obj = ResponseBodyDeserializer.Deserialize(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore); + var response = new UpdateCompanyResponse() + { + StatusCode = responseStatusCode, + ContentType = contentType, + RawResponse = httpResponse + }; + response.Company = obj; + return response; + } + else + { + throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + } + else if(new List{401, 402, 403, 404, 429, 500, 503}.Contains(responseStatusCode)) + { + if(Utilities.IsContentTypeMatch("application/json", contentType)) + { + var obj = ResponseBodyDeserializer.Deserialize(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore); + throw obj!; + } + else + { + throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + } + else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600) + { + throw new SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + else + { + throw new SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + } + } +} \ No newline at end of file diff --git a/sync-for-payroll/Codat/Sync/Payroll/CompanyInfo.cs b/sync-for-payroll/Codat/Sync/Payroll/CompanyInfo.cs new file mode 100644 index 000000000..40abeeb18 --- /dev/null +++ b/sync-for-payroll/Codat/Sync/Payroll/CompanyInfo.cs @@ -0,0 +1,153 @@ + +//------------------------------------------------------------------------------ +// +// This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// +// Changes to this file may cause incorrect behavior and will be lost when +// the code is regenerated. +// +//------------------------------------------------------------------------------ +#nullable enable +namespace Codat.Sync.Payroll +{ + using Codat.Sync.Payroll.Hooks; + using Codat.Sync.Payroll.Models.Errors; + using Codat.Sync.Payroll.Models.Operations; + using Codat.Sync.Payroll.Models.Shared; + using Codat.Sync.Payroll.Utils; + using Newtonsoft.Json; + using System.Collections.Generic; + using System.Net.Http.Headers; + using System.Net.Http; + using System.Threading.Tasks; + using System; + + /// + /// View company profile from the source platform. + /// + public interface ICompanyInfo + { + + /// + /// Get company accounting profile + /// + /// + /// Gets the latest basic info for a company. + /// + /// + Task GetAccountingProfileAsync(GetAccountingProfileRequest request); + } + + /// + /// View company profile from the source platform. + /// + public class CompanyInfo: ICompanyInfo + { + public SDKConfig SDKConfiguration { get; private set; } + private const string _language = "csharp"; + private const string _sdkVersion = "3.1.0"; + private const string _sdkGenVersion = "2.319.7"; + private const string _openapiDocVersion = "3.0.0"; + private const string _userAgent = "speakeasy-sdk/csharp 3.1.0 2.319.7 3.0.0 Codat.Sync.Payroll"; + private string _serverUrl = ""; + private ISpeakeasyHttpClient _defaultClient; + private Func? _securitySource; + + public CompanyInfo(ISpeakeasyHttpClient defaultClient, Func? securitySource, string serverUrl, SDKConfig config) + { + _defaultClient = defaultClient; + _securitySource = securitySource; + _serverUrl = serverUrl; + SDKConfiguration = config; + } + + public async Task GetAccountingProfileAsync(GetAccountingProfileRequest request) + { + string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl(); + var urlString = URLBuilder.Build(baseUrl, "/companies/{companyId}/data/info", request); + + var httpRequest = new HttpRequestMessage(HttpMethod.Get, urlString); + httpRequest.Headers.Add("user-agent", _userAgent); + + if (_securitySource != null) + { + httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest); + } + + var hookCtx = new HookContext("get-accounting-profile", null, _securitySource); + + httpRequest = await this.SDKConfiguration.hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest); + HttpResponseMessage httpResponse; + try + { + httpResponse = await _defaultClient.SendAsync(httpRequest); + int _statusCode = (int)httpResponse.StatusCode; + + if (_statusCode == 401 || _statusCode == 402 || _statusCode == 403 || _statusCode == 404 || _statusCode == 409 || _statusCode == 429 || _statusCode >= 400 && _statusCode < 500 || _statusCode == 500 || _statusCode == 503 || _statusCode >= 500 && _statusCode < 600) + { + var _httpResponse = await this.SDKConfiguration.hooks.AfterErrorAsync(new AfterErrorContext(hookCtx), httpResponse, null); + if (_httpResponse != null) + { + httpResponse = _httpResponse; + } + } + } + catch (Exception error) + { + var _httpResponse = await this.SDKConfiguration.hooks.AfterErrorAsync(new AfterErrorContext(hookCtx), null, error); + if (_httpResponse != null) + { + httpResponse = _httpResponse; + } + else + { + throw; + } + } + + httpResponse = await this.SDKConfiguration.hooks.AfterSuccessAsync(new AfterSuccessContext(hookCtx), httpResponse); + + var contentType = httpResponse.Content.Headers.ContentType?.MediaType; + int responseStatusCode = (int)httpResponse.StatusCode; + if(responseStatusCode == 200) + { + if(Utilities.IsContentTypeMatch("application/json", contentType)) + { + var obj = ResponseBodyDeserializer.Deserialize(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore); + var response = new GetAccountingProfileResponse() + { + StatusCode = responseStatusCode, + ContentType = contentType, + RawResponse = httpResponse + }; + response.CompanyInfo = obj; + return response; + } + else + { + throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + } + else if(new List{401, 402, 403, 404, 409, 429, 500, 503}.Contains(responseStatusCode)) + { + if(Utilities.IsContentTypeMatch("application/json", contentType)) + { + var obj = ResponseBodyDeserializer.Deserialize(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore); + throw obj!; + } + else + { + throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + } + else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600) + { + throw new SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + else + { + throw new SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + } + } +} \ No newline at end of file diff --git a/sync-for-payroll/Codat/Sync/Payroll/Connections.cs b/sync-for-payroll/Codat/Sync/Payroll/Connections.cs new file mode 100644 index 000000000..c452508f2 --- /dev/null +++ b/sync-for-payroll/Codat/Sync/Payroll/Connections.cs @@ -0,0 +1,550 @@ + +//------------------------------------------------------------------------------ +// +// This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// +// Changes to this file may cause incorrect behavior and will be lost when +// the code is regenerated. +// +//------------------------------------------------------------------------------ +#nullable enable +namespace Codat.Sync.Payroll +{ + using Codat.Sync.Payroll.Hooks; + using Codat.Sync.Payroll.Models.Errors; + using Codat.Sync.Payroll.Models.Operations; + using Codat.Sync.Payroll.Models.Shared; + using Codat.Sync.Payroll.Utils; + using Newtonsoft.Json; + using System.Collections.Generic; + using System.Net.Http.Headers; + using System.Net.Http; + using System.Threading.Tasks; + using System; + + /// + /// Create new and manage existing data connections for a company. + /// + public interface IConnections + { + + /// + /// Create connection + /// + /// + /// Creates a connection for the company by providing a valid `platformKey`.
+ ///
+ /// Use the List Integrations endpoint to access valid platform keys. + ///
+ ///
+ Task CreateAsync(CreateConnectionRequest request); + + /// + /// Delete connection + /// + /// + /// Revoke and remove a connection from a company.
+ /// This operation is not reversible. The end user would need to reauthorize a new data connection if you wish to view new data for this company. + ///
+ ///
+ Task DeleteAsync(DeleteConnectionRequest request); + + /// + /// Get connection + /// + /// + /// Returns a specific connection for a company when valid identifiers are provided. If the identifiers are for a deleted company and/or connection, a not found response is returned. + /// + /// + Task GetAsync(GetConnectionRequest request); + + /// + /// List connections + /// + /// + /// List the connections for a company. + /// + /// + Task ListAsync(ListConnectionsRequest request); + + /// + /// Unlink connection + /// + /// + /// This allows you to deauthorize a connection, without deleting it from Codat. This means you can still view any data that has previously been pulled into Codat, and also lets you re-authorize in future if your customer wishes to resume sharing their data. + /// + /// + Task UnlinkAsync(UnlinkConnectionRequest request); + } + + /// + /// Create new and manage existing data connections for a company. + /// + public class Connections: IConnections + { + public SDKConfig SDKConfiguration { get; private set; } + private const string _language = "csharp"; + private const string _sdkVersion = "3.1.0"; + private const string _sdkGenVersion = "2.319.7"; + private const string _openapiDocVersion = "3.0.0"; + private const string _userAgent = "speakeasy-sdk/csharp 3.1.0 2.319.7 3.0.0 Codat.Sync.Payroll"; + private string _serverUrl = ""; + private ISpeakeasyHttpClient _defaultClient; + private Func? _securitySource; + + public Connections(ISpeakeasyHttpClient defaultClient, Func? securitySource, string serverUrl, SDKConfig config) + { + _defaultClient = defaultClient; + _securitySource = securitySource; + _serverUrl = serverUrl; + SDKConfiguration = config; + } + + public async Task CreateAsync(CreateConnectionRequest request) + { + string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl(); + var urlString = URLBuilder.Build(baseUrl, "/companies/{companyId}/connections", request); + + var httpRequest = new HttpRequestMessage(HttpMethod.Post, urlString); + httpRequest.Headers.Add("user-agent", _userAgent); + + var serializedBody = RequestBodySerializer.Serialize(request, "RequestBody", "json", false, true); + if (serializedBody != null) + { + httpRequest.Content = serializedBody; + } + + if (_securitySource != null) + { + httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest); + } + + var hookCtx = new HookContext("create-connection", null, _securitySource); + + httpRequest = await this.SDKConfiguration.hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest); + HttpResponseMessage httpResponse; + try + { + httpResponse = await _defaultClient.SendAsync(httpRequest); + int _statusCode = (int)httpResponse.StatusCode; + + if (_statusCode == 401 || _statusCode == 402 || _statusCode == 403 || _statusCode == 404 || _statusCode == 429 || _statusCode >= 400 && _statusCode < 500 || _statusCode == 500 || _statusCode == 503 || _statusCode >= 500 && _statusCode < 600) + { + var _httpResponse = await this.SDKConfiguration.hooks.AfterErrorAsync(new AfterErrorContext(hookCtx), httpResponse, null); + if (_httpResponse != null) + { + httpResponse = _httpResponse; + } + } + } + catch (Exception error) + { + var _httpResponse = await this.SDKConfiguration.hooks.AfterErrorAsync(new AfterErrorContext(hookCtx), null, error); + if (_httpResponse != null) + { + httpResponse = _httpResponse; + } + else + { + throw; + } + } + + httpResponse = await this.SDKConfiguration.hooks.AfterSuccessAsync(new AfterSuccessContext(hookCtx), httpResponse); + + var contentType = httpResponse.Content.Headers.ContentType?.MediaType; + int responseStatusCode = (int)httpResponse.StatusCode; + if(responseStatusCode == 200) + { + if(Utilities.IsContentTypeMatch("application/json", contentType)) + { + var obj = ResponseBodyDeserializer.Deserialize(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore); + var response = new CreateConnectionResponse() + { + StatusCode = responseStatusCode, + ContentType = contentType, + RawResponse = httpResponse + }; + response.Connection = obj; + return response; + } + else + { + throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + } + else if(new List{401, 402, 403, 404, 429, 500, 503}.Contains(responseStatusCode)) + { + if(Utilities.IsContentTypeMatch("application/json", contentType)) + { + var obj = ResponseBodyDeserializer.Deserialize(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore); + throw obj!; + } + else + { + throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + } + else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600) + { + throw new SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + else + { + throw new SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + } + + public async Task DeleteAsync(DeleteConnectionRequest request) + { + string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl(); + var urlString = URLBuilder.Build(baseUrl, "/companies/{companyId}/connections/{connectionId}", request); + + var httpRequest = new HttpRequestMessage(HttpMethod.Delete, urlString); + httpRequest.Headers.Add("user-agent", _userAgent); + + if (_securitySource != null) + { + httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest); + } + + var hookCtx = new HookContext("delete-connection", null, _securitySource); + + httpRequest = await this.SDKConfiguration.hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest); + HttpResponseMessage httpResponse; + try + { + httpResponse = await _defaultClient.SendAsync(httpRequest); + int _statusCode = (int)httpResponse.StatusCode; + + if (_statusCode == 401 || _statusCode == 402 || _statusCode == 403 || _statusCode == 404 || _statusCode == 429 || _statusCode >= 400 && _statusCode < 500 || _statusCode == 500 || _statusCode == 503 || _statusCode >= 500 && _statusCode < 600) + { + var _httpResponse = await this.SDKConfiguration.hooks.AfterErrorAsync(new AfterErrorContext(hookCtx), httpResponse, null); + if (_httpResponse != null) + { + httpResponse = _httpResponse; + } + } + } + catch (Exception error) + { + var _httpResponse = await this.SDKConfiguration.hooks.AfterErrorAsync(new AfterErrorContext(hookCtx), null, error); + if (_httpResponse != null) + { + httpResponse = _httpResponse; + } + else + { + throw; + } + } + + httpResponse = await this.SDKConfiguration.hooks.AfterSuccessAsync(new AfterSuccessContext(hookCtx), httpResponse); + + var contentType = httpResponse.Content.Headers.ContentType?.MediaType; + int responseStatusCode = (int)httpResponse.StatusCode; + if(responseStatusCode == 200) + { + return new DeleteConnectionResponse() + { + StatusCode = responseStatusCode, + ContentType = contentType, + RawResponse = httpResponse + };; + } + else if(new List{401, 402, 403, 404, 429, 500, 503}.Contains(responseStatusCode)) + { + if(Utilities.IsContentTypeMatch("application/json", contentType)) + { + var obj = ResponseBodyDeserializer.Deserialize(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore); + throw obj!; + } + else + { + throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + } + else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600) + { + throw new SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + else + { + throw new SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + } + + public async Task GetAsync(GetConnectionRequest request) + { + string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl(); + var urlString = URLBuilder.Build(baseUrl, "/companies/{companyId}/connections/{connectionId}", request); + + var httpRequest = new HttpRequestMessage(HttpMethod.Get, urlString); + httpRequest.Headers.Add("user-agent", _userAgent); + + if (_securitySource != null) + { + httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest); + } + + var hookCtx = new HookContext("get-connection", null, _securitySource); + + httpRequest = await this.SDKConfiguration.hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest); + HttpResponseMessage httpResponse; + try + { + httpResponse = await _defaultClient.SendAsync(httpRequest); + int _statusCode = (int)httpResponse.StatusCode; + + if (_statusCode == 401 || _statusCode == 402 || _statusCode == 403 || _statusCode == 404 || _statusCode == 429 || _statusCode >= 400 && _statusCode < 500 || _statusCode == 500 || _statusCode == 503 || _statusCode >= 500 && _statusCode < 600) + { + var _httpResponse = await this.SDKConfiguration.hooks.AfterErrorAsync(new AfterErrorContext(hookCtx), httpResponse, null); + if (_httpResponse != null) + { + httpResponse = _httpResponse; + } + } + } + catch (Exception error) + { + var _httpResponse = await this.SDKConfiguration.hooks.AfterErrorAsync(new AfterErrorContext(hookCtx), null, error); + if (_httpResponse != null) + { + httpResponse = _httpResponse; + } + else + { + throw; + } + } + + httpResponse = await this.SDKConfiguration.hooks.AfterSuccessAsync(new AfterSuccessContext(hookCtx), httpResponse); + + var contentType = httpResponse.Content.Headers.ContentType?.MediaType; + int responseStatusCode = (int)httpResponse.StatusCode; + if(responseStatusCode == 200) + { + if(Utilities.IsContentTypeMatch("application/json", contentType)) + { + var obj = ResponseBodyDeserializer.Deserialize(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore); + var response = new GetConnectionResponse() + { + StatusCode = responseStatusCode, + ContentType = contentType, + RawResponse = httpResponse + }; + response.Connection = obj; + return response; + } + else + { + throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + } + else if(new List{401, 402, 403, 404, 429, 500, 503}.Contains(responseStatusCode)) + { + if(Utilities.IsContentTypeMatch("application/json", contentType)) + { + var obj = ResponseBodyDeserializer.Deserialize(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore); + throw obj!; + } + else + { + throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + } + else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600) + { + throw new SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + else + { + throw new SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + } + + public async Task ListAsync(ListConnectionsRequest request) + { + string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl(); + var urlString = URLBuilder.Build(baseUrl, "/companies/{companyId}/connections", request); + + var httpRequest = new HttpRequestMessage(HttpMethod.Get, urlString); + httpRequest.Headers.Add("user-agent", _userAgent); + + if (_securitySource != null) + { + httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest); + } + + var hookCtx = new HookContext("list-connections", null, _securitySource); + + httpRequest = await this.SDKConfiguration.hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest); + HttpResponseMessage httpResponse; + try + { + httpResponse = await _defaultClient.SendAsync(httpRequest); + int _statusCode = (int)httpResponse.StatusCode; + + if (_statusCode == 400 || _statusCode == 401 || _statusCode == 402 || _statusCode == 403 || _statusCode == 404 || _statusCode == 429 || _statusCode >= 400 && _statusCode < 500 || _statusCode == 500 || _statusCode == 503 || _statusCode >= 500 && _statusCode < 600) + { + var _httpResponse = await this.SDKConfiguration.hooks.AfterErrorAsync(new AfterErrorContext(hookCtx), httpResponse, null); + if (_httpResponse != null) + { + httpResponse = _httpResponse; + } + } + } + catch (Exception error) + { + var _httpResponse = await this.SDKConfiguration.hooks.AfterErrorAsync(new AfterErrorContext(hookCtx), null, error); + if (_httpResponse != null) + { + httpResponse = _httpResponse; + } + else + { + throw; + } + } + + httpResponse = await this.SDKConfiguration.hooks.AfterSuccessAsync(new AfterSuccessContext(hookCtx), httpResponse); + + var contentType = httpResponse.Content.Headers.ContentType?.MediaType; + int responseStatusCode = (int)httpResponse.StatusCode; + if(responseStatusCode == 200) + { + if(Utilities.IsContentTypeMatch("application/json", contentType)) + { + var obj = ResponseBodyDeserializer.Deserialize(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore); + var response = new ListConnectionsResponse() + { + StatusCode = responseStatusCode, + ContentType = contentType, + RawResponse = httpResponse + }; + response.Connections = obj; + return response; + } + else + { + throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + } + else if(new List{400, 401, 402, 403, 404, 429, 500, 503}.Contains(responseStatusCode)) + { + if(Utilities.IsContentTypeMatch("application/json", contentType)) + { + var obj = ResponseBodyDeserializer.Deserialize(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore); + throw obj!; + } + else + { + throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + } + else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600) + { + throw new SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + else + { + throw new SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + } + + public async Task UnlinkAsync(UnlinkConnectionRequest request) + { + string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl(); + var urlString = URLBuilder.Build(baseUrl, "/companies/{companyId}/connections/{connectionId}", request); + + var httpRequest = new HttpRequestMessage(HttpMethod.Patch, urlString); + httpRequest.Headers.Add("user-agent", _userAgent); + + var serializedBody = RequestBodySerializer.Serialize(request, "RequestBody", "json", false, true); + if (serializedBody != null) + { + httpRequest.Content = serializedBody; + } + + if (_securitySource != null) + { + httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest); + } + + var hookCtx = new HookContext("unlink-connection", null, _securitySource); + + httpRequest = await this.SDKConfiguration.hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest); + HttpResponseMessage httpResponse; + try + { + httpResponse = await _defaultClient.SendAsync(httpRequest); + int _statusCode = (int)httpResponse.StatusCode; + + if (_statusCode == 401 || _statusCode == 402 || _statusCode == 403 || _statusCode == 404 || _statusCode == 429 || _statusCode >= 400 && _statusCode < 500 || _statusCode == 500 || _statusCode == 503 || _statusCode >= 500 && _statusCode < 600) + { + var _httpResponse = await this.SDKConfiguration.hooks.AfterErrorAsync(new AfterErrorContext(hookCtx), httpResponse, null); + if (_httpResponse != null) + { + httpResponse = _httpResponse; + } + } + } + catch (Exception error) + { + var _httpResponse = await this.SDKConfiguration.hooks.AfterErrorAsync(new AfterErrorContext(hookCtx), null, error); + if (_httpResponse != null) + { + httpResponse = _httpResponse; + } + else + { + throw; + } + } + + httpResponse = await this.SDKConfiguration.hooks.AfterSuccessAsync(new AfterSuccessContext(hookCtx), httpResponse); + + var contentType = httpResponse.Content.Headers.ContentType?.MediaType; + int responseStatusCode = (int)httpResponse.StatusCode; + if(responseStatusCode == 200) + { + if(Utilities.IsContentTypeMatch("application/json", contentType)) + { + var obj = ResponseBodyDeserializer.Deserialize(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore); + var response = new UnlinkConnectionResponse() + { + StatusCode = responseStatusCode, + ContentType = contentType, + RawResponse = httpResponse + }; + response.Connection = obj; + return response; + } + else + { + throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + } + else if(new List{401, 402, 403, 404, 429, 500, 503}.Contains(responseStatusCode)) + { + if(Utilities.IsContentTypeMatch("application/json", contentType)) + { + var obj = ResponseBodyDeserializer.Deserialize(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore); + throw obj!; + } + else + { + throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + } + else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600) + { + throw new SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + else + { + throw new SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + } + } +} \ No newline at end of file diff --git a/sync-for-payroll/Codat/Sync/Payroll/Hooks/HookRegistration.cs b/sync-for-payroll/Codat/Sync/Payroll/Hooks/HookRegistration.cs new file mode 100644 index 000000000..6d6d282e1 --- /dev/null +++ b/sync-for-payroll/Codat/Sync/Payroll/Hooks/HookRegistration.cs @@ -0,0 +1,36 @@ + +namespace Codat.Sync.Payroll.Hooks +{ + /// + /// Hook Registration File. + /// + /// + /// This file is only ever generated once on the first generation and then is free to be modified. + /// Any hooks you wish to add should be registered in the InitHooks function. Feel free to define them + /// in this file or in separate files in the Hooks folder. + /// + public static class HookRegistration + { + /// + /// Initializes hooks. + /// + /// + /// Add hooks by calling `Codat.Sync.Payroll.Hooks.Register<HookInterface>(myHook);` + /// where `I<HookInterface>` is one of the following interfaces defined in HookTypes.cs: + /// - ISDKInitHook + /// - IBeforeRequestHook + /// - IAfterSuccess + /// - IAfterError + /// and `myHook` an instance that implements that specific interface. + /// + public static void InitHooks(IHooks hooks) + { + // var myHook = new MyHook(); + + // hooks.RegisterSDKInitHook(myHook); + // hooks.RegisterBeforeRequestHook(myHook); + // hooks.RegisterAfterSuccessHook(myHook); + // hooks.RegisterAfterErrorHook(myHook; + } + } +} \ No newline at end of file diff --git a/sync-for-payroll/Codat/Sync/Payroll/Hooks/HookTypes.cs b/sync-for-payroll/Codat/Sync/Payroll/Hooks/HookTypes.cs new file mode 100644 index 000000000..7fe1351ac --- /dev/null +++ b/sync-for-payroll/Codat/Sync/Payroll/Hooks/HookTypes.cs @@ -0,0 +1,99 @@ + +//------------------------------------------------------------------------------ +// +// This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// +// Changes to this file may cause incorrect behavior and will be lost when +// the code is regenerated. +// +//------------------------------------------------------------------------------ +#nullable enable +namespace Codat.Sync.Payroll.Hooks +{ + using System; + using System.Collections.Generic; + using System.Net.Http; + using System.Threading.Tasks; + using Codat.Sync.Payroll.Utils; + + public class HookContext + { + public string OperationID { get; set; } + public List? Oauth2Scopes { get; set; } + public Func? SecuritySource { get; set; } + + public HookContext(string operationID, List? oauth2Scopes, Func? securitySource) + { + OperationID = operationID; + Oauth2Scopes = oauth2Scopes; + SecuritySource = securitySource; + } + } + + public class BeforeRequestContext : HookContext + { + public BeforeRequestContext(HookContext hookCtx) + : base(hookCtx.OperationID, hookCtx.Oauth2Scopes, hookCtx.SecuritySource) { } + } + + public class AfterSuccessContext : HookContext + { + public AfterSuccessContext(HookContext hookCtx) + : base(hookCtx.OperationID, hookCtx.Oauth2Scopes, hookCtx.SecuritySource) { } + } + + public class AfterErrorContext : HookContext + { + public AfterErrorContext(HookContext hookCtx) + : base(hookCtx.OperationID, hookCtx.Oauth2Scopes, hookCtx.SecuritySource) { } + } + + /// + /// SDKInit hook is called when the SDK is initializing. + /// The hook can modify and return a new baseUrl and HTTP client to be used by the SDK. + /// + public interface ISDKInitHook + { + (string, ISpeakeasyHttpClient) SDKInit(string baseUrl, ISpeakeasyHttpClient client); + } + + /// + /// BeforeRequestAsync hook is called before the SDK sends a request. + /// The hook can modify the request before it is sent or throw an exception to stop the request from being sent. + /// + public interface IBeforeRequestHook + { + Task BeforeRequestAsync(BeforeRequestContext hookCtx, HttpRequestMessage request); + } + + /// + /// AfterSuccessAsync is called after the SDK receives a response. + /// The hook can modify the response before it is handled or throw an exception to stop the response from being handled. + /// + public interface IAfterSuccessHook + { + Task AfterSuccessAsync(AfterSuccessContext hookCtx, HttpResponseMessage response); + } + + /// + /// AfterErrorAsync is called after the SDK encounters an error, or a non-successful response. + /// The hook can modify the response, if available, otherwise modify the error. + /// All hooks are called sequentially. If an error is returned, it will be passed to the subsequent hook implementing IAfterErrorHook. + /// If you want to prevent other AfterError hooks from being run, you can throw an FailEarlyException instead. + /// + public interface IAfterErrorHook + { + Task<(HttpResponseMessage?, Exception?)> AfterErrorAsync(AfterErrorContext hookCtx, HttpResponseMessage? response, Exception? error); + } + + public interface IHooks + { + void RegisterSDKInitHook(ISDKInitHook hook); + + void RegisterBeforeRequestHook(IBeforeRequestHook hook); + + void RegisterAfterSuccessHook(IAfterSuccessHook hook); + + void RegisterAfterErrorHook(IAfterErrorHook hook); + } +} diff --git a/sync-for-payroll/Codat/Sync/Payroll/Hooks/SDKHooks.cs b/sync-for-payroll/Codat/Sync/Payroll/Hooks/SDKHooks.cs new file mode 100644 index 000000000..dd7d55ad2 --- /dev/null +++ b/sync-for-payroll/Codat/Sync/Payroll/Hooks/SDKHooks.cs @@ -0,0 +1,130 @@ + +//------------------------------------------------------------------------------ +// +// This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// +// Changes to this file may cause incorrect behavior and will be lost when +// the code is regenerated. +// +//------------------------------------------------------------------------------ +#nullable enable +namespace Codat.Sync.Payroll.Hooks +{ + using Codat.Sync.Payroll.Utils; + using System; + using System.Collections.Generic; + using System.Net.Http; + using System.Threading.Tasks; + + public sealed class FailEarlyException : Exception {} + + public class SDKHooks: IHooks + { + public List sdkInitHooks; + public List beforeRequestHooks; + public List afterSuccessHooks; + public List afterErrorHooks; + + public SDKHooks() + { + this.sdkInitHooks = new List(); + this.beforeRequestHooks = new List(); + this.afterSuccessHooks = new List(); + this.afterErrorHooks = new List(); + HookRegistration.InitHooks(this); + } + + public void RegisterSDKInitHook(ISDKInitHook hook) + { + this.sdkInitHooks.Add(hook); + } + + public void RegisterBeforeRequestHook(IBeforeRequestHook hook) + { + this.beforeRequestHooks.Add(hook); + } + + public void RegisterAfterSuccessHook(IAfterSuccessHook hook) + { + this.afterSuccessHooks.Add(hook); + } + + public void RegisterAfterErrorHook(IAfterErrorHook hook) + { + this.afterErrorHooks.Add(hook); + } + + public (string, ISpeakeasyHttpClient) SDKInit(string baseUrl, ISpeakeasyHttpClient client) + { + var urlAndClient = (baseUrl, client); + foreach (var hook in this.sdkInitHooks) + { + try + { + urlAndClient = hook.SDKInit(urlAndClient.Item1, urlAndClient.Item2); + } catch (Exception ex) + { + throw new Exception("An error occurred while calling SDKInit hook.", ex); + } + } + return urlAndClient; + } + + public async Task BeforeRequestAsync(BeforeRequestContext hookCtx, HttpRequestMessage request) + { + foreach (var hook in this.beforeRequestHooks) + { + try + { + request = await hook.BeforeRequestAsync(hookCtx, request); + } catch (Exception ex) + { + throw new Exception("An error occurred while calling BeforeRequestAsync hook", ex); + } + } + return request; + } + + public async Task AfterSuccessAsync(AfterSuccessContext hookCtx, HttpResponseMessage response) + { + foreach (var hook in this.afterSuccessHooks) + { + try + { + response = await hook.AfterSuccessAsync(hookCtx, response); + } + catch (Exception ex) + { + throw new Exception("An error occurred while calling AfterSuccessAsync hook.", ex); + } + } + return response; + } + + public async Task AfterErrorAsync(AfterErrorContext hookCtx, HttpResponseMessage? response, Exception? error) + { + + (HttpResponseMessage?, Exception?) responseAndError = (response, error); + foreach (var hook in this.afterErrorHooks) + { + try + { + responseAndError = await hook.AfterErrorAsync(hookCtx, responseAndError.Item1, responseAndError.Item2); + } catch (FailEarlyException) + { + throw; + } catch (Exception ex) + { + throw new Exception("An error occurred while calling AfterErrorAsync hook", ex); + } + } + + if (responseAndError.Item2 != null) + { + throw responseAndError.Item2; + } + + return responseAndError.Item1; + } + } +} \ No newline at end of file diff --git a/sync-for-payroll/Codat/Sync/Payroll/JournalEntries.cs b/sync-for-payroll/Codat/Sync/Payroll/JournalEntries.cs new file mode 100644 index 000000000..8bd745bd4 --- /dev/null +++ b/sync-for-payroll/Codat/Sync/Payroll/JournalEntries.cs @@ -0,0 +1,610 @@ + +//------------------------------------------------------------------------------ +// +// This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// +// Changes to this file may cause incorrect behavior and will be lost when +// the code is regenerated. +// +//------------------------------------------------------------------------------ +#nullable enable +namespace Codat.Sync.Payroll +{ + using Codat.Sync.Payroll.Hooks; + using Codat.Sync.Payroll.Models.Errors; + using Codat.Sync.Payroll.Models.Operations; + using Codat.Sync.Payroll.Models.Shared; + using Codat.Sync.Payroll.Utils; + using Newtonsoft.Json; + using System.Collections.Generic; + using System.Net.Http.Headers; + using System.Net.Http; + using System.Threading.Tasks; + using System; + + /// + /// Get, create, and update Journal entries. + /// + public interface IJournalEntries + { + + /// + /// Create journal entry + /// + /// + /// The *Create journal entry* endpoint creates a new journal entry for a given company's connection.
+ ///
+ /// Journal entries are made in a company's general ledger, or accounts, when transactions are approved.
+ ///
+ /// **Integration-specific behaviour**
+ ///
+ /// Required data may vary by integration. To see what data to post, first call Get create journal entry model.
+ ///
+ /// Check out our coverage explorer for integrations that support creating a journal entry.
+ /// + ///
+ ///
+ Task CreateAsync(CreateJournalEntryRequest request); + + /// + /// Delete journal entry + /// + /// + /// > **Use with caution**
+ /// >
+ /// >Because journal entries underpin every transaction in an accounting platform, deleting a journal entry can affect every transaction for a given company.
+ /// >
+ /// > **Before you proceed, make sure you understand the implications of deleting journal entries from an accounting perspective.**
+ ///
+ /// The *Delete journal entry* endpoint allows you to delete a specified journal entry from an accounting platform.
+ ///
+ /// Journal entries are made in a company's general ledger, or accounts, when transactions are approved.
+ ///
+ /// ### Process
+ /// 1. Pass the `{journalEntryId}` to the *Delete journal entry* endpoint and store the `pushOperationKey` returned.
+ /// 2. Check the status of the delete by checking the status of push operation either via
+ /// 1. Push operation webhook (advised),
+ /// 2. Push operation status endpoint.
+ ///
+ /// A `Success` status indicates that the journal entry object was deleted from the accounting platform.
+ /// 3. (Optional) Check that the journal entry was deleted from the accounting platform.
+ ///
+ /// ### Effect on related objects
+ ///
+ /// Be aware that deleting a journal entry from an accounting platform might cause related objects to be modified. For example, if you delete the journal entry for a paid invoice in QuickBooks Online, the invoice is deleted but the payment against that invoice is not. The payment is converted to a payment on account.
+ ///
+ /// ## Integration specifics
+ /// Integrations that support soft delete do not permanently delete the object in the accounting platform.
+ ///
+ /// | Integration | Soft Deleted |
+ /// |-------------|--------------|
+ /// | QuickBooks Online | Yes |
+ /// + ///
+ ///
+ Task DeleteAsync(DeleteJournalEntryRequest request); + + /// + /// Get journal entry + /// + /// + /// The *Get journal entry* endpoint returns a single journal entry for a given `journalEntryId`.
+ ///
+ /// Journal entries are made in a company's general ledger, or accounts, when transactions are approved.
+ ///
+ /// Check out our coverage explorer for integrations that support getting a specific journal entry.
+ ///
+ /// Before using this endpoint, you must have retrieved data for the company.
+ /// + ///
+ ///
+ Task GetAsync(GetJournalEntryRequest request); + + /// + /// Get create journal entry model + /// + /// + /// The *Get create journal entry model* endpoint returns the expected data for the request payload when creating a journal entry for a given company and integration.
+ ///
+ /// Journal entries are made in a company's general ledger, or accounts, when transactions are approved.
+ ///
+ /// **Integration-specific behaviour**
+ ///
+ /// See the *response examples* for integration-specific indicative models.
+ ///
+ /// Check out our coverage explorer for integrations that support creating a journal entry.
+ /// + ///
+ ///
+ Task GetCreateModelAsync(GetCreateJournalEntryModelRequest request); + + /// + /// List journal entries + /// + /// + /// The *List journal entries* endpoint returns a list of journal entries for a given company's connection.
+ ///
+ /// Journal entries are made in a company's general ledger, or accounts, when transactions are approved.
+ ///
+ /// Before using this endpoint, you must have retrieved data for the company.
+ /// + ///
+ ///
+ Task ListAsync(ListJournalEntriesRequest request); + } + + /// + /// Get, create, and update Journal entries. + /// + public class JournalEntries: IJournalEntries + { + public SDKConfig SDKConfiguration { get; private set; } + private const string _language = "csharp"; + private const string _sdkVersion = "3.1.0"; + private const string _sdkGenVersion = "2.319.7"; + private const string _openapiDocVersion = "3.0.0"; + private const string _userAgent = "speakeasy-sdk/csharp 3.1.0 2.319.7 3.0.0 Codat.Sync.Payroll"; + private string _serverUrl = ""; + private ISpeakeasyHttpClient _defaultClient; + private Func? _securitySource; + + public JournalEntries(ISpeakeasyHttpClient defaultClient, Func? securitySource, string serverUrl, SDKConfig config) + { + _defaultClient = defaultClient; + _securitySource = securitySource; + _serverUrl = serverUrl; + SDKConfiguration = config; + } + + public async Task CreateAsync(CreateJournalEntryRequest request) + { + string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl(); + var urlString = URLBuilder.Build(baseUrl, "/companies/{companyId}/connections/{connectionId}/push/journalEntries", request); + + var httpRequest = new HttpRequestMessage(HttpMethod.Post, urlString); + httpRequest.Headers.Add("user-agent", _userAgent); + + var serializedBody = RequestBodySerializer.Serialize(request, "JournalEntry", "json", true, true); + if (serializedBody != null) + { + httpRequest.Content = serializedBody; + } + + if (_securitySource != null) + { + httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest); + } + + var hookCtx = new HookContext("create-journal-entry", null, _securitySource); + + httpRequest = await this.SDKConfiguration.hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest); + HttpResponseMessage httpResponse; + try + { + httpResponse = await _defaultClient.SendAsync(httpRequest); + int _statusCode = (int)httpResponse.StatusCode; + + if (_statusCode == 400 || _statusCode == 401 || _statusCode == 402 || _statusCode == 403 || _statusCode == 404 || _statusCode == 429 || _statusCode >= 400 && _statusCode < 500 || _statusCode == 500 || _statusCode == 503 || _statusCode >= 500 && _statusCode < 600) + { + var _httpResponse = await this.SDKConfiguration.hooks.AfterErrorAsync(new AfterErrorContext(hookCtx), httpResponse, null); + if (_httpResponse != null) + { + httpResponse = _httpResponse; + } + } + } + catch (Exception error) + { + var _httpResponse = await this.SDKConfiguration.hooks.AfterErrorAsync(new AfterErrorContext(hookCtx), null, error); + if (_httpResponse != null) + { + httpResponse = _httpResponse; + } + else + { + throw; + } + } + + httpResponse = await this.SDKConfiguration.hooks.AfterSuccessAsync(new AfterSuccessContext(hookCtx), httpResponse); + + var contentType = httpResponse.Content.Headers.ContentType?.MediaType; + int responseStatusCode = (int)httpResponse.StatusCode; + if(responseStatusCode == 200) + { + if(Utilities.IsContentTypeMatch("application/json", contentType)) + { + var obj = ResponseBodyDeserializer.Deserialize(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore); + var response = new Models.Operations.CreateJournalEntryResponse() + { + StatusCode = responseStatusCode, + ContentType = contentType, + RawResponse = httpResponse + }; + response.CreateJournalEntryResponseValue = obj; + return response; + } + else + { + throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + } + else if(new List{400, 401, 402, 403, 404, 429, 500, 503}.Contains(responseStatusCode)) + { + if(Utilities.IsContentTypeMatch("application/json", contentType)) + { + var obj = ResponseBodyDeserializer.Deserialize(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore); + throw obj!; + } + else + { + throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + } + else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600) + { + throw new SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + else + { + throw new SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + } + + public async Task DeleteAsync(DeleteJournalEntryRequest request) + { + string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl(); + var urlString = URLBuilder.Build(baseUrl, "/companies/{companyId}/connections/{connectionId}/push/journalEntries/{journalEntryId}", request); + + var httpRequest = new HttpRequestMessage(HttpMethod.Delete, urlString); + httpRequest.Headers.Add("user-agent", _userAgent); + + if (_securitySource != null) + { + httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest); + } + + var hookCtx = new HookContext("delete-journal-entry", null, _securitySource); + + httpRequest = await this.SDKConfiguration.hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest); + HttpResponseMessage httpResponse; + try + { + httpResponse = await _defaultClient.SendAsync(httpRequest); + int _statusCode = (int)httpResponse.StatusCode; + + if (_statusCode == 401 || _statusCode == 402 || _statusCode == 403 || _statusCode == 404 || _statusCode == 429 || _statusCode >= 400 && _statusCode < 500 || _statusCode == 500 || _statusCode == 503 || _statusCode >= 500 && _statusCode < 600) + { + var _httpResponse = await this.SDKConfiguration.hooks.AfterErrorAsync(new AfterErrorContext(hookCtx), httpResponse, null); + if (_httpResponse != null) + { + httpResponse = _httpResponse; + } + } + } + catch (Exception error) + { + var _httpResponse = await this.SDKConfiguration.hooks.AfterErrorAsync(new AfterErrorContext(hookCtx), null, error); + if (_httpResponse != null) + { + httpResponse = _httpResponse; + } + else + { + throw; + } + } + + httpResponse = await this.SDKConfiguration.hooks.AfterSuccessAsync(new AfterSuccessContext(hookCtx), httpResponse); + + var contentType = httpResponse.Content.Headers.ContentType?.MediaType; + int responseStatusCode = (int)httpResponse.StatusCode; + if(responseStatusCode == 200) + { + if(Utilities.IsContentTypeMatch("application/json", contentType)) + { + var obj = ResponseBodyDeserializer.Deserialize(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore); + var response = new DeleteJournalEntryResponse() + { + StatusCode = responseStatusCode, + ContentType = contentType, + RawResponse = httpResponse + }; + response.PushOperation = obj; + return response; + } + else + { + throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + } + else if(new List{401, 402, 403, 404, 429, 500, 503}.Contains(responseStatusCode)) + { + if(Utilities.IsContentTypeMatch("application/json", contentType)) + { + var obj = ResponseBodyDeserializer.Deserialize(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore); + throw obj!; + } + else + { + throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + } + else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600) + { + throw new SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + else + { + throw new SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + } + + public async Task GetAsync(GetJournalEntryRequest request) + { + string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl(); + var urlString = URLBuilder.Build(baseUrl, "/companies/{companyId}/data/journalEntries/{journalEntryId}", request); + + var httpRequest = new HttpRequestMessage(HttpMethod.Get, urlString); + httpRequest.Headers.Add("user-agent", _userAgent); + + if (_securitySource != null) + { + httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest); + } + + var hookCtx = new HookContext("get-journal-entry", null, _securitySource); + + httpRequest = await this.SDKConfiguration.hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest); + HttpResponseMessage httpResponse; + try + { + httpResponse = await _defaultClient.SendAsync(httpRequest); + int _statusCode = (int)httpResponse.StatusCode; + + if (_statusCode == 401 || _statusCode == 402 || _statusCode == 403 || _statusCode == 404 || _statusCode == 409 || _statusCode == 429 || _statusCode >= 400 && _statusCode < 500 || _statusCode == 500 || _statusCode == 503 || _statusCode >= 500 && _statusCode < 600) + { + var _httpResponse = await this.SDKConfiguration.hooks.AfterErrorAsync(new AfterErrorContext(hookCtx), httpResponse, null); + if (_httpResponse != null) + { + httpResponse = _httpResponse; + } + } + } + catch (Exception error) + { + var _httpResponse = await this.SDKConfiguration.hooks.AfterErrorAsync(new AfterErrorContext(hookCtx), null, error); + if (_httpResponse != null) + { + httpResponse = _httpResponse; + } + else + { + throw; + } + } + + httpResponse = await this.SDKConfiguration.hooks.AfterSuccessAsync(new AfterSuccessContext(hookCtx), httpResponse); + + var contentType = httpResponse.Content.Headers.ContentType?.MediaType; + int responseStatusCode = (int)httpResponse.StatusCode; + if(responseStatusCode == 200) + { + if(Utilities.IsContentTypeMatch("application/json", contentType)) + { + var obj = ResponseBodyDeserializer.Deserialize(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore); + var response = new GetJournalEntryResponse() + { + StatusCode = responseStatusCode, + ContentType = contentType, + RawResponse = httpResponse + }; + response.JournalEntry = obj; + return response; + } + else + { + throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + } + else if(new List{401, 402, 403, 404, 409, 429, 500, 503}.Contains(responseStatusCode)) + { + if(Utilities.IsContentTypeMatch("application/json", contentType)) + { + var obj = ResponseBodyDeserializer.Deserialize(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore); + throw obj!; + } + else + { + throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + } + else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600) + { + throw new SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + else + { + throw new SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + } + + public async Task GetCreateModelAsync(GetCreateJournalEntryModelRequest request) + { + string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl(); + var urlString = URLBuilder.Build(baseUrl, "/companies/{companyId}/connections/{connectionId}/options/journalEntries", request); + + var httpRequest = new HttpRequestMessage(HttpMethod.Get, urlString); + httpRequest.Headers.Add("user-agent", _userAgent); + + if (_securitySource != null) + { + httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest); + } + + var hookCtx = new HookContext("get-create-journalEntry-model", null, _securitySource); + + httpRequest = await this.SDKConfiguration.hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest); + HttpResponseMessage httpResponse; + try + { + httpResponse = await _defaultClient.SendAsync(httpRequest); + int _statusCode = (int)httpResponse.StatusCode; + + if (_statusCode == 401 || _statusCode == 402 || _statusCode == 403 || _statusCode == 404 || _statusCode == 429 || _statusCode >= 400 && _statusCode < 500 || _statusCode == 500 || _statusCode == 503 || _statusCode >= 500 && _statusCode < 600) + { + var _httpResponse = await this.SDKConfiguration.hooks.AfterErrorAsync(new AfterErrorContext(hookCtx), httpResponse, null); + if (_httpResponse != null) + { + httpResponse = _httpResponse; + } + } + } + catch (Exception error) + { + var _httpResponse = await this.SDKConfiguration.hooks.AfterErrorAsync(new AfterErrorContext(hookCtx), null, error); + if (_httpResponse != null) + { + httpResponse = _httpResponse; + } + else + { + throw; + } + } + + httpResponse = await this.SDKConfiguration.hooks.AfterSuccessAsync(new AfterSuccessContext(hookCtx), httpResponse); + + var contentType = httpResponse.Content.Headers.ContentType?.MediaType; + int responseStatusCode = (int)httpResponse.StatusCode; + if(responseStatusCode == 200) + { + if(Utilities.IsContentTypeMatch("application/json", contentType)) + { + var obj = ResponseBodyDeserializer.Deserialize(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore); + var response = new GetCreateJournalEntryModelResponse() + { + StatusCode = responseStatusCode, + ContentType = contentType, + RawResponse = httpResponse + }; + response.PushOption = obj; + return response; + } + else + { + throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + } + else if(new List{401, 402, 403, 404, 429, 500, 503}.Contains(responseStatusCode)) + { + if(Utilities.IsContentTypeMatch("application/json", contentType)) + { + var obj = ResponseBodyDeserializer.Deserialize(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore); + throw obj!; + } + else + { + throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + } + else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600) + { + throw new SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + else + { + throw new SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + } + + public async Task ListAsync(ListJournalEntriesRequest request) + { + string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl(); + var urlString = URLBuilder.Build(baseUrl, "/companies/{companyId}/data/journalEntries", request); + + var httpRequest = new HttpRequestMessage(HttpMethod.Get, urlString); + httpRequest.Headers.Add("user-agent", _userAgent); + + if (_securitySource != null) + { + httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest); + } + + var hookCtx = new HookContext("list-journal-entries", null, _securitySource); + + httpRequest = await this.SDKConfiguration.hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest); + HttpResponseMessage httpResponse; + try + { + httpResponse = await _defaultClient.SendAsync(httpRequest); + int _statusCode = (int)httpResponse.StatusCode; + + if (_statusCode == 400 || _statusCode == 401 || _statusCode == 402 || _statusCode == 403 || _statusCode == 404 || _statusCode == 409 || _statusCode == 429 || _statusCode >= 400 && _statusCode < 500 || _statusCode == 500 || _statusCode == 503 || _statusCode >= 500 && _statusCode < 600) + { + var _httpResponse = await this.SDKConfiguration.hooks.AfterErrorAsync(new AfterErrorContext(hookCtx), httpResponse, null); + if (_httpResponse != null) + { + httpResponse = _httpResponse; + } + } + } + catch (Exception error) + { + var _httpResponse = await this.SDKConfiguration.hooks.AfterErrorAsync(new AfterErrorContext(hookCtx), null, error); + if (_httpResponse != null) + { + httpResponse = _httpResponse; + } + else + { + throw; + } + } + + httpResponse = await this.SDKConfiguration.hooks.AfterSuccessAsync(new AfterSuccessContext(hookCtx), httpResponse); + + var contentType = httpResponse.Content.Headers.ContentType?.MediaType; + int responseStatusCode = (int)httpResponse.StatusCode; + if(responseStatusCode == 200) + { + if(Utilities.IsContentTypeMatch("application/json", contentType)) + { + var obj = ResponseBodyDeserializer.Deserialize(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore); + var response = new ListJournalEntriesResponse() + { + StatusCode = responseStatusCode, + ContentType = contentType, + RawResponse = httpResponse + }; + response.JournalEntries = obj; + return response; + } + else + { + throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + } + else if(new List{400, 401, 402, 403, 404, 409, 429, 500, 503}.Contains(responseStatusCode)) + { + if(Utilities.IsContentTypeMatch("application/json", contentType)) + { + var obj = ResponseBodyDeserializer.Deserialize(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore); + throw obj!; + } + else + { + throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + } + else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600) + { + throw new SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + else + { + throw new SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + } + } +} \ No newline at end of file diff --git a/sync-for-payroll/Codat/Sync/Payroll/Journals.cs b/sync-for-payroll/Codat/Sync/Payroll/Journals.cs new file mode 100644 index 000000000..c4864c50a --- /dev/null +++ b/sync-for-payroll/Codat/Sync/Payroll/Journals.cs @@ -0,0 +1,483 @@ + +//------------------------------------------------------------------------------ +// +// This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// +// Changes to this file may cause incorrect behavior and will be lost when +// the code is regenerated. +// +//------------------------------------------------------------------------------ +#nullable enable +namespace Codat.Sync.Payroll +{ + using Codat.Sync.Payroll.Hooks; + using Codat.Sync.Payroll.Models.Errors; + using Codat.Sync.Payroll.Models.Operations; + using Codat.Sync.Payroll.Models.Shared; + using Codat.Sync.Payroll.Utils; + using Newtonsoft.Json; + using System.Collections.Generic; + using System.Net.Http.Headers; + using System.Net.Http; + using System.Threading.Tasks; + using System; + + /// + /// Get, create, and update Journals. + /// + public interface IJournals + { + + /// + /// Create journal + /// + /// + /// The *Create journal* endpoint creates a new journal for a given company's connection.
+ ///
+ /// Journals are used to record all the financial transactions of a company.
+ ///
+ /// **Integration-specific behaviour**
+ ///
+ /// Required data may vary by integration. To see what data to post, first call Get create journal model.
+ ///
+ /// Check out our coverage explorer for integrations that support creating a journal.
+ /// + ///
+ ///
+ Task CreateAsync(CreateJournalRequest request); + + /// + /// Get journal + /// + /// + /// The *Get journal* endpoint returns a single journal for a given `journalId`.
+ ///
+ /// Journals are used to record all the financial transactions of a company.
+ ///
+ /// Check out our coverage explorer for integrations that support getting a specific journal.
+ ///
+ /// Before using this endpoint, you must have retrieved data for the company.
+ /// + ///
+ ///
+ Task GetAsync(GetJournalRequest request); + + /// + /// Get create journal model + /// + /// + /// The *Get create journal model* endpoint returns the expected data for the request payload when creating a journal for a given company and integration.
+ ///
+ /// Journals are used to record all the financial transactions of a company.
+ ///
+ /// **Integration-specific behaviour**
+ ///
+ /// See the *response examples* for integration-specific indicative models.
+ ///
+ /// Check out our coverage explorer for integrations that support creating a journal.
+ /// + ///
+ ///
+ Task GetCreateModelAsync(GetCreateJournalModelRequest request); + + /// + /// List journals + /// + /// + /// The *List journals* endpoint returns a list of journals for a given company's connection.
+ ///
+ /// Journals are used to record all the financial transactions of a company.
+ ///
+ /// Before using this endpoint, you must have retrieved data for the company.
+ /// + ///
+ ///
+ Task ListAsync(ListJournalsRequest request); + } + + /// + /// Get, create, and update Journals. + /// + public class Journals: IJournals + { + public SDKConfig SDKConfiguration { get; private set; } + private const string _language = "csharp"; + private const string _sdkVersion = "3.1.0"; + private const string _sdkGenVersion = "2.319.7"; + private const string _openapiDocVersion = "3.0.0"; + private const string _userAgent = "speakeasy-sdk/csharp 3.1.0 2.319.7 3.0.0 Codat.Sync.Payroll"; + private string _serverUrl = ""; + private ISpeakeasyHttpClient _defaultClient; + private Func? _securitySource; + + public Journals(ISpeakeasyHttpClient defaultClient, Func? securitySource, string serverUrl, SDKConfig config) + { + _defaultClient = defaultClient; + _securitySource = securitySource; + _serverUrl = serverUrl; + SDKConfiguration = config; + } + + public async Task CreateAsync(CreateJournalRequest request) + { + string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl(); + var urlString = URLBuilder.Build(baseUrl, "/companies/{companyId}/connections/{connectionId}/push/journals", request); + + var httpRequest = new HttpRequestMessage(HttpMethod.Post, urlString); + httpRequest.Headers.Add("user-agent", _userAgent); + + var serializedBody = RequestBodySerializer.Serialize(request, "JournalPrototype", "json", false, true); + if (serializedBody != null) + { + httpRequest.Content = serializedBody; + } + + if (_securitySource != null) + { + httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest); + } + + var hookCtx = new HookContext("create-journal", null, _securitySource); + + httpRequest = await this.SDKConfiguration.hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest); + HttpResponseMessage httpResponse; + try + { + httpResponse = await _defaultClient.SendAsync(httpRequest); + int _statusCode = (int)httpResponse.StatusCode; + + if (_statusCode == 400 || _statusCode == 401 || _statusCode == 402 || _statusCode == 403 || _statusCode == 404 || _statusCode == 429 || _statusCode >= 400 && _statusCode < 500 || _statusCode == 500 || _statusCode == 503 || _statusCode >= 500 && _statusCode < 600) + { + var _httpResponse = await this.SDKConfiguration.hooks.AfterErrorAsync(new AfterErrorContext(hookCtx), httpResponse, null); + if (_httpResponse != null) + { + httpResponse = _httpResponse; + } + } + } + catch (Exception error) + { + var _httpResponse = await this.SDKConfiguration.hooks.AfterErrorAsync(new AfterErrorContext(hookCtx), null, error); + if (_httpResponse != null) + { + httpResponse = _httpResponse; + } + else + { + throw; + } + } + + httpResponse = await this.SDKConfiguration.hooks.AfterSuccessAsync(new AfterSuccessContext(hookCtx), httpResponse); + + var contentType = httpResponse.Content.Headers.ContentType?.MediaType; + int responseStatusCode = (int)httpResponse.StatusCode; + if(responseStatusCode == 200) + { + if(Utilities.IsContentTypeMatch("application/json", contentType)) + { + var obj = ResponseBodyDeserializer.Deserialize(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore); + var response = new Models.Operations.CreateJournalResponse() + { + StatusCode = responseStatusCode, + ContentType = contentType, + RawResponse = httpResponse + }; + response.CreateJournalResponseValue = obj; + return response; + } + else + { + throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + } + else if(new List{400, 401, 402, 403, 404, 429, 500, 503}.Contains(responseStatusCode)) + { + if(Utilities.IsContentTypeMatch("application/json", contentType)) + { + var obj = ResponseBodyDeserializer.Deserialize(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore); + throw obj!; + } + else + { + throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + } + else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600) + { + throw new SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + else + { + throw new SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + } + + public async Task GetAsync(GetJournalRequest request) + { + string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl(); + var urlString = URLBuilder.Build(baseUrl, "/companies/{companyId}/data/journals/{journalId}", request); + + var httpRequest = new HttpRequestMessage(HttpMethod.Get, urlString); + httpRequest.Headers.Add("user-agent", _userAgent); + + if (_securitySource != null) + { + httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest); + } + + var hookCtx = new HookContext("get-journal", null, _securitySource); + + httpRequest = await this.SDKConfiguration.hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest); + HttpResponseMessage httpResponse; + try + { + httpResponse = await _defaultClient.SendAsync(httpRequest); + int _statusCode = (int)httpResponse.StatusCode; + + if (_statusCode == 401 || _statusCode == 402 || _statusCode == 403 || _statusCode == 404 || _statusCode == 409 || _statusCode == 429 || _statusCode >= 400 && _statusCode < 500 || _statusCode == 500 || _statusCode == 503 || _statusCode >= 500 && _statusCode < 600) + { + var _httpResponse = await this.SDKConfiguration.hooks.AfterErrorAsync(new AfterErrorContext(hookCtx), httpResponse, null); + if (_httpResponse != null) + { + httpResponse = _httpResponse; + } + } + } + catch (Exception error) + { + var _httpResponse = await this.SDKConfiguration.hooks.AfterErrorAsync(new AfterErrorContext(hookCtx), null, error); + if (_httpResponse != null) + { + httpResponse = _httpResponse; + } + else + { + throw; + } + } + + httpResponse = await this.SDKConfiguration.hooks.AfterSuccessAsync(new AfterSuccessContext(hookCtx), httpResponse); + + var contentType = httpResponse.Content.Headers.ContentType?.MediaType; + int responseStatusCode = (int)httpResponse.StatusCode; + if(responseStatusCode == 200) + { + if(Utilities.IsContentTypeMatch("application/json", contentType)) + { + var obj = ResponseBodyDeserializer.Deserialize(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore); + var response = new GetJournalResponse() + { + StatusCode = responseStatusCode, + ContentType = contentType, + RawResponse = httpResponse + }; + response.Journal = obj; + return response; + } + else + { + throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + } + else if(new List{401, 402, 403, 404, 409, 429, 500, 503}.Contains(responseStatusCode)) + { + if(Utilities.IsContentTypeMatch("application/json", contentType)) + { + var obj = ResponseBodyDeserializer.Deserialize(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore); + throw obj!; + } + else + { + throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + } + else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600) + { + throw new SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + else + { + throw new SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + } + + public async Task GetCreateModelAsync(GetCreateJournalModelRequest request) + { + string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl(); + var urlString = URLBuilder.Build(baseUrl, "/companies/{companyId}/connections/{connectionId}/options/journals", request); + + var httpRequest = new HttpRequestMessage(HttpMethod.Get, urlString); + httpRequest.Headers.Add("user-agent", _userAgent); + + if (_securitySource != null) + { + httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest); + } + + var hookCtx = new HookContext("get-create-journal-model", null, _securitySource); + + httpRequest = await this.SDKConfiguration.hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest); + HttpResponseMessage httpResponse; + try + { + httpResponse = await _defaultClient.SendAsync(httpRequest); + int _statusCode = (int)httpResponse.StatusCode; + + if (_statusCode == 401 || _statusCode == 402 || _statusCode == 403 || _statusCode == 404 || _statusCode == 429 || _statusCode >= 400 && _statusCode < 500 || _statusCode == 500 || _statusCode == 503 || _statusCode >= 500 && _statusCode < 600) + { + var _httpResponse = await this.SDKConfiguration.hooks.AfterErrorAsync(new AfterErrorContext(hookCtx), httpResponse, null); + if (_httpResponse != null) + { + httpResponse = _httpResponse; + } + } + } + catch (Exception error) + { + var _httpResponse = await this.SDKConfiguration.hooks.AfterErrorAsync(new AfterErrorContext(hookCtx), null, error); + if (_httpResponse != null) + { + httpResponse = _httpResponse; + } + else + { + throw; + } + } + + httpResponse = await this.SDKConfiguration.hooks.AfterSuccessAsync(new AfterSuccessContext(hookCtx), httpResponse); + + var contentType = httpResponse.Content.Headers.ContentType?.MediaType; + int responseStatusCode = (int)httpResponse.StatusCode; + if(responseStatusCode == 200) + { + if(Utilities.IsContentTypeMatch("application/json", contentType)) + { + var obj = ResponseBodyDeserializer.Deserialize(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore); + var response = new GetCreateJournalModelResponse() + { + StatusCode = responseStatusCode, + ContentType = contentType, + RawResponse = httpResponse + }; + response.PushOption = obj; + return response; + } + else + { + throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + } + else if(new List{401, 402, 403, 404, 429, 500, 503}.Contains(responseStatusCode)) + { + if(Utilities.IsContentTypeMatch("application/json", contentType)) + { + var obj = ResponseBodyDeserializer.Deserialize(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore); + throw obj!; + } + else + { + throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + } + else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600) + { + throw new SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + else + { + throw new SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + } + + public async Task ListAsync(ListJournalsRequest request) + { + string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl(); + var urlString = URLBuilder.Build(baseUrl, "/companies/{companyId}/data/journals", request); + + var httpRequest = new HttpRequestMessage(HttpMethod.Get, urlString); + httpRequest.Headers.Add("user-agent", _userAgent); + + if (_securitySource != null) + { + httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest); + } + + var hookCtx = new HookContext("list-journals", null, _securitySource); + + httpRequest = await this.SDKConfiguration.hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest); + HttpResponseMessage httpResponse; + try + { + httpResponse = await _defaultClient.SendAsync(httpRequest); + int _statusCode = (int)httpResponse.StatusCode; + + if (_statusCode == 400 || _statusCode == 401 || _statusCode == 402 || _statusCode == 403 || _statusCode == 404 || _statusCode == 409 || _statusCode == 429 || _statusCode >= 400 && _statusCode < 500 || _statusCode == 500 || _statusCode == 503 || _statusCode >= 500 && _statusCode < 600) + { + var _httpResponse = await this.SDKConfiguration.hooks.AfterErrorAsync(new AfterErrorContext(hookCtx), httpResponse, null); + if (_httpResponse != null) + { + httpResponse = _httpResponse; + } + } + } + catch (Exception error) + { + var _httpResponse = await this.SDKConfiguration.hooks.AfterErrorAsync(new AfterErrorContext(hookCtx), null, error); + if (_httpResponse != null) + { + httpResponse = _httpResponse; + } + else + { + throw; + } + } + + httpResponse = await this.SDKConfiguration.hooks.AfterSuccessAsync(new AfterSuccessContext(hookCtx), httpResponse); + + var contentType = httpResponse.Content.Headers.ContentType?.MediaType; + int responseStatusCode = (int)httpResponse.StatusCode; + if(responseStatusCode == 200) + { + if(Utilities.IsContentTypeMatch("application/json", contentType)) + { + var obj = ResponseBodyDeserializer.Deserialize(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore); + var response = new ListJournalsResponse() + { + StatusCode = responseStatusCode, + ContentType = contentType, + RawResponse = httpResponse + }; + response.Journals = obj; + return response; + } + else + { + throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + } + else if(new List{400, 401, 402, 403, 404, 409, 429, 500, 503}.Contains(responseStatusCode)) + { + if(Utilities.IsContentTypeMatch("application/json", contentType)) + { + var obj = ResponseBodyDeserializer.Deserialize(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore); + throw obj!; + } + else + { + throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + } + else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600) + { + throw new SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + else + { + throw new SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + } + } +} \ No newline at end of file diff --git a/sync-for-payroll/Codat/Sync/Payroll/ManageData.cs b/sync-for-payroll/Codat/Sync/Payroll/ManageData.cs new file mode 100644 index 000000000..6cfb0361e --- /dev/null +++ b/sync-for-payroll/Codat/Sync/Payroll/ManageData.cs @@ -0,0 +1,737 @@ + +//------------------------------------------------------------------------------ +// +// This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// +// Changes to this file may cause incorrect behavior and will be lost when +// the code is regenerated. +// +//------------------------------------------------------------------------------ +#nullable enable +namespace Codat.Sync.Payroll +{ + using Codat.Sync.Payroll.Hooks; + using Codat.Sync.Payroll.Models.Errors; + using Codat.Sync.Payroll.Models.Operations; + using Codat.Sync.Payroll.Models.Shared; + using Codat.Sync.Payroll.Utils; + using Newtonsoft.Json; + using System.Collections.Generic; + using System.Net.Http.Headers; + using System.Net.Http; + using System.Threading.Tasks; + using System; + + /// + /// Control how data is retrieved from an integration. + /// + public interface IManageData + { + + /// + /// Get data status + /// + /// + /// Get the state of each data type for a company + /// + /// + Task GetDataStatusAsync(GetDataStatusRequest request); + + /// + /// Get pull operation + /// + /// + /// Retrieve information about a single dataset or pull operation. + /// + /// + Task GetPullOperationAsync(GetPullOperationRequest request); + + /// + /// Get push operation + /// + /// + /// Retrieve push operation. + /// + /// + Task GetPushOperationAsync(GetPushOperationRequest request); + + /// + /// List push operations + /// + /// + /// List push operation records. + /// + /// + Task ListAsync(ListPushOperationsRequest request); + + /// + /// List pull operations + /// + /// + /// Gets the pull operation history (datasets) for a given company. + /// + /// + Task ListPullOperationsAsync(ListPullOperationsRequest request); + + /// + /// Refresh all data + /// + /// + /// Refreshes all data types with `fetch on first link` set to `true` for a given company.
+ ///
+ /// This is an asynchronous operation, and will bring updated data into Codat from the linked integration for you to view.
+ ///
+ /// Read more about data type settings and `fetch on first link`. + ///
+ ///
+ Task RefreshAllDataTypesAsync(RefreshAllDataTypesRequest request); + + /// + /// Refresh data type + /// + /// + /// Refreshes a given data type for a given company.
+ ///
+ /// This is an asynchronous operation, and will bring updated data into Codat from the linked integration for you to view. + ///
+ ///
+ Task RefreshDataTypeAsync(RefreshDataTypeRequest request); + } + + /// + /// Control how data is retrieved from an integration. + /// + public class ManageData: IManageData + { + public SDKConfig SDKConfiguration { get; private set; } + private const string _language = "csharp"; + private const string _sdkVersion = "3.1.0"; + private const string _sdkGenVersion = "2.319.7"; + private const string _openapiDocVersion = "3.0.0"; + private const string _userAgent = "speakeasy-sdk/csharp 3.1.0 2.319.7 3.0.0 Codat.Sync.Payroll"; + private string _serverUrl = ""; + private ISpeakeasyHttpClient _defaultClient; + private Func? _securitySource; + + public ManageData(ISpeakeasyHttpClient defaultClient, Func? securitySource, string serverUrl, SDKConfig config) + { + _defaultClient = defaultClient; + _securitySource = securitySource; + _serverUrl = serverUrl; + SDKConfiguration = config; + } + + public async Task GetDataStatusAsync(GetDataStatusRequest request) + { + string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl(); + var urlString = URLBuilder.Build(baseUrl, "/companies/{companyId}/dataStatus", request); + + var httpRequest = new HttpRequestMessage(HttpMethod.Get, urlString); + httpRequest.Headers.Add("user-agent", _userAgent); + + if (_securitySource != null) + { + httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest); + } + + var hookCtx = new HookContext("get-data-status", null, _securitySource); + + httpRequest = await this.SDKConfiguration.hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest); + HttpResponseMessage httpResponse; + try + { + httpResponse = await _defaultClient.SendAsync(httpRequest); + int _statusCode = (int)httpResponse.StatusCode; + + if (_statusCode == 401 || _statusCode == 402 || _statusCode == 403 || _statusCode == 404 || _statusCode == 429 || _statusCode >= 400 && _statusCode < 500 || _statusCode == 500 || _statusCode == 503 || _statusCode >= 500 && _statusCode < 600) + { + var _httpResponse = await this.SDKConfiguration.hooks.AfterErrorAsync(new AfterErrorContext(hookCtx), httpResponse, null); + if (_httpResponse != null) + { + httpResponse = _httpResponse; + } + } + } + catch (Exception error) + { + var _httpResponse = await this.SDKConfiguration.hooks.AfterErrorAsync(new AfterErrorContext(hookCtx), null, error); + if (_httpResponse != null) + { + httpResponse = _httpResponse; + } + else + { + throw; + } + } + + httpResponse = await this.SDKConfiguration.hooks.AfterSuccessAsync(new AfterSuccessContext(hookCtx), httpResponse); + + var contentType = httpResponse.Content.Headers.ContentType?.MediaType; + int responseStatusCode = (int)httpResponse.StatusCode; + if(responseStatusCode == 200) + { + if(Utilities.IsContentTypeMatch("application/json", contentType)) + { + var obj = ResponseBodyDeserializer.Deserialize(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore); + var response = new GetDataStatusResponse() + { + StatusCode = responseStatusCode, + ContentType = contentType, + RawResponse = httpResponse + }; + response.DataStatuses = obj; + return response; + } + else + { + throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + } + else if(new List{401, 402, 403, 404, 429, 500, 503}.Contains(responseStatusCode)) + { + if(Utilities.IsContentTypeMatch("application/json", contentType)) + { + var obj = ResponseBodyDeserializer.Deserialize(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore); + throw obj!; + } + else + { + throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + } + else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600) + { + throw new SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + else + { + throw new SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + } + + public async Task GetPullOperationAsync(GetPullOperationRequest request) + { + string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl(); + var urlString = URLBuilder.Build(baseUrl, "/companies/{companyId}/data/history/{datasetId}", request); + + var httpRequest = new HttpRequestMessage(HttpMethod.Get, urlString); + httpRequest.Headers.Add("user-agent", _userAgent); + + if (_securitySource != null) + { + httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest); + } + + var hookCtx = new HookContext("get-pull-operation", null, _securitySource); + + httpRequest = await this.SDKConfiguration.hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest); + HttpResponseMessage httpResponse; + try + { + httpResponse = await _defaultClient.SendAsync(httpRequest); + int _statusCode = (int)httpResponse.StatusCode; + + if (_statusCode == 401 || _statusCode == 402 || _statusCode == 403 || _statusCode == 404 || _statusCode == 429 || _statusCode >= 400 && _statusCode < 500 || _statusCode == 500 || _statusCode == 503 || _statusCode >= 500 && _statusCode < 600) + { + var _httpResponse = await this.SDKConfiguration.hooks.AfterErrorAsync(new AfterErrorContext(hookCtx), httpResponse, null); + if (_httpResponse != null) + { + httpResponse = _httpResponse; + } + } + } + catch (Exception error) + { + var _httpResponse = await this.SDKConfiguration.hooks.AfterErrorAsync(new AfterErrorContext(hookCtx), null, error); + if (_httpResponse != null) + { + httpResponse = _httpResponse; + } + else + { + throw; + } + } + + httpResponse = await this.SDKConfiguration.hooks.AfterSuccessAsync(new AfterSuccessContext(hookCtx), httpResponse); + + var contentType = httpResponse.Content.Headers.ContentType?.MediaType; + int responseStatusCode = (int)httpResponse.StatusCode; + if(responseStatusCode == 200) + { + if(Utilities.IsContentTypeMatch("application/json", contentType)) + { + var obj = ResponseBodyDeserializer.Deserialize(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore); + var response = new GetPullOperationResponse() + { + StatusCode = responseStatusCode, + ContentType = contentType, + RawResponse = httpResponse + }; + response.PullOperation = obj; + return response; + } + else + { + throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + } + else if(new List{401, 402, 403, 404, 429, 500, 503}.Contains(responseStatusCode)) + { + if(Utilities.IsContentTypeMatch("application/json", contentType)) + { + var obj = ResponseBodyDeserializer.Deserialize(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore); + throw obj!; + } + else + { + throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + } + else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600) + { + throw new SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + else + { + throw new SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + } + + public async Task GetPushOperationAsync(GetPushOperationRequest request) + { + string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl(); + var urlString = URLBuilder.Build(baseUrl, "/companies/{companyId}/push/{pushOperationKey}", request); + + var httpRequest = new HttpRequestMessage(HttpMethod.Get, urlString); + httpRequest.Headers.Add("user-agent", _userAgent); + + if (_securitySource != null) + { + httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest); + } + + var hookCtx = new HookContext("get-push-operation", null, _securitySource); + + httpRequest = await this.SDKConfiguration.hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest); + HttpResponseMessage httpResponse; + try + { + httpResponse = await _defaultClient.SendAsync(httpRequest); + int _statusCode = (int)httpResponse.StatusCode; + + if (_statusCode == 401 || _statusCode == 402 || _statusCode == 403 || _statusCode == 404 || _statusCode == 429 || _statusCode >= 400 && _statusCode < 500 || _statusCode == 500 || _statusCode == 503 || _statusCode >= 500 && _statusCode < 600) + { + var _httpResponse = await this.SDKConfiguration.hooks.AfterErrorAsync(new AfterErrorContext(hookCtx), httpResponse, null); + if (_httpResponse != null) + { + httpResponse = _httpResponse; + } + } + } + catch (Exception error) + { + var _httpResponse = await this.SDKConfiguration.hooks.AfterErrorAsync(new AfterErrorContext(hookCtx), null, error); + if (_httpResponse != null) + { + httpResponse = _httpResponse; + } + else + { + throw; + } + } + + httpResponse = await this.SDKConfiguration.hooks.AfterSuccessAsync(new AfterSuccessContext(hookCtx), httpResponse); + + var contentType = httpResponse.Content.Headers.ContentType?.MediaType; + int responseStatusCode = (int)httpResponse.StatusCode; + if(responseStatusCode == 200) + { + if(Utilities.IsContentTypeMatch("application/json", contentType)) + { + var obj = ResponseBodyDeserializer.Deserialize(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore); + var response = new GetPushOperationResponse() + { + StatusCode = responseStatusCode, + ContentType = contentType, + RawResponse = httpResponse + }; + response.PushOperation = obj; + return response; + } + else + { + throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + } + else if(new List{401, 402, 403, 404, 429, 500, 503}.Contains(responseStatusCode)) + { + if(Utilities.IsContentTypeMatch("application/json", contentType)) + { + var obj = ResponseBodyDeserializer.Deserialize(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore); + throw obj!; + } + else + { + throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + } + else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600) + { + throw new SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + else + { + throw new SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + } + + public async Task ListAsync(ListPushOperationsRequest request) + { + string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl(); + var urlString = URLBuilder.Build(baseUrl, "/companies/{companyId}/push", request); + + var httpRequest = new HttpRequestMessage(HttpMethod.Get, urlString); + httpRequest.Headers.Add("user-agent", _userAgent); + + if (_securitySource != null) + { + httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest); + } + + var hookCtx = new HookContext("list-push-operations", null, _securitySource); + + httpRequest = await this.SDKConfiguration.hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest); + HttpResponseMessage httpResponse; + try + { + httpResponse = await _defaultClient.SendAsync(httpRequest); + int _statusCode = (int)httpResponse.StatusCode; + + if (_statusCode == 400 || _statusCode == 401 || _statusCode == 402 || _statusCode == 403 || _statusCode == 404 || _statusCode == 429 || _statusCode >= 400 && _statusCode < 500 || _statusCode == 500 || _statusCode == 503 || _statusCode >= 500 && _statusCode < 600) + { + var _httpResponse = await this.SDKConfiguration.hooks.AfterErrorAsync(new AfterErrorContext(hookCtx), httpResponse, null); + if (_httpResponse != null) + { + httpResponse = _httpResponse; + } + } + } + catch (Exception error) + { + var _httpResponse = await this.SDKConfiguration.hooks.AfterErrorAsync(new AfterErrorContext(hookCtx), null, error); + if (_httpResponse != null) + { + httpResponse = _httpResponse; + } + else + { + throw; + } + } + + httpResponse = await this.SDKConfiguration.hooks.AfterSuccessAsync(new AfterSuccessContext(hookCtx), httpResponse); + + var contentType = httpResponse.Content.Headers.ContentType?.MediaType; + int responseStatusCode = (int)httpResponse.StatusCode; + if(responseStatusCode == 200) + { + if(Utilities.IsContentTypeMatch("application/json", contentType)) + { + var obj = ResponseBodyDeserializer.Deserialize(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore); + var response = new ListPushOperationsResponse() + { + StatusCode = responseStatusCode, + ContentType = contentType, + RawResponse = httpResponse + }; + response.PushOperations = obj; + return response; + } + else + { + throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + } + else if(new List{400, 401, 402, 403, 404, 429, 500, 503}.Contains(responseStatusCode)) + { + if(Utilities.IsContentTypeMatch("application/json", contentType)) + { + var obj = ResponseBodyDeserializer.Deserialize(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore); + throw obj!; + } + else + { + throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + } + else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600) + { + throw new SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + else + { + throw new SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + } + + public async Task ListPullOperationsAsync(ListPullOperationsRequest request) + { + string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl(); + var urlString = URLBuilder.Build(baseUrl, "/companies/{companyId}/data/history", request); + + var httpRequest = new HttpRequestMessage(HttpMethod.Get, urlString); + httpRequest.Headers.Add("user-agent", _userAgent); + + if (_securitySource != null) + { + httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest); + } + + var hookCtx = new HookContext("list-pull-operations", null, _securitySource); + + httpRequest = await this.SDKConfiguration.hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest); + HttpResponseMessage httpResponse; + try + { + httpResponse = await _defaultClient.SendAsync(httpRequest); + int _statusCode = (int)httpResponse.StatusCode; + + if (_statusCode == 400 || _statusCode == 401 || _statusCode == 402 || _statusCode == 403 || _statusCode == 404 || _statusCode == 429 || _statusCode >= 400 && _statusCode < 500 || _statusCode == 500 || _statusCode == 503 || _statusCode >= 500 && _statusCode < 600) + { + var _httpResponse = await this.SDKConfiguration.hooks.AfterErrorAsync(new AfterErrorContext(hookCtx), httpResponse, null); + if (_httpResponse != null) + { + httpResponse = _httpResponse; + } + } + } + catch (Exception error) + { + var _httpResponse = await this.SDKConfiguration.hooks.AfterErrorAsync(new AfterErrorContext(hookCtx), null, error); + if (_httpResponse != null) + { + httpResponse = _httpResponse; + } + else + { + throw; + } + } + + httpResponse = await this.SDKConfiguration.hooks.AfterSuccessAsync(new AfterSuccessContext(hookCtx), httpResponse); + + var contentType = httpResponse.Content.Headers.ContentType?.MediaType; + int responseStatusCode = (int)httpResponse.StatusCode; + if(responseStatusCode == 200) + { + if(Utilities.IsContentTypeMatch("application/json", contentType)) + { + var obj = ResponseBodyDeserializer.Deserialize(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore); + var response = new ListPullOperationsResponse() + { + StatusCode = responseStatusCode, + ContentType = contentType, + RawResponse = httpResponse + }; + response.PullOperations = obj; + return response; + } + else + { + throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + } + else if(new List{400, 401, 402, 403, 404, 429, 500, 503}.Contains(responseStatusCode)) + { + if(Utilities.IsContentTypeMatch("application/json", contentType)) + { + var obj = ResponseBodyDeserializer.Deserialize(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore); + throw obj!; + } + else + { + throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + } + else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600) + { + throw new SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + else + { + throw new SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + } + + public async Task RefreshAllDataTypesAsync(RefreshAllDataTypesRequest request) + { + string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl(); + var urlString = URLBuilder.Build(baseUrl, "/companies/{companyId}/data/all", request); + + var httpRequest = new HttpRequestMessage(HttpMethod.Post, urlString); + httpRequest.Headers.Add("user-agent", _userAgent); + + if (_securitySource != null) + { + httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest); + } + + var hookCtx = new HookContext("refresh-all-data-types", null, _securitySource); + + httpRequest = await this.SDKConfiguration.hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest); + HttpResponseMessage httpResponse; + try + { + httpResponse = await _defaultClient.SendAsync(httpRequest); + int _statusCode = (int)httpResponse.StatusCode; + + if (_statusCode == 401 || _statusCode == 402 || _statusCode == 403 || _statusCode == 404 || _statusCode == 429 || _statusCode >= 400 && _statusCode < 500 || _statusCode == 500 || _statusCode == 503 || _statusCode >= 500 && _statusCode < 600) + { + var _httpResponse = await this.SDKConfiguration.hooks.AfterErrorAsync(new AfterErrorContext(hookCtx), httpResponse, null); + if (_httpResponse != null) + { + httpResponse = _httpResponse; + } + } + } + catch (Exception error) + { + var _httpResponse = await this.SDKConfiguration.hooks.AfterErrorAsync(new AfterErrorContext(hookCtx), null, error); + if (_httpResponse != null) + { + httpResponse = _httpResponse; + } + else + { + throw; + } + } + + httpResponse = await this.SDKConfiguration.hooks.AfterSuccessAsync(new AfterSuccessContext(hookCtx), httpResponse); + + var contentType = httpResponse.Content.Headers.ContentType?.MediaType; + int responseStatusCode = (int)httpResponse.StatusCode; + if(responseStatusCode == 204) + { + return new RefreshAllDataTypesResponse() + { + StatusCode = responseStatusCode, + ContentType = contentType, + RawResponse = httpResponse + };; + } + else if(new List{401, 402, 403, 404, 429, 500, 503}.Contains(responseStatusCode)) + { + if(Utilities.IsContentTypeMatch("application/json", contentType)) + { + var obj = ResponseBodyDeserializer.Deserialize(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore); + throw obj!; + } + else + { + throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + } + else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600) + { + throw new SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + else + { + throw new SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + } + + public async Task RefreshDataTypeAsync(RefreshDataTypeRequest request) + { + string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl(); + var urlString = URLBuilder.Build(baseUrl, "/companies/{companyId}/data/queue/{dataType}", request); + + var httpRequest = new HttpRequestMessage(HttpMethod.Post, urlString); + httpRequest.Headers.Add("user-agent", _userAgent); + + if (_securitySource != null) + { + httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest); + } + + var hookCtx = new HookContext("refresh-data-type", null, _securitySource); + + httpRequest = await this.SDKConfiguration.hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest); + HttpResponseMessage httpResponse; + try + { + httpResponse = await _defaultClient.SendAsync(httpRequest); + int _statusCode = (int)httpResponse.StatusCode; + + if (_statusCode == 401 || _statusCode == 402 || _statusCode == 403 || _statusCode == 404 || _statusCode == 429 || _statusCode >= 400 && _statusCode < 500 || _statusCode == 500 || _statusCode == 503 || _statusCode >= 500 && _statusCode < 600) + { + var _httpResponse = await this.SDKConfiguration.hooks.AfterErrorAsync(new AfterErrorContext(hookCtx), httpResponse, null); + if (_httpResponse != null) + { + httpResponse = _httpResponse; + } + } + } + catch (Exception error) + { + var _httpResponse = await this.SDKConfiguration.hooks.AfterErrorAsync(new AfterErrorContext(hookCtx), null, error); + if (_httpResponse != null) + { + httpResponse = _httpResponse; + } + else + { + throw; + } + } + + httpResponse = await this.SDKConfiguration.hooks.AfterSuccessAsync(new AfterSuccessContext(hookCtx), httpResponse); + + var contentType = httpResponse.Content.Headers.ContentType?.MediaType; + int responseStatusCode = (int)httpResponse.StatusCode; + if(responseStatusCode == 200) + { + if(Utilities.IsContentTypeMatch("application/json", contentType)) + { + var obj = ResponseBodyDeserializer.Deserialize(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore); + var response = new RefreshDataTypeResponse() + { + StatusCode = responseStatusCode, + ContentType = contentType, + RawResponse = httpResponse + }; + response.PullOperation = obj; + return response; + } + else + { + throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + } + else if(new List{401, 402, 403, 404, 429, 500, 503}.Contains(responseStatusCode)) + { + if(Utilities.IsContentTypeMatch("application/json", contentType)) + { + var obj = ResponseBodyDeserializer.Deserialize(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore); + throw obj!; + } + else + { + throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + } + else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600) + { + throw new SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + else + { + throw new SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + } + } +} \ No newline at end of file diff --git a/sync-for-payroll/CodatSyncPayroll/Models/Shared/ErrorMessage.cs b/sync-for-payroll/Codat/Sync/Payroll/Models/Errors/ErrorMessage.cs similarity index 88% rename from sync-for-payroll/CodatSyncPayroll/Models/Shared/ErrorMessage.cs rename to sync-for-payroll/Codat/Sync/Payroll/Models/Errors/ErrorMessage.cs index 15fe0d17e..a8f903858 100644 --- a/sync-for-payroll/CodatSyncPayroll/Models/Shared/ErrorMessage.cs +++ b/sync-for-payroll/Codat/Sync/Payroll/Models/Errors/ErrorMessage.cs @@ -8,11 +8,17 @@ // //------------------------------------------------------------------------------ #nullable enable -namespace Codat.Sync.Payroll.Models.Shared +namespace Codat.Sync.Payroll.Models.Errors { + using Codat.Sync.Payroll.Models.Shared; + using Codat.Sync.Payroll.Utils; using Newtonsoft.Json; + using System; - public class ErrorMessage + /// + /// The request made is not valid. + /// + public class ErrorMessage : Exception { /// diff --git a/sync-for-payroll/Codat/Sync/Payroll/Models/Errors/SDKException.cs b/sync-for-payroll/Codat/Sync/Payroll/Models/Errors/SDKException.cs new file mode 100644 index 000000000..278fe128b --- /dev/null +++ b/sync-for-payroll/Codat/Sync/Payroll/Models/Errors/SDKException.cs @@ -0,0 +1,42 @@ + +//------------------------------------------------------------------------------ +// +// This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// +// Changes to this file may cause incorrect behavior and will be lost when +// the code is regenerated. +// +//------------------------------------------------------------------------------ +#nullable enable +namespace Codat.Sync.Payroll.Models.Errors +{ + using System; + using System.Net.Http; + + public class SDKException : Exception + { + + public override string Message { get; } + public int StatusCode { get; set; } + public string Body { get; set; } + public HttpResponseMessage RawResponse { get; set; } = default!; + public SDKException(string message, int statusCode, string body, HttpResponseMessage rawResponse) + { + Message = message; + this.StatusCode = statusCode; + StatusCode = statusCode; + Body = body; + RawResponse = rawResponse; + } + + public override string ToString(){ + var body = ""; + if (Body.Length > 0) + { + body += $"\n{Body}"; + } + return Message + ": Status " + StatusCode + body; + } + + } +} diff --git a/sync-for-payroll/CodatSyncPayroll/Models/Operations/CreateAccountRequest.cs b/sync-for-payroll/Codat/Sync/Payroll/Models/Operations/CreateAccountRequest.cs similarity index 96% rename from sync-for-payroll/CodatSyncPayroll/Models/Operations/CreateAccountRequest.cs rename to sync-for-payroll/Codat/Sync/Payroll/Models/Operations/CreateAccountRequest.cs index 141117525..9788366a0 100644 --- a/sync-for-payroll/CodatSyncPayroll/Models/Operations/CreateAccountRequest.cs +++ b/sync-for-payroll/Codat/Sync/Payroll/Models/Operations/CreateAccountRequest.cs @@ -23,7 +23,7 @@ public class CreateAccountRequest /// Allow a sync upon push completion. /// [SpeakeasyMetadata("queryParam:style=form,explode=true,name=allowSyncOnPushComplete")] - public bool? AllowSyncOnPushComplete { get; set; } + public bool? AllowSyncOnPushComplete { get; set; } = true; /// /// Unique identifier for a company. diff --git a/sync-for-payroll/CodatSyncPayroll/Models/Operations/CreateAccountResponse.cs b/sync-for-payroll/Codat/Sync/Payroll/Models/Operations/CreateAccountResponse.cs similarity index 89% rename from sync-for-payroll/CodatSyncPayroll/Models/Operations/CreateAccountResponse.cs rename to sync-for-payroll/Codat/Sync/Payroll/Models/Operations/CreateAccountResponse.cs index c46cfa20a..39e000203 100644 --- a/sync-for-payroll/CodatSyncPayroll/Models/Operations/CreateAccountResponse.cs +++ b/sync-for-payroll/Codat/Sync/Payroll/Models/Operations/CreateAccountResponse.cs @@ -11,6 +11,7 @@ namespace Codat.Sync.Payroll.Models.Operations { using Codat.Sync.Payroll.Models.Shared; + using Codat.Sync.Payroll.Utils; using System.Net.Http; using System; @@ -27,11 +28,6 @@ public class CreateAccountResponse /// public Models.Shared.CreateAccountResponse? CreateAccountResponseValue { get; set; } - /// - /// The request made is not valid. - /// - public ErrorMessage? ErrorMessage { get; set; } - /// /// HTTP response status code for this operation /// diff --git a/sync-for-payroll/CodatSyncPayroll/Models/Operations/CreateCompanyResponse.cs b/sync-for-payroll/Codat/Sync/Payroll/Models/Operations/CreateCompanyResponse.cs similarity index 89% rename from sync-for-payroll/CodatSyncPayroll/Models/Operations/CreateCompanyResponse.cs rename to sync-for-payroll/Codat/Sync/Payroll/Models/Operations/CreateCompanyResponse.cs index 3cf40c595..b945b2401 100644 --- a/sync-for-payroll/CodatSyncPayroll/Models/Operations/CreateCompanyResponse.cs +++ b/sync-for-payroll/Codat/Sync/Payroll/Models/Operations/CreateCompanyResponse.cs @@ -11,6 +11,7 @@ namespace Codat.Sync.Payroll.Models.Operations { using Codat.Sync.Payroll.Models.Shared; + using Codat.Sync.Payroll.Utils; using System.Net.Http; using System; @@ -27,11 +28,6 @@ public class CreateCompanyResponse /// public string? ContentType { get; set; } = default!; - /// - /// The request made is not valid. - /// - public ErrorMessage? ErrorMessage { get; set; } - /// /// HTTP response status code for this operation /// diff --git a/sync-for-payroll/CodatSyncPayroll/Models/Operations/CreateConnectionRequest.cs b/sync-for-payroll/Codat/Sync/Payroll/Models/Operations/CreateConnectionRequest.cs similarity index 95% rename from sync-for-payroll/CodatSyncPayroll/Models/Operations/CreateConnectionRequest.cs rename to sync-for-payroll/Codat/Sync/Payroll/Models/Operations/CreateConnectionRequest.cs index e511fcff7..10da95d08 100644 --- a/sync-for-payroll/CodatSyncPayroll/Models/Operations/CreateConnectionRequest.cs +++ b/sync-for-payroll/Codat/Sync/Payroll/Models/Operations/CreateConnectionRequest.cs @@ -10,6 +10,7 @@ #nullable enable namespace Codat.Sync.Payroll.Models.Operations { + using Codat.Sync.Payroll.Models.Operations; using Codat.Sync.Payroll.Utils; public class CreateConnectionRequest diff --git a/sync-for-payroll/CodatSyncPayroll/Models/Operations/CreateConnectionRequestBody.cs b/sync-for-payroll/Codat/Sync/Payroll/Models/Operations/CreateConnectionRequestBody.cs similarity index 96% rename from sync-for-payroll/CodatSyncPayroll/Models/Operations/CreateConnectionRequestBody.cs rename to sync-for-payroll/Codat/Sync/Payroll/Models/Operations/CreateConnectionRequestBody.cs index cbcbb69a9..13d8b0474 100644 --- a/sync-for-payroll/CodatSyncPayroll/Models/Operations/CreateConnectionRequestBody.cs +++ b/sync-for-payroll/Codat/Sync/Payroll/Models/Operations/CreateConnectionRequestBody.cs @@ -10,6 +10,7 @@ #nullable enable namespace Codat.Sync.Payroll.Models.Operations { + using Codat.Sync.Payroll.Utils; using Newtonsoft.Json; public class CreateConnectionRequestBody diff --git a/sync-for-payroll/CodatSyncPayroll/Models/Operations/CreateConnectionResponse.cs b/sync-for-payroll/Codat/Sync/Payroll/Models/Operations/CreateConnectionResponse.cs similarity index 88% rename from sync-for-payroll/CodatSyncPayroll/Models/Operations/CreateConnectionResponse.cs rename to sync-for-payroll/Codat/Sync/Payroll/Models/Operations/CreateConnectionResponse.cs index 0d7a0e5fb..19e2f0025 100644 --- a/sync-for-payroll/CodatSyncPayroll/Models/Operations/CreateConnectionResponse.cs +++ b/sync-for-payroll/Codat/Sync/Payroll/Models/Operations/CreateConnectionResponse.cs @@ -11,6 +11,7 @@ namespace Codat.Sync.Payroll.Models.Operations { using Codat.Sync.Payroll.Models.Shared; + using Codat.Sync.Payroll.Utils; using System.Net.Http; using System; @@ -27,11 +28,6 @@ public class CreateConnectionResponse /// public string? ContentType { get; set; } = default!; - /// - /// Your API request was not properly authorized. - /// - public ErrorMessage? ErrorMessage { get; set; } - /// /// HTTP response status code for this operation /// diff --git a/sync-for-payroll/CodatSyncPayroll/Models/Operations/CreateJournalEntryRequest.cs b/sync-for-payroll/Codat/Sync/Payroll/Models/Operations/CreateJournalEntryRequest.cs similarity index 92% rename from sync-for-payroll/CodatSyncPayroll/Models/Operations/CreateJournalEntryRequest.cs rename to sync-for-payroll/Codat/Sync/Payroll/Models/Operations/CreateJournalEntryRequest.cs index a78d65eb7..791132e25 100644 --- a/sync-for-payroll/CodatSyncPayroll/Models/Operations/CreateJournalEntryRequest.cs +++ b/sync-for-payroll/Codat/Sync/Payroll/Models/Operations/CreateJournalEntryRequest.cs @@ -17,13 +17,13 @@ public class CreateJournalEntryRequest { [SpeakeasyMetadata("request:mediaType=application/json")] - public JournalEntry? JournalEntry { get; set; } + public JournalEntry? JournalEntry { get; set; } = null; /// /// Allow a sync upon push completion. /// [SpeakeasyMetadata("queryParam:style=form,explode=true,name=allowSyncOnPushComplete")] - public bool? AllowSyncOnPushComplete { get; set; } + public bool? AllowSyncOnPushComplete { get; set; } = true; /// /// Unique identifier for a company. diff --git a/sync-for-payroll/CodatSyncPayroll/Models/Operations/CreateJournalEntryResponse.cs b/sync-for-payroll/Codat/Sync/Payroll/Models/Operations/CreateJournalEntryResponse.cs similarity index 89% rename from sync-for-payroll/CodatSyncPayroll/Models/Operations/CreateJournalEntryResponse.cs rename to sync-for-payroll/Codat/Sync/Payroll/Models/Operations/CreateJournalEntryResponse.cs index a6c904013..c9f705324 100644 --- a/sync-for-payroll/CodatSyncPayroll/Models/Operations/CreateJournalEntryResponse.cs +++ b/sync-for-payroll/Codat/Sync/Payroll/Models/Operations/CreateJournalEntryResponse.cs @@ -11,6 +11,7 @@ namespace Codat.Sync.Payroll.Models.Operations { using Codat.Sync.Payroll.Models.Shared; + using Codat.Sync.Payroll.Utils; using System.Net.Http; using System; @@ -27,11 +28,6 @@ public class CreateJournalEntryResponse /// public Models.Shared.CreateJournalEntryResponse? CreateJournalEntryResponseValue { get; set; } - /// - /// The request made is not valid. - /// - public ErrorMessage? ErrorMessage { get; set; } - /// /// HTTP response status code for this operation /// diff --git a/sync-for-payroll/CodatSyncPayroll/Models/Operations/CreateJournalRequest.cs b/sync-for-payroll/Codat/Sync/Payroll/Models/Operations/CreateJournalRequest.cs similarity index 96% rename from sync-for-payroll/CodatSyncPayroll/Models/Operations/CreateJournalRequest.cs rename to sync-for-payroll/Codat/Sync/Payroll/Models/Operations/CreateJournalRequest.cs index 9c8416c5c..af498c7f6 100644 --- a/sync-for-payroll/CodatSyncPayroll/Models/Operations/CreateJournalRequest.cs +++ b/sync-for-payroll/Codat/Sync/Payroll/Models/Operations/CreateJournalRequest.cs @@ -20,7 +20,7 @@ public class CreateJournalRequest /// Allow a sync upon push completion. /// [SpeakeasyMetadata("queryParam:style=form,explode=true,name=allowSyncOnPushComplete")] - public bool? AllowSyncOnPushComplete { get; set; } + public bool? AllowSyncOnPushComplete { get; set; } = true; /// /// Unique identifier for a company. diff --git a/sync-for-payroll/CodatSyncPayroll/Models/Operations/CreateJournalResponse.cs b/sync-for-payroll/Codat/Sync/Payroll/Models/Operations/CreateJournalResponse.cs similarity index 89% rename from sync-for-payroll/CodatSyncPayroll/Models/Operations/CreateJournalResponse.cs rename to sync-for-payroll/Codat/Sync/Payroll/Models/Operations/CreateJournalResponse.cs index 51ea2c5cb..a7f7c4c8a 100644 --- a/sync-for-payroll/CodatSyncPayroll/Models/Operations/CreateJournalResponse.cs +++ b/sync-for-payroll/Codat/Sync/Payroll/Models/Operations/CreateJournalResponse.cs @@ -11,6 +11,7 @@ namespace Codat.Sync.Payroll.Models.Operations { using Codat.Sync.Payroll.Models.Shared; + using Codat.Sync.Payroll.Utils; using System.Net.Http; using System; @@ -27,11 +28,6 @@ public class CreateJournalResponse /// public Models.Shared.CreateJournalResponse? CreateJournalResponseValue { get; set; } - /// - /// The request made is not valid. - /// - public ErrorMessage? ErrorMessage { get; set; } - /// /// HTTP response status code for this operation /// diff --git a/sync-for-payroll/CodatSyncPayroll/Models/Operations/DeleteCompanyRequest.cs b/sync-for-payroll/Codat/Sync/Payroll/Models/Operations/DeleteCompanyRequest.cs similarity index 100% rename from sync-for-payroll/CodatSyncPayroll/Models/Operations/DeleteCompanyRequest.cs rename to sync-for-payroll/Codat/Sync/Payroll/Models/Operations/DeleteCompanyRequest.cs diff --git a/sync-for-payroll/CodatSyncPayroll/Models/Operations/DeleteCompanyResponse.cs b/sync-for-payroll/Codat/Sync/Payroll/Models/Operations/DeleteCompanyResponse.cs similarity index 83% rename from sync-for-payroll/CodatSyncPayroll/Models/Operations/DeleteCompanyResponse.cs rename to sync-for-payroll/Codat/Sync/Payroll/Models/Operations/DeleteCompanyResponse.cs index 6c409d318..35343ae77 100644 --- a/sync-for-payroll/CodatSyncPayroll/Models/Operations/DeleteCompanyResponse.cs +++ b/sync-for-payroll/Codat/Sync/Payroll/Models/Operations/DeleteCompanyResponse.cs @@ -10,7 +10,7 @@ #nullable enable namespace Codat.Sync.Payroll.Models.Operations { - using Codat.Sync.Payroll.Models.Shared; + using Codat.Sync.Payroll.Utils; using System.Net.Http; using System; @@ -22,11 +22,6 @@ public class DeleteCompanyResponse /// public string? ContentType { get; set; } = default!; - /// - /// Your API request was not properly authorized. - /// - public ErrorMessage? ErrorMessage { get; set; } - /// /// HTTP response status code for this operation /// diff --git a/sync-for-payroll/CodatSyncPayroll/Models/Operations/DeleteConnectionRequest.cs b/sync-for-payroll/Codat/Sync/Payroll/Models/Operations/DeleteConnectionRequest.cs similarity index 100% rename from sync-for-payroll/CodatSyncPayroll/Models/Operations/DeleteConnectionRequest.cs rename to sync-for-payroll/Codat/Sync/Payroll/Models/Operations/DeleteConnectionRequest.cs diff --git a/sync-for-payroll/CodatSyncPayroll/Models/Operations/DeleteConnectionResponse.cs b/sync-for-payroll/Codat/Sync/Payroll/Models/Operations/DeleteConnectionResponse.cs similarity index 84% rename from sync-for-payroll/CodatSyncPayroll/Models/Operations/DeleteConnectionResponse.cs rename to sync-for-payroll/Codat/Sync/Payroll/Models/Operations/DeleteConnectionResponse.cs index 2afe46664..720388398 100644 --- a/sync-for-payroll/CodatSyncPayroll/Models/Operations/DeleteConnectionResponse.cs +++ b/sync-for-payroll/Codat/Sync/Payroll/Models/Operations/DeleteConnectionResponse.cs @@ -10,7 +10,7 @@ #nullable enable namespace Codat.Sync.Payroll.Models.Operations { - using Codat.Sync.Payroll.Models.Shared; + using Codat.Sync.Payroll.Utils; using System.Net.Http; using System; @@ -22,11 +22,6 @@ public class DeleteConnectionResponse /// public string? ContentType { get; set; } = default!; - /// - /// Your API request was not properly authorized. - /// - public ErrorMessage? ErrorMessage { get; set; } - /// /// HTTP response status code for this operation /// diff --git a/sync-for-payroll/CodatSyncPayroll/Models/Operations/DeleteJournalEntryRequest.cs b/sync-for-payroll/Codat/Sync/Payroll/Models/Operations/DeleteJournalEntryRequest.cs similarity index 96% rename from sync-for-payroll/CodatSyncPayroll/Models/Operations/DeleteJournalEntryRequest.cs rename to sync-for-payroll/Codat/Sync/Payroll/Models/Operations/DeleteJournalEntryRequest.cs index 0744b5e29..21510e483 100644 --- a/sync-for-payroll/CodatSyncPayroll/Models/Operations/DeleteJournalEntryRequest.cs +++ b/sync-for-payroll/Codat/Sync/Payroll/Models/Operations/DeleteJournalEntryRequest.cs @@ -19,7 +19,7 @@ public class DeleteJournalEntryRequest /// Allow a sync upon push completion. /// [SpeakeasyMetadata("queryParam:style=form,explode=true,name=allowSyncOnPushComplete")] - public bool? AllowSyncOnPushComplete { get; set; } + public bool? AllowSyncOnPushComplete { get; set; } = true; /// /// Unique identifier for a company. diff --git a/sync-for-payroll/CodatSyncPayroll/Models/Operations/DeleteJournalEntryResponse.cs b/sync-for-payroll/Codat/Sync/Payroll/Models/Operations/DeleteJournalEntryResponse.cs similarity index 88% rename from sync-for-payroll/CodatSyncPayroll/Models/Operations/DeleteJournalEntryResponse.cs rename to sync-for-payroll/Codat/Sync/Payroll/Models/Operations/DeleteJournalEntryResponse.cs index ef94ded9a..67ebbe40f 100644 --- a/sync-for-payroll/CodatSyncPayroll/Models/Operations/DeleteJournalEntryResponse.cs +++ b/sync-for-payroll/Codat/Sync/Payroll/Models/Operations/DeleteJournalEntryResponse.cs @@ -11,6 +11,7 @@ namespace Codat.Sync.Payroll.Models.Operations { using Codat.Sync.Payroll.Models.Shared; + using Codat.Sync.Payroll.Utils; using System.Net.Http; using System; @@ -22,11 +23,6 @@ public class DeleteJournalEntryResponse /// public string? ContentType { get; set; } = default!; - /// - /// Your API request was not properly authorized. - /// - public ErrorMessage? ErrorMessage { get; set; } - /// /// OK /// diff --git a/sync-for-payroll/CodatSyncPayroll/Models/Operations/GetAccountRequest.cs b/sync-for-payroll/Codat/Sync/Payroll/Models/Operations/GetAccountRequest.cs similarity index 100% rename from sync-for-payroll/CodatSyncPayroll/Models/Operations/GetAccountRequest.cs rename to sync-for-payroll/Codat/Sync/Payroll/Models/Operations/GetAccountRequest.cs diff --git a/sync-for-payroll/CodatSyncPayroll/Models/Operations/GetAccountResponse.cs b/sync-for-payroll/Codat/Sync/Payroll/Models/Operations/GetAccountResponse.cs similarity index 85% rename from sync-for-payroll/CodatSyncPayroll/Models/Operations/GetAccountResponse.cs rename to sync-for-payroll/Codat/Sync/Payroll/Models/Operations/GetAccountResponse.cs index 04d166236..9cf61d86e 100644 --- a/sync-for-payroll/CodatSyncPayroll/Models/Operations/GetAccountResponse.cs +++ b/sync-for-payroll/Codat/Sync/Payroll/Models/Operations/GetAccountResponse.cs @@ -11,6 +11,7 @@ namespace Codat.Sync.Payroll.Models.Operations { using Codat.Sync.Payroll.Models.Shared; + using Codat.Sync.Payroll.Utils; using System.Net.Http; using System; @@ -20,18 +21,13 @@ public class GetAccountResponse /// /// Success /// - public Account? Account { get; set; } + public Account? Account { get; set; } = null; /// /// HTTP response content type for this operation /// public string? ContentType { get; set; } = default!; - /// - /// Your API request was not properly authorized. - /// - public ErrorMessage? ErrorMessage { get; set; } - /// /// HTTP response status code for this operation /// diff --git a/sync-for-payroll/CodatSyncPayroll/Models/Operations/GetAccountingProfileRequest.cs b/sync-for-payroll/Codat/Sync/Payroll/Models/Operations/GetAccountingProfileRequest.cs similarity index 100% rename from sync-for-payroll/CodatSyncPayroll/Models/Operations/GetAccountingProfileRequest.cs rename to sync-for-payroll/Codat/Sync/Payroll/Models/Operations/GetAccountingProfileRequest.cs diff --git a/sync-for-payroll/CodatSyncPayroll/Models/Operations/GetAccountingProfileResponse.cs b/sync-for-payroll/Codat/Sync/Payroll/Models/Operations/GetAccountingProfileResponse.cs similarity index 88% rename from sync-for-payroll/CodatSyncPayroll/Models/Operations/GetAccountingProfileResponse.cs rename to sync-for-payroll/Codat/Sync/Payroll/Models/Operations/GetAccountingProfileResponse.cs index d99b455ef..4649508dc 100644 --- a/sync-for-payroll/CodatSyncPayroll/Models/Operations/GetAccountingProfileResponse.cs +++ b/sync-for-payroll/Codat/Sync/Payroll/Models/Operations/GetAccountingProfileResponse.cs @@ -11,6 +11,7 @@ namespace Codat.Sync.Payroll.Models.Operations { using Codat.Sync.Payroll.Models.Shared; + using Codat.Sync.Payroll.Utils; using System.Net.Http; using System; @@ -27,11 +28,6 @@ public class GetAccountingProfileResponse /// public string? ContentType { get; set; } = default!; - /// - /// Your API request was not properly authorized. - /// - public ErrorMessage? ErrorMessage { get; set; } - /// /// HTTP response status code for this operation /// diff --git a/sync-for-payroll/CodatSyncPayroll/Models/Operations/GetCompanyRequest.cs b/sync-for-payroll/Codat/Sync/Payroll/Models/Operations/GetCompanyRequest.cs similarity index 100% rename from sync-for-payroll/CodatSyncPayroll/Models/Operations/GetCompanyRequest.cs rename to sync-for-payroll/Codat/Sync/Payroll/Models/Operations/GetCompanyRequest.cs diff --git a/sync-for-payroll/CodatSyncPayroll/Models/Operations/GetCompanyResponse.cs b/sync-for-payroll/Codat/Sync/Payroll/Models/Operations/GetCompanyResponse.cs similarity index 88% rename from sync-for-payroll/CodatSyncPayroll/Models/Operations/GetCompanyResponse.cs rename to sync-for-payroll/Codat/Sync/Payroll/Models/Operations/GetCompanyResponse.cs index 005769302..2165ec463 100644 --- a/sync-for-payroll/CodatSyncPayroll/Models/Operations/GetCompanyResponse.cs +++ b/sync-for-payroll/Codat/Sync/Payroll/Models/Operations/GetCompanyResponse.cs @@ -11,6 +11,7 @@ namespace Codat.Sync.Payroll.Models.Operations { using Codat.Sync.Payroll.Models.Shared; + using Codat.Sync.Payroll.Utils; using System.Net.Http; using System; @@ -27,11 +28,6 @@ public class GetCompanyResponse /// public string? ContentType { get; set; } = default!; - /// - /// Your API request was not properly authorized. - /// - public ErrorMessage? ErrorMessage { get; set; } - /// /// HTTP response status code for this operation /// diff --git a/sync-for-payroll/CodatSyncPayroll/Models/Operations/GetConnectionRequest.cs b/sync-for-payroll/Codat/Sync/Payroll/Models/Operations/GetConnectionRequest.cs similarity index 100% rename from sync-for-payroll/CodatSyncPayroll/Models/Operations/GetConnectionRequest.cs rename to sync-for-payroll/Codat/Sync/Payroll/Models/Operations/GetConnectionRequest.cs diff --git a/sync-for-payroll/CodatSyncPayroll/Models/Operations/GetConnectionResponse.cs b/sync-for-payroll/Codat/Sync/Payroll/Models/Operations/GetConnectionResponse.cs similarity index 88% rename from sync-for-payroll/CodatSyncPayroll/Models/Operations/GetConnectionResponse.cs rename to sync-for-payroll/Codat/Sync/Payroll/Models/Operations/GetConnectionResponse.cs index 2feb8c48e..9da7ab381 100644 --- a/sync-for-payroll/CodatSyncPayroll/Models/Operations/GetConnectionResponse.cs +++ b/sync-for-payroll/Codat/Sync/Payroll/Models/Operations/GetConnectionResponse.cs @@ -11,6 +11,7 @@ namespace Codat.Sync.Payroll.Models.Operations { using Codat.Sync.Payroll.Models.Shared; + using Codat.Sync.Payroll.Utils; using System.Net.Http; using System; @@ -27,11 +28,6 @@ public class GetConnectionResponse /// public string? ContentType { get; set; } = default!; - /// - /// Your API request was not properly authorized. - /// - public ErrorMessage? ErrorMessage { get; set; } - /// /// HTTP response status code for this operation /// diff --git a/sync-for-payroll/CodatSyncPayroll/Models/Operations/GetCreateAccountsModelRequest.cs b/sync-for-payroll/Codat/Sync/Payroll/Models/Operations/GetCreateAccountsModelRequest.cs similarity index 100% rename from sync-for-payroll/CodatSyncPayroll/Models/Operations/GetCreateAccountsModelRequest.cs rename to sync-for-payroll/Codat/Sync/Payroll/Models/Operations/GetCreateAccountsModelRequest.cs diff --git a/sync-for-payroll/CodatSyncPayroll/Models/Operations/GetCreateAccountsModelResponse.cs b/sync-for-payroll/Codat/Sync/Payroll/Models/Operations/GetCreateAccountsModelResponse.cs similarity index 88% rename from sync-for-payroll/CodatSyncPayroll/Models/Operations/GetCreateAccountsModelResponse.cs rename to sync-for-payroll/Codat/Sync/Payroll/Models/Operations/GetCreateAccountsModelResponse.cs index 1935382f3..617c3d7d4 100644 --- a/sync-for-payroll/CodatSyncPayroll/Models/Operations/GetCreateAccountsModelResponse.cs +++ b/sync-for-payroll/Codat/Sync/Payroll/Models/Operations/GetCreateAccountsModelResponse.cs @@ -11,6 +11,7 @@ namespace Codat.Sync.Payroll.Models.Operations { using Codat.Sync.Payroll.Models.Shared; + using Codat.Sync.Payroll.Utils; using System.Net.Http; using System; @@ -22,11 +23,6 @@ public class GetCreateAccountsModelResponse /// public string? ContentType { get; set; } = default!; - /// - /// Your API request was not properly authorized. - /// - public ErrorMessage? ErrorMessage { get; set; } - /// /// OK /// diff --git a/sync-for-payroll/CodatSyncPayroll/Models/Operations/GetCreateJournalEntryModelRequest.cs b/sync-for-payroll/Codat/Sync/Payroll/Models/Operations/GetCreateJournalEntryModelRequest.cs similarity index 100% rename from sync-for-payroll/CodatSyncPayroll/Models/Operations/GetCreateJournalEntryModelRequest.cs rename to sync-for-payroll/Codat/Sync/Payroll/Models/Operations/GetCreateJournalEntryModelRequest.cs diff --git a/sync-for-payroll/CodatSyncPayroll/Models/Operations/GetCreateJournalEntryModelResponse.cs b/sync-for-payroll/Codat/Sync/Payroll/Models/Operations/GetCreateJournalEntryModelResponse.cs similarity index 88% rename from sync-for-payroll/CodatSyncPayroll/Models/Operations/GetCreateJournalEntryModelResponse.cs rename to sync-for-payroll/Codat/Sync/Payroll/Models/Operations/GetCreateJournalEntryModelResponse.cs index 3e7f62661..bfd21a525 100644 --- a/sync-for-payroll/CodatSyncPayroll/Models/Operations/GetCreateJournalEntryModelResponse.cs +++ b/sync-for-payroll/Codat/Sync/Payroll/Models/Operations/GetCreateJournalEntryModelResponse.cs @@ -11,6 +11,7 @@ namespace Codat.Sync.Payroll.Models.Operations { using Codat.Sync.Payroll.Models.Shared; + using Codat.Sync.Payroll.Utils; using System.Net.Http; using System; @@ -22,11 +23,6 @@ public class GetCreateJournalEntryModelResponse /// public string? ContentType { get; set; } = default!; - /// - /// Your API request was not properly authorized. - /// - public ErrorMessage? ErrorMessage { get; set; } - /// /// OK /// diff --git a/sync-for-payroll/CodatSyncPayroll/Models/Operations/GetCreateJournalModelRequest.cs b/sync-for-payroll/Codat/Sync/Payroll/Models/Operations/GetCreateJournalModelRequest.cs similarity index 100% rename from sync-for-payroll/CodatSyncPayroll/Models/Operations/GetCreateJournalModelRequest.cs rename to sync-for-payroll/Codat/Sync/Payroll/Models/Operations/GetCreateJournalModelRequest.cs diff --git a/sync-for-payroll/CodatSyncPayroll/Models/Operations/GetCreateJournalModelResponse.cs b/sync-for-payroll/Codat/Sync/Payroll/Models/Operations/GetCreateJournalModelResponse.cs similarity index 88% rename from sync-for-payroll/CodatSyncPayroll/Models/Operations/GetCreateJournalModelResponse.cs rename to sync-for-payroll/Codat/Sync/Payroll/Models/Operations/GetCreateJournalModelResponse.cs index c5d24315d..089a7e3e4 100644 --- a/sync-for-payroll/CodatSyncPayroll/Models/Operations/GetCreateJournalModelResponse.cs +++ b/sync-for-payroll/Codat/Sync/Payroll/Models/Operations/GetCreateJournalModelResponse.cs @@ -11,6 +11,7 @@ namespace Codat.Sync.Payroll.Models.Operations { using Codat.Sync.Payroll.Models.Shared; + using Codat.Sync.Payroll.Utils; using System.Net.Http; using System; @@ -22,11 +23,6 @@ public class GetCreateJournalModelResponse /// public string? ContentType { get; set; } = default!; - /// - /// Your API request was not properly authorized. - /// - public ErrorMessage? ErrorMessage { get; set; } - /// /// OK /// diff --git a/sync-for-payroll/Codat/Sync/Payroll/Models/Operations/GetDataStatusDataStatuses.cs b/sync-for-payroll/Codat/Sync/Payroll/Models/Operations/GetDataStatusDataStatuses.cs new file mode 100644 index 000000000..1557a0d7d --- /dev/null +++ b/sync-for-payroll/Codat/Sync/Payroll/Models/Operations/GetDataStatusDataStatuses.cs @@ -0,0 +1,281 @@ + +//------------------------------------------------------------------------------ +// +// This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// +// Changes to this file may cause incorrect behavior and will be lost when +// the code is regenerated. +// +//------------------------------------------------------------------------------ +#nullable enable +namespace Codat.Sync.Payroll.Models.Operations +{ + using Codat.Sync.Payroll.Models.Shared; + using Codat.Sync.Payroll.Utils; + using Newtonsoft.Json; + + /// + /// OK + /// + public class GetDataStatusDataStatuses + { + + /// + /// Describes the state of data in the Codat cache for a company and data type + /// + [JsonProperty("accountTransactions")] + public DataStatus? AccountTransactions { get; set; } + + /// + /// Describes the state of data in the Codat cache for a company and data type + /// + [JsonProperty("balanceSheet")] + public DataStatus? BalanceSheet { get; set; } + + /// + /// Describes the state of data in the Codat cache for a company and data type + /// + [JsonProperty("bankAccounts")] + public DataStatus? BankAccounts { get; set; } + + /// + /// Describes the state of data in the Codat cache for a company and data type + /// + [JsonProperty("bankTransactions")] + public DataStatus? BankTransactions { get; set; } + + /// + /// Describes the state of data in the Codat cache for a company and data type + /// + [JsonProperty("banking-accountBalances")] + public DataStatus? BankingAccountBalances { get; set; } + + /// + /// Describes the state of data in the Codat cache for a company and data type + /// + [JsonProperty("banking-accounts")] + public DataStatus? BankingAccounts { get; set; } + + /// + /// Describes the state of data in the Codat cache for a company and data type + /// + [JsonProperty("banking-transactionCategories")] + public DataStatus? BankingTransactionCategories { get; set; } + + /// + /// Describes the state of data in the Codat cache for a company and data type + /// + [JsonProperty("banking-transactions")] + public DataStatus? BankingTransactions { get; set; } + + /// + /// Describes the state of data in the Codat cache for a company and data type + /// + [JsonProperty("billCreditNotes")] + public DataStatus? BillCreditNotes { get; set; } + + /// + /// Describes the state of data in the Codat cache for a company and data type + /// + [JsonProperty("billPayments")] + public DataStatus? BillPayments { get; set; } + + /// + /// Describes the state of data in the Codat cache for a company and data type + /// + [JsonProperty("bills")] + public DataStatus? Bills { get; set; } + + /// + /// Describes the state of data in the Codat cache for a company and data type + /// + [JsonProperty("cashFlowStatement")] + public DataStatus? CashFlowStatement { get; set; } + + /// + /// Describes the state of data in the Codat cache for a company and data type + /// + [JsonProperty("chartOfAccounts")] + public DataStatus? ChartOfAccounts { get; set; } + + /// + /// Describes the state of data in the Codat cache for a company and data type + /// + [JsonProperty("commerce-companyInfo")] + public DataStatus? CommerceCompanyInfo { get; set; } + + /// + /// Describes the state of data in the Codat cache for a company and data type + /// + [JsonProperty("commerce-customers")] + public DataStatus? CommerceCustomers { get; set; } + + /// + /// Describes the state of data in the Codat cache for a company and data type + /// + [JsonProperty("commerce-disputes")] + public DataStatus? CommerceDisputes { get; set; } + + /// + /// Describes the state of data in the Codat cache for a company and data type + /// + [JsonProperty("commerce-locations")] + public DataStatus? CommerceLocations { get; set; } + + /// + /// Describes the state of data in the Codat cache for a company and data type + /// + [JsonProperty("commerce-orders")] + public DataStatus? CommerceOrders { get; set; } + + /// + /// Describes the state of data in the Codat cache for a company and data type + /// + [JsonProperty("commerce-paymentMethods")] + public DataStatus? CommercePaymentMethods { get; set; } + + /// + /// Describes the state of data in the Codat cache for a company and data type + /// + [JsonProperty("commerce-payments")] + public DataStatus? CommercePayments { get; set; } + + /// + /// Describes the state of data in the Codat cache for a company and data type + /// + [JsonProperty("commerce-productCategories")] + public DataStatus? CommerceProductCategories { get; set; } + + /// + /// Describes the state of data in the Codat cache for a company and data type + /// + [JsonProperty("commerce-products")] + public DataStatus? CommerceProducts { get; set; } + + /// + /// Describes the state of data in the Codat cache for a company and data type + /// + [JsonProperty("commerce-taxComponents")] + public DataStatus? CommerceTaxComponents { get; set; } + + /// + /// Describes the state of data in the Codat cache for a company and data type + /// + [JsonProperty("commerce-transactions")] + public DataStatus? CommerceTransactions { get; set; } + + /// + /// Describes the state of data in the Codat cache for a company and data type + /// + [JsonProperty("company")] + public DataStatus? Company { get; set; } + + /// + /// Describes the state of data in the Codat cache for a company and data type + /// + [JsonProperty("creditNotes")] + public DataStatus? CreditNotes { get; set; } + + /// + /// Describes the state of data in the Codat cache for a company and data type + /// + [JsonProperty("customers")] + public DataStatus? Customers { get; set; } + + /// + /// Describes the state of data in the Codat cache for a company and data type + /// + [JsonProperty("directCosts")] + public DataStatus? DirectCosts { get; set; } + + /// + /// Describes the state of data in the Codat cache for a company and data type + /// + [JsonProperty("directIncomes")] + public DataStatus? DirectIncomes { get; set; } + + /// + /// Describes the state of data in the Codat cache for a company and data type + /// + [JsonProperty("invoices")] + public DataStatus? Invoices { get; set; } + + /// + /// Describes the state of data in the Codat cache for a company and data type + /// + [JsonProperty("itemReceipts")] + public DataStatus? ItemReceipts { get; set; } + + /// + /// Describes the state of data in the Codat cache for a company and data type + /// + [JsonProperty("items")] + public DataStatus? Items { get; set; } + + /// + /// Describes the state of data in the Codat cache for a company and data type + /// + [JsonProperty("journalEntries")] + public DataStatus? JournalEntries { get; set; } + + /// + /// Describes the state of data in the Codat cache for a company and data type + /// + [JsonProperty("journals")] + public DataStatus? Journals { get; set; } + + /// + /// Describes the state of data in the Codat cache for a company and data type + /// + [JsonProperty("paymentMethods")] + public DataStatus? PaymentMethods { get; set; } + + /// + /// Describes the state of data in the Codat cache for a company and data type + /// + [JsonProperty("payments")] + public DataStatus? Payments { get; set; } + + /// + /// Describes the state of data in the Codat cache for a company and data type + /// + [JsonProperty("profitAndLoss")] + public DataStatus? ProfitAndLoss { get; set; } + + /// + /// Describes the state of data in the Codat cache for a company and data type + /// + [JsonProperty("purchaseOrders")] + public DataStatus? PurchaseOrders { get; set; } + + /// + /// Describes the state of data in the Codat cache for a company and data type + /// + [JsonProperty("salesOrders")] + public DataStatus? SalesOrders { get; set; } + + /// + /// Describes the state of data in the Codat cache for a company and data type + /// + [JsonProperty("suppliers")] + public DataStatus? Suppliers { get; set; } + + /// + /// Describes the state of data in the Codat cache for a company and data type + /// + [JsonProperty("taxRates")] + public DataStatus? TaxRates { get; set; } + + /// + /// Describes the state of data in the Codat cache for a company and data type + /// + [JsonProperty("trackingCategories")] + public DataStatus? TrackingCategories { get; set; } + + /// + /// Describes the state of data in the Codat cache for a company and data type + /// + [JsonProperty("transfers")] + public DataStatus? Transfers { get; set; } + } +} \ No newline at end of file diff --git a/sync-for-payroll/CodatSyncPayroll/Models/Operations/GetDataStatusRequest.cs b/sync-for-payroll/Codat/Sync/Payroll/Models/Operations/GetDataStatusRequest.cs similarity index 100% rename from sync-for-payroll/CodatSyncPayroll/Models/Operations/GetDataStatusRequest.cs rename to sync-for-payroll/Codat/Sync/Payroll/Models/Operations/GetDataStatusRequest.cs diff --git a/sync-for-payroll/CodatSyncPayroll/Models/Operations/GetDataStatusResponse.cs b/sync-for-payroll/Codat/Sync/Payroll/Models/Operations/GetDataStatusResponse.cs similarity index 78% rename from sync-for-payroll/CodatSyncPayroll/Models/Operations/GetDataStatusResponse.cs rename to sync-for-payroll/Codat/Sync/Payroll/Models/Operations/GetDataStatusResponse.cs index 2af74d4e7..96aab9249 100644 --- a/sync-for-payroll/CodatSyncPayroll/Models/Operations/GetDataStatusResponse.cs +++ b/sync-for-payroll/Codat/Sync/Payroll/Models/Operations/GetDataStatusResponse.cs @@ -10,8 +10,8 @@ #nullable enable namespace Codat.Sync.Payroll.Models.Operations { - using Codat.Sync.Payroll.Models.Shared; - using System.Collections.Generic; + using Codat.Sync.Payroll.Models.Operations; + using Codat.Sync.Payroll.Utils; using System.Net.Http; using System; @@ -26,12 +26,7 @@ public class GetDataStatusResponse /// /// OK /// - public Dictionary? DataStatuses { get; set; } - - /// - /// Your API request was not properly authorized. - /// - public ErrorMessage? ErrorMessage { get; set; } + public GetDataStatusDataStatuses? DataStatuses { get; set; } /// /// HTTP response status code for this operation diff --git a/sync-for-payroll/CodatSyncPayroll/Models/Operations/GetJournalEntryRequest.cs b/sync-for-payroll/Codat/Sync/Payroll/Models/Operations/GetJournalEntryRequest.cs similarity index 100% rename from sync-for-payroll/CodatSyncPayroll/Models/Operations/GetJournalEntryRequest.cs rename to sync-for-payroll/Codat/Sync/Payroll/Models/Operations/GetJournalEntryRequest.cs diff --git a/sync-for-payroll/CodatSyncPayroll/Models/Operations/GetJournalEntryResponse.cs b/sync-for-payroll/Codat/Sync/Payroll/Models/Operations/GetJournalEntryResponse.cs similarity index 84% rename from sync-for-payroll/CodatSyncPayroll/Models/Operations/GetJournalEntryResponse.cs rename to sync-for-payroll/Codat/Sync/Payroll/Models/Operations/GetJournalEntryResponse.cs index 7deed98f5..0574d29cf 100644 --- a/sync-for-payroll/CodatSyncPayroll/Models/Operations/GetJournalEntryResponse.cs +++ b/sync-for-payroll/Codat/Sync/Payroll/Models/Operations/GetJournalEntryResponse.cs @@ -11,6 +11,7 @@ namespace Codat.Sync.Payroll.Models.Operations { using Codat.Sync.Payroll.Models.Shared; + using Codat.Sync.Payroll.Utils; using System.Net.Http; using System; @@ -22,15 +23,10 @@ public class GetJournalEntryResponse /// public string? ContentType { get; set; } = default!; - /// - /// Your API request was not properly authorized. - /// - public ErrorMessage? ErrorMessage { get; set; } - /// /// Success /// - public JournalEntry? JournalEntry { get; set; } + public JournalEntry? JournalEntry { get; set; } = null; /// /// HTTP response status code for this operation diff --git a/sync-for-payroll/CodatSyncPayroll/Models/Operations/GetJournalRequest.cs b/sync-for-payroll/Codat/Sync/Payroll/Models/Operations/GetJournalRequest.cs similarity index 100% rename from sync-for-payroll/CodatSyncPayroll/Models/Operations/GetJournalRequest.cs rename to sync-for-payroll/Codat/Sync/Payroll/Models/Operations/GetJournalRequest.cs diff --git a/sync-for-payroll/CodatSyncPayroll/Models/Operations/GetJournalResponse.cs b/sync-for-payroll/Codat/Sync/Payroll/Models/Operations/GetJournalResponse.cs similarity index 85% rename from sync-for-payroll/CodatSyncPayroll/Models/Operations/GetJournalResponse.cs rename to sync-for-payroll/Codat/Sync/Payroll/Models/Operations/GetJournalResponse.cs index aabee0afc..8a9625131 100644 --- a/sync-for-payroll/CodatSyncPayroll/Models/Operations/GetJournalResponse.cs +++ b/sync-for-payroll/Codat/Sync/Payroll/Models/Operations/GetJournalResponse.cs @@ -11,6 +11,7 @@ namespace Codat.Sync.Payroll.Models.Operations { using Codat.Sync.Payroll.Models.Shared; + using Codat.Sync.Payroll.Utils; using System.Net.Http; using System; @@ -22,15 +23,10 @@ public class GetJournalResponse /// public string? ContentType { get; set; } = default!; - /// - /// Your API request was not properly authorized. - /// - public ErrorMessage? ErrorMessage { get; set; } - /// /// Success /// - public Journal? Journal { get; set; } + public Journal? Journal { get; set; } = null; /// /// HTTP response status code for this operation diff --git a/sync-for-payroll/CodatSyncPayroll/Models/Operations/GetPullOperationRequest.cs b/sync-for-payroll/Codat/Sync/Payroll/Models/Operations/GetPullOperationRequest.cs similarity index 100% rename from sync-for-payroll/CodatSyncPayroll/Models/Operations/GetPullOperationRequest.cs rename to sync-for-payroll/Codat/Sync/Payroll/Models/Operations/GetPullOperationRequest.cs diff --git a/sync-for-payroll/CodatSyncPayroll/Models/Operations/GetPullOperationResponse.cs b/sync-for-payroll/Codat/Sync/Payroll/Models/Operations/GetPullOperationResponse.cs similarity index 88% rename from sync-for-payroll/CodatSyncPayroll/Models/Operations/GetPullOperationResponse.cs rename to sync-for-payroll/Codat/Sync/Payroll/Models/Operations/GetPullOperationResponse.cs index 878dd0d86..5148ea575 100644 --- a/sync-for-payroll/CodatSyncPayroll/Models/Operations/GetPullOperationResponse.cs +++ b/sync-for-payroll/Codat/Sync/Payroll/Models/Operations/GetPullOperationResponse.cs @@ -11,6 +11,7 @@ namespace Codat.Sync.Payroll.Models.Operations { using Codat.Sync.Payroll.Models.Shared; + using Codat.Sync.Payroll.Utils; using System.Net.Http; using System; @@ -22,11 +23,6 @@ public class GetPullOperationResponse /// public string? ContentType { get; set; } = default!; - /// - /// Your API request was not properly authorized. - /// - public ErrorMessage? ErrorMessage { get; set; } - /// /// OK /// diff --git a/sync-for-payroll/CodatSyncPayroll/Models/Operations/GetPushOperationRequest.cs b/sync-for-payroll/Codat/Sync/Payroll/Models/Operations/GetPushOperationRequest.cs similarity index 100% rename from sync-for-payroll/CodatSyncPayroll/Models/Operations/GetPushOperationRequest.cs rename to sync-for-payroll/Codat/Sync/Payroll/Models/Operations/GetPushOperationRequest.cs diff --git a/sync-for-payroll/CodatSyncPayroll/Models/Operations/GetPushOperationResponse.cs b/sync-for-payroll/Codat/Sync/Payroll/Models/Operations/GetPushOperationResponse.cs similarity index 88% rename from sync-for-payroll/CodatSyncPayroll/Models/Operations/GetPushOperationResponse.cs rename to sync-for-payroll/Codat/Sync/Payroll/Models/Operations/GetPushOperationResponse.cs index f0edc1d86..80b6d9ba0 100644 --- a/sync-for-payroll/CodatSyncPayroll/Models/Operations/GetPushOperationResponse.cs +++ b/sync-for-payroll/Codat/Sync/Payroll/Models/Operations/GetPushOperationResponse.cs @@ -11,6 +11,7 @@ namespace Codat.Sync.Payroll.Models.Operations { using Codat.Sync.Payroll.Models.Shared; + using Codat.Sync.Payroll.Utils; using System.Net.Http; using System; @@ -22,11 +23,6 @@ public class GetPushOperationResponse /// public string? ContentType { get; set; } = default!; - /// - /// Your API request was not properly authorized. - /// - public ErrorMessage? ErrorMessage { get; set; } - /// /// OK /// diff --git a/sync-for-payroll/CodatSyncPayroll/Models/Operations/GetTrackingCategoryRequest.cs b/sync-for-payroll/Codat/Sync/Payroll/Models/Operations/GetTrackingCategoryRequest.cs similarity index 100% rename from sync-for-payroll/CodatSyncPayroll/Models/Operations/GetTrackingCategoryRequest.cs rename to sync-for-payroll/Codat/Sync/Payroll/Models/Operations/GetTrackingCategoryRequest.cs diff --git a/sync-for-payroll/CodatSyncPayroll/Models/Operations/GetTrackingCategoryResponse.cs b/sync-for-payroll/Codat/Sync/Payroll/Models/Operations/GetTrackingCategoryResponse.cs similarity index 88% rename from sync-for-payroll/CodatSyncPayroll/Models/Operations/GetTrackingCategoryResponse.cs rename to sync-for-payroll/Codat/Sync/Payroll/Models/Operations/GetTrackingCategoryResponse.cs index a3ce5b47f..7d4f4364e 100644 --- a/sync-for-payroll/CodatSyncPayroll/Models/Operations/GetTrackingCategoryResponse.cs +++ b/sync-for-payroll/Codat/Sync/Payroll/Models/Operations/GetTrackingCategoryResponse.cs @@ -11,6 +11,7 @@ namespace Codat.Sync.Payroll.Models.Operations { using Codat.Sync.Payroll.Models.Shared; + using Codat.Sync.Payroll.Utils; using System.Net.Http; using System; @@ -22,11 +23,6 @@ public class GetTrackingCategoryResponse /// public string? ContentType { get; set; } = default!; - /// - /// Your API request was not properly authorized. - /// - public ErrorMessage? ErrorMessage { get; set; } - /// /// HTTP response status code for this operation /// @@ -40,6 +36,6 @@ public class GetTrackingCategoryResponse /// /// Success /// - public TrackingCategoryTree? TrackingCategoryTree { get; set; } + public TrackingCategoryTree? TrackingCategoryTree { get; set; } = null; } } \ No newline at end of file diff --git a/sync-for-payroll/CodatSyncPayroll/Models/Operations/ListAccountsRequest.cs b/sync-for-payroll/Codat/Sync/Payroll/Models/Operations/ListAccountsRequest.cs similarity index 95% rename from sync-for-payroll/CodatSyncPayroll/Models/Operations/ListAccountsRequest.cs rename to sync-for-payroll/Codat/Sync/Payroll/Models/Operations/ListAccountsRequest.cs index 39ec5611d..befbf4a6a 100644 --- a/sync-for-payroll/CodatSyncPayroll/Models/Operations/ListAccountsRequest.cs +++ b/sync-for-payroll/Codat/Sync/Payroll/Models/Operations/ListAccountsRequest.cs @@ -31,13 +31,13 @@ public class ListAccountsRequest /// Page number. Read more. /// [SpeakeasyMetadata("queryParam:style=form,explode=true,name=page")] - public int? Page { get; set; } + public int? Page { get; set; } = 1; /// /// Number of records to return in a page. Read more. /// [SpeakeasyMetadata("queryParam:style=form,explode=true,name=pageSize")] - public int? PageSize { get; set; } + public int? PageSize { get; set; } = 100; /// /// Codat query string. Read more. diff --git a/sync-for-payroll/CodatSyncPayroll/Models/Operations/ListAccountsResponse.cs b/sync-for-payroll/Codat/Sync/Payroll/Models/Operations/ListAccountsResponse.cs similarity index 88% rename from sync-for-payroll/CodatSyncPayroll/Models/Operations/ListAccountsResponse.cs rename to sync-for-payroll/Codat/Sync/Payroll/Models/Operations/ListAccountsResponse.cs index 59bdaf86f..8d22763eb 100644 --- a/sync-for-payroll/CodatSyncPayroll/Models/Operations/ListAccountsResponse.cs +++ b/sync-for-payroll/Codat/Sync/Payroll/Models/Operations/ListAccountsResponse.cs @@ -11,6 +11,7 @@ namespace Codat.Sync.Payroll.Models.Operations { using Codat.Sync.Payroll.Models.Shared; + using Codat.Sync.Payroll.Utils; using System.Net.Http; using System; @@ -27,11 +28,6 @@ public class ListAccountsResponse /// public string? ContentType { get; set; } = default!; - /// - /// Your `query` parameter was not correctly formed - /// - public ErrorMessage? ErrorMessage { get; set; } - /// /// HTTP response status code for this operation /// diff --git a/sync-for-payroll/CodatSyncPayroll/Models/Operations/ListCompaniesRequest.cs b/sync-for-payroll/Codat/Sync/Payroll/Models/Operations/ListCompaniesRequest.cs similarity index 94% rename from sync-for-payroll/CodatSyncPayroll/Models/Operations/ListCompaniesRequest.cs rename to sync-for-payroll/Codat/Sync/Payroll/Models/Operations/ListCompaniesRequest.cs index 9e7a3e473..1fb7ee735 100644 --- a/sync-for-payroll/CodatSyncPayroll/Models/Operations/ListCompaniesRequest.cs +++ b/sync-for-payroll/Codat/Sync/Payroll/Models/Operations/ListCompaniesRequest.cs @@ -25,13 +25,13 @@ public class ListCompaniesRequest /// Page number. Read more. /// [SpeakeasyMetadata("queryParam:style=form,explode=true,name=page")] - public int? Page { get; set; } + public int? Page { get; set; } = 1; /// /// Number of records to return in a page. Read more. /// [SpeakeasyMetadata("queryParam:style=form,explode=true,name=pageSize")] - public int? PageSize { get; set; } + public int? PageSize { get; set; } = 100; /// /// Codat query string. Read more. diff --git a/sync-for-payroll/CodatSyncPayroll/Models/Operations/ListCompaniesResponse.cs b/sync-for-payroll/Codat/Sync/Payroll/Models/Operations/ListCompaniesResponse.cs similarity index 88% rename from sync-for-payroll/CodatSyncPayroll/Models/Operations/ListCompaniesResponse.cs rename to sync-for-payroll/Codat/Sync/Payroll/Models/Operations/ListCompaniesResponse.cs index f3db898ad..f9743c4ed 100644 --- a/sync-for-payroll/CodatSyncPayroll/Models/Operations/ListCompaniesResponse.cs +++ b/sync-for-payroll/Codat/Sync/Payroll/Models/Operations/ListCompaniesResponse.cs @@ -11,6 +11,7 @@ namespace Codat.Sync.Payroll.Models.Operations { using Codat.Sync.Payroll.Models.Shared; + using Codat.Sync.Payroll.Utils; using System.Net.Http; using System; @@ -27,11 +28,6 @@ public class ListCompaniesResponse /// public string? ContentType { get; set; } = default!; - /// - /// Your `query` parameter was not correctly formed - /// - public ErrorMessage? ErrorMessage { get; set; } - /// /// HTTP response status code for this operation /// diff --git a/sync-for-payroll/CodatSyncPayroll/Models/Operations/ListConnectionsRequest.cs b/sync-for-payroll/Codat/Sync/Payroll/Models/Operations/ListConnectionsRequest.cs similarity index 95% rename from sync-for-payroll/CodatSyncPayroll/Models/Operations/ListConnectionsRequest.cs rename to sync-for-payroll/Codat/Sync/Payroll/Models/Operations/ListConnectionsRequest.cs index 9b5f69d88..810857421 100644 --- a/sync-for-payroll/CodatSyncPayroll/Models/Operations/ListConnectionsRequest.cs +++ b/sync-for-payroll/Codat/Sync/Payroll/Models/Operations/ListConnectionsRequest.cs @@ -31,13 +31,13 @@ public class ListConnectionsRequest /// Page number. Read more. /// [SpeakeasyMetadata("queryParam:style=form,explode=true,name=page")] - public int? Page { get; set; } + public int? Page { get; set; } = 1; /// /// Number of records to return in a page. Read more. /// [SpeakeasyMetadata("queryParam:style=form,explode=true,name=pageSize")] - public int? PageSize { get; set; } + public int? PageSize { get; set; } = 100; /// /// Codat query string. Read more. diff --git a/sync-for-payroll/CodatSyncPayroll/Models/Operations/ListConnectionsResponse.cs b/sync-for-payroll/Codat/Sync/Payroll/Models/Operations/ListConnectionsResponse.cs similarity index 88% rename from sync-for-payroll/CodatSyncPayroll/Models/Operations/ListConnectionsResponse.cs rename to sync-for-payroll/Codat/Sync/Payroll/Models/Operations/ListConnectionsResponse.cs index 9735f7339..fad922e2f 100644 --- a/sync-for-payroll/CodatSyncPayroll/Models/Operations/ListConnectionsResponse.cs +++ b/sync-for-payroll/Codat/Sync/Payroll/Models/Operations/ListConnectionsResponse.cs @@ -11,6 +11,7 @@ namespace Codat.Sync.Payroll.Models.Operations { using Codat.Sync.Payroll.Models.Shared; + using Codat.Sync.Payroll.Utils; using System.Net.Http; using System; @@ -27,11 +28,6 @@ public class ListConnectionsResponse /// public string? ContentType { get; set; } = default!; - /// - /// Your `query` parameter was not correctly formed - /// - public ErrorMessage? ErrorMessage { get; set; } - /// /// HTTP response status code for this operation /// diff --git a/sync-for-payroll/CodatSyncPayroll/Models/Operations/ListJournalEntriesRequest.cs b/sync-for-payroll/Codat/Sync/Payroll/Models/Operations/ListJournalEntriesRequest.cs similarity index 95% rename from sync-for-payroll/CodatSyncPayroll/Models/Operations/ListJournalEntriesRequest.cs rename to sync-for-payroll/Codat/Sync/Payroll/Models/Operations/ListJournalEntriesRequest.cs index f3d6a578a..eb796fcc8 100644 --- a/sync-for-payroll/CodatSyncPayroll/Models/Operations/ListJournalEntriesRequest.cs +++ b/sync-for-payroll/Codat/Sync/Payroll/Models/Operations/ListJournalEntriesRequest.cs @@ -31,13 +31,13 @@ public class ListJournalEntriesRequest /// Page number. Read more. /// [SpeakeasyMetadata("queryParam:style=form,explode=true,name=page")] - public int? Page { get; set; } + public int? Page { get; set; } = 1; /// /// Number of records to return in a page. Read more. /// [SpeakeasyMetadata("queryParam:style=form,explode=true,name=pageSize")] - public int? PageSize { get; set; } + public int? PageSize { get; set; } = 100; /// /// Codat query string. Read more. diff --git a/sync-for-payroll/CodatSyncPayroll/Models/Operations/ListJournalEntriesResponse.cs b/sync-for-payroll/Codat/Sync/Payroll/Models/Operations/ListJournalEntriesResponse.cs similarity index 88% rename from sync-for-payroll/CodatSyncPayroll/Models/Operations/ListJournalEntriesResponse.cs rename to sync-for-payroll/Codat/Sync/Payroll/Models/Operations/ListJournalEntriesResponse.cs index 78e4d982e..915ad39a0 100644 --- a/sync-for-payroll/CodatSyncPayroll/Models/Operations/ListJournalEntriesResponse.cs +++ b/sync-for-payroll/Codat/Sync/Payroll/Models/Operations/ListJournalEntriesResponse.cs @@ -11,6 +11,7 @@ namespace Codat.Sync.Payroll.Models.Operations { using Codat.Sync.Payroll.Models.Shared; + using Codat.Sync.Payroll.Utils; using System.Net.Http; using System; @@ -22,11 +23,6 @@ public class ListJournalEntriesResponse /// public string? ContentType { get; set; } = default!; - /// - /// Your `query` parameter was not correctly formed - /// - public ErrorMessage? ErrorMessage { get; set; } - /// /// Success /// diff --git a/sync-for-payroll/CodatSyncPayroll/Models/Operations/ListJournalsRequest.cs b/sync-for-payroll/Codat/Sync/Payroll/Models/Operations/ListJournalsRequest.cs similarity index 95% rename from sync-for-payroll/CodatSyncPayroll/Models/Operations/ListJournalsRequest.cs rename to sync-for-payroll/Codat/Sync/Payroll/Models/Operations/ListJournalsRequest.cs index cf6398bdb..2aa7fb36a 100644 --- a/sync-for-payroll/CodatSyncPayroll/Models/Operations/ListJournalsRequest.cs +++ b/sync-for-payroll/Codat/Sync/Payroll/Models/Operations/ListJournalsRequest.cs @@ -31,13 +31,13 @@ public class ListJournalsRequest /// Page number. Read more. /// [SpeakeasyMetadata("queryParam:style=form,explode=true,name=page")] - public int? Page { get; set; } + public int? Page { get; set; } = 1; /// /// Number of records to return in a page. Read more. /// [SpeakeasyMetadata("queryParam:style=form,explode=true,name=pageSize")] - public int? PageSize { get; set; } + public int? PageSize { get; set; } = 100; /// /// Codat query string. Read more. diff --git a/sync-for-payroll/CodatSyncPayroll/Models/Operations/ListJournalsResponse.cs b/sync-for-payroll/Codat/Sync/Payroll/Models/Operations/ListJournalsResponse.cs similarity index 88% rename from sync-for-payroll/CodatSyncPayroll/Models/Operations/ListJournalsResponse.cs rename to sync-for-payroll/Codat/Sync/Payroll/Models/Operations/ListJournalsResponse.cs index dad8e2a49..0361b5bd7 100644 --- a/sync-for-payroll/CodatSyncPayroll/Models/Operations/ListJournalsResponse.cs +++ b/sync-for-payroll/Codat/Sync/Payroll/Models/Operations/ListJournalsResponse.cs @@ -11,6 +11,7 @@ namespace Codat.Sync.Payroll.Models.Operations { using Codat.Sync.Payroll.Models.Shared; + using Codat.Sync.Payroll.Utils; using System.Net.Http; using System; @@ -22,11 +23,6 @@ public class ListJournalsResponse /// public string? ContentType { get; set; } = default!; - /// - /// Your `query` parameter was not correctly formed - /// - public ErrorMessage? ErrorMessage { get; set; } - /// /// Success /// diff --git a/sync-for-payroll/CodatSyncPayroll/Models/Operations/ListPullOperationsRequest.cs b/sync-for-payroll/Codat/Sync/Payroll/Models/Operations/ListPullOperationsRequest.cs similarity index 95% rename from sync-for-payroll/CodatSyncPayroll/Models/Operations/ListPullOperationsRequest.cs rename to sync-for-payroll/Codat/Sync/Payroll/Models/Operations/ListPullOperationsRequest.cs index bf9a7542b..a8edbfed3 100644 --- a/sync-for-payroll/CodatSyncPayroll/Models/Operations/ListPullOperationsRequest.cs +++ b/sync-for-payroll/Codat/Sync/Payroll/Models/Operations/ListPullOperationsRequest.cs @@ -31,13 +31,13 @@ public class ListPullOperationsRequest /// Page number. Read more. /// [SpeakeasyMetadata("queryParam:style=form,explode=true,name=page")] - public int? Page { get; set; } + public int? Page { get; set; } = 1; /// /// Number of records to return in a page. Read more. /// [SpeakeasyMetadata("queryParam:style=form,explode=true,name=pageSize")] - public int? PageSize { get; set; } + public int? PageSize { get; set; } = 100; /// /// Codat query string. Read more. diff --git a/sync-for-payroll/CodatSyncPayroll/Models/Operations/ListPullOperationsResponse.cs b/sync-for-payroll/Codat/Sync/Payroll/Models/Operations/ListPullOperationsResponse.cs similarity index 88% rename from sync-for-payroll/CodatSyncPayroll/Models/Operations/ListPullOperationsResponse.cs rename to sync-for-payroll/Codat/Sync/Payroll/Models/Operations/ListPullOperationsResponse.cs index f3d1d5c67..f92a26c3a 100644 --- a/sync-for-payroll/CodatSyncPayroll/Models/Operations/ListPullOperationsResponse.cs +++ b/sync-for-payroll/Codat/Sync/Payroll/Models/Operations/ListPullOperationsResponse.cs @@ -11,6 +11,7 @@ namespace Codat.Sync.Payroll.Models.Operations { using Codat.Sync.Payroll.Models.Shared; + using Codat.Sync.Payroll.Utils; using System.Net.Http; using System; @@ -22,11 +23,6 @@ public class ListPullOperationsResponse /// public string? ContentType { get; set; } = default!; - /// - /// Your `query` parameter was not correctly formed - /// - public ErrorMessage? ErrorMessage { get; set; } - /// /// OK /// diff --git a/sync-for-payroll/CodatSyncPayroll/Models/Operations/ListPushOperationsRequest.cs b/sync-for-payroll/Codat/Sync/Payroll/Models/Operations/ListPushOperationsRequest.cs similarity index 95% rename from sync-for-payroll/CodatSyncPayroll/Models/Operations/ListPushOperationsRequest.cs rename to sync-for-payroll/Codat/Sync/Payroll/Models/Operations/ListPushOperationsRequest.cs index 668c14028..d2df4dbc1 100644 --- a/sync-for-payroll/CodatSyncPayroll/Models/Operations/ListPushOperationsRequest.cs +++ b/sync-for-payroll/Codat/Sync/Payroll/Models/Operations/ListPushOperationsRequest.cs @@ -31,13 +31,13 @@ public class ListPushOperationsRequest /// Page number. Read more. /// [SpeakeasyMetadata("queryParam:style=form,explode=true,name=page")] - public int? Page { get; set; } + public int? Page { get; set; } = 1; /// /// Number of records to return in a page. Read more. /// [SpeakeasyMetadata("queryParam:style=form,explode=true,name=pageSize")] - public int? PageSize { get; set; } + public int? PageSize { get; set; } = 100; /// /// Codat query string. Read more. diff --git a/sync-for-payroll/CodatSyncPayroll/Models/Operations/ListPushOperationsResponse.cs b/sync-for-payroll/Codat/Sync/Payroll/Models/Operations/ListPushOperationsResponse.cs similarity index 88% rename from sync-for-payroll/CodatSyncPayroll/Models/Operations/ListPushOperationsResponse.cs rename to sync-for-payroll/Codat/Sync/Payroll/Models/Operations/ListPushOperationsResponse.cs index dc545d6fe..73e3dca8e 100644 --- a/sync-for-payroll/CodatSyncPayroll/Models/Operations/ListPushOperationsResponse.cs +++ b/sync-for-payroll/Codat/Sync/Payroll/Models/Operations/ListPushOperationsResponse.cs @@ -11,6 +11,7 @@ namespace Codat.Sync.Payroll.Models.Operations { using Codat.Sync.Payroll.Models.Shared; + using Codat.Sync.Payroll.Utils; using System.Net.Http; using System; @@ -22,11 +23,6 @@ public class ListPushOperationsResponse /// public string? ContentType { get; set; } = default!; - /// - /// Your `query` parameter was not correctly formed - /// - public ErrorMessage? ErrorMessage { get; set; } - /// /// OK /// diff --git a/sync-for-payroll/CodatSyncPayroll/Models/Operations/ListTrackingCategoriesRequest.cs b/sync-for-payroll/Codat/Sync/Payroll/Models/Operations/ListTrackingCategoriesRequest.cs similarity index 95% rename from sync-for-payroll/CodatSyncPayroll/Models/Operations/ListTrackingCategoriesRequest.cs rename to sync-for-payroll/Codat/Sync/Payroll/Models/Operations/ListTrackingCategoriesRequest.cs index da69a56fc..e92ae80c9 100644 --- a/sync-for-payroll/CodatSyncPayroll/Models/Operations/ListTrackingCategoriesRequest.cs +++ b/sync-for-payroll/Codat/Sync/Payroll/Models/Operations/ListTrackingCategoriesRequest.cs @@ -31,13 +31,13 @@ public class ListTrackingCategoriesRequest /// Page number. Read more. /// [SpeakeasyMetadata("queryParam:style=form,explode=true,name=page")] - public int? Page { get; set; } + public int? Page { get; set; } = 1; /// /// Number of records to return in a page. Read more. /// [SpeakeasyMetadata("queryParam:style=form,explode=true,name=pageSize")] - public int? PageSize { get; set; } + public int? PageSize { get; set; } = 100; /// /// Codat query string. Read more. diff --git a/sync-for-payroll/CodatSyncPayroll/Models/Operations/ListTrackingCategoriesResponse.cs b/sync-for-payroll/Codat/Sync/Payroll/Models/Operations/ListTrackingCategoriesResponse.cs similarity index 88% rename from sync-for-payroll/CodatSyncPayroll/Models/Operations/ListTrackingCategoriesResponse.cs rename to sync-for-payroll/Codat/Sync/Payroll/Models/Operations/ListTrackingCategoriesResponse.cs index b3fbbdc6b..cdd822075 100644 --- a/sync-for-payroll/CodatSyncPayroll/Models/Operations/ListTrackingCategoriesResponse.cs +++ b/sync-for-payroll/Codat/Sync/Payroll/Models/Operations/ListTrackingCategoriesResponse.cs @@ -11,6 +11,7 @@ namespace Codat.Sync.Payroll.Models.Operations { using Codat.Sync.Payroll.Models.Shared; + using Codat.Sync.Payroll.Utils; using System.Net.Http; using System; @@ -22,11 +23,6 @@ public class ListTrackingCategoriesResponse /// public string? ContentType { get; set; } = default!; - /// - /// Your `query` parameter was not correctly formed - /// - public ErrorMessage? ErrorMessage { get; set; } - /// /// HTTP response status code for this operation /// diff --git a/sync-for-payroll/CodatSyncPayroll/Models/Operations/RefreshAllDataTypesRequest.cs b/sync-for-payroll/Codat/Sync/Payroll/Models/Operations/RefreshAllDataTypesRequest.cs similarity index 100% rename from sync-for-payroll/CodatSyncPayroll/Models/Operations/RefreshAllDataTypesRequest.cs rename to sync-for-payroll/Codat/Sync/Payroll/Models/Operations/RefreshAllDataTypesRequest.cs diff --git a/sync-for-payroll/CodatSyncPayroll/Models/Operations/RefreshAllDataTypesResponse.cs b/sync-for-payroll/Codat/Sync/Payroll/Models/Operations/RefreshAllDataTypesResponse.cs similarity index 84% rename from sync-for-payroll/CodatSyncPayroll/Models/Operations/RefreshAllDataTypesResponse.cs rename to sync-for-payroll/Codat/Sync/Payroll/Models/Operations/RefreshAllDataTypesResponse.cs index 3ae861919..05eb500d7 100644 --- a/sync-for-payroll/CodatSyncPayroll/Models/Operations/RefreshAllDataTypesResponse.cs +++ b/sync-for-payroll/Codat/Sync/Payroll/Models/Operations/RefreshAllDataTypesResponse.cs @@ -10,7 +10,7 @@ #nullable enable namespace Codat.Sync.Payroll.Models.Operations { - using Codat.Sync.Payroll.Models.Shared; + using Codat.Sync.Payroll.Utils; using System.Net.Http; using System; @@ -22,11 +22,6 @@ public class RefreshAllDataTypesResponse /// public string? ContentType { get; set; } = default!; - /// - /// Your API request was not properly authorized. - /// - public ErrorMessage? ErrorMessage { get; set; } - /// /// HTTP response status code for this operation /// diff --git a/sync-for-payroll/CodatSyncPayroll/Models/Operations/RefreshDataTypeRequest.cs b/sync-for-payroll/Codat/Sync/Payroll/Models/Operations/RefreshDataTypeRequest.cs similarity index 100% rename from sync-for-payroll/CodatSyncPayroll/Models/Operations/RefreshDataTypeRequest.cs rename to sync-for-payroll/Codat/Sync/Payroll/Models/Operations/RefreshDataTypeRequest.cs diff --git a/sync-for-payroll/CodatSyncPayroll/Models/Operations/RefreshDataTypeResponse.cs b/sync-for-payroll/Codat/Sync/Payroll/Models/Operations/RefreshDataTypeResponse.cs similarity index 88% rename from sync-for-payroll/CodatSyncPayroll/Models/Operations/RefreshDataTypeResponse.cs rename to sync-for-payroll/Codat/Sync/Payroll/Models/Operations/RefreshDataTypeResponse.cs index 762d1cd8d..749f86e14 100644 --- a/sync-for-payroll/CodatSyncPayroll/Models/Operations/RefreshDataTypeResponse.cs +++ b/sync-for-payroll/Codat/Sync/Payroll/Models/Operations/RefreshDataTypeResponse.cs @@ -11,6 +11,7 @@ namespace Codat.Sync.Payroll.Models.Operations { using Codat.Sync.Payroll.Models.Shared; + using Codat.Sync.Payroll.Utils; using System.Net.Http; using System; @@ -22,11 +23,6 @@ public class RefreshDataTypeResponse /// public string? ContentType { get; set; } = default!; - /// - /// Your API request was not properly authorized. - /// - public ErrorMessage? ErrorMessage { get; set; } - /// /// OK /// diff --git a/sync-for-payroll/CodatSyncPayroll/Models/Operations/UnlinkConnectionRequest.cs b/sync-for-payroll/Codat/Sync/Payroll/Models/Operations/UnlinkConnectionRequest.cs similarity index 96% rename from sync-for-payroll/CodatSyncPayroll/Models/Operations/UnlinkConnectionRequest.cs rename to sync-for-payroll/Codat/Sync/Payroll/Models/Operations/UnlinkConnectionRequest.cs index 0b7344bb3..87c38b83f 100644 --- a/sync-for-payroll/CodatSyncPayroll/Models/Operations/UnlinkConnectionRequest.cs +++ b/sync-for-payroll/Codat/Sync/Payroll/Models/Operations/UnlinkConnectionRequest.cs @@ -10,6 +10,7 @@ #nullable enable namespace Codat.Sync.Payroll.Models.Operations { + using Codat.Sync.Payroll.Models.Operations; using Codat.Sync.Payroll.Utils; public class UnlinkConnectionRequest diff --git a/sync-for-payroll/CodatSyncPayroll/Models/Operations/UnlinkConnectionResponse.cs b/sync-for-payroll/Codat/Sync/Payroll/Models/Operations/UnlinkConnectionResponse.cs similarity index 88% rename from sync-for-payroll/CodatSyncPayroll/Models/Operations/UnlinkConnectionResponse.cs rename to sync-for-payroll/Codat/Sync/Payroll/Models/Operations/UnlinkConnectionResponse.cs index 92ca65a17..6f278c5c1 100644 --- a/sync-for-payroll/CodatSyncPayroll/Models/Operations/UnlinkConnectionResponse.cs +++ b/sync-for-payroll/Codat/Sync/Payroll/Models/Operations/UnlinkConnectionResponse.cs @@ -11,6 +11,7 @@ namespace Codat.Sync.Payroll.Models.Operations { using Codat.Sync.Payroll.Models.Shared; + using Codat.Sync.Payroll.Utils; using System.Net.Http; using System; @@ -27,11 +28,6 @@ public class UnlinkConnectionResponse /// public string? ContentType { get; set; } = default!; - /// - /// Your API request was not properly authorized. - /// - public ErrorMessage? ErrorMessage { get; set; } - /// /// HTTP response status code for this operation /// diff --git a/sync-for-payroll/CodatSyncPayroll/Models/Operations/UnlinkConnectionUpdateConnection.cs b/sync-for-payroll/Codat/Sync/Payroll/Models/Operations/UnlinkConnectionUpdateConnection.cs similarity index 95% rename from sync-for-payroll/CodatSyncPayroll/Models/Operations/UnlinkConnectionUpdateConnection.cs rename to sync-for-payroll/Codat/Sync/Payroll/Models/Operations/UnlinkConnectionUpdateConnection.cs index 35d5eb38b..07677a2b6 100644 --- a/sync-for-payroll/CodatSyncPayroll/Models/Operations/UnlinkConnectionUpdateConnection.cs +++ b/sync-for-payroll/Codat/Sync/Payroll/Models/Operations/UnlinkConnectionUpdateConnection.cs @@ -11,6 +11,7 @@ namespace Codat.Sync.Payroll.Models.Operations { using Codat.Sync.Payroll.Models.Shared; + using Codat.Sync.Payroll.Utils; using Newtonsoft.Json; public class UnlinkConnectionUpdateConnection diff --git a/sync-for-payroll/CodatSyncPayroll/Models/Operations/UpdateCompanyRequest.cs b/sync-for-payroll/Codat/Sync/Payroll/Models/Operations/UpdateCompanyRequest.cs similarity index 100% rename from sync-for-payroll/CodatSyncPayroll/Models/Operations/UpdateCompanyRequest.cs rename to sync-for-payroll/Codat/Sync/Payroll/Models/Operations/UpdateCompanyRequest.cs diff --git a/sync-for-payroll/CodatSyncPayroll/Models/Operations/UpdateCompanyResponse.cs b/sync-for-payroll/Codat/Sync/Payroll/Models/Operations/UpdateCompanyResponse.cs similarity index 88% rename from sync-for-payroll/CodatSyncPayroll/Models/Operations/UpdateCompanyResponse.cs rename to sync-for-payroll/Codat/Sync/Payroll/Models/Operations/UpdateCompanyResponse.cs index 77531ec9f..75653642c 100644 --- a/sync-for-payroll/CodatSyncPayroll/Models/Operations/UpdateCompanyResponse.cs +++ b/sync-for-payroll/Codat/Sync/Payroll/Models/Operations/UpdateCompanyResponse.cs @@ -11,6 +11,7 @@ namespace Codat.Sync.Payroll.Models.Operations { using Codat.Sync.Payroll.Models.Shared; + using Codat.Sync.Payroll.Utils; using System.Net.Http; using System; @@ -27,11 +28,6 @@ public class UpdateCompanyResponse /// public string? ContentType { get; set; } = default!; - /// - /// Your API request was not properly authorized. - /// - public ErrorMessage? ErrorMessage { get; set; } - /// /// HTTP response status code for this operation /// diff --git a/sync-for-payroll/CodatSyncPayroll/Models/Shared/Account.cs b/sync-for-payroll/Codat/Sync/Payroll/Models/Shared/Account.cs similarity index 93% rename from sync-for-payroll/CodatSyncPayroll/Models/Shared/Account.cs rename to sync-for-payroll/Codat/Sync/Payroll/Models/Shared/Account.cs index 1af308703..9718ed97b 100644 --- a/sync-for-payroll/CodatSyncPayroll/Models/Shared/Account.cs +++ b/sync-for-payroll/Codat/Sync/Payroll/Models/Shared/Account.cs @@ -10,6 +10,8 @@ #nullable enable namespace Codat.Sync.Payroll.Models.Shared { + using Codat.Sync.Payroll.Models.Shared; + using Codat.Sync.Payroll.Utils; using Newtonsoft.Json; using System.Collections.Generic; @@ -68,13 +70,13 @@ public class Account /// Current balance in the account. /// [JsonProperty("currentBalance")] - public decimal? CurrentBalance { get; set; } + public decimal? CurrentBalance { get; set; } = null; /// /// Description for the account. /// [JsonProperty("description")] - public string? Description { get; set; } + public string? Description { get; set; } = null; /// /// Full category of the account.
@@ -85,7 +87,7 @@ public class Account /// ///
[JsonProperty("fullyQualifiedCategory")] - public string? FullyQualifiedCategory { get; set; } + public string? FullyQualifiedCategory { get; set; } = null; /// /// Full name of the account, for example:
@@ -97,7 +99,7 @@ public class Account /// ///
[JsonProperty("fullyQualifiedName")] - public string? FullyQualifiedName { get; set; } + public string? FullyQualifiedName { get; set; } = null; /// /// Identifier for the account, unique for the company. @@ -121,13 +123,13 @@ public class Account /// Name of the account. /// [JsonProperty("name")] - public string? Name { get; set; } + public string? Name { get; set; } = null; /// /// Reference given to each nominal account for a business. It ensures money is allocated to the correct account. This code isn't a unique identifier in the Codat system. /// [JsonProperty("nominalCode")] - public string? NominalCode { get; set; } + public string? NominalCode { get; set; } = null; [JsonProperty("sourceModifiedDate")] public string? SourceModifiedDate { get; set; } @@ -159,6 +161,6 @@ public class Account /// The validDatatypeLinks can be used to determine whether an account can be correctly mapped to another object; for example, accounts with a `type` of `income` might only support being used on an Invoice and Direct Income. For more information, see Valid Data Type Links. /// [JsonProperty("validDatatypeLinks")] - public List? ValidDatatypeLinks { get; set; } + public List? ValidDatatypeLinks { get; set; } = null; } } \ No newline at end of file diff --git a/sync-for-payroll/CodatSyncPayroll/Models/Shared/AccountMetadata.cs b/sync-for-payroll/Codat/Sync/Payroll/Models/Shared/AccountMetadata.cs similarity index 89% rename from sync-for-payroll/CodatSyncPayroll/Models/Shared/AccountMetadata.cs rename to sync-for-payroll/Codat/Sync/Payroll/Models/Shared/AccountMetadata.cs index 0d7648875..4c8e4fa0d 100644 --- a/sync-for-payroll/CodatSyncPayroll/Models/Shared/AccountMetadata.cs +++ b/sync-for-payroll/Codat/Sync/Payroll/Models/Shared/AccountMetadata.cs @@ -10,6 +10,7 @@ #nullable enable namespace Codat.Sync.Payroll.Models.Shared { + using Codat.Sync.Payroll.Utils; using Newtonsoft.Json; public class AccountMetadata @@ -19,6 +20,6 @@ public class AccountMetadata /// Indicates whether the record has been deleted in the third-party system this record originated from. /// [JsonProperty("isDeleted")] - public bool? IsDeleted { get; set; } + public bool? IsDeleted { get; set; } = null; } } \ No newline at end of file diff --git a/sync-for-payroll/CodatSyncPayroll/Models/Shared/AccountPrototype.cs b/sync-for-payroll/Codat/Sync/Payroll/Models/Shared/AccountPrototype.cs similarity index 90% rename from sync-for-payroll/CodatSyncPayroll/Models/Shared/AccountPrototype.cs rename to sync-for-payroll/Codat/Sync/Payroll/Models/Shared/AccountPrototype.cs index bc7bc853f..e93fdd400 100644 --- a/sync-for-payroll/CodatSyncPayroll/Models/Shared/AccountPrototype.cs +++ b/sync-for-payroll/Codat/Sync/Payroll/Models/Shared/AccountPrototype.cs @@ -10,6 +10,8 @@ #nullable enable namespace Codat.Sync.Payroll.Models.Shared { + using Codat.Sync.Payroll.Models.Shared; + using Codat.Sync.Payroll.Utils; using Newtonsoft.Json; using System.Collections.Generic; @@ -35,13 +37,13 @@ public class AccountPrototype /// Current balance in the account. /// [JsonProperty("currentBalance")] - public decimal? CurrentBalance { get; set; } + public decimal? CurrentBalance { get; set; } = null; /// /// Description for the account. /// [JsonProperty("description")] - public string? Description { get; set; } + public string? Description { get; set; } = null; /// /// Full category of the account.
@@ -52,7 +54,7 @@ public class AccountPrototype /// ///
[JsonProperty("fullyQualifiedCategory")] - public string? FullyQualifiedCategory { get; set; } + public string? FullyQualifiedCategory { get; set; } = null; /// /// Full name of the account, for example:
@@ -64,7 +66,7 @@ public class AccountPrototype /// ///
[JsonProperty("fullyQualifiedName")] - public string? FullyQualifiedName { get; set; } + public string? FullyQualifiedName { get; set; } = null; /// /// Confirms whether the account is a bank account or not. @@ -76,13 +78,13 @@ public class AccountPrototype /// Name of the account. /// [JsonProperty("name")] - public string? Name { get; set; } + public string? Name { get; set; } = null; /// /// Reference given to each nominal account for a business. It ensures money is allocated to the correct account. This code isn't a unique identifier in the Codat system. /// [JsonProperty("nominalCode")] - public string? NominalCode { get; set; } + public string? NominalCode { get; set; } = null; /// /// Status of the account @@ -111,6 +113,6 @@ public class AccountPrototype /// The validDatatypeLinks can be used to determine whether an account can be correctly mapped to another object; for example, accounts with a `type` of `income` might only support being used on an Invoice and Direct Income. For more information, see Valid Data Type Links. /// [JsonProperty("validDatatypeLinks")] - public List? ValidDatatypeLinks { get; set; } + public List? ValidDatatypeLinks { get; set; } = null; } } \ No newline at end of file diff --git a/sync-for-payroll/CodatSyncPayroll/Models/Shared/AccountRef.cs b/sync-for-payroll/Codat/Sync/Payroll/Models/Shared/AccountRef.cs similarity index 96% rename from sync-for-payroll/CodatSyncPayroll/Models/Shared/AccountRef.cs rename to sync-for-payroll/Codat/Sync/Payroll/Models/Shared/AccountRef.cs index b4e9b68a8..0db31c819 100644 --- a/sync-for-payroll/CodatSyncPayroll/Models/Shared/AccountRef.cs +++ b/sync-for-payroll/Codat/Sync/Payroll/Models/Shared/AccountRef.cs @@ -10,6 +10,7 @@ #nullable enable namespace Codat.Sync.Payroll.Models.Shared { + using Codat.Sync.Payroll.Utils; using Newtonsoft.Json; /// diff --git a/sync-for-payroll/CodatSyncPayroll/Models/Shared/AccountStatus.cs b/sync-for-payroll/Codat/Sync/Payroll/Models/Shared/AccountStatus.cs similarity index 98% rename from sync-for-payroll/CodatSyncPayroll/Models/Shared/AccountStatus.cs rename to sync-for-payroll/Codat/Sync/Payroll/Models/Shared/AccountStatus.cs index 2cae568dc..7bd7ddb7b 100644 --- a/sync-for-payroll/CodatSyncPayroll/Models/Shared/AccountStatus.cs +++ b/sync-for-payroll/Codat/Sync/Payroll/Models/Shared/AccountStatus.cs @@ -10,6 +10,7 @@ #nullable enable namespace Codat.Sync.Payroll.Models.Shared { + using Codat.Sync.Payroll.Utils; using Newtonsoft.Json; using System; diff --git a/sync-for-payroll/CodatSyncPayroll/Models/Shared/AccountType.cs b/sync-for-payroll/Codat/Sync/Payroll/Models/Shared/AccountType.cs similarity index 98% rename from sync-for-payroll/CodatSyncPayroll/Models/Shared/AccountType.cs rename to sync-for-payroll/Codat/Sync/Payroll/Models/Shared/AccountType.cs index 83f33a3b8..06dd70864 100644 --- a/sync-for-payroll/CodatSyncPayroll/Models/Shared/AccountType.cs +++ b/sync-for-payroll/Codat/Sync/Payroll/Models/Shared/AccountType.cs @@ -10,6 +10,7 @@ #nullable enable namespace Codat.Sync.Payroll.Models.Shared { + using Codat.Sync.Payroll.Utils; using Newtonsoft.Json; using System; diff --git a/sync-for-payroll/CodatSyncPayroll/Models/Shared/AccountValidDataTypeLinks.cs b/sync-for-payroll/Codat/Sync/Payroll/Models/Shared/AccountValidDataTypeLinks.cs similarity index 96% rename from sync-for-payroll/CodatSyncPayroll/Models/Shared/AccountValidDataTypeLinks.cs rename to sync-for-payroll/Codat/Sync/Payroll/Models/Shared/AccountValidDataTypeLinks.cs index 5ddde0582..02e600728 100644 --- a/sync-for-payroll/CodatSyncPayroll/Models/Shared/AccountValidDataTypeLinks.cs +++ b/sync-for-payroll/Codat/Sync/Payroll/Models/Shared/AccountValidDataTypeLinks.cs @@ -10,6 +10,7 @@ #nullable enable namespace Codat.Sync.Payroll.Models.Shared { + using Codat.Sync.Payroll.Utils; using Newtonsoft.Json; using System.Collections.Generic; @@ -65,12 +66,12 @@ public class AccountValidDataTypeLinks /// Supported `dataTypes` that the record can be linked to. /// [JsonProperty("links")] - public List? Links { get; set; } + public List? Links { get; set; } = null; /// /// The property from the account that can be linked. /// [JsonProperty("property")] - public string? Property { get; set; } + public string? Property { get; set; } = null; } } \ No newline at end of file diff --git a/sync-for-payroll/CodatSyncPayroll/Models/Shared/AccountingAccount.cs b/sync-for-payroll/Codat/Sync/Payroll/Models/Shared/AccountingAccount.cs similarity index 93% rename from sync-for-payroll/CodatSyncPayroll/Models/Shared/AccountingAccount.cs rename to sync-for-payroll/Codat/Sync/Payroll/Models/Shared/AccountingAccount.cs index 346939762..d502428d2 100644 --- a/sync-for-payroll/CodatSyncPayroll/Models/Shared/AccountingAccount.cs +++ b/sync-for-payroll/Codat/Sync/Payroll/Models/Shared/AccountingAccount.cs @@ -10,6 +10,8 @@ #nullable enable namespace Codat.Sync.Payroll.Models.Shared { + using Codat.Sync.Payroll.Models.Shared; + using Codat.Sync.Payroll.Utils; using Newtonsoft.Json; using System.Collections.Generic; using System; @@ -69,13 +71,13 @@ public class AccountingAccount /// Current balance in the account. /// [JsonProperty("currentBalance")] - public decimal? CurrentBalance { get; set; } + public decimal? CurrentBalance { get; set; } = null; /// /// Description for the account. /// [JsonProperty("description")] - public string? Description { get; set; } + public string? Description { get; set; } = null; /// /// Full category of the account.
@@ -86,7 +88,7 @@ public class AccountingAccount /// ///
[JsonProperty("fullyQualifiedCategory")] - public string? FullyQualifiedCategory { get; set; } + public string? FullyQualifiedCategory { get; set; } = null; /// /// Full name of the account, for example:
@@ -98,7 +100,7 @@ public class AccountingAccount /// ///
[JsonProperty("fullyQualifiedName")] - public string? FullyQualifiedName { get; set; } + public string? FullyQualifiedName { get; set; } = null; /// /// Identifier for the account, unique for the company. @@ -122,13 +124,13 @@ public class AccountingAccount /// Name of the account. /// [JsonProperty("name")] - public string? Name { get; set; } + public string? Name { get; set; } = null; /// /// Reference given to each nominal account for a business. It ensures money is allocated to the correct account. This code isn't a unique identifier in the Codat system. /// [JsonProperty("nominalCode")] - public string? NominalCode { get; set; } + public string? NominalCode { get; set; } = null; [JsonProperty("sourceModifiedDate")] public string? SourceModifiedDate { get; set; } @@ -160,6 +162,6 @@ public class AccountingAccount /// The validDatatypeLinks can be used to determine whether an account can be correctly mapped to another object; for example, accounts with a `type` of `income` might only support being used on an Invoice and Direct Income. For more information, see Valid Data Type Links. /// [JsonProperty("validDatatypeLinks")] - public List? ValidDatatypeLinks { get; set; } + public List? ValidDatatypeLinks { get; set; } = null; } } \ No newline at end of file diff --git a/sync-for-payroll/CodatSyncPayroll/Models/Shared/AccountingAddressType.cs b/sync-for-payroll/Codat/Sync/Payroll/Models/Shared/AccountingAddressType.cs similarity index 98% rename from sync-for-payroll/CodatSyncPayroll/Models/Shared/AccountingAddressType.cs rename to sync-for-payroll/Codat/Sync/Payroll/Models/Shared/AccountingAddressType.cs index 40971c8e1..99f8d518c 100644 --- a/sync-for-payroll/CodatSyncPayroll/Models/Shared/AccountingAddressType.cs +++ b/sync-for-payroll/Codat/Sync/Payroll/Models/Shared/AccountingAddressType.cs @@ -10,6 +10,7 @@ #nullable enable namespace Codat.Sync.Payroll.Models.Shared { + using Codat.Sync.Payroll.Utils; using Newtonsoft.Json; using System; diff --git a/sync-for-payroll/CodatSyncPayroll/Models/Shared/AccountingJournal.cs b/sync-for-payroll/Codat/Sync/Payroll/Models/Shared/AccountingJournal.cs similarity index 95% rename from sync-for-payroll/CodatSyncPayroll/Models/Shared/AccountingJournal.cs rename to sync-for-payroll/Codat/Sync/Payroll/Models/Shared/AccountingJournal.cs index 122b2c2bd..5175a430b 100644 --- a/sync-for-payroll/CodatSyncPayroll/Models/Shared/AccountingJournal.cs +++ b/sync-for-payroll/Codat/Sync/Payroll/Models/Shared/AccountingJournal.cs @@ -10,6 +10,8 @@ #nullable enable namespace Codat.Sync.Payroll.Models.Shared { + using Codat.Sync.Payroll.Models.Shared; + using Codat.Sync.Payroll.Utils; using Newtonsoft.Json; using System; @@ -87,7 +89,7 @@ public class AccountingJournal /// Native journal number or code. /// [JsonProperty("journalCode")] - public string? JournalCode { get; set; } + public string? JournalCode { get; set; } = null; [JsonProperty("metadata")] public Metadata? Metadata { get; set; } @@ -103,7 +105,7 @@ public class AccountingJournal /// /// [JsonProperty("name")] - public string? Name { get; set; } + public string? Name { get; set; } = null; /// /// Parent journal ID.
@@ -113,7 +115,7 @@ public class AccountingJournal /// ///
[JsonProperty("parentId")] - public string? ParentId { get; set; } + public string? ParentId { get; set; } = null; [JsonProperty("sourceModifiedDate")] public string? SourceModifiedDate { get; set; } @@ -128,6 +130,6 @@ public class AccountingJournal /// The type of the journal. /// [JsonProperty("type")] - public string? Type { get; set; } + public string? Type { get; set; } = null; } } \ No newline at end of file diff --git a/sync-for-payroll/CodatSyncPayroll/Models/Shared/AccountingJournalEntry.cs b/sync-for-payroll/Codat/Sync/Payroll/Models/Shared/AccountingJournalEntry.cs similarity index 97% rename from sync-for-payroll/CodatSyncPayroll/Models/Shared/AccountingJournalEntry.cs rename to sync-for-payroll/Codat/Sync/Payroll/Models/Shared/AccountingJournalEntry.cs index 09e880d94..6334cccc9 100644 --- a/sync-for-payroll/CodatSyncPayroll/Models/Shared/AccountingJournalEntry.cs +++ b/sync-for-payroll/Codat/Sync/Payroll/Models/Shared/AccountingJournalEntry.cs @@ -10,6 +10,8 @@ #nullable enable namespace Codat.Sync.Payroll.Models.Shared { + using Codat.Sync.Payroll.Models.Shared; + using Codat.Sync.Payroll.Utils; using Newtonsoft.Json; using System.Collections.Generic; using System; @@ -75,7 +77,7 @@ public class AccountingJournalEntry /// Optional description of the journal entry. /// [JsonProperty("description")] - public string? Description { get; set; } + public string? Description { get; set; } = null; /// /// Unique identifier of the journal entry for the company in the accounting platform. @@ -87,7 +89,7 @@ public class AccountingJournalEntry /// An array of journal lines. /// [JsonProperty("journalLines")] - public List? JournalLines { get; set; } + public List? JournalLines { get; set; } = null; /// /// Links journal entries to the relevant journal in accounting integrations that use multi-book accounting (multiple journals). diff --git a/sync-for-payroll/CodatSyncPayroll/Models/Shared/Accounts.cs b/sync-for-payroll/Codat/Sync/Payroll/Models/Shared/Accounts.cs similarity index 94% rename from sync-for-payroll/CodatSyncPayroll/Models/Shared/Accounts.cs rename to sync-for-payroll/Codat/Sync/Payroll/Models/Shared/Accounts.cs index c05d39e8d..ab381aad4 100644 --- a/sync-for-payroll/CodatSyncPayroll/Models/Shared/Accounts.cs +++ b/sync-for-payroll/Codat/Sync/Payroll/Models/Shared/Accounts.cs @@ -10,6 +10,8 @@ #nullable enable namespace Codat.Sync.Payroll.Models.Shared { + using Codat.Sync.Payroll.Models.Shared; + using Codat.Sync.Payroll.Utils; using Newtonsoft.Json; using System.Collections.Generic; diff --git a/sync-for-payroll/CodatSyncPayroll/Models/Shared/Address.cs b/sync-for-payroll/Codat/Sync/Payroll/Models/Shared/Address.cs similarity index 78% rename from sync-for-payroll/CodatSyncPayroll/Models/Shared/Address.cs rename to sync-for-payroll/Codat/Sync/Payroll/Models/Shared/Address.cs index fe2b4b39a..ab15fa4c8 100644 --- a/sync-for-payroll/CodatSyncPayroll/Models/Shared/Address.cs +++ b/sync-for-payroll/Codat/Sync/Payroll/Models/Shared/Address.cs @@ -10,6 +10,8 @@ #nullable enable namespace Codat.Sync.Payroll.Models.Shared { + using Codat.Sync.Payroll.Models.Shared; + using Codat.Sync.Payroll.Utils; using Newtonsoft.Json; public class Address @@ -19,37 +21,37 @@ public class Address /// City of the customer address. /// [JsonProperty("city")] - public string? City { get; set; } + public string? City { get; set; } = null; /// /// Country of the customer address. /// [JsonProperty("country")] - public string? Country { get; set; } + public string? Country { get; set; } = null; /// /// Line 1 of the customer address. /// [JsonProperty("line1")] - public string? Line1 { get; set; } + public string? Line1 { get; set; } = null; /// /// Line 2 of the customer address. /// [JsonProperty("line2")] - public string? Line2 { get; set; } + public string? Line2 { get; set; } = null; /// /// Postal code or zip code. /// [JsonProperty("postalCode")] - public string? PostalCode { get; set; } + public string? PostalCode { get; set; } = null; /// /// Region of the customer address. /// [JsonProperty("region")] - public string? Region { get; set; } + public string? Region { get; set; } = null; /// /// The type of the address diff --git a/sync-for-payroll/CodatSyncPayroll/Models/Shared/ClientRateLimitReachedWebhook.cs b/sync-for-payroll/Codat/Sync/Payroll/Models/Shared/ClientRateLimitReachedWebhook.cs similarity index 86% rename from sync-for-payroll/CodatSyncPayroll/Models/Shared/ClientRateLimitReachedWebhook.cs rename to sync-for-payroll/Codat/Sync/Payroll/Models/Shared/ClientRateLimitReachedWebhook.cs index a220201b6..af74cfde5 100644 --- a/sync-for-payroll/CodatSyncPayroll/Models/Shared/ClientRateLimitReachedWebhook.cs +++ b/sync-for-payroll/Codat/Sync/Payroll/Models/Shared/ClientRateLimitReachedWebhook.cs @@ -10,7 +10,10 @@ #nullable enable namespace Codat.Sync.Payroll.Models.Shared { + using Codat.Sync.Payroll.Models.Shared; + using Codat.Sync.Payroll.Utils; using Newtonsoft.Json; + using System; /// /// Webhook request body for a client that has reached their rate limit. @@ -40,7 +43,7 @@ public class ClientRateLimitReachedWebhook public ClientRateLimitReachedWebhookData? Data { get; set; } /// - /// A human readable message about the webhook. + /// A human-readable message about the webhook. /// [JsonProperty("Message")] public string? Message { get; set; } @@ -48,6 +51,7 @@ public class ClientRateLimitReachedWebhook /// /// Unique identifier for the rule. /// + [Obsolete("This field will be removed in a future release, please migrate away from it as soon as possible")] [JsonProperty("RuleId")] public string? RuleId { get; set; } diff --git a/sync-for-payroll/CodatSyncPayroll/Models/Shared/ClientRateLimitReachedWebhookData.cs b/sync-for-payroll/Codat/Sync/Payroll/Models/Shared/ClientRateLimitReachedWebhookData.cs similarity index 98% rename from sync-for-payroll/CodatSyncPayroll/Models/Shared/ClientRateLimitReachedWebhookData.cs rename to sync-for-payroll/Codat/Sync/Payroll/Models/Shared/ClientRateLimitReachedWebhookData.cs index 171eef22a..12146d313 100644 --- a/sync-for-payroll/CodatSyncPayroll/Models/Shared/ClientRateLimitReachedWebhookData.cs +++ b/sync-for-payroll/Codat/Sync/Payroll/Models/Shared/ClientRateLimitReachedWebhookData.cs @@ -10,6 +10,7 @@ #nullable enable namespace Codat.Sync.Payroll.Models.Shared { + using Codat.Sync.Payroll.Utils; using Newtonsoft.Json; public class ClientRateLimitReachedWebhookData diff --git a/sync-for-payroll/CodatSyncPayroll/Models/Shared/ClientRateLimitResetWebhook.cs b/sync-for-payroll/Codat/Sync/Payroll/Models/Shared/ClientRateLimitResetWebhook.cs similarity index 86% rename from sync-for-payroll/CodatSyncPayroll/Models/Shared/ClientRateLimitResetWebhook.cs rename to sync-for-payroll/Codat/Sync/Payroll/Models/Shared/ClientRateLimitResetWebhook.cs index 958a6aebd..6cb4e048d 100644 --- a/sync-for-payroll/CodatSyncPayroll/Models/Shared/ClientRateLimitResetWebhook.cs +++ b/sync-for-payroll/Codat/Sync/Payroll/Models/Shared/ClientRateLimitResetWebhook.cs @@ -10,7 +10,10 @@ #nullable enable namespace Codat.Sync.Payroll.Models.Shared { + using Codat.Sync.Payroll.Models.Shared; + using Codat.Sync.Payroll.Utils; using Newtonsoft.Json; + using System; /// /// Webhook request body for a client that has had their rate limit reset. @@ -40,7 +43,7 @@ public class ClientRateLimitResetWebhook public ClientRateLimitResetWebhookData? Data { get; set; } /// - /// A human readable message about the webhook. + /// A human-readable message about the webhook. /// [JsonProperty("Message")] public string? Message { get; set; } @@ -48,6 +51,7 @@ public class ClientRateLimitResetWebhook /// /// Unique identifier for the rule. /// + [Obsolete("This field will be removed in a future release, please migrate away from it as soon as possible")] [JsonProperty("RuleId")] public string? RuleId { get; set; } diff --git a/sync-for-payroll/CodatSyncPayroll/Models/Shared/ClientRateLimitResetWebhookData.cs b/sync-for-payroll/Codat/Sync/Payroll/Models/Shared/ClientRateLimitResetWebhookData.cs similarity index 93% rename from sync-for-payroll/CodatSyncPayroll/Models/Shared/ClientRateLimitResetWebhookData.cs rename to sync-for-payroll/Codat/Sync/Payroll/Models/Shared/ClientRateLimitResetWebhookData.cs index a9586ea77..006eb6442 100644 --- a/sync-for-payroll/CodatSyncPayroll/Models/Shared/ClientRateLimitResetWebhookData.cs +++ b/sync-for-payroll/Codat/Sync/Payroll/Models/Shared/ClientRateLimitResetWebhookData.cs @@ -10,6 +10,7 @@ #nullable enable namespace Codat.Sync.Payroll.Models.Shared { + using Codat.Sync.Payroll.Utils; using Newtonsoft.Json; public class ClientRateLimitResetWebhookData @@ -49,10 +50,10 @@ public class ClientRateLimitResetWebhookData public string? ExpiresUtc { get; set; } /// - /// Total number of request remaining for your client. + /// Total number of requests remaining for your client. /// [JsonProperty("QuotaRemaining")] - public long? QuotaRemaining { get; set; } + public long? QuotaRemaining { get; set; } = null; /// /// The reason for your rate limit quota being reset. diff --git a/sync-for-payroll/CodatSyncPayroll/Models/Shared/Companies.cs b/sync-for-payroll/Codat/Sync/Payroll/Models/Shared/Companies.cs similarity index 94% rename from sync-for-payroll/CodatSyncPayroll/Models/Shared/Companies.cs rename to sync-for-payroll/Codat/Sync/Payroll/Models/Shared/Companies.cs index 10ed7d353..99ca89774 100644 --- a/sync-for-payroll/CodatSyncPayroll/Models/Shared/Companies.cs +++ b/sync-for-payroll/Codat/Sync/Payroll/Models/Shared/Companies.cs @@ -10,6 +10,8 @@ #nullable enable namespace Codat.Sync.Payroll.Models.Shared { + using Codat.Sync.Payroll.Models.Shared; + using Codat.Sync.Payroll.Utils; using Newtonsoft.Json; using System.Collections.Generic; diff --git a/sync-for-payroll/CodatSyncPayroll/Models/Shared/Company.cs b/sync-for-payroll/Codat/Sync/Payroll/Models/Shared/Company.cs similarity index 98% rename from sync-for-payroll/CodatSyncPayroll/Models/Shared/Company.cs rename to sync-for-payroll/Codat/Sync/Payroll/Models/Shared/Company.cs index 69c25b99c..d4539b0d8 100644 --- a/sync-for-payroll/CodatSyncPayroll/Models/Shared/Company.cs +++ b/sync-for-payroll/Codat/Sync/Payroll/Models/Shared/Company.cs @@ -10,6 +10,8 @@ #nullable enable namespace Codat.Sync.Payroll.Models.Shared { + using Codat.Sync.Payroll.Models.Shared; + using Codat.Sync.Payroll.Utils; using Newtonsoft.Json; using System.Collections.Generic; using System; diff --git a/sync-for-payroll/CodatSyncPayroll/Models/Shared/CompanyInfo.cs b/sync-for-payroll/Codat/Sync/Payroll/Models/Shared/CompanyInfo.cs similarity index 92% rename from sync-for-payroll/CodatSyncPayroll/Models/Shared/CompanyInfo.cs rename to sync-for-payroll/Codat/Sync/Payroll/Models/Shared/CompanyInfo.cs index a8dbe68c1..f42c01175 100644 --- a/sync-for-payroll/CodatSyncPayroll/Models/Shared/CompanyInfo.cs +++ b/sync-for-payroll/Codat/Sync/Payroll/Models/Shared/CompanyInfo.cs @@ -10,6 +10,8 @@ #nullable enable namespace Codat.Sync.Payroll.Models.Shared { + using Codat.Sync.Payroll.Models.Shared; + using Codat.Sync.Payroll.Utils; using Newtonsoft.Json; using System.Collections.Generic; @@ -32,31 +34,31 @@ public class CompanyInfo /// Identifier or reference for the company in the accounting platform. /// [JsonProperty("accountingPlatformRef")] - public string? AccountingPlatformRef { get; set; } + public string? AccountingPlatformRef { get; set; } = null; /// /// An array of Addresses. /// [JsonProperty("addresses")] - public List
? Addresses { get; set; } + public List
? Addresses { get; set; } = null; /// /// Currency set in the accounting platform of the linked company. Used by the currency rate. /// [JsonProperty("baseCurrency")] - public string? BaseCurrency { get; set; } + public string? BaseCurrency { get; set; } = null; /// /// Registered legal name of the linked company. /// [JsonProperty("companyLegalName")] - public string? CompanyLegalName { get; set; } + public string? CompanyLegalName { get; set; } = null; /// /// Name of the linked company. /// [JsonProperty("companyName")] - public string? CompanyName { get; set; } + public string? CompanyName { get; set; } = null; /// /// In Codat's data model, dates and times are represented using the <a class="external" href="https://en.wikipedia.org/wiki/ISO_8601" target="_blank">ISO 8601 standard</a>. Date and time fields are formatted as strings; for example:
@@ -143,13 +145,13 @@ public class CompanyInfo /// An array of phone numbers. ///
[JsonProperty("phoneNumbers")] - public List? PhoneNumbers { get; set; } + public List? PhoneNumbers { get; set; } = null; /// /// Registration number given to the linked company by the companies authority in the country of origin. In the UK this is Companies House. /// [JsonProperty("registrationNumber")] - public string? RegistrationNumber { get; set; } + public string? RegistrationNumber { get; set; } = null; /// /// URL addresses for the accounting source.
@@ -160,7 +162,7 @@ public class CompanyInfo /// ///
[JsonProperty("sourceUrls")] - public Dictionary? SourceUrls { get; set; } + public Dictionary? SourceUrls { get; set; } = null; /// /// Supplemental data is additional data you can include in our standard data types.
@@ -177,12 +179,12 @@ public class CompanyInfo /// Company tax number. ///
[JsonProperty("taxNumber")] - public string? TaxNumber { get; set; } + public string? TaxNumber { get; set; } = null; /// /// An array of weblinks. /// [JsonProperty("webLinks")] - public List? WebLinks { get; set; } + public List? WebLinks { get; set; } = null; } } \ No newline at end of file diff --git a/sync-for-payroll/CodatSyncPayroll/Models/Shared/CompanyRequestBody.cs b/sync-for-payroll/Codat/Sync/Payroll/Models/Shared/CompanyRequestBody.cs similarity index 93% rename from sync-for-payroll/CodatSyncPayroll/Models/Shared/CompanyRequestBody.cs rename to sync-for-payroll/Codat/Sync/Payroll/Models/Shared/CompanyRequestBody.cs index 974389850..c537475c2 100644 --- a/sync-for-payroll/CodatSyncPayroll/Models/Shared/CompanyRequestBody.cs +++ b/sync-for-payroll/Codat/Sync/Payroll/Models/Shared/CompanyRequestBody.cs @@ -10,6 +10,8 @@ #nullable enable namespace Codat.Sync.Payroll.Models.Shared { + using Codat.Sync.Payroll.Models.Shared; + using Codat.Sync.Payroll.Utils; using Newtonsoft.Json; using System.Collections.Generic; diff --git a/sync-for-payroll/CodatSyncPayroll/Models/Shared/Connection.cs b/sync-for-payroll/Codat/Sync/Payroll/Models/Shared/Connection.cs similarity index 98% rename from sync-for-payroll/CodatSyncPayroll/Models/Shared/Connection.cs rename to sync-for-payroll/Codat/Sync/Payroll/Models/Shared/Connection.cs index 7b611a5fa..779e27880 100644 --- a/sync-for-payroll/CodatSyncPayroll/Models/Shared/Connection.cs +++ b/sync-for-payroll/Codat/Sync/Payroll/Models/Shared/Connection.cs @@ -10,6 +10,8 @@ #nullable enable namespace Codat.Sync.Payroll.Models.Shared { + using Codat.Sync.Payroll.Models.Shared; + using Codat.Sync.Payroll.Utils; using Newtonsoft.Json; using System.Collections.Generic; diff --git a/sync-for-payroll/CodatSyncPayroll/Models/Shared/Connections.cs b/sync-for-payroll/Codat/Sync/Payroll/Models/Shared/Connections.cs similarity index 94% rename from sync-for-payroll/CodatSyncPayroll/Models/Shared/Connections.cs rename to sync-for-payroll/Codat/Sync/Payroll/Models/Shared/Connections.cs index 01ae2ede3..f5d3aa1b3 100644 --- a/sync-for-payroll/CodatSyncPayroll/Models/Shared/Connections.cs +++ b/sync-for-payroll/Codat/Sync/Payroll/Models/Shared/Connections.cs @@ -10,6 +10,8 @@ #nullable enable namespace Codat.Sync.Payroll.Models.Shared { + using Codat.Sync.Payroll.Models.Shared; + using Codat.Sync.Payroll.Utils; using Newtonsoft.Json; using System.Collections.Generic; diff --git a/sync-for-payroll/CodatSyncPayroll/Models/Shared/CreateAccountResponse.cs b/sync-for-payroll/Codat/Sync/Payroll/Models/Shared/CreateAccountResponse.cs similarity index 93% rename from sync-for-payroll/CodatSyncPayroll/Models/Shared/CreateAccountResponse.cs rename to sync-for-payroll/Codat/Sync/Payroll/Models/Shared/CreateAccountResponse.cs index 69e5d6ae0..fe2d231d3 100644 --- a/sync-for-payroll/CodatSyncPayroll/Models/Shared/CreateAccountResponse.cs +++ b/sync-for-payroll/Codat/Sync/Payroll/Models/Shared/CreateAccountResponse.cs @@ -10,6 +10,8 @@ #nullable enable namespace Codat.Sync.Payroll.Models.Shared { + using Codat.Sync.Payroll.Models.Shared; + using Codat.Sync.Payroll.Utils; using Newtonsoft.Json; using System.Collections.Generic; using System; @@ -21,7 +23,7 @@ public class CreateAccountResponse /// Contains a single entry that communicates which record has changed and the manner in which it changed. ///
[JsonProperty("changes")] - public List? Changes { get; set; } + public List? Changes { get; set; } = null; /// /// Unique identifier for your SMB in Codat. @@ -57,7 +59,7 @@ public class CreateAccountResponse public string? CompletedOnUtc { get; set; } [JsonProperty("data")] - public AccountingAccount? Data { get; set; } + public AccountingAccount? Data { get; set; } = null; /// /// Unique identifier for a company's data connection. @@ -66,7 +68,7 @@ public class CreateAccountResponse public string DataConnectionKey { get; set; } = default!; /// - /// Available Data types + /// Available data types /// [JsonProperty("dataType")] public DataType? DataType { get; set; } @@ -75,7 +77,7 @@ public class CreateAccountResponse /// A message about the error. /// [JsonProperty("errorMessage")] - public string? ErrorMessage { get; set; } + public string? ErrorMessage { get; set; } = null; /// /// A unique identifier generated by Codat to represent this single push operation. This identifier can be used to track the status of the push, and should be persisted. @@ -126,14 +128,14 @@ public class CreateAccountResponse /// Number of minutes the push operation must complete within before it times out. /// [JsonProperty("timeoutInMinutes")] - public int? TimeoutInMinutes { get; set; } + public int? TimeoutInMinutes { get; set; } = null; /// /// Number of seconds the push operation must complete within before it times out. /// [Obsolete("This field will be removed in a future release, please migrate away from it as soon as possible")] [JsonProperty("timeoutInSeconds")] - public int? TimeoutInSeconds { get; set; } + public int? TimeoutInSeconds { get; set; } = null; /// /// A human-readable object describing validation decisions Codat has made when pushing data into the platform. If a push has failed because of validation errors, they will be detailed here. diff --git a/sync-for-payroll/CodatSyncPayroll/Models/Shared/CreateAccountResponseMetadata.cs b/sync-for-payroll/Codat/Sync/Payroll/Models/Shared/CreateAccountResponseMetadata.cs similarity index 89% rename from sync-for-payroll/CodatSyncPayroll/Models/Shared/CreateAccountResponseMetadata.cs rename to sync-for-payroll/Codat/Sync/Payroll/Models/Shared/CreateAccountResponseMetadata.cs index f6a74f06b..20e0f3465 100644 --- a/sync-for-payroll/CodatSyncPayroll/Models/Shared/CreateAccountResponseMetadata.cs +++ b/sync-for-payroll/Codat/Sync/Payroll/Models/Shared/CreateAccountResponseMetadata.cs @@ -10,6 +10,7 @@ #nullable enable namespace Codat.Sync.Payroll.Models.Shared { + using Codat.Sync.Payroll.Utils; using Newtonsoft.Json; public class CreateAccountResponseMetadata @@ -19,6 +20,6 @@ public class CreateAccountResponseMetadata /// Indicates whether the record has been deleted in the third-party system this record originated from. /// [JsonProperty("isDeleted")] - public bool? IsDeleted { get; set; } + public bool? IsDeleted { get; set; } = null; } } \ No newline at end of file diff --git a/sync-for-payroll/CodatSyncPayroll/Models/Shared/CreateAccountResponseValidDataTypeLinks.cs b/sync-for-payroll/Codat/Sync/Payroll/Models/Shared/CreateAccountResponseValidDataTypeLinks.cs similarity index 96% rename from sync-for-payroll/CodatSyncPayroll/Models/Shared/CreateAccountResponseValidDataTypeLinks.cs rename to sync-for-payroll/Codat/Sync/Payroll/Models/Shared/CreateAccountResponseValidDataTypeLinks.cs index 64fed38f0..18eb5dc56 100644 --- a/sync-for-payroll/CodatSyncPayroll/Models/Shared/CreateAccountResponseValidDataTypeLinks.cs +++ b/sync-for-payroll/Codat/Sync/Payroll/Models/Shared/CreateAccountResponseValidDataTypeLinks.cs @@ -10,6 +10,7 @@ #nullable enable namespace Codat.Sync.Payroll.Models.Shared { + using Codat.Sync.Payroll.Utils; using Newtonsoft.Json; using System.Collections.Generic; @@ -65,12 +66,12 @@ public class CreateAccountResponseValidDataTypeLinks /// Supported `dataTypes` that the record can be linked to. /// [JsonProperty("links")] - public List? Links { get; set; } + public List? Links { get; set; } = null; /// /// The property from the account that can be linked. /// [JsonProperty("property")] - public string? Property { get; set; } + public string? Property { get; set; } = null; } } \ No newline at end of file diff --git a/sync-for-payroll/CodatSyncPayroll/Models/Shared/CreateJournalEntryResponse.cs b/sync-for-payroll/Codat/Sync/Payroll/Models/Shared/CreateJournalEntryResponse.cs similarity index 93% rename from sync-for-payroll/CodatSyncPayroll/Models/Shared/CreateJournalEntryResponse.cs rename to sync-for-payroll/Codat/Sync/Payroll/Models/Shared/CreateJournalEntryResponse.cs index bb662b995..01c562742 100644 --- a/sync-for-payroll/CodatSyncPayroll/Models/Shared/CreateJournalEntryResponse.cs +++ b/sync-for-payroll/Codat/Sync/Payroll/Models/Shared/CreateJournalEntryResponse.cs @@ -10,6 +10,8 @@ #nullable enable namespace Codat.Sync.Payroll.Models.Shared { + using Codat.Sync.Payroll.Models.Shared; + using Codat.Sync.Payroll.Utils; using Newtonsoft.Json; using System.Collections.Generic; using System; @@ -21,7 +23,7 @@ public class CreateJournalEntryResponse /// Contains a single entry that communicates which record has changed and the manner in which it changed. ///
[JsonProperty("changes")] - public List? Changes { get; set; } + public List? Changes { get; set; } = null; /// /// Unique identifier for your SMB in Codat. @@ -57,7 +59,7 @@ public class CreateJournalEntryResponse public string? CompletedOnUtc { get; set; } [JsonProperty("data")] - public AccountingJournalEntry? Data { get; set; } + public AccountingJournalEntry? Data { get; set; } = null; /// /// Unique identifier for a company's data connection. @@ -66,7 +68,7 @@ public class CreateJournalEntryResponse public string DataConnectionKey { get; set; } = default!; /// - /// Available Data types + /// Available data types /// [JsonProperty("dataType")] public DataType? DataType { get; set; } @@ -75,7 +77,7 @@ public class CreateJournalEntryResponse /// A message about the error. /// [JsonProperty("errorMessage")] - public string? ErrorMessage { get; set; } + public string? ErrorMessage { get; set; } = null; /// /// A unique identifier generated by Codat to represent this single push operation. This identifier can be used to track the status of the push, and should be persisted. @@ -126,14 +128,14 @@ public class CreateJournalEntryResponse /// Number of minutes the push operation must complete within before it times out. /// [JsonProperty("timeoutInMinutes")] - public int? TimeoutInMinutes { get; set; } + public int? TimeoutInMinutes { get; set; } = null; /// /// Number of seconds the push operation must complete within before it times out. /// [Obsolete("This field will be removed in a future release, please migrate away from it as soon as possible")] [JsonProperty("timeoutInSeconds")] - public int? TimeoutInSeconds { get; set; } + public int? TimeoutInSeconds { get; set; } = null; /// /// A human-readable object describing validation decisions Codat has made when pushing data into the platform. If a push has failed because of validation errors, they will be detailed here. diff --git a/sync-for-payroll/CodatSyncPayroll/Models/Shared/CreateJournalResponse.cs b/sync-for-payroll/Codat/Sync/Payroll/Models/Shared/CreateJournalResponse.cs similarity index 93% rename from sync-for-payroll/CodatSyncPayroll/Models/Shared/CreateJournalResponse.cs rename to sync-for-payroll/Codat/Sync/Payroll/Models/Shared/CreateJournalResponse.cs index 43c3b1848..5da8b984d 100644 --- a/sync-for-payroll/CodatSyncPayroll/Models/Shared/CreateJournalResponse.cs +++ b/sync-for-payroll/Codat/Sync/Payroll/Models/Shared/CreateJournalResponse.cs @@ -10,6 +10,8 @@ #nullable enable namespace Codat.Sync.Payroll.Models.Shared { + using Codat.Sync.Payroll.Models.Shared; + using Codat.Sync.Payroll.Utils; using Newtonsoft.Json; using System.Collections.Generic; using System; @@ -21,7 +23,7 @@ public class CreateJournalResponse /// Contains a single entry that communicates which record has changed and the manner in which it changed. /// [JsonProperty("changes")] - public List? Changes { get; set; } + public List? Changes { get; set; } = null; /// /// Unique identifier for your SMB in Codat. @@ -57,7 +59,7 @@ public class CreateJournalResponse public string? CompletedOnUtc { get; set; } [JsonProperty("data")] - public AccountingJournal? Data { get; set; } + public AccountingJournal? Data { get; set; } = null; /// /// Unique identifier for a company's data connection. @@ -66,7 +68,7 @@ public class CreateJournalResponse public string DataConnectionKey { get; set; } = default!; /// - /// Available Data types + /// Available data types /// [JsonProperty("dataType")] public DataType? DataType { get; set; } @@ -75,7 +77,7 @@ public class CreateJournalResponse /// A message about the error. /// [JsonProperty("errorMessage")] - public string? ErrorMessage { get; set; } + public string? ErrorMessage { get; set; } = null; /// /// A unique identifier generated by Codat to represent this single push operation. This identifier can be used to track the status of the push, and should be persisted. @@ -126,14 +128,14 @@ public class CreateJournalResponse /// Number of minutes the push operation must complete within before it times out. /// [JsonProperty("timeoutInMinutes")] - public int? TimeoutInMinutes { get; set; } + public int? TimeoutInMinutes { get; set; } = null; /// /// Number of seconds the push operation must complete within before it times out. /// [Obsolete("This field will be removed in a future release, please migrate away from it as soon as possible")] [JsonProperty("timeoutInSeconds")] - public int? TimeoutInSeconds { get; set; } + public int? TimeoutInSeconds { get; set; } = null; /// /// A human-readable object describing validation decisions Codat has made when pushing data into the platform. If a push has failed because of validation errors, they will be detailed here. diff --git a/sync-for-payroll/CodatSyncPayroll/Models/Shared/DataConnectionError.cs b/sync-for-payroll/Codat/Sync/Payroll/Models/Shared/DataConnectionError.cs similarity index 98% rename from sync-for-payroll/CodatSyncPayroll/Models/Shared/DataConnectionError.cs rename to sync-for-payroll/Codat/Sync/Payroll/Models/Shared/DataConnectionError.cs index 87c83f3a1..c97df0ecb 100644 --- a/sync-for-payroll/CodatSyncPayroll/Models/Shared/DataConnectionError.cs +++ b/sync-for-payroll/Codat/Sync/Payroll/Models/Shared/DataConnectionError.cs @@ -10,6 +10,7 @@ #nullable enable namespace Codat.Sync.Payroll.Models.Shared { + using Codat.Sync.Payroll.Utils; using Newtonsoft.Json; public class DataConnectionError diff --git a/sync-for-payroll/CodatSyncPayroll/Models/Shared/DataConnectionStatus.cs b/sync-for-payroll/Codat/Sync/Payroll/Models/Shared/DataConnectionStatus.cs similarity index 98% rename from sync-for-payroll/CodatSyncPayroll/Models/Shared/DataConnectionStatus.cs rename to sync-for-payroll/Codat/Sync/Payroll/Models/Shared/DataConnectionStatus.cs index 11aabb2e2..750f009bf 100644 --- a/sync-for-payroll/CodatSyncPayroll/Models/Shared/DataConnectionStatus.cs +++ b/sync-for-payroll/Codat/Sync/Payroll/Models/Shared/DataConnectionStatus.cs @@ -10,6 +10,7 @@ #nullable enable namespace Codat.Sync.Payroll.Models.Shared { + using Codat.Sync.Payroll.Utils; using Newtonsoft.Json; using System; diff --git a/sync-for-payroll/CodatSyncPayroll/Models/Shared/DataStatus.cs b/sync-for-payroll/Codat/Sync/Payroll/Models/Shared/DataStatus.cs similarity index 92% rename from sync-for-payroll/CodatSyncPayroll/Models/Shared/DataStatus.cs rename to sync-for-payroll/Codat/Sync/Payroll/Models/Shared/DataStatus.cs index a62ea1e2b..b74358d73 100644 --- a/sync-for-payroll/CodatSyncPayroll/Models/Shared/DataStatus.cs +++ b/sync-for-payroll/Codat/Sync/Payroll/Models/Shared/DataStatus.cs @@ -10,6 +10,8 @@ #nullable enable namespace Codat.Sync.Payroll.Models.Shared { + using Codat.Sync.Payroll.Models.Shared; + using Codat.Sync.Payroll.Utils; using Newtonsoft.Json; /// @@ -19,13 +21,13 @@ public class DataStatus { /// - /// The current status of the dataset in Codat's cache. + /// The current status of the dataset. /// [JsonProperty("currentStatus")] - public string CurrentStatus { get; set; } = default!; + public PropertieStatus CurrentStatus { get; set; } = default!; /// - /// Available Data types + /// Available data types /// [JsonProperty("dataType")] public DataTypes DataType { get; set; } = default!; diff --git a/sync-for-payroll/CodatSyncPayroll/Models/Shared/DataType.cs b/sync-for-payroll/Codat/Sync/Payroll/Models/Shared/DataType.cs similarity index 98% rename from sync-for-payroll/CodatSyncPayroll/Models/Shared/DataType.cs rename to sync-for-payroll/Codat/Sync/Payroll/Models/Shared/DataType.cs index 029d91d6e..756217055 100644 --- a/sync-for-payroll/CodatSyncPayroll/Models/Shared/DataType.cs +++ b/sync-for-payroll/Codat/Sync/Payroll/Models/Shared/DataType.cs @@ -10,11 +10,12 @@ #nullable enable namespace Codat.Sync.Payroll.Models.Shared { + using Codat.Sync.Payroll.Utils; using Newtonsoft.Json; using System; /// - /// Available Data types + /// Available data types /// public enum DataType { diff --git a/sync-for-payroll/CodatSyncPayroll/Models/Shared/DataTypes.cs b/sync-for-payroll/Codat/Sync/Payroll/Models/Shared/DataTypes.cs similarity index 98% rename from sync-for-payroll/CodatSyncPayroll/Models/Shared/DataTypes.cs rename to sync-for-payroll/Codat/Sync/Payroll/Models/Shared/DataTypes.cs index 678d680db..e5b94c675 100644 --- a/sync-for-payroll/CodatSyncPayroll/Models/Shared/DataTypes.cs +++ b/sync-for-payroll/Codat/Sync/Payroll/Models/Shared/DataTypes.cs @@ -10,11 +10,12 @@ #nullable enable namespace Codat.Sync.Payroll.Models.Shared { + using Codat.Sync.Payroll.Utils; using Newtonsoft.Json; using System; /// - /// Available Data types + /// Available data types /// public enum DataTypes { diff --git a/sync-for-payroll/CodatSyncPayroll/Models/Shared/PullOperationStatus.cs b/sync-for-payroll/Codat/Sync/Payroll/Models/Shared/DatasetStatus.cs similarity index 81% rename from sync-for-payroll/CodatSyncPayroll/Models/Shared/PullOperationStatus.cs rename to sync-for-payroll/Codat/Sync/Payroll/Models/Shared/DatasetStatus.cs index 2201618b5..e696d009c 100644 --- a/sync-for-payroll/CodatSyncPayroll/Models/Shared/PullOperationStatus.cs +++ b/sync-for-payroll/Codat/Sync/Payroll/Models/Shared/DatasetStatus.cs @@ -10,13 +10,14 @@ #nullable enable namespace Codat.Sync.Payroll.Models.Shared { + using Codat.Sync.Payroll.Utils; using Newtonsoft.Json; using System; /// - /// The current status of the pull operation. + /// The current status of the dataset. /// - public enum PullOperationStatus + public enum DatasetStatus { [JsonProperty("Initial")] Initial, @@ -52,10 +53,6 @@ public enum PullOperationStatus AuthError, [JsonProperty("Cancelled")] Cancelled, - [JsonProperty("Routing")] - Routing, - [JsonProperty("RoutingError")] - RoutingError, [JsonProperty("NotSupported")] NotSupported, [JsonProperty("RateLimitError")] @@ -66,16 +63,16 @@ public enum PullOperationStatus PrerequisiteNotMet, } - public static class PullOperationStatusExtension + public static class DatasetStatusExtension { - public static string Value(this PullOperationStatus value) + public static string Value(this DatasetStatus value) { return ((JsonPropertyAttribute)value.GetType().GetMember(value.ToString())[0].GetCustomAttributes(typeof(JsonPropertyAttribute), false)[0]).PropertyName ?? value.ToString(); } - public static PullOperationStatus ToEnum(this string value) + public static DatasetStatus ToEnum(this string value) { - foreach(var field in typeof(PullOperationStatus).GetFields()) + foreach(var field in typeof(DatasetStatus).GetFields()) { var attributes = field.GetCustomAttributes(typeof(JsonPropertyAttribute), false); if (attributes.Length == 0) @@ -88,14 +85,14 @@ public static PullOperationStatus ToEnum(this string value) { var enumVal = field.GetValue(null); - if (enumVal is PullOperationStatus) + if (enumVal is DatasetStatus) { - return (PullOperationStatus)enumVal; + return (DatasetStatus)enumVal; } } } - throw new Exception($"Unknown value {value} for enum PullOperationStatus"); + throw new Exception($"Unknown value {value} for enum DatasetStatus"); } } diff --git a/sync-for-payroll/CodatSyncPayroll/Models/Shared/ErrorValidation.cs b/sync-for-payroll/Codat/Sync/Payroll/Models/Shared/ErrorValidation.cs similarity index 84% rename from sync-for-payroll/CodatSyncPayroll/Models/Shared/ErrorValidation.cs rename to sync-for-payroll/Codat/Sync/Payroll/Models/Shared/ErrorValidation.cs index f24fd83b7..06abbf6d3 100644 --- a/sync-for-payroll/CodatSyncPayroll/Models/Shared/ErrorValidation.cs +++ b/sync-for-payroll/Codat/Sync/Payroll/Models/Shared/ErrorValidation.cs @@ -10,6 +10,8 @@ #nullable enable namespace Codat.Sync.Payroll.Models.Shared { + using Codat.Sync.Payroll.Models.Shared; + using Codat.Sync.Payroll.Utils; using Newtonsoft.Json; using System.Collections.Generic; @@ -20,9 +22,9 @@ public class ErrorValidation { [JsonProperty("errors")] - public List? Errors { get; set; } + public List? Errors { get; set; } = null; [JsonProperty("warnings")] - public List? Warnings { get; set; } + public List? Warnings { get; set; } = null; } } \ No newline at end of file diff --git a/sync-for-payroll/CodatSyncPayroll/Models/Shared/ErrorValidationItem.cs b/sync-for-payroll/Codat/Sync/Payroll/Models/Shared/ErrorValidationItem.cs similarity index 82% rename from sync-for-payroll/CodatSyncPayroll/Models/Shared/ErrorValidationItem.cs rename to sync-for-payroll/Codat/Sync/Payroll/Models/Shared/ErrorValidationItem.cs index 30ddb8d8d..c0a6cf2ba 100644 --- a/sync-for-payroll/CodatSyncPayroll/Models/Shared/ErrorValidationItem.cs +++ b/sync-for-payroll/Codat/Sync/Payroll/Models/Shared/ErrorValidationItem.cs @@ -10,6 +10,7 @@ #nullable enable namespace Codat.Sync.Payroll.Models.Shared { + using Codat.Sync.Payroll.Utils; using Newtonsoft.Json; public class ErrorValidationItem @@ -19,18 +20,18 @@ public class ErrorValidationItem /// Unique identifier for a validation item. /// [JsonProperty("itemId")] - public string? ItemId { get; set; } + public string? ItemId { get; set; } = null; /// /// A message outlining validation item's issue. /// [JsonProperty("message")] - public string? Message { get; set; } + public string? Message { get; set; } = null; /// /// Name of validator. /// [JsonProperty("validatorName")] - public string? ValidatorName { get; set; } + public string? ValidatorName { get; set; } = null; } } \ No newline at end of file diff --git a/sync-for-payroll/CodatSyncPayroll/Models/Shared/GroupReference.cs b/sync-for-payroll/Codat/Sync/Payroll/Models/Shared/GroupReference.cs similarity index 95% rename from sync-for-payroll/CodatSyncPayroll/Models/Shared/GroupReference.cs rename to sync-for-payroll/Codat/Sync/Payroll/Models/Shared/GroupReference.cs index 14074e6e9..531bca317 100644 --- a/sync-for-payroll/CodatSyncPayroll/Models/Shared/GroupReference.cs +++ b/sync-for-payroll/Codat/Sync/Payroll/Models/Shared/GroupReference.cs @@ -10,6 +10,7 @@ #nullable enable namespace Codat.Sync.Payroll.Models.Shared { + using Codat.Sync.Payroll.Utils; using Newtonsoft.Json; public class GroupReference diff --git a/sync-for-payroll/CodatSyncPayroll/Models/Shared/HalRef.cs b/sync-for-payroll/Codat/Sync/Payroll/Models/Shared/HalRef.cs similarity index 94% rename from sync-for-payroll/CodatSyncPayroll/Models/Shared/HalRef.cs rename to sync-for-payroll/Codat/Sync/Payroll/Models/Shared/HalRef.cs index 9730ba8a5..ca392da61 100644 --- a/sync-for-payroll/CodatSyncPayroll/Models/Shared/HalRef.cs +++ b/sync-for-payroll/Codat/Sync/Payroll/Models/Shared/HalRef.cs @@ -10,6 +10,7 @@ #nullable enable namespace Codat.Sync.Payroll.Models.Shared { + using Codat.Sync.Payroll.Utils; using Newtonsoft.Json; public class HalRef diff --git a/sync-for-payroll/CodatSyncPayroll/Models/Shared/Items.cs b/sync-for-payroll/Codat/Sync/Payroll/Models/Shared/Items.cs similarity index 94% rename from sync-for-payroll/CodatSyncPayroll/Models/Shared/Items.cs rename to sync-for-payroll/Codat/Sync/Payroll/Models/Shared/Items.cs index 451445384..92b701803 100644 --- a/sync-for-payroll/CodatSyncPayroll/Models/Shared/Items.cs +++ b/sync-for-payroll/Codat/Sync/Payroll/Models/Shared/Items.cs @@ -10,6 +10,7 @@ #nullable enable namespace Codat.Sync.Payroll.Models.Shared { + using Codat.Sync.Payroll.Utils; using Newtonsoft.Json; public class Items diff --git a/sync-for-payroll/CodatSyncPayroll/Models/Shared/Journal.cs b/sync-for-payroll/Codat/Sync/Payroll/Models/Shared/Journal.cs similarity index 95% rename from sync-for-payroll/CodatSyncPayroll/Models/Shared/Journal.cs rename to sync-for-payroll/Codat/Sync/Payroll/Models/Shared/Journal.cs index 15a638b32..645bd9eba 100644 --- a/sync-for-payroll/CodatSyncPayroll/Models/Shared/Journal.cs +++ b/sync-for-payroll/Codat/Sync/Payroll/Models/Shared/Journal.cs @@ -10,6 +10,8 @@ #nullable enable namespace Codat.Sync.Payroll.Models.Shared { + using Codat.Sync.Payroll.Models.Shared; + using Codat.Sync.Payroll.Utils; using Newtonsoft.Json; /// @@ -86,7 +88,7 @@ public class Journal /// Native journal number or code. /// [JsonProperty("journalCode")] - public string? JournalCode { get; set; } + public string? JournalCode { get; set; } = null; [JsonProperty("metadata")] public Metadata? Metadata { get; set; } @@ -102,7 +104,7 @@ public class Journal /// /// [JsonProperty("name")] - public string? Name { get; set; } + public string? Name { get; set; } = null; /// /// Parent journal ID.
@@ -112,7 +114,7 @@ public class Journal /// ///
[JsonProperty("parentId")] - public string? ParentId { get; set; } + public string? ParentId { get; set; } = null; [JsonProperty("sourceModifiedDate")] public string? SourceModifiedDate { get; set; } @@ -127,6 +129,6 @@ public class Journal /// The type of the journal. ///
[JsonProperty("type")] - public string? Type { get; set; } + public string? Type { get; set; } = null; } } \ No newline at end of file diff --git a/sync-for-payroll/CodatSyncPayroll/Models/Shared/JournalEntries.cs b/sync-for-payroll/Codat/Sync/Payroll/Models/Shared/JournalEntries.cs similarity index 94% rename from sync-for-payroll/CodatSyncPayroll/Models/Shared/JournalEntries.cs rename to sync-for-payroll/Codat/Sync/Payroll/Models/Shared/JournalEntries.cs index ec329dbd8..821d628cd 100644 --- a/sync-for-payroll/CodatSyncPayroll/Models/Shared/JournalEntries.cs +++ b/sync-for-payroll/Codat/Sync/Payroll/Models/Shared/JournalEntries.cs @@ -10,6 +10,8 @@ #nullable enable namespace Codat.Sync.Payroll.Models.Shared { + using Codat.Sync.Payroll.Models.Shared; + using Codat.Sync.Payroll.Utils; using Newtonsoft.Json; using System.Collections.Generic; diff --git a/sync-for-payroll/CodatSyncPayroll/Models/Shared/JournalEntry.cs b/sync-for-payroll/Codat/Sync/Payroll/Models/Shared/JournalEntry.cs similarity index 97% rename from sync-for-payroll/CodatSyncPayroll/Models/Shared/JournalEntry.cs rename to sync-for-payroll/Codat/Sync/Payroll/Models/Shared/JournalEntry.cs index 60d7f70b2..1d31bcc51 100644 --- a/sync-for-payroll/CodatSyncPayroll/Models/Shared/JournalEntry.cs +++ b/sync-for-payroll/Codat/Sync/Payroll/Models/Shared/JournalEntry.cs @@ -10,6 +10,8 @@ #nullable enable namespace Codat.Sync.Payroll.Models.Shared { + using Codat.Sync.Payroll.Models.Shared; + using Codat.Sync.Payroll.Utils; using Newtonsoft.Json; using System.Collections.Generic; @@ -74,7 +76,7 @@ public class JournalEntry /// Optional description of the journal entry. ///
[JsonProperty("description")] - public string? Description { get; set; } + public string? Description { get; set; } = null; /// /// Unique identifier of the journal entry for the company in the accounting platform. @@ -86,7 +88,7 @@ public class JournalEntry /// An array of journal lines. /// [JsonProperty("journalLines")] - public List? JournalLines { get; set; } + public List? JournalLines { get; set; } = null; /// /// Links journal entries to the relevant journal in accounting integrations that use multi-book accounting (multiple journals). diff --git a/sync-for-payroll/CodatSyncPayroll/Models/Shared/JournalEntryRecordRef.cs b/sync-for-payroll/Codat/Sync/Payroll/Models/Shared/JournalEntryRecordRef.cs similarity index 92% rename from sync-for-payroll/CodatSyncPayroll/Models/Shared/JournalEntryRecordRef.cs rename to sync-for-payroll/Codat/Sync/Payroll/Models/Shared/JournalEntryRecordRef.cs index 6d65ec4b6..c32dd8f2c 100644 --- a/sync-for-payroll/CodatSyncPayroll/Models/Shared/JournalEntryRecordRef.cs +++ b/sync-for-payroll/Codat/Sync/Payroll/Models/Shared/JournalEntryRecordRef.cs @@ -10,6 +10,8 @@ #nullable enable namespace Codat.Sync.Payroll.Models.Shared { + using Codat.Sync.Payroll.Models.Shared; + using Codat.Sync.Payroll.Utils; using Newtonsoft.Json; /// diff --git a/sync-for-payroll/CodatSyncPayroll/Models/Shared/JournalEntryRecordRefDataType.cs b/sync-for-payroll/Codat/Sync/Payroll/Models/Shared/JournalEntryRecordRefDataType.cs similarity index 98% rename from sync-for-payroll/CodatSyncPayroll/Models/Shared/JournalEntryRecordRefDataType.cs rename to sync-for-payroll/Codat/Sync/Payroll/Models/Shared/JournalEntryRecordRefDataType.cs index e74b3608d..1b43f7927 100644 --- a/sync-for-payroll/CodatSyncPayroll/Models/Shared/JournalEntryRecordRefDataType.cs +++ b/sync-for-payroll/Codat/Sync/Payroll/Models/Shared/JournalEntryRecordRefDataType.cs @@ -10,6 +10,7 @@ #nullable enable namespace Codat.Sync.Payroll.Models.Shared { + using Codat.Sync.Payroll.Utils; using Newtonsoft.Json; using System; diff --git a/sync-for-payroll/CodatSyncPayroll/Models/Shared/JournalLine.cs b/sync-for-payroll/Codat/Sync/Payroll/Models/Shared/JournalLine.cs similarity index 89% rename from sync-for-payroll/CodatSyncPayroll/Models/Shared/JournalLine.cs rename to sync-for-payroll/Codat/Sync/Payroll/Models/Shared/JournalLine.cs index 55a7c434b..432fa51c7 100644 --- a/sync-for-payroll/CodatSyncPayroll/Models/Shared/JournalLine.cs +++ b/sync-for-payroll/Codat/Sync/Payroll/Models/Shared/JournalLine.cs @@ -10,6 +10,8 @@ #nullable enable namespace Codat.Sync.Payroll.Models.Shared { + using Codat.Sync.Payroll.Models.Shared; + using Codat.Sync.Payroll.Utils; using Newtonsoft.Json; public class JournalLine @@ -25,13 +27,13 @@ public class JournalLine /// Currency for the journal line item. /// [JsonProperty("currency")] - public string? Currency { get; set; } + public string? Currency { get; set; } = null; /// /// Description of the journal line item. /// [JsonProperty("description")] - public string? Description { get; set; } + public string? Description { get; set; } = null; /// /// Amount for the journal line. Debit entries are considered positive, and credit entries are considered negative. diff --git a/sync-for-payroll/CodatSyncPayroll/Models/Shared/JournalPrototype.cs b/sync-for-payroll/Codat/Sync/Payroll/Models/Shared/JournalPrototype.cs similarity index 91% rename from sync-for-payroll/CodatSyncPayroll/Models/Shared/JournalPrototype.cs rename to sync-for-payroll/Codat/Sync/Payroll/Models/Shared/JournalPrototype.cs index 4cbd5fa64..293ae4575 100644 --- a/sync-for-payroll/CodatSyncPayroll/Models/Shared/JournalPrototype.cs +++ b/sync-for-payroll/Codat/Sync/Payroll/Models/Shared/JournalPrototype.cs @@ -10,6 +10,8 @@ #nullable enable namespace Codat.Sync.Payroll.Models.Shared { + using Codat.Sync.Payroll.Models.Shared; + using Codat.Sync.Payroll.Utils; using Newtonsoft.Json; public class JournalPrototype @@ -52,7 +54,7 @@ public class JournalPrototype /// Native journal number or code. /// [JsonProperty("journalCode")] - public string? JournalCode { get; set; } + public string? JournalCode { get; set; } = null; /// /// Journal name.
@@ -62,7 +64,7 @@ public class JournalPrototype /// ///
[JsonProperty("name")] - public string? Name { get; set; } + public string? Name { get; set; } = null; /// /// Parent journal ID.
@@ -72,7 +74,7 @@ public class JournalPrototype /// ///
[JsonProperty("parentId")] - public string? ParentId { get; set; } + public string? ParentId { get; set; } = null; /// /// Current journal status. @@ -84,6 +86,6 @@ public class JournalPrototype /// The type of the journal. /// [JsonProperty("type")] - public string? Type { get; set; } + public string? Type { get; set; } = null; } } \ No newline at end of file diff --git a/sync-for-payroll/CodatSyncPayroll/Models/Shared/JournalRef.cs b/sync-for-payroll/Codat/Sync/Payroll/Models/Shared/JournalRef.cs similarity index 91% rename from sync-for-payroll/CodatSyncPayroll/Models/Shared/JournalRef.cs rename to sync-for-payroll/Codat/Sync/Payroll/Models/Shared/JournalRef.cs index 3992e090c..90bcd49a8 100644 --- a/sync-for-payroll/CodatSyncPayroll/Models/Shared/JournalRef.cs +++ b/sync-for-payroll/Codat/Sync/Payroll/Models/Shared/JournalRef.cs @@ -10,6 +10,7 @@ #nullable enable namespace Codat.Sync.Payroll.Models.Shared { + using Codat.Sync.Payroll.Utils; using Newtonsoft.Json; /// @@ -28,6 +29,6 @@ public class JournalRef /// Name of journal /// [JsonProperty("name")] - public string? Name { get; set; } + public string? Name { get; set; } = null; } } \ No newline at end of file diff --git a/sync-for-payroll/CodatSyncPayroll/Models/Shared/JournalStatus.cs b/sync-for-payroll/Codat/Sync/Payroll/Models/Shared/JournalStatus.cs similarity index 98% rename from sync-for-payroll/CodatSyncPayroll/Models/Shared/JournalStatus.cs rename to sync-for-payroll/Codat/Sync/Payroll/Models/Shared/JournalStatus.cs index edd8df89f..6011e2f44 100644 --- a/sync-for-payroll/CodatSyncPayroll/Models/Shared/JournalStatus.cs +++ b/sync-for-payroll/Codat/Sync/Payroll/Models/Shared/JournalStatus.cs @@ -10,6 +10,7 @@ #nullable enable namespace Codat.Sync.Payroll.Models.Shared { + using Codat.Sync.Payroll.Utils; using Newtonsoft.Json; using System; diff --git a/sync-for-payroll/CodatSyncPayroll/Models/Shared/Journals.cs b/sync-for-payroll/Codat/Sync/Payroll/Models/Shared/Journals.cs similarity index 94% rename from sync-for-payroll/CodatSyncPayroll/Models/Shared/Journals.cs rename to sync-for-payroll/Codat/Sync/Payroll/Models/Shared/Journals.cs index 9a670f684..d41f83579 100644 --- a/sync-for-payroll/CodatSyncPayroll/Models/Shared/Journals.cs +++ b/sync-for-payroll/Codat/Sync/Payroll/Models/Shared/Journals.cs @@ -10,6 +10,8 @@ #nullable enable namespace Codat.Sync.Payroll.Models.Shared { + using Codat.Sync.Payroll.Models.Shared; + using Codat.Sync.Payroll.Utils; using Newtonsoft.Json; using System.Collections.Generic; diff --git a/sync-for-payroll/CodatSyncPayroll/Models/Shared/Links.cs b/sync-for-payroll/Codat/Sync/Payroll/Models/Shared/Links.cs similarity index 91% rename from sync-for-payroll/CodatSyncPayroll/Models/Shared/Links.cs rename to sync-for-payroll/Codat/Sync/Payroll/Models/Shared/Links.cs index 0cc209fd5..1d963e8e2 100644 --- a/sync-for-payroll/CodatSyncPayroll/Models/Shared/Links.cs +++ b/sync-for-payroll/Codat/Sync/Payroll/Models/Shared/Links.cs @@ -10,6 +10,8 @@ #nullable enable namespace Codat.Sync.Payroll.Models.Shared { + using Codat.Sync.Payroll.Models.Shared; + using Codat.Sync.Payroll.Utils; using Newtonsoft.Json; public class Links diff --git a/sync-for-payroll/CodatSyncPayroll/Models/Shared/Metadata.cs b/sync-for-payroll/Codat/Sync/Payroll/Models/Shared/Metadata.cs similarity index 88% rename from sync-for-payroll/CodatSyncPayroll/Models/Shared/Metadata.cs rename to sync-for-payroll/Codat/Sync/Payroll/Models/Shared/Metadata.cs index ae279eb1c..bfc81f0ff 100644 --- a/sync-for-payroll/CodatSyncPayroll/Models/Shared/Metadata.cs +++ b/sync-for-payroll/Codat/Sync/Payroll/Models/Shared/Metadata.cs @@ -10,6 +10,7 @@ #nullable enable namespace Codat.Sync.Payroll.Models.Shared { + using Codat.Sync.Payroll.Utils; using Newtonsoft.Json; public class Metadata @@ -19,6 +20,6 @@ public class Metadata /// Indicates whether the record has been deleted in the third-party system this record originated from. ///
[JsonProperty("isDeleted")] - public bool? IsDeleted { get; set; } + public bool? IsDeleted { get; set; } = null; } } \ No newline at end of file diff --git a/sync-for-payroll/CodatSyncPayroll/Models/Shared/PhoneNumber.cs b/sync-for-payroll/Codat/Sync/Payroll/Models/Shared/PhoneNumber.cs similarity index 85% rename from sync-for-payroll/CodatSyncPayroll/Models/Shared/PhoneNumber.cs rename to sync-for-payroll/Codat/Sync/Payroll/Models/Shared/PhoneNumber.cs index 62ff74e0f..f73a99612 100644 --- a/sync-for-payroll/CodatSyncPayroll/Models/Shared/PhoneNumber.cs +++ b/sync-for-payroll/Codat/Sync/Payroll/Models/Shared/PhoneNumber.cs @@ -10,6 +10,8 @@ #nullable enable namespace Codat.Sync.Payroll.Models.Shared { + using Codat.Sync.Payroll.Models.Shared; + using Codat.Sync.Payroll.Utils; using Newtonsoft.Json; public class PhoneNumber @@ -19,7 +21,7 @@ public class PhoneNumber /// A phone number. ///
[JsonProperty("number")] - public string Number { get; set; } = default!; + public string? Number { get; set; } = null; /// /// The type of phone number diff --git a/sync-for-payroll/CodatSyncPayroll/Models/Shared/PhoneNumberType.cs b/sync-for-payroll/Codat/Sync/Payroll/Models/Shared/PhoneNumberType.cs similarity index 98% rename from sync-for-payroll/CodatSyncPayroll/Models/Shared/PhoneNumberType.cs rename to sync-for-payroll/Codat/Sync/Payroll/Models/Shared/PhoneNumberType.cs index b2d7f7c6c..e54cc14da 100644 --- a/sync-for-payroll/CodatSyncPayroll/Models/Shared/PhoneNumberType.cs +++ b/sync-for-payroll/Codat/Sync/Payroll/Models/Shared/PhoneNumberType.cs @@ -10,6 +10,7 @@ #nullable enable namespace Codat.Sync.Payroll.Models.Shared { + using Codat.Sync.Payroll.Utils; using Newtonsoft.Json; using System; diff --git a/sync-for-payroll/Codat/Sync/Payroll/Models/Shared/PropertieStatus.cs b/sync-for-payroll/Codat/Sync/Payroll/Models/Shared/PropertieStatus.cs new file mode 100644 index 000000000..3c06d4293 --- /dev/null +++ b/sync-for-payroll/Codat/Sync/Payroll/Models/Shared/PropertieStatus.cs @@ -0,0 +1,99 @@ + +//------------------------------------------------------------------------------ +// +// This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// +// Changes to this file may cause incorrect behavior and will be lost when +// the code is regenerated. +// +//------------------------------------------------------------------------------ +#nullable enable +namespace Codat.Sync.Payroll.Models.Shared +{ + using Codat.Sync.Payroll.Utils; + using Newtonsoft.Json; + using System; + + /// + /// The current status of the dataset. + /// + public enum PropertieStatus + { + [JsonProperty("Initial")] + Initial, + [JsonProperty("Queued")] + Queued, + [JsonProperty("Fetching")] + Fetching, + [JsonProperty("MapQueued")] + MapQueued, + [JsonProperty("Mapping")] + Mapping, + [JsonProperty("Complete")] + Complete, + [JsonProperty("FetchError")] + FetchError, + [JsonProperty("MapError")] + MapError, + [JsonProperty("InternalError")] + InternalError, + [JsonProperty("ProcessingQueued")] + ProcessingQueued, + [JsonProperty("Processing")] + Processing, + [JsonProperty("ProcessingError")] + ProcessingError, + [JsonProperty("ValidationQueued")] + ValidationQueued, + [JsonProperty("Validating")] + Validating, + [JsonProperty("ValidationError")] + ValidationError, + [JsonProperty("AuthError")] + AuthError, + [JsonProperty("Cancelled")] + Cancelled, + [JsonProperty("NotSupported")] + NotSupported, + [JsonProperty("RateLimitError")] + RateLimitError, + [JsonProperty("PermissionsError")] + PermissionsError, + [JsonProperty("PrerequisiteNotMet")] + PrerequisiteNotMet, + } + + public static class PropertieStatusExtension + { + public static string Value(this PropertieStatus value) + { + return ((JsonPropertyAttribute)value.GetType().GetMember(value.ToString())[0].GetCustomAttributes(typeof(JsonPropertyAttribute), false)[0]).PropertyName ?? value.ToString(); + } + + public static PropertieStatus ToEnum(this string value) + { + foreach(var field in typeof(PropertieStatus).GetFields()) + { + var attributes = field.GetCustomAttributes(typeof(JsonPropertyAttribute), false); + if (attributes.Length == 0) + { + continue; + } + + var attribute = attributes[0] as JsonPropertyAttribute; + if (attribute != null && attribute.PropertyName == value) + { + var enumVal = field.GetValue(null); + + if (enumVal is PropertieStatus) + { + return (PropertieStatus)enumVal; + } + } + } + + throw new Exception($"Unknown value {value} for enum PropertieStatus"); + } + } + +} \ No newline at end of file diff --git a/sync-for-payroll/CodatSyncPayroll/Models/Shared/PullOperation.cs b/sync-for-payroll/Codat/Sync/Payroll/Models/Shared/PullOperation.cs similarity index 94% rename from sync-for-payroll/CodatSyncPayroll/Models/Shared/PullOperation.cs rename to sync-for-payroll/Codat/Sync/Payroll/Models/Shared/PullOperation.cs index 7e099a027..ad18b7f44 100644 --- a/sync-for-payroll/CodatSyncPayroll/Models/Shared/PullOperation.cs +++ b/sync-for-payroll/Codat/Sync/Payroll/Models/Shared/PullOperation.cs @@ -10,6 +10,8 @@ #nullable enable namespace Codat.Sync.Payroll.Models.Shared { + using Codat.Sync.Payroll.Models.Shared; + using Codat.Sync.Payroll.Utils; using Newtonsoft.Json; /// @@ -71,7 +73,7 @@ public class PullOperation /// A message about a transient or persistent error. /// [JsonProperty("errorMessage")] - public string? ErrorMessage { get; set; } + public string? ErrorMessage { get; set; } = null; /// /// Unique identifier of the pull operation. @@ -125,15 +127,15 @@ public class PullOperation public string Requested { get; set; } = default!; /// - /// The current status of the pull operation. + /// The current status of the dataset. /// [JsonProperty("status")] - public PullOperationStatus Status { get; set; } = default!; + public DatasetStatus Status { get; set; } = default!; /// /// Additional information about the dataset status. /// [JsonProperty("statusDescription")] - public string? StatusDescription { get; set; } + public string? StatusDescription { get; set; } = null; } } \ No newline at end of file diff --git a/sync-for-payroll/CodatSyncPayroll/Models/Shared/PullOperations.cs b/sync-for-payroll/Codat/Sync/Payroll/Models/Shared/PullOperations.cs similarity index 94% rename from sync-for-payroll/CodatSyncPayroll/Models/Shared/PullOperations.cs rename to sync-for-payroll/Codat/Sync/Payroll/Models/Shared/PullOperations.cs index 1569407ce..78a1cc641 100644 --- a/sync-for-payroll/CodatSyncPayroll/Models/Shared/PullOperations.cs +++ b/sync-for-payroll/Codat/Sync/Payroll/Models/Shared/PullOperations.cs @@ -10,6 +10,8 @@ #nullable enable namespace Codat.Sync.Payroll.Models.Shared { + using Codat.Sync.Payroll.Models.Shared; + using Codat.Sync.Payroll.Utils; using Newtonsoft.Json; using System.Collections.Generic; diff --git a/sync-for-payroll/CodatSyncPayroll/Models/Shared/PushChangeType.cs b/sync-for-payroll/Codat/Sync/Payroll/Models/Shared/PushChangeType.cs similarity index 98% rename from sync-for-payroll/CodatSyncPayroll/Models/Shared/PushChangeType.cs rename to sync-for-payroll/Codat/Sync/Payroll/Models/Shared/PushChangeType.cs index 901d458a9..0cbbf0814 100644 --- a/sync-for-payroll/CodatSyncPayroll/Models/Shared/PushChangeType.cs +++ b/sync-for-payroll/Codat/Sync/Payroll/Models/Shared/PushChangeType.cs @@ -10,6 +10,7 @@ #nullable enable namespace Codat.Sync.Payroll.Models.Shared { + using Codat.Sync.Payroll.Utils; using Newtonsoft.Json; using System; diff --git a/sync-for-payroll/CodatSyncPayroll/Models/Shared/PushFieldValidation.cs b/sync-for-payroll/Codat/Sync/Payroll/Models/Shared/PushFieldValidation.cs similarity index 92% rename from sync-for-payroll/CodatSyncPayroll/Models/Shared/PushFieldValidation.cs rename to sync-for-payroll/Codat/Sync/Payroll/Models/Shared/PushFieldValidation.cs index 9ff6d8de6..dac540670 100644 --- a/sync-for-payroll/CodatSyncPayroll/Models/Shared/PushFieldValidation.cs +++ b/sync-for-payroll/Codat/Sync/Payroll/Models/Shared/PushFieldValidation.cs @@ -10,6 +10,7 @@ #nullable enable namespace Codat.Sync.Payroll.Models.Shared { + using Codat.Sync.Payroll.Utils; using Newtonsoft.Json; public class PushFieldValidation @@ -31,6 +32,6 @@ public class PushFieldValidation /// Unique reference identifier for the validation issue. /// [JsonProperty("ref")] - public string? Ref { get; set; } + public string? Ref { get; set; } = null; } } \ No newline at end of file diff --git a/sync-for-payroll/CodatSyncPayroll/Models/Shared/PushOperation.cs b/sync-for-payroll/Codat/Sync/Payroll/Models/Shared/PushOperation.cs similarity index 94% rename from sync-for-payroll/CodatSyncPayroll/Models/Shared/PushOperation.cs rename to sync-for-payroll/Codat/Sync/Payroll/Models/Shared/PushOperation.cs index 06dd4b587..f883bbe0d 100644 --- a/sync-for-payroll/CodatSyncPayroll/Models/Shared/PushOperation.cs +++ b/sync-for-payroll/Codat/Sync/Payroll/Models/Shared/PushOperation.cs @@ -10,6 +10,8 @@ #nullable enable namespace Codat.Sync.Payroll.Models.Shared { + using Codat.Sync.Payroll.Models.Shared; + using Codat.Sync.Payroll.Utils; using Newtonsoft.Json; using System.Collections.Generic; using System; @@ -21,7 +23,7 @@ public class PushOperation /// Contains a single entry that communicates which record has changed and the manner in which it changed. /// [JsonProperty("changes")] - public List? Changes { get; set; } + public List? Changes { get; set; } = null; /// /// Unique identifier for your SMB in Codat. @@ -63,7 +65,7 @@ public class PushOperation public string DataConnectionKey { get; set; } = default!; /// - /// Available Data types + /// Available data types /// [JsonProperty("dataType")] public DataType? DataType { get; set; } @@ -72,7 +74,7 @@ public class PushOperation /// A message about the error. /// [JsonProperty("errorMessage")] - public string? ErrorMessage { get; set; } + public string? ErrorMessage { get; set; } = null; /// /// A unique identifier generated by Codat to represent this single push operation. This identifier can be used to track the status of the push, and should be persisted. @@ -123,14 +125,14 @@ public class PushOperation /// Number of minutes the push operation must complete within before it times out. /// [JsonProperty("timeoutInMinutes")] - public int? TimeoutInMinutes { get; set; } + public int? TimeoutInMinutes { get; set; } = null; /// /// Number of seconds the push operation must complete within before it times out. /// [Obsolete("This field will be removed in a future release, please migrate away from it as soon as possible")] [JsonProperty("timeoutInSeconds")] - public int? TimeoutInSeconds { get; set; } + public int? TimeoutInSeconds { get; set; } = null; /// /// A human-readable object describing validation decisions Codat has made when pushing data into the platform. If a push has failed because of validation errors, they will be detailed here. diff --git a/sync-for-payroll/CodatSyncPayroll/Models/Shared/PushOperationChange.cs b/sync-for-payroll/Codat/Sync/Payroll/Models/Shared/PushOperationChange.cs similarity index 87% rename from sync-for-payroll/CodatSyncPayroll/Models/Shared/PushOperationChange.cs rename to sync-for-payroll/Codat/Sync/Payroll/Models/Shared/PushOperationChange.cs index 378305d1a..a8fed50ac 100644 --- a/sync-for-payroll/CodatSyncPayroll/Models/Shared/PushOperationChange.cs +++ b/sync-for-payroll/Codat/Sync/Payroll/Models/Shared/PushOperationChange.cs @@ -10,6 +10,8 @@ #nullable enable namespace Codat.Sync.Payroll.Models.Shared { + using Codat.Sync.Payroll.Models.Shared; + using Codat.Sync.Payroll.Utils; using Newtonsoft.Json; public class PushOperationChange @@ -19,7 +21,7 @@ public class PushOperationChange /// Unique identifier for the attachment created otherwise null. /// [JsonProperty("attachmentId")] - public string? AttachmentId { get; set; } + public string? AttachmentId { get; set; } = null; [JsonProperty("recordRef")] public PushOperationRef? RecordRef { get; set; } diff --git a/sync-for-payroll/CodatSyncPayroll/Models/Shared/PushOperationRef.cs b/sync-for-payroll/Codat/Sync/Payroll/Models/Shared/PushOperationRef.cs similarity index 87% rename from sync-for-payroll/CodatSyncPayroll/Models/Shared/PushOperationRef.cs rename to sync-for-payroll/Codat/Sync/Payroll/Models/Shared/PushOperationRef.cs index 7f391bf48..6ceb35c34 100644 --- a/sync-for-payroll/CodatSyncPayroll/Models/Shared/PushOperationRef.cs +++ b/sync-for-payroll/Codat/Sync/Payroll/Models/Shared/PushOperationRef.cs @@ -10,13 +10,15 @@ #nullable enable namespace Codat.Sync.Payroll.Models.Shared { + using Codat.Sync.Payroll.Models.Shared; + using Codat.Sync.Payroll.Utils; using Newtonsoft.Json; public class PushOperationRef { /// - /// Available Data types + /// Available data types /// [JsonProperty("dataType")] public DataType? DataType { get; set; } diff --git a/sync-for-payroll/CodatSyncPayroll/Models/Shared/PushOperationStatus.cs b/sync-for-payroll/Codat/Sync/Payroll/Models/Shared/PushOperationStatus.cs similarity index 98% rename from sync-for-payroll/CodatSyncPayroll/Models/Shared/PushOperationStatus.cs rename to sync-for-payroll/Codat/Sync/Payroll/Models/Shared/PushOperationStatus.cs index 748693972..2e0f0d701 100644 --- a/sync-for-payroll/CodatSyncPayroll/Models/Shared/PushOperationStatus.cs +++ b/sync-for-payroll/Codat/Sync/Payroll/Models/Shared/PushOperationStatus.cs @@ -10,6 +10,7 @@ #nullable enable namespace Codat.Sync.Payroll.Models.Shared { + using Codat.Sync.Payroll.Utils; using Newtonsoft.Json; using System; diff --git a/sync-for-payroll/CodatSyncPayroll/Models/Shared/PushOperations.cs b/sync-for-payroll/Codat/Sync/Payroll/Models/Shared/PushOperations.cs similarity index 94% rename from sync-for-payroll/CodatSyncPayroll/Models/Shared/PushOperations.cs rename to sync-for-payroll/Codat/Sync/Payroll/Models/Shared/PushOperations.cs index 56ea97dc9..a070adbdd 100644 --- a/sync-for-payroll/CodatSyncPayroll/Models/Shared/PushOperations.cs +++ b/sync-for-payroll/Codat/Sync/Payroll/Models/Shared/PushOperations.cs @@ -10,6 +10,8 @@ #nullable enable namespace Codat.Sync.Payroll.Models.Shared { + using Codat.Sync.Payroll.Models.Shared; + using Codat.Sync.Payroll.Utils; using Newtonsoft.Json; using System.Collections.Generic; diff --git a/sync-for-payroll/CodatSyncPayroll/Models/Shared/PushOption.cs b/sync-for-payroll/Codat/Sync/Payroll/Models/Shared/PushOption.cs similarity index 89% rename from sync-for-payroll/CodatSyncPayroll/Models/Shared/PushOption.cs rename to sync-for-payroll/Codat/Sync/Payroll/Models/Shared/PushOption.cs index ad67a8b6b..ef5ad1347 100644 --- a/sync-for-payroll/CodatSyncPayroll/Models/Shared/PushOption.cs +++ b/sync-for-payroll/Codat/Sync/Payroll/Models/Shared/PushOption.cs @@ -10,6 +10,8 @@ #nullable enable namespace Codat.Sync.Payroll.Models.Shared { + using Codat.Sync.Payroll.Models.Shared; + using Codat.Sync.Payroll.Utils; using Newtonsoft.Json; using System.Collections.Generic; @@ -29,10 +31,10 @@ public class PushOption public string DisplayName { get; set; } = default!; [JsonProperty("options")] - public List? Options { get; set; } + public List? Options { get; set; } = null; [JsonProperty("properties")] - public Dictionary? Properties { get; set; } + public Dictionary? Properties { get; set; } = null; /// /// The property is required if `True`. diff --git a/sync-for-payroll/CodatSyncPayroll/Models/Shared/PushOptionChoice.cs b/sync-for-payroll/Codat/Sync/Payroll/Models/Shared/PushOptionChoice.cs similarity index 94% rename from sync-for-payroll/CodatSyncPayroll/Models/Shared/PushOptionChoice.cs rename to sync-for-payroll/Codat/Sync/Payroll/Models/Shared/PushOptionChoice.cs index d4c14d77b..8c088070b 100644 --- a/sync-for-payroll/CodatSyncPayroll/Models/Shared/PushOptionChoice.cs +++ b/sync-for-payroll/Codat/Sync/Payroll/Models/Shared/PushOptionChoice.cs @@ -10,6 +10,8 @@ #nullable enable namespace Codat.Sync.Payroll.Models.Shared { + using Codat.Sync.Payroll.Models.Shared; + using Codat.Sync.Payroll.Utils; using Newtonsoft.Json; public class PushOptionChoice diff --git a/sync-for-payroll/CodatSyncPayroll/Models/Shared/PushOptionProperty.cs b/sync-for-payroll/Codat/Sync/Payroll/Models/Shared/PushOptionProperty.cs similarity index 89% rename from sync-for-payroll/CodatSyncPayroll/Models/Shared/PushOptionProperty.cs rename to sync-for-payroll/Codat/Sync/Payroll/Models/Shared/PushOptionProperty.cs index 61788a4c6..243c9155d 100644 --- a/sync-for-payroll/CodatSyncPayroll/Models/Shared/PushOptionProperty.cs +++ b/sync-for-payroll/Codat/Sync/Payroll/Models/Shared/PushOptionProperty.cs @@ -10,6 +10,8 @@ #nullable enable namespace Codat.Sync.Payroll.Models.Shared { + using Codat.Sync.Payroll.Models.Shared; + using Codat.Sync.Payroll.Utils; using Newtonsoft.Json; using System.Collections.Generic; @@ -29,10 +31,10 @@ public class PushOptionProperty public string DisplayName { get; set; } = default!; [JsonProperty("options")] - public List? Options { get; set; } + public List? Options { get; set; } = null; [JsonProperty("properties")] - public Dictionary? Properties { get; set; } + public Dictionary? Properties { get; set; } = null; /// /// The property is required if `True`. diff --git a/sync-for-payroll/CodatSyncPayroll/Models/Shared/PushOptionType.cs b/sync-for-payroll/Codat/Sync/Payroll/Models/Shared/PushOptionType.cs similarity index 98% rename from sync-for-payroll/CodatSyncPayroll/Models/Shared/PushOptionType.cs rename to sync-for-payroll/Codat/Sync/Payroll/Models/Shared/PushOptionType.cs index 09a06a213..cc891d55a 100644 --- a/sync-for-payroll/CodatSyncPayroll/Models/Shared/PushOptionType.cs +++ b/sync-for-payroll/Codat/Sync/Payroll/Models/Shared/PushOptionType.cs @@ -10,6 +10,7 @@ #nullable enable namespace Codat.Sync.Payroll.Models.Shared { + using Codat.Sync.Payroll.Utils; using Newtonsoft.Json; using System; diff --git a/sync-for-payroll/CodatSyncPayroll/Models/Shared/PushValidationInfo.cs b/sync-for-payroll/Codat/Sync/Payroll/Models/Shared/PushValidationInfo.cs similarity index 88% rename from sync-for-payroll/CodatSyncPayroll/Models/Shared/PushValidationInfo.cs rename to sync-for-payroll/Codat/Sync/Payroll/Models/Shared/PushValidationInfo.cs index 39b3cf846..8f27f9e69 100644 --- a/sync-for-payroll/CodatSyncPayroll/Models/Shared/PushValidationInfo.cs +++ b/sync-for-payroll/Codat/Sync/Payroll/Models/Shared/PushValidationInfo.cs @@ -10,6 +10,8 @@ #nullable enable namespace Codat.Sync.Payroll.Models.Shared { + using Codat.Sync.Payroll.Models.Shared; + using Codat.Sync.Payroll.Utils; using Newtonsoft.Json; using System.Collections.Generic; @@ -17,9 +19,9 @@ public class PushValidationInfo { [JsonProperty("information")] - public List? Information { get; set; } + public List? Information { get; set; } = null; [JsonProperty("warnings")] - public List? Warnings { get; set; } + public List? Warnings { get; set; } = null; } } \ No newline at end of file diff --git a/sync-for-payroll/CodatSyncPayroll/Models/Shared/SchemaDataType.cs b/sync-for-payroll/Codat/Sync/Payroll/Models/Shared/SchemaDataType.cs similarity index 98% rename from sync-for-payroll/CodatSyncPayroll/Models/Shared/SchemaDataType.cs rename to sync-for-payroll/Codat/Sync/Payroll/Models/Shared/SchemaDataType.cs index 38c0bc96d..35cfe5822 100644 --- a/sync-for-payroll/CodatSyncPayroll/Models/Shared/SchemaDataType.cs +++ b/sync-for-payroll/Codat/Sync/Payroll/Models/Shared/SchemaDataType.cs @@ -10,11 +10,12 @@ #nullable enable namespace Codat.Sync.Payroll.Models.Shared { + using Codat.Sync.Payroll.Utils; using Newtonsoft.Json; using System; /// - /// Available Data types + /// Available data types /// public enum SchemaDataType { diff --git a/sync-for-payroll/CodatSyncPayroll/Models/Shared/Security.cs b/sync-for-payroll/Codat/Sync/Payroll/Models/Shared/Security.cs similarity index 100% rename from sync-for-payroll/CodatSyncPayroll/Models/Shared/Security.cs rename to sync-for-payroll/Codat/Sync/Payroll/Models/Shared/Security.cs diff --git a/sync-for-payroll/CodatSyncPayroll/Models/Shared/SourceType.cs b/sync-for-payroll/Codat/Sync/Payroll/Models/Shared/SourceType.cs similarity index 98% rename from sync-for-payroll/CodatSyncPayroll/Models/Shared/SourceType.cs rename to sync-for-payroll/Codat/Sync/Payroll/Models/Shared/SourceType.cs index 8465adbaa..05dc0a947 100644 --- a/sync-for-payroll/CodatSyncPayroll/Models/Shared/SourceType.cs +++ b/sync-for-payroll/Codat/Sync/Payroll/Models/Shared/SourceType.cs @@ -10,6 +10,7 @@ #nullable enable namespace Codat.Sync.Payroll.Models.Shared { + using Codat.Sync.Payroll.Utils; using Newtonsoft.Json; using System; diff --git a/sync-for-payroll/CodatSyncPayroll/Models/Shared/Status.cs b/sync-for-payroll/Codat/Sync/Payroll/Models/Shared/Status.cs similarity index 98% rename from sync-for-payroll/CodatSyncPayroll/Models/Shared/Status.cs rename to sync-for-payroll/Codat/Sync/Payroll/Models/Shared/Status.cs index de6a6aacc..0a65f7b67 100644 --- a/sync-for-payroll/CodatSyncPayroll/Models/Shared/Status.cs +++ b/sync-for-payroll/Codat/Sync/Payroll/Models/Shared/Status.cs @@ -10,6 +10,7 @@ #nullable enable namespace Codat.Sync.Payroll.Models.Shared { + using Codat.Sync.Payroll.Utils; using Newtonsoft.Json; using System; diff --git a/sync-for-payroll/CodatSyncPayroll/Models/Shared/SupplementalData.cs b/sync-for-payroll/Codat/Sync/Payroll/Models/Shared/SupplementalData.cs similarity index 94% rename from sync-for-payroll/CodatSyncPayroll/Models/Shared/SupplementalData.cs rename to sync-for-payroll/Codat/Sync/Payroll/Models/Shared/SupplementalData.cs index a0d0cb023..307a2f1ae 100644 --- a/sync-for-payroll/CodatSyncPayroll/Models/Shared/SupplementalData.cs +++ b/sync-for-payroll/Codat/Sync/Payroll/Models/Shared/SupplementalData.cs @@ -10,6 +10,7 @@ #nullable enable namespace Codat.Sync.Payroll.Models.Shared { + using Codat.Sync.Payroll.Utils; using Newtonsoft.Json; using System.Collections.Generic; @@ -25,6 +26,6 @@ public class SupplementalData { [JsonProperty("content")] - public Dictionary>? Content { get; set; } + public Dictionary>? Content { get; set; } = null; } } \ No newline at end of file diff --git a/sync-for-payroll/CodatSyncPayroll/Models/Shared/Tracking.cs b/sync-for-payroll/Codat/Sync/Payroll/Models/Shared/Tracking.cs similarity index 90% rename from sync-for-payroll/CodatSyncPayroll/Models/Shared/Tracking.cs rename to sync-for-payroll/Codat/Sync/Payroll/Models/Shared/Tracking.cs index 489137082..cd0d8978b 100644 --- a/sync-for-payroll/CodatSyncPayroll/Models/Shared/Tracking.cs +++ b/sync-for-payroll/Codat/Sync/Payroll/Models/Shared/Tracking.cs @@ -10,6 +10,8 @@ #nullable enable namespace Codat.Sync.Payroll.Models.Shared { + using Codat.Sync.Payroll.Models.Shared; + using Codat.Sync.Payroll.Utils; using Newtonsoft.Json; using System.Collections.Generic; @@ -20,6 +22,6 @@ public class Tracking { [JsonProperty("recordRefs")] - public List? RecordRefs { get; set; } + public List? RecordRefs { get; set; } = null; } } \ No newline at end of file diff --git a/sync-for-payroll/CodatSyncPayroll/Models/Shared/TrackingCategories.cs b/sync-for-payroll/Codat/Sync/Payroll/Models/Shared/TrackingCategories.cs similarity index 94% rename from sync-for-payroll/CodatSyncPayroll/Models/Shared/TrackingCategories.cs rename to sync-for-payroll/Codat/Sync/Payroll/Models/Shared/TrackingCategories.cs index c094c7388..0c008cf34 100644 --- a/sync-for-payroll/CodatSyncPayroll/Models/Shared/TrackingCategories.cs +++ b/sync-for-payroll/Codat/Sync/Payroll/Models/Shared/TrackingCategories.cs @@ -10,6 +10,8 @@ #nullable enable namespace Codat.Sync.Payroll.Models.Shared { + using Codat.Sync.Payroll.Models.Shared; + using Codat.Sync.Payroll.Utils; using Newtonsoft.Json; using System.Collections.Generic; diff --git a/sync-for-payroll/CodatSyncPayroll/Models/Shared/TrackingCategory.cs b/sync-for-payroll/Codat/Sync/Payroll/Models/Shared/TrackingCategory.cs similarity index 97% rename from sync-for-payroll/CodatSyncPayroll/Models/Shared/TrackingCategory.cs rename to sync-for-payroll/Codat/Sync/Payroll/Models/Shared/TrackingCategory.cs index fdb4fce44..103651d57 100644 --- a/sync-for-payroll/CodatSyncPayroll/Models/Shared/TrackingCategory.cs +++ b/sync-for-payroll/Codat/Sync/Payroll/Models/Shared/TrackingCategory.cs @@ -10,6 +10,8 @@ #nullable enable namespace Codat.Sync.Payroll.Models.Shared { + using Codat.Sync.Payroll.Models.Shared; + using Codat.Sync.Payroll.Utils; using Newtonsoft.Json; /// @@ -158,7 +160,7 @@ public class TrackingCategory /// The identifier for the item, unique per tracking category. /// [JsonProperty("id")] - public string? Id { get; set; } + public string? Id { get; set; } = null; [JsonProperty("metadata")] public Metadata? Metadata { get; set; } @@ -170,13 +172,13 @@ public class TrackingCategory /// The name of the tracking category. /// [JsonProperty("name")] - public string? Name { get; set; } + public string? Name { get; set; } = null; /// /// The identifier for this item's immediate parent. /// [JsonProperty("parentId")] - public string? ParentId { get; set; } + public string? ParentId { get; set; } = null; [JsonProperty("sourceModifiedDate")] public string? SourceModifiedDate { get; set; } diff --git a/sync-for-payroll/CodatSyncPayroll/Models/Shared/TrackingCategoryTree.cs b/sync-for-payroll/Codat/Sync/Payroll/Models/Shared/TrackingCategoryTree.cs similarity index 89% rename from sync-for-payroll/CodatSyncPayroll/Models/Shared/TrackingCategoryTree.cs rename to sync-for-payroll/Codat/Sync/Payroll/Models/Shared/TrackingCategoryTree.cs index 395db34fd..d836cf98a 100644 --- a/sync-for-payroll/CodatSyncPayroll/Models/Shared/TrackingCategoryTree.cs +++ b/sync-for-payroll/Codat/Sync/Payroll/Models/Shared/TrackingCategoryTree.cs @@ -10,6 +10,8 @@ #nullable enable namespace Codat.Sync.Payroll.Models.Shared { + using Codat.Sync.Payroll.Models.Shared; + using Codat.Sync.Payroll.Utils; using Newtonsoft.Json; using System.Collections.Generic; @@ -29,7 +31,7 @@ public class TrackingCategoryTree /// The identifier for the item, unique per tracking category /// [JsonProperty("id")] - public string? Id { get; set; } + public string? Id { get; set; } = null; [JsonProperty("metadata")] public Metadata? Metadata { get; set; } @@ -41,13 +43,13 @@ public class TrackingCategoryTree /// The name of the tracking category /// [JsonProperty("name")] - public string? Name { get; set; } + public string? Name { get; set; } = null; /// /// The identifier for this item's immediate parent /// [JsonProperty("parentId")] - public string? ParentId { get; set; } + public string? ParentId { get; set; } = null; [JsonProperty("sourceModifiedDate")] public string? SourceModifiedDate { get; set; } @@ -62,6 +64,6 @@ public class TrackingCategoryTree /// A collection of subcategories that are nested beneath this category. /// [JsonProperty("subCategories")] - public List? SubCategories { get; set; } + public List? SubCategories { get; set; } = null; } } \ No newline at end of file diff --git a/sync-for-payroll/CodatSyncPayroll/Models/Shared/TrackingRecordRef.cs b/sync-for-payroll/Codat/Sync/Payroll/Models/Shared/TrackingRecordRef.cs similarity index 92% rename from sync-for-payroll/CodatSyncPayroll/Models/Shared/TrackingRecordRef.cs rename to sync-for-payroll/Codat/Sync/Payroll/Models/Shared/TrackingRecordRef.cs index 81f3cc989..530bf7d1f 100644 --- a/sync-for-payroll/CodatSyncPayroll/Models/Shared/TrackingRecordRef.cs +++ b/sync-for-payroll/Codat/Sync/Payroll/Models/Shared/TrackingRecordRef.cs @@ -10,6 +10,8 @@ #nullable enable namespace Codat.Sync.Payroll.Models.Shared { + using Codat.Sync.Payroll.Models.Shared; + using Codat.Sync.Payroll.Utils; using Newtonsoft.Json; /// diff --git a/sync-for-payroll/CodatSyncPayroll/Models/Shared/TrackingRecordRefDataType.cs b/sync-for-payroll/Codat/Sync/Payroll/Models/Shared/TrackingRecordRefDataType.cs similarity index 98% rename from sync-for-payroll/CodatSyncPayroll/Models/Shared/TrackingRecordRefDataType.cs rename to sync-for-payroll/Codat/Sync/Payroll/Models/Shared/TrackingRecordRefDataType.cs index 5092020d1..b951b057a 100644 --- a/sync-for-payroll/CodatSyncPayroll/Models/Shared/TrackingRecordRefDataType.cs +++ b/sync-for-payroll/Codat/Sync/Payroll/Models/Shared/TrackingRecordRefDataType.cs @@ -10,6 +10,7 @@ #nullable enable namespace Codat.Sync.Payroll.Models.Shared { + using Codat.Sync.Payroll.Utils; using Newtonsoft.Json; using System; diff --git a/sync-for-payroll/CodatSyncPayroll/Models/Shared/Type.cs b/sync-for-payroll/Codat/Sync/Payroll/Models/Shared/Type.cs similarity index 98% rename from sync-for-payroll/CodatSyncPayroll/Models/Shared/Type.cs rename to sync-for-payroll/Codat/Sync/Payroll/Models/Shared/Type.cs index 2f2344b25..36730c856 100644 --- a/sync-for-payroll/CodatSyncPayroll/Models/Shared/Type.cs +++ b/sync-for-payroll/Codat/Sync/Payroll/Models/Shared/Type.cs @@ -10,6 +10,7 @@ #nullable enable namespace Codat.Sync.Payroll.Models.Shared { + using Codat.Sync.Payroll.Utils; using Newtonsoft.Json; using System; diff --git a/sync-for-payroll/CodatSyncPayroll/Models/Shared/ValidDataTypeLinks.cs b/sync-for-payroll/Codat/Sync/Payroll/Models/Shared/ValidDataTypeLinks.cs similarity index 96% rename from sync-for-payroll/CodatSyncPayroll/Models/Shared/ValidDataTypeLinks.cs rename to sync-for-payroll/Codat/Sync/Payroll/Models/Shared/ValidDataTypeLinks.cs index db48309b1..2b9687898 100644 --- a/sync-for-payroll/CodatSyncPayroll/Models/Shared/ValidDataTypeLinks.cs +++ b/sync-for-payroll/Codat/Sync/Payroll/Models/Shared/ValidDataTypeLinks.cs @@ -10,6 +10,7 @@ #nullable enable namespace Codat.Sync.Payroll.Models.Shared { + using Codat.Sync.Payroll.Utils; using Newtonsoft.Json; using System.Collections.Generic; @@ -65,12 +66,12 @@ public class ValidDataTypeLinks /// Supported `dataTypes` that the record can be linked to. /// [JsonProperty("links")] - public List? Links { get; set; } + public List? Links { get; set; } = null; /// /// The property from the account that can be linked. /// [JsonProperty("property")] - public string? Property { get; set; } + public string? Property { get; set; } = null; } } \ No newline at end of file diff --git a/sync-for-payroll/CodatSyncPayroll/Models/Shared/Validation.cs b/sync-for-payroll/Codat/Sync/Payroll/Models/Shared/Validation.cs similarity index 80% rename from sync-for-payroll/CodatSyncPayroll/Models/Shared/Validation.cs rename to sync-for-payroll/Codat/Sync/Payroll/Models/Shared/Validation.cs index aa083890e..eb10416a1 100644 --- a/sync-for-payroll/CodatSyncPayroll/Models/Shared/Validation.cs +++ b/sync-for-payroll/Codat/Sync/Payroll/Models/Shared/Validation.cs @@ -10,6 +10,8 @@ #nullable enable namespace Codat.Sync.Payroll.Models.Shared { + using Codat.Sync.Payroll.Models.Shared; + using Codat.Sync.Payroll.Utils; using Newtonsoft.Json; using System.Collections.Generic; @@ -20,9 +22,9 @@ public class Validation { [JsonProperty("errors")] - public List? Errors { get; set; } + public List? Errors { get; set; } = null; [JsonProperty("warnings")] - public List? Warnings { get; set; } + public List? Warnings { get; set; } = null; } } \ No newline at end of file diff --git a/sync-for-payroll/CodatSyncPayroll/Models/Shared/ValidationItem.cs b/sync-for-payroll/Codat/Sync/Payroll/Models/Shared/ValidationItem.cs similarity index 82% rename from sync-for-payroll/CodatSyncPayroll/Models/Shared/ValidationItem.cs rename to sync-for-payroll/Codat/Sync/Payroll/Models/Shared/ValidationItem.cs index 0ba7f3e3b..1f4818bde 100644 --- a/sync-for-payroll/CodatSyncPayroll/Models/Shared/ValidationItem.cs +++ b/sync-for-payroll/Codat/Sync/Payroll/Models/Shared/ValidationItem.cs @@ -10,6 +10,7 @@ #nullable enable namespace Codat.Sync.Payroll.Models.Shared { + using Codat.Sync.Payroll.Utils; using Newtonsoft.Json; public class ValidationItem @@ -19,18 +20,18 @@ public class ValidationItem /// Unique identifier for a validation item. /// [JsonProperty("itemId")] - public string? ItemId { get; set; } + public string? ItemId { get; set; } = null; /// /// A message outlining validation item's issue. /// [JsonProperty("message")] - public string? Message { get; set; } + public string? Message { get; set; } = null; /// /// Name of validator. /// [JsonProperty("validatorName")] - public string? ValidatorName { get; set; } + public string? ValidatorName { get; set; } = null; } } \ No newline at end of file diff --git a/sync-for-payroll/CodatSyncPayroll/Models/Shared/WebLink.cs b/sync-for-payroll/Codat/Sync/Payroll/Models/Shared/WebLink.cs similarity index 91% rename from sync-for-payroll/CodatSyncPayroll/Models/Shared/WebLink.cs rename to sync-for-payroll/Codat/Sync/Payroll/Models/Shared/WebLink.cs index cd04ebd86..b4a7a3939 100644 --- a/sync-for-payroll/CodatSyncPayroll/Models/Shared/WebLink.cs +++ b/sync-for-payroll/Codat/Sync/Payroll/Models/Shared/WebLink.cs @@ -10,6 +10,8 @@ #nullable enable namespace Codat.Sync.Payroll.Models.Shared { + using Codat.Sync.Payroll.Models.Shared; + using Codat.Sync.Payroll.Utils; using Newtonsoft.Json; /// diff --git a/sync-for-payroll/CodatSyncPayroll/Models/Webhooks/ClientRateLimitReachedResponse.cs b/sync-for-payroll/Codat/Sync/Payroll/Models/Webhooks/ClientRateLimitReachedResponse.cs similarity index 96% rename from sync-for-payroll/CodatSyncPayroll/Models/Webhooks/ClientRateLimitReachedResponse.cs rename to sync-for-payroll/Codat/Sync/Payroll/Models/Webhooks/ClientRateLimitReachedResponse.cs index dadb5fe40..78f7b2445 100644 --- a/sync-for-payroll/CodatSyncPayroll/Models/Webhooks/ClientRateLimitReachedResponse.cs +++ b/sync-for-payroll/Codat/Sync/Payroll/Models/Webhooks/ClientRateLimitReachedResponse.cs @@ -10,6 +10,7 @@ #nullable enable namespace Codat.Sync.Payroll.Models.Webhooks { + using Codat.Sync.Payroll.Utils; using System.Net.Http; using System; diff --git a/sync-for-payroll/CodatSyncPayroll/Models/Webhooks/ClientRateLimitResetResponse.cs b/sync-for-payroll/Codat/Sync/Payroll/Models/Webhooks/ClientRateLimitResetResponse.cs similarity index 96% rename from sync-for-payroll/CodatSyncPayroll/Models/Webhooks/ClientRateLimitResetResponse.cs rename to sync-for-payroll/Codat/Sync/Payroll/Models/Webhooks/ClientRateLimitResetResponse.cs index 32f2802e9..2599e4760 100644 --- a/sync-for-payroll/CodatSyncPayroll/Models/Webhooks/ClientRateLimitResetResponse.cs +++ b/sync-for-payroll/Codat/Sync/Payroll/Models/Webhooks/ClientRateLimitResetResponse.cs @@ -10,6 +10,7 @@ #nullable enable namespace Codat.Sync.Payroll.Models.Webhooks { + using Codat.Sync.Payroll.Utils; using System.Net.Http; using System; diff --git a/sync-for-payroll/Codat/Sync/Payroll/TrackingCategories.cs b/sync-for-payroll/Codat/Sync/Payroll/TrackingCategories.cs new file mode 100644 index 000000000..737709c6a --- /dev/null +++ b/sync-for-payroll/Codat/Sync/Payroll/TrackingCategories.cs @@ -0,0 +1,263 @@ + +//------------------------------------------------------------------------------ +// +// This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// +// Changes to this file may cause incorrect behavior and will be lost when +// the code is regenerated. +// +//------------------------------------------------------------------------------ +#nullable enable +namespace Codat.Sync.Payroll +{ + using Codat.Sync.Payroll.Hooks; + using Codat.Sync.Payroll.Models.Errors; + using Codat.Sync.Payroll.Models.Operations; + using Codat.Sync.Payroll.Models.Shared; + using Codat.Sync.Payroll.Utils; + using Newtonsoft.Json; + using System.Collections.Generic; + using System.Net.Http.Headers; + using System.Net.Http; + using System.Threading.Tasks; + using System; + + /// + /// Get, create, and update Tracking Categories for additional categorization of payroll components. + /// + public interface ITrackingCategories + { + + /// + /// Get tracking categories + /// + /// + /// The *Get tracking category* endpoint returns a single tracking category for a given `trackingCategoryId`.
+ ///
+ /// Tracking categories are used to monitor cost centres and control budgets that sit outside the standard set of accounts.
+ ///
+ /// Check out our coverage explorer for integrations that support getting a specific tracking category.
+ ///
+ /// Before using this endpoint, you must have retrieved data for the company.
+ /// + ///
+ ///
+ Task GetAsync(GetTrackingCategoryRequest request); + + /// + /// List tracking categories + /// + /// + /// The *List tracking categories* endpoint returns a list of tracking categories for a given company's connection.
+ ///
+ /// Tracking categories are used to monitor cost centres and control budgets that sit outside the standard set of accounts.
+ ///
+ /// Before using this endpoint, you must have retrieved data for the company.
+ /// + ///
+ ///
+ Task ListAsync(ListTrackingCategoriesRequest request); + } + + /// + /// Get, create, and update Tracking Categories for additional categorization of payroll components. + /// + public class TrackingCategories: ITrackingCategories + { + public SDKConfig SDKConfiguration { get; private set; } + private const string _language = "csharp"; + private const string _sdkVersion = "3.1.0"; + private const string _sdkGenVersion = "2.319.7"; + private const string _openapiDocVersion = "3.0.0"; + private const string _userAgent = "speakeasy-sdk/csharp 3.1.0 2.319.7 3.0.0 Codat.Sync.Payroll"; + private string _serverUrl = ""; + private ISpeakeasyHttpClient _defaultClient; + private Func? _securitySource; + + public TrackingCategories(ISpeakeasyHttpClient defaultClient, Func? securitySource, string serverUrl, SDKConfig config) + { + _defaultClient = defaultClient; + _securitySource = securitySource; + _serverUrl = serverUrl; + SDKConfiguration = config; + } + + public async Task GetAsync(GetTrackingCategoryRequest request) + { + string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl(); + var urlString = URLBuilder.Build(baseUrl, "/companies/{companyId}/data/trackingCategories/{trackingCategoryId}", request); + + var httpRequest = new HttpRequestMessage(HttpMethod.Get, urlString); + httpRequest.Headers.Add("user-agent", _userAgent); + + if (_securitySource != null) + { + httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest); + } + + var hookCtx = new HookContext("get-tracking-category", null, _securitySource); + + httpRequest = await this.SDKConfiguration.hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest); + HttpResponseMessage httpResponse; + try + { + httpResponse = await _defaultClient.SendAsync(httpRequest); + int _statusCode = (int)httpResponse.StatusCode; + + if (_statusCode == 401 || _statusCode == 402 || _statusCode == 403 || _statusCode == 404 || _statusCode == 409 || _statusCode == 429 || _statusCode >= 400 && _statusCode < 500 || _statusCode == 500 || _statusCode == 503 || _statusCode >= 500 && _statusCode < 600) + { + var _httpResponse = await this.SDKConfiguration.hooks.AfterErrorAsync(new AfterErrorContext(hookCtx), httpResponse, null); + if (_httpResponse != null) + { + httpResponse = _httpResponse; + } + } + } + catch (Exception error) + { + var _httpResponse = await this.SDKConfiguration.hooks.AfterErrorAsync(new AfterErrorContext(hookCtx), null, error); + if (_httpResponse != null) + { + httpResponse = _httpResponse; + } + else + { + throw; + } + } + + httpResponse = await this.SDKConfiguration.hooks.AfterSuccessAsync(new AfterSuccessContext(hookCtx), httpResponse); + + var contentType = httpResponse.Content.Headers.ContentType?.MediaType; + int responseStatusCode = (int)httpResponse.StatusCode; + if(responseStatusCode == 200) + { + if(Utilities.IsContentTypeMatch("application/json", contentType)) + { + var obj = ResponseBodyDeserializer.Deserialize(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore); + var response = new GetTrackingCategoryResponse() + { + StatusCode = responseStatusCode, + ContentType = contentType, + RawResponse = httpResponse + }; + response.TrackingCategoryTree = obj; + return response; + } + else + { + throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + } + else if(new List{401, 402, 403, 404, 409, 429, 500, 503}.Contains(responseStatusCode)) + { + if(Utilities.IsContentTypeMatch("application/json", contentType)) + { + var obj = ResponseBodyDeserializer.Deserialize(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore); + throw obj!; + } + else + { + throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + } + else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600) + { + throw new SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + else + { + throw new SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + } + + public async Task ListAsync(ListTrackingCategoriesRequest request) + { + string baseUrl = this.SDKConfiguration.GetTemplatedServerUrl(); + var urlString = URLBuilder.Build(baseUrl, "/companies/{companyId}/data/trackingCategories", request); + + var httpRequest = new HttpRequestMessage(HttpMethod.Get, urlString); + httpRequest.Headers.Add("user-agent", _userAgent); + + if (_securitySource != null) + { + httpRequest = new SecurityMetadata(_securitySource).Apply(httpRequest); + } + + var hookCtx = new HookContext("list-tracking-categories", null, _securitySource); + + httpRequest = await this.SDKConfiguration.hooks.BeforeRequestAsync(new BeforeRequestContext(hookCtx), httpRequest); + HttpResponseMessage httpResponse; + try + { + httpResponse = await _defaultClient.SendAsync(httpRequest); + int _statusCode = (int)httpResponse.StatusCode; + + if (_statusCode == 400 || _statusCode == 401 || _statusCode == 402 || _statusCode == 403 || _statusCode == 404 || _statusCode == 409 || _statusCode == 429 || _statusCode >= 400 && _statusCode < 500 || _statusCode == 500 || _statusCode == 503 || _statusCode >= 500 && _statusCode < 600) + { + var _httpResponse = await this.SDKConfiguration.hooks.AfterErrorAsync(new AfterErrorContext(hookCtx), httpResponse, null); + if (_httpResponse != null) + { + httpResponse = _httpResponse; + } + } + } + catch (Exception error) + { + var _httpResponse = await this.SDKConfiguration.hooks.AfterErrorAsync(new AfterErrorContext(hookCtx), null, error); + if (_httpResponse != null) + { + httpResponse = _httpResponse; + } + else + { + throw; + } + } + + httpResponse = await this.SDKConfiguration.hooks.AfterSuccessAsync(new AfterSuccessContext(hookCtx), httpResponse); + + var contentType = httpResponse.Content.Headers.ContentType?.MediaType; + int responseStatusCode = (int)httpResponse.StatusCode; + if(responseStatusCode == 200) + { + if(Utilities.IsContentTypeMatch("application/json", contentType)) + { + var obj = ResponseBodyDeserializer.Deserialize(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore); + var response = new ListTrackingCategoriesResponse() + { + StatusCode = responseStatusCode, + ContentType = contentType, + RawResponse = httpResponse + }; + response.TrackingCategories = obj; + return response; + } + else + { + throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + } + else if(new List{400, 401, 402, 403, 404, 409, 429, 500, 503}.Contains(responseStatusCode)) + { + if(Utilities.IsContentTypeMatch("application/json", contentType)) + { + var obj = ResponseBodyDeserializer.Deserialize(await httpResponse.Content.ReadAsStringAsync(), NullValueHandling.Ignore); + throw obj!; + } + else + { + throw new SDKException("Unknown content type received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + } + else if(responseStatusCode >= 400 && responseStatusCode < 500 || responseStatusCode >= 500 && responseStatusCode < 600) + { + throw new SDKException("API error occurred", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + else + { + throw new SDKException("Unknown status code received", responseStatusCode, await httpResponse.Content.ReadAsStringAsync(), httpResponse); + } + } + } +} \ No newline at end of file diff --git a/sync-for-payroll/Codat/Sync/Payroll/Utils/AnyDeserializer.cs b/sync-for-payroll/Codat/Sync/Payroll/Utils/AnyDeserializer.cs new file mode 100644 index 000000000..708d36113 --- /dev/null +++ b/sync-for-payroll/Codat/Sync/Payroll/Utils/AnyDeserializer.cs @@ -0,0 +1,95 @@ + +//------------------------------------------------------------------------------ +// +// This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// +// Changes to this file may cause incorrect behavior and will be lost when +// the code is regenerated. +// +//------------------------------------------------------------------------------ +#nullable enable +namespace Codat.Sync.Payroll.Utils +{ + using Newtonsoft.Json; + using Newtonsoft.Json.Linq; + using System; + using System.Collections.Generic; + + public class AnyDeserializer : JsonConverter + { + public override bool CanConvert(Type objectType) + { + return (objectType == typeof(Dictionary)); + } + + public override bool CanWrite => false; + + public override void WriteJson(JsonWriter writer, object? value, JsonSerializer serializer) + { + throw new NotSupportedException(); + } + + public override object ReadJson( + JsonReader reader, + Type objectType, + object? existingValue, + JsonSerializer serializer + ) + { + if (reader.TokenType == JsonToken.StartObject) { + return ParseTokenIntoDictionary(JToken.Load(reader)); + } + throw new JsonSerializationException($"Could not deserialize token into dictionary"); + } + + private Dictionary ParseTokenIntoDictionary(JToken token) + { + var dict = new Dictionary(); + + foreach (var child in token.Children()) + { + + object? val = null; + if (child.Value is JObject) + { + val = ParseTokenIntoDictionary(child.Value); + } + else if (child.Value is JArray) + { + val = ParseTokenIntoList(child.Value); + } + else if (child.Value != null) + { + val = ((JValue)child.Value).Value; + } + + dict[child.Name] = val; + } + + return dict; + } + + private List ParseTokenIntoList(JToken token) + { + var list = new List(); + + foreach (var child in token.Children()) + { + if (child is JObject) + { + list.Add((object)ParseTokenIntoDictionary(child)); + } + else if (child is JArray) + { + list.Add((object)ParseTokenIntoList(child)); + } + else + { + list.Add(((JValue)child).Value); + } + } + + return list; + } + } +} \ No newline at end of file diff --git a/sync-for-payroll/CodatSyncPayroll/Utils/BigIntSerializer.cs b/sync-for-payroll/Codat/Sync/Payroll/Utils/BigIntStrConverter.cs similarity index 64% rename from sync-for-payroll/CodatSyncPayroll/Utils/BigIntSerializer.cs rename to sync-for-payroll/Codat/Sync/Payroll/Utils/BigIntStrConverter.cs index 22a00a85c..0e38b90b3 100644 --- a/sync-for-payroll/CodatSyncPayroll/Utils/BigIntSerializer.cs +++ b/sync-for-payroll/Codat/Sync/Payroll/Utils/BigIntStrConverter.cs @@ -14,12 +14,20 @@ namespace Codat.Sync.Payroll.Utils using System.Globalization; using System.Numerics; using Newtonsoft.Json; + using Newtonsoft.Json.Linq; - internal class BigIntSerializer : JsonConverter + internal class BigIntStrConverter : JsonConverter { - public override bool CanConvert(Type objectType) => objectType == typeof(BigInteger); + public override bool CanConvert(Type objectType) + { + var nullableType = Nullable.GetUnderlyingType(objectType); + if (nullableType != null) + { + return nullableType == typeof(BigInteger); + } - public override bool CanRead => true; + return objectType == typeof(BigInteger); + } public override object? ReadJson( JsonReader reader, @@ -33,7 +41,11 @@ JsonSerializer serializer return null; } - return BigInteger.Parse(reader.Value.ToString()!); + try { + return BigInteger.Parse(reader.Value.ToString()!); + } catch (System.FormatException ex) { + throw new Newtonsoft.Json.JsonSerializationException("Could not parse BigInteger", ex); + } } public override void WriteJson(JsonWriter writer, object? value, JsonSerializer serializer) diff --git a/sync-for-payroll/CodatSyncPayroll/Utils/DecimalSerializer.cs b/sync-for-payroll/Codat/Sync/Payroll/Utils/DecimalStrConverter.cs similarity index 64% rename from sync-for-payroll/CodatSyncPayroll/Utils/DecimalSerializer.cs rename to sync-for-payroll/Codat/Sync/Payroll/Utils/DecimalStrConverter.cs index 7ebc7b85b..2a78431ab 100644 --- a/sync-for-payroll/CodatSyncPayroll/Utils/DecimalSerializer.cs +++ b/sync-for-payroll/Codat/Sync/Payroll/Utils/DecimalStrConverter.cs @@ -13,12 +13,20 @@ namespace Codat.Sync.Payroll.Utils using System; using System.Globalization; using Newtonsoft.Json; + using Newtonsoft.Json.Linq; - internal class DecimalSerializer : JsonConverter + internal class DecimalStrConverter : JsonConverter { - public override bool CanConvert(Type objectType) => objectType == typeof(Decimal); + public override bool CanConvert(Type objectType) + { + var nullableType = Nullable.GetUnderlyingType(objectType); + if (nullableType != null) + { + return nullableType == typeof(Decimal); + } - public override bool CanRead => true; + return objectType == typeof(Decimal); + } public override object? ReadJson( JsonReader reader, @@ -32,7 +40,11 @@ JsonSerializer serializer return null; } - return Decimal.Parse(reader.Value.ToString()!); + try { + return Decimal.Parse(reader.Value.ToString()!); + } catch (System.FormatException ex) { + throw new Newtonsoft.Json.JsonSerializationException("Could not parse Decimal", ex); + } } public override void WriteJson(JsonWriter writer, object? value, JsonSerializer serializer) diff --git a/sync-for-payroll/CodatSyncPayroll/Utils/EnumSerializer.cs b/sync-for-payroll/Codat/Sync/Payroll/Utils/EnumConverter.cs similarity index 68% rename from sync-for-payroll/CodatSyncPayroll/Utils/EnumSerializer.cs rename to sync-for-payroll/Codat/Sync/Payroll/Utils/EnumConverter.cs index 80a247568..baf553767 100644 --- a/sync-for-payroll/CodatSyncPayroll/Utils/EnumSerializer.cs +++ b/sync-for-payroll/Codat/Sync/Payroll/Utils/EnumConverter.cs @@ -13,11 +13,18 @@ namespace Codat.Sync.Payroll.Utils { - internal class EnumSerializer : JsonConverter + internal class EnumConverter : JsonConverter { - public override bool CanConvert(System.Type objectType) => objectType.IsEnum; + public override bool CanConvert(System.Type objectType) + { + var nullableType = Nullable.GetUnderlyingType(objectType); + if (nullableType != null) + { + return nullableType.IsEnum; + } - public override bool CanRead => true; + return objectType.IsEnum; + } public override object? ReadJson( JsonReader reader, @@ -32,6 +39,11 @@ JsonSerializer serializer } var extensionType = System.Type.GetType(objectType.FullName + "Extension"); + + if (Nullable.GetUnderlyingType(objectType) != null) { + extensionType = System.Type.GetType(Nullable.GetUnderlyingType(objectType)!.FullName + "Extension"); + } + if (extensionType == null) { return Enum.ToObject(objectType, reader.Value); @@ -43,7 +55,12 @@ JsonSerializer serializer throw new Exception($"Unable to find ToEnum method on {extensionType.FullName}"); } - return method.Invoke(null, new[] { (string)reader.Value }); + try { + return method.Invoke(null, new[] { (string)reader.Value }); + } catch(System.Reflection.TargetInvocationException e) { + throw new Newtonsoft.Json.JsonSerializationException("Unable to convert value to enum", e); + } + } public override void WriteJson(JsonWriter writer, object? value, JsonSerializer serializer) diff --git a/sync-for-payroll/CodatSyncPayroll/Utils/FlexibleObjectDeserializer.cs b/sync-for-payroll/Codat/Sync/Payroll/Utils/FlexibleObjectDeserializer.cs similarity index 100% rename from sync-for-payroll/CodatSyncPayroll/Utils/FlexibleObjectDeserializer.cs rename to sync-for-payroll/Codat/Sync/Payroll/Utils/FlexibleObjectDeserializer.cs diff --git a/sync-for-payroll/CodatSyncPayroll/Utils/HeaderSerializer.cs b/sync-for-payroll/Codat/Sync/Payroll/Utils/HeaderSerializer.cs similarity index 100% rename from sync-for-payroll/CodatSyncPayroll/Utils/HeaderSerializer.cs rename to sync-for-payroll/Codat/Sync/Payroll/Utils/HeaderSerializer.cs diff --git a/sync-for-payroll/CodatSyncPayroll/Utils/IsoDateTimeSerializer.cs b/sync-for-payroll/Codat/Sync/Payroll/Utils/IsoDateTimeSerializer.cs similarity index 80% rename from sync-for-payroll/CodatSyncPayroll/Utils/IsoDateTimeSerializer.cs rename to sync-for-payroll/Codat/Sync/Payroll/Utils/IsoDateTimeSerializer.cs index 3c614e59e..f00433fbb 100644 --- a/sync-for-payroll/CodatSyncPayroll/Utils/IsoDateTimeSerializer.cs +++ b/sync-for-payroll/Codat/Sync/Payroll/Utils/IsoDateTimeSerializer.cs @@ -16,8 +16,16 @@ namespace Codat.Sync.Payroll.Utils internal class IsoDateTimeSerializer: JsonConverter { - public override bool CanConvert(Type objectType) => - objectType == typeof(DateTime); + public override bool CanConvert(Type objectType) + { + var nullableType = Nullable.GetUnderlyingType(objectType); + if (nullableType != null) + { + return nullableType == typeof(DateTime); + } + + return objectType == typeof(DateTime); + } public override bool CanRead => false; diff --git a/sync-for-payroll/CodatSyncPayroll/Utils/RequestBodySerializer.cs b/sync-for-payroll/Codat/Sync/Payroll/Utils/RequestBodySerializer.cs similarity index 97% rename from sync-for-payroll/CodatSyncPayroll/Utils/RequestBodySerializer.cs rename to sync-for-payroll/Codat/Sync/Payroll/Utils/RequestBodySerializer.cs index 6b0e0da38..b702279f4 100644 --- a/sync-for-payroll/CodatSyncPayroll/Utils/RequestBodySerializer.cs +++ b/sync-for-payroll/Codat/Sync/Payroll/Utils/RequestBodySerializer.cs @@ -17,17 +17,30 @@ namespace Codat.Sync.Payroll.Utils using System.Reflection; using System.Text; + internal class RequestBodySerializer { + public static HttpContent? Serialize( object? request, string requestFieldName, string serializationMethod, + bool nullable = false, + bool optional = false, string format = "" ) { if (request == null) { + if (!nullable && !optional) + { + throw new ArgumentNullException("request body is required"); + } + else if (nullable && serializationMethod == "json") + { + return new StringContent("null", Encoding.UTF8, "application/json"); + } + return null; } diff --git a/sync-for-payroll/Codat/Sync/Payroll/Utils/ResponseBodyDeserializer.cs b/sync-for-payroll/Codat/Sync/Payroll/Utils/ResponseBodyDeserializer.cs new file mode 100644 index 000000000..af13ea732 --- /dev/null +++ b/sync-for-payroll/Codat/Sync/Payroll/Utils/ResponseBodyDeserializer.cs @@ -0,0 +1,30 @@ + +//------------------------------------------------------------------------------ +// +// This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// +// Changes to this file may cause incorrect behavior and will be lost when +// the code is regenerated. +// +//------------------------------------------------------------------------------ +#nullable enable +namespace Codat.Sync.Payroll.Utils +{ + using System; + using System.Collections; + using System.Collections.Generic; + using System.Net.Http; + using System.Reflection; + using System.Text; + using Newtonsoft.Json; + + + internal class ResponseBodyDeserializer + { + + public static T? Deserialize(string json, NullValueHandling nullValueHandling=NullValueHandling.Ignore, MissingMemberHandling missingMemberHandling=MissingMemberHandling.Ignore) + { + return JsonConvert.DeserializeObject(json, new JsonSerializerSettings(){ NullValueHandling = nullValueHandling, MissingMemberHandling = missingMemberHandling, Converters = Utilities.GetJsonDeserializers(typeof(T))}); + } + } +} \ No newline at end of file diff --git a/sync-for-payroll/CodatSyncPayroll/Utils/SecuritySerializer.cs b/sync-for-payroll/Codat/Sync/Payroll/Utils/SecurityMetadata.cs similarity index 50% rename from sync-for-payroll/CodatSyncPayroll/Utils/SecuritySerializer.cs rename to sync-for-payroll/Codat/Sync/Payroll/Utils/SecurityMetadata.cs index fbac8e9de..ab1371b89 100644 --- a/sync-for-payroll/CodatSyncPayroll/Utils/SecuritySerializer.cs +++ b/sync-for-payroll/Codat/Sync/Payroll/Utils/SecurityMetadata.cs @@ -11,179 +11,189 @@ namespace Codat.Sync.Payroll.Utils { using System; + using System.Collections.Generic; + using System.Net.Http; using System.Reflection; using System.Text; + using System.Web; - internal static class SecuritySerializer + + internal class SecurityMetadata { - public static ISpeakeasyHttpClient Apply(ISpeakeasyHttpClient client, Func securitySource) + private Dictionary headerParams { get; } = new Dictionary(); + private Dictionary queryParams { get; } = new Dictionary(); + + public SecurityMetadata(Func securitySource) + { + ParseSecuritySource(securitySource); + } + + public HttpRequestMessage Apply(HttpRequestMessage request) + { + foreach (var kvp in headerParams) + { + request.Headers.Add(kvp.Key, kvp.Value); + } + + if(request.RequestUri != null) + { + var uriBuilder = new UriBuilder(request.RequestUri); + var query = HttpUtility.ParseQueryString(uriBuilder.Query); + foreach (var kvp in queryParams) + { + query.Add(kvp.Key, kvp.Value); + } + uriBuilder.Query = query.ToString(); + request.RequestUri = uriBuilder.Uri; + } + + return request; + } + + private void ParseSecuritySource(Func securitySource) { if (securitySource == null) { - return client; + return; } var security = securitySource(); if (security == null) { - return client; + return; } - client = new SpeakeasyHttpClient(client); - - var props = security.GetType().GetProperties(); - - foreach (var prop in props) + foreach (var prop in security.GetType().GetProperties()) { var value = prop.GetValue(security, null); - if (value == null) { continue; } - var metadata = prop.GetCustomAttribute()?.GetSecurityMetadata(); - if (metadata == null) + var secMetadata = prop.GetCustomAttribute()?.GetSecurityMetadata(); + if (secMetadata == null) { continue; } - if (metadata.Option) + if (secMetadata.Option) { - ApplyOption(ref client, value); + ParseOption(value); } - else if (metadata.Scheme) + else if (secMetadata.Scheme) { - if (metadata.SubType == "basic" && !Utilities.IsClass(value)) + if (secMetadata.SubType == "basic" && !Utilities.IsClass(value)) { - ApplyScheme(ref client, metadata, security); - return client; + ParseScheme(secMetadata, security); + return; } else { - ApplyScheme(ref client, metadata, value); + ParseScheme(secMetadata, value); } } } - return client; + return; } - private static void ApplyOption(ref ISpeakeasyHttpClient client, object option) + private void ParseOption(object option) { - var props = option.GetType().GetProperties(); - - foreach (var prop in props) + foreach (var prop in option.GetType().GetProperties()) { var value = prop.GetValue(option, null); - if (value == null) { continue; } - var metadata = prop.GetCustomAttribute()?.GetSecurityMetadata(); - if (metadata == null || !metadata.Scheme) + var secMetadata = prop.GetCustomAttribute()?.GetSecurityMetadata(); + if (secMetadata == null || !secMetadata.Scheme) { continue; } - ApplyScheme(ref client, metadata, value); + ParseScheme(secMetadata, value); } } - private static void ApplyScheme( - ref ISpeakeasyHttpClient client, - SpeakeasyMetadata.SecurityMetadata schemeMetadata, - object scheme - ) + private void ParseScheme(SpeakeasyMetadata.SecurityMetadata schemeMetadata, object scheme) { if (Utilities.IsClass(scheme)) { if (schemeMetadata.Type == "http" && schemeMetadata.SubType == "basic") { - ApplyBasicAuthScheme(ref client, scheme); + ParseBasicAuthScheme(scheme); return; } - var props = scheme.GetType().GetProperties(); - - foreach (var prop in props) + foreach (var prop in scheme.GetType().GetProperties()) { var value = prop.GetValue(scheme, null); - if (value == null) { continue; } - var metadata = prop.GetCustomAttribute()?.GetSecurityMetadata(); - if (metadata == null || metadata.Name == "") + var secMetadata = prop.GetCustomAttribute()?.GetSecurityMetadata(); + if (secMetadata == null || secMetadata.Name == "") { continue; } - ApplySchemeValue(ref client, schemeMetadata, metadata, value); + ParseSchemeValue(schemeMetadata, secMetadata, value); } } else { - ApplySchemeValue(ref client, schemeMetadata, schemeMetadata, scheme); + ParseSchemeValue(schemeMetadata, schemeMetadata, scheme); } } - private static void ApplySchemeValue( - ref ISpeakeasyHttpClient client, + private void ParseSchemeValue( SpeakeasyMetadata.SecurityMetadata schemeMetadata, SpeakeasyMetadata.SecurityMetadata valueMetadata, object value ) { - if (valueMetadata.Name == "") + var key = valueMetadata.Name; + if (key == "") { return; } + var valStr = Utilities.ValueToString(value); + switch (schemeMetadata.Type) { case "apiKey": switch (schemeMetadata.SubType) { case "header": - client.AddHeader(valueMetadata.Name, Utilities.ValueToString(value)); + headerParams.Add(key, valStr); break; case "query": - client.AddQueryParam( - valueMetadata.Name, - Utilities.ValueToString(value) - ); + queryParams.Add(key, valStr); break; case "cookie": - client.AddHeader( - "cookie", - $"{valueMetadata.Name}={Utilities.ValueToString(value)}" - ); + headerParams.Add("cookie", $"{key}={valStr}"); break; default: - throw new Exception( - $"Unknown apiKey subType: {schemeMetadata.SubType}" - ); + throw new Exception($"Unknown apiKey subType: {schemeMetadata.SubType}"); } break; case "openIdConnect": - client.AddHeader(valueMetadata.Name, Utilities.PrefixBearer(Utilities.ValueToString(value))); + headerParams.Add(key, Utilities.PrefixBearer(valStr)); break; case "oauth2": - client.AddHeader(valueMetadata.Name, Utilities.PrefixBearer(Utilities.ValueToString(value))); + headerParams.Add(key, Utilities.PrefixBearer(valStr)); break; case "http": switch (schemeMetadata.SubType) { case "bearer": - client.AddHeader( - valueMetadata.Name, - Utilities.PrefixBearer(Utilities.ValueToString(value)) - ); + headerParams.Add(key, Utilities.PrefixBearer(valStr)); break; default: throw new Exception($"Unknown http subType: {schemeMetadata.SubType}"); @@ -194,40 +204,38 @@ object value } } - private static void ApplyBasicAuthScheme(ref ISpeakeasyHttpClient client, object scheme) + private void ParseBasicAuthScheme(object scheme) { - var props = scheme.GetType().GetProperties(); string username = ""; string password = ""; - foreach (var prop in props) + foreach (var prop in scheme.GetType().GetProperties()) { var value = prop.GetValue(scheme, null); - if (value == null) { continue; } - var metadata = prop.GetCustomAttribute()?.GetSecurityMetadata(); - if (metadata == null || metadata.Name == "") + var secMetadata = prop.GetCustomAttribute()?.GetSecurityMetadata(); + if (secMetadata == null || secMetadata.Name == "") { continue; } - if (metadata.Name == "username") + if (secMetadata.Name == "username") { username = Utilities.ValueToString(value); } - else if (metadata.Name == "password") + else if (secMetadata.Name == "password") { password = Utilities.ValueToString(value); } } var auth = Convert.ToBase64String(Encoding.UTF8.GetBytes($"{username}:{password}")); - client.AddHeader("Authorization", $"Basic {auth}"); + headerParams.Add("Authorization", $"Basic {auth}"); } } } diff --git a/sync-for-payroll/Codat/Sync/Payroll/Utils/SpeakeasyHttpClient.cs b/sync-for-payroll/Codat/Sync/Payroll/Utils/SpeakeasyHttpClient.cs new file mode 100644 index 000000000..a2f3250df --- /dev/null +++ b/sync-for-payroll/Codat/Sync/Payroll/Utils/SpeakeasyHttpClient.cs @@ -0,0 +1,57 @@ + +//------------------------------------------------------------------------------ +// +// This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. +// +// Changes to this file may cause incorrect behavior and will be lost when +// the code is regenerated. +// +//------------------------------------------------------------------------------ +#nullable enable +namespace Codat.Sync.Payroll.Utils +{ + using System; + using System.Collections.Generic; + using System.Net.Http; + using System.Threading.Tasks; + + public interface ISpeakeasyHttpClient + { + Task SendAsync(HttpRequestMessage request); + } + + public class SpeakeasyHttpClient : ISpeakeasyHttpClient + { + private class HttpClient : ISpeakeasyHttpClient + { + private System.Net.Http.HttpClient client; + + public HttpClient() + { + client = new System.Net.Http.HttpClient(); + } + + public async Task SendAsync(HttpRequestMessage request) + { + return await client.SendAsync(request); + } + } + + private ISpeakeasyHttpClient? client; + + internal SpeakeasyHttpClient(ISpeakeasyHttpClient? client = null) + { + if (client == null) + { + client = new HttpClient(); + } + + this.client = client; + } + + public async Task SendAsync(HttpRequestMessage request) + { + return await client?.SendAsync(request); + } + } +} \ No newline at end of file diff --git a/sync-for-payroll/CodatSyncPayroll/Utils/SpeakeasyMetadata.cs b/sync-for-payroll/Codat/Sync/Payroll/Utils/SpeakeasyMetadata.cs similarity index 100% rename from sync-for-payroll/CodatSyncPayroll/Utils/SpeakeasyMetadata.cs rename to sync-for-payroll/Codat/Sync/Payroll/Utils/SpeakeasyMetadata.cs diff --git a/sync-for-payroll/CodatSyncPayroll/Utils/URLBuilder.cs b/sync-for-payroll/Codat/Sync/Payroll/Utils/URLBuilder.cs similarity index 100% rename from sync-for-payroll/CodatSyncPayroll/Utils/URLBuilder.cs rename to sync-for-payroll/Codat/Sync/Payroll/Utils/URLBuilder.cs diff --git a/sync-for-payroll/CodatSyncPayroll/Utils/Utilities.cs b/sync-for-payroll/Codat/Sync/Payroll/Utils/Utilities.cs similarity index 77% rename from sync-for-payroll/CodatSyncPayroll/Utils/Utilities.cs rename to sync-for-payroll/Codat/Sync/Payroll/Utils/Utilities.cs index 6af4dfa02..7c6ccdfce 100644 --- a/sync-for-payroll/CodatSyncPayroll/Utils/Utilities.cs +++ b/sync-for-payroll/Codat/Sync/Payroll/Utils/Utilities.cs @@ -22,25 +22,73 @@ namespace Codat.Sync.Payroll.Utils public class Utilities { - public static JsonConverter[] GetJsonConverters(Type type, string format = "") + public static JsonConverter[] GetDefaultJsonSerializers() + { + return new JsonConverter[] + { + new IsoDateTimeSerializer(), + new EnumConverter() + }; + } + + public static JsonConverter[] GetDefaultJsonDeserializers() + { + return new JsonConverter[] { + new FlexibleObjectDeserializer(), + new EnumConverter(), + new AnyDeserializer() + }; + } + + public static JsonSerializerSettings GetDefaultJsonSerializerSettings() + { + return new JsonSerializerSettings() + { + NullValueHandling = NullValueHandling.Ignore, + Converters = GetDefaultJsonSerializers() + }; + } + + public static JsonSerializerSettings GetDefaultJsonDeserializerSettings() + { + return new JsonSerializerSettings() + { + NullValueHandling = NullValueHandling.Ignore, + Converters = GetDefaultJsonDeserializers() + }; + } + + public static JsonConverter[] GetJsonSerializers(Type type, string format = "") { if (format == "string") { if (type == typeof(BigInteger)) { - return new JsonConverter[] { new BigIntSerializer() }; + return new JsonConverter[] { new BigIntStrConverter() }; } + if (type == typeof(Decimal)) { - return new JsonConverter[] { new DecimalSerializer() }; + return new JsonConverter[] { new DecimalStrConverter() }; } } - return new JsonConverter[] + return GetDefaultJsonSerializers(); + } + + public static JsonConverter[] GetJsonDeserializers(Type type) + { + if (type == typeof(BigInteger)) { - new IsoDateTimeSerializer(), - new EnumSerializer(), - }; + return new JsonConverter[] { new BigIntStrConverter() }; + } + + if (type == typeof(Decimal)) + { + return new JsonConverter[] { new DecimalStrConverter() }; + } + + return GetDefaultJsonDeserializers(); } public static string SerializeJSON(object obj, string format = "") @@ -60,7 +108,7 @@ public static string SerializeJSON(object obj, string format = "") new JsonSerializerSettings() { NullValueHandling = NullValueHandling.Ignore, - Converters = GetJsonConverters(type, format) + Converters = GetJsonSerializers(type, format) } ); } @@ -110,11 +158,11 @@ public static bool IsString(object? obj) } } - public static bool IsPrimitive(object obj) => obj != null && obj.GetType().IsPrimitive; + public static bool IsPrimitive(object? obj) => obj != null && obj.GetType().IsPrimitive; - public static bool IsEnum(object obj) => obj != null && obj.GetType().IsEnum; + public static bool IsEnum(object? obj) => obj != null && obj.GetType().IsEnum; - public static bool IsDate(object obj) => + public static bool IsDate(object? obj) => obj != null && (obj.GetType() == typeof(DateTime) || obj.GetType() == typeof(LocalDate)); private static string StripSurroundingQuotes(string input) @@ -200,9 +248,12 @@ public static string ToString(object? obj) if (IsDate(obj)) { - return StripSurroundingQuotes(JsonConvert.SerializeObject(obj, new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new IsoDateTimeSerializer(), new EnumSerializer() }})); + return StripSurroundingQuotes( + JsonConvert.SerializeObject(obj, GetDefaultJsonSerializerSettings()) + ); } - return JsonConvert.SerializeObject(obj, new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new IsoDateTimeSerializer(), new EnumSerializer() }}); + + return JsonConvert.SerializeObject(obj, GetDefaultJsonSerializerSettings()); } public static bool IsContentTypeMatch(string expected, string? actual) diff --git a/sync-for-payroll/CodatSyncPayroll/Accounts.cs b/sync-for-payroll/CodatSyncPayroll/Accounts.cs deleted file mode 100644 index 4df3d89ff..000000000 --- a/sync-for-payroll/CodatSyncPayroll/Accounts.cs +++ /dev/null @@ -1,319 +0,0 @@ - -//------------------------------------------------------------------------------ -// -// This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. -// -// Changes to this file may cause incorrect behavior and will be lost when -// the code is regenerated. -// -//------------------------------------------------------------------------------ -#nullable enable -namespace Codat.Sync.Payroll -{ - using Codat.Sync.Payroll.Models.Operations; - using Codat.Sync.Payroll.Models.Shared; - using Codat.Sync.Payroll.Utils; - using Newtonsoft.Json; - using System.Net.Http.Headers; - using System.Net.Http; - using System.Threading.Tasks; - using System; - - /// - /// Accounts - /// - public interface IAccounts - { - - /// - /// Create account - /// - /// - /// The *Create account* endpoint creates a new account for a given company's connection.
- ///
- /// Accounts are the categories a business uses to record accounting transactions.
- ///
- /// **Integration-specific behaviour**
- ///
- /// Required data may vary by integration. To see what data to post, first call Get create account model.
- ///
- /// Check out our coverage explorer for integrations that support creating an account.
- /// - ///
- ///
- Task CreateAsync(CreateAccountRequest? request = null); - - /// - /// Get account - /// - /// - /// The *Get account* endpoint returns a single account for a given `accountId`.
- ///
- /// Accounts are the categories a business uses to record accounting transactions.
- ///
- /// Check out our coverage explorer for integrations that support getting a specific account.
- ///
- /// Before using this endpoint, you must have retrieved data for the company.
- /// - ///
- ///
- Task GetAsync(GetAccountRequest? request = null); - - /// - /// Get create account model - /// - /// - /// The *Get create account model* endpoint returns the expected data for the request payload when creating an account for a given company and integration.
- ///
- /// Accounts are the categories a business uses to record accounting transactions.
- ///
- /// **Integration-specific behaviour**
- ///
- /// See the *response examples* for integration-specific indicative models.
- ///
- /// Check out our coverage explorer for integrations that support creating an account.
- /// - ///
- ///
- Task GetCreateModelAsync(GetCreateAccountsModelRequest? request = null); - - /// - /// List accounts - /// - /// - /// The *List accounts* endpoint returns a list of accounts for a given company's connection.
- ///
- /// Accounts are the categories a business uses to record accounting transactions.
- ///
- /// Before using this endpoint, you must have retrieved data for the company. - ///
- ///
- Task ListAsync(ListAccountsRequest? request = null); - } - - /// - /// Accounts - /// - public class Accounts: IAccounts - { - public SDKConfig SDKConfiguration { get; private set; } - private const string _language = "csharp"; - private const string _sdkVersion = "3.0.0"; - private const string _sdkGenVersion = "2.257.2"; - private const string _openapiDocVersion = "3.0.0"; - private const string _userAgent = "speakeasy-sdk/csharp 3.0.0 2.257.2 3.0.0 Codat.Sync.Payroll"; - private string _serverUrl = ""; - private ISpeakeasyHttpClient _defaultClient; - private Func? _securitySource; - - public Accounts(ISpeakeasyHttpClient defaultClient, Func? securitySource, string serverUrl, SDKConfig config) - { - _defaultClient = defaultClient; - _securitySource = securitySource; - _serverUrl = serverUrl; - SDKConfiguration = config; - } - - - public async Task CreateAsync(CreateAccountRequest? request = null) - { - string baseUrl = this.SDKConfiguration.GetTemplatedServerDetails(); - var urlString = URLBuilder.Build(baseUrl, "/companies/{companyId}/connections/{connectionId}/push/accounts", request); - - var httpRequest = new HttpRequestMessage(HttpMethod.Post, urlString); - httpRequest.Headers.Add("user-agent", _userAgent); - - var serializedBody = RequestBodySerializer.Serialize(request, "AccountPrototype", "json"); - if (serializedBody != null) - { - httpRequest.Content = serializedBody; - } - - var client = _defaultClient; - if (_securitySource != null) - { - client = SecuritySerializer.Apply(_defaultClient, _securitySource); - } - - var httpResponse = await client.SendAsync(httpRequest); - - var contentType = httpResponse.Content.Headers.ContentType?.MediaType; - - var response = new Models.Operations.CreateAccountResponse - { - StatusCode = (int)httpResponse.StatusCode, - ContentType = contentType, - RawResponse = httpResponse - }; - - if((response.StatusCode == 200)) - { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) - { - response.CreateAccountResponseValue = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); - } - - return response; - } - if((response.StatusCode == 400) || (response.StatusCode == 401) || (response.StatusCode == 402) || (response.StatusCode == 403) || (response.StatusCode == 404) || (response.StatusCode == 429) || (response.StatusCode == 500) || (response.StatusCode == 503)) - { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) - { - response.ErrorMessage = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); - } - - return response; - } - return response; - } - - - - public async Task GetAsync(GetAccountRequest? request = null) - { - string baseUrl = this.SDKConfiguration.GetTemplatedServerDetails(); - var urlString = URLBuilder.Build(baseUrl, "/companies/{companyId}/data/accounts/{accountId}", request); - - var httpRequest = new HttpRequestMessage(HttpMethod.Get, urlString); - httpRequest.Headers.Add("user-agent", _userAgent); - - - var client = _defaultClient; - if (_securitySource != null) - { - client = SecuritySerializer.Apply(_defaultClient, _securitySource); - } - - var httpResponse = await client.SendAsync(httpRequest); - - var contentType = httpResponse.Content.Headers.ContentType?.MediaType; - - var response = new GetAccountResponse - { - StatusCode = (int)httpResponse.StatusCode, - ContentType = contentType, - RawResponse = httpResponse - }; - - if((response.StatusCode == 200)) - { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) - { - response.Account = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); - } - - return response; - } - if((response.StatusCode == 401) || (response.StatusCode == 402) || (response.StatusCode == 403) || (response.StatusCode == 404) || (response.StatusCode == 409) || (response.StatusCode == 429) || (response.StatusCode == 500) || (response.StatusCode == 503)) - { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) - { - response.ErrorMessage = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); - } - - return response; - } - return response; - } - - - - public async Task GetCreateModelAsync(GetCreateAccountsModelRequest? request = null) - { - string baseUrl = this.SDKConfiguration.GetTemplatedServerDetails(); - var urlString = URLBuilder.Build(baseUrl, "/companies/{companyId}/connections/{connectionId}/options/chartOfAccounts", request); - - var httpRequest = new HttpRequestMessage(HttpMethod.Get, urlString); - httpRequest.Headers.Add("user-agent", _userAgent); - - - var client = _defaultClient; - if (_securitySource != null) - { - client = SecuritySerializer.Apply(_defaultClient, _securitySource); - } - - var httpResponse = await client.SendAsync(httpRequest); - - var contentType = httpResponse.Content.Headers.ContentType?.MediaType; - - var response = new GetCreateAccountsModelResponse - { - StatusCode = (int)httpResponse.StatusCode, - ContentType = contentType, - RawResponse = httpResponse - }; - - if((response.StatusCode == 200)) - { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) - { - response.PushOption = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); - } - - return response; - } - if((response.StatusCode == 401) || (response.StatusCode == 402) || (response.StatusCode == 403) || (response.StatusCode == 404) || (response.StatusCode == 429) || (response.StatusCode == 500) || (response.StatusCode == 503)) - { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) - { - response.ErrorMessage = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); - } - - return response; - } - return response; - } - - - - public async Task ListAsync(ListAccountsRequest? request = null) - { - string baseUrl = this.SDKConfiguration.GetTemplatedServerDetails(); - var urlString = URLBuilder.Build(baseUrl, "/companies/{companyId}/data/accounts", request); - - var httpRequest = new HttpRequestMessage(HttpMethod.Get, urlString); - httpRequest.Headers.Add("user-agent", _userAgent); - - - var client = _defaultClient; - if (_securitySource != null) - { - client = SecuritySerializer.Apply(_defaultClient, _securitySource); - } - - var httpResponse = await client.SendAsync(httpRequest); - - var contentType = httpResponse.Content.Headers.ContentType?.MediaType; - - var response = new ListAccountsResponse - { - StatusCode = (int)httpResponse.StatusCode, - ContentType = contentType, - RawResponse = httpResponse - }; - - if((response.StatusCode == 200)) - { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) - { - response.Accounts = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); - } - - return response; - } - if((response.StatusCode == 400) || (response.StatusCode == 401) || (response.StatusCode == 402) || (response.StatusCode == 403) || (response.StatusCode == 404) || (response.StatusCode == 409) || (response.StatusCode == 429) || (response.StatusCode == 500) || (response.StatusCode == 503)) - { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) - { - response.ErrorMessage = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); - } - - return response; - } - return response; - } - - - } -} \ No newline at end of file diff --git a/sync-for-payroll/CodatSyncPayroll/Companies.cs b/sync-for-payroll/CodatSyncPayroll/Companies.cs deleted file mode 100644 index 8a75ad803..000000000 --- a/sync-for-payroll/CodatSyncPayroll/Companies.cs +++ /dev/null @@ -1,369 +0,0 @@ - -//------------------------------------------------------------------------------ -// -// This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. -// -// Changes to this file may cause incorrect behavior and will be lost when -// the code is regenerated. -// -//------------------------------------------------------------------------------ -#nullable enable -namespace Codat.Sync.Payroll -{ - using Codat.Sync.Payroll.Models.Operations; - using Codat.Sync.Payroll.Models.Shared; - using Codat.Sync.Payroll.Utils; - using Newtonsoft.Json; - using System.Net.Http.Headers; - using System.Net.Http; - using System.Threading.Tasks; - using System; - - /// - /// Create and manage your Codat companies. - /// - public interface ICompanies - { - - /// - /// Create company - /// - /// - /// Use the *Create company* endpoint to create a new company that represents your customer in Codat.
- ///
- /// A company represents a business sharing access to their data.
- /// Each company can have multiple connections to different data sources, such as one connection to Xero for accounting data, two connections to Plaid for two bank accounts, and a connection to Zettle for POS data.
- ///
- /// If forbidden characters (see `name` pattern) are present in the request, a company will be created with the forbidden characters removed. For example, `Company (Codat[1])` with be created as `Company Codat1`. - ///
- ///
- Task CreateAsync(CompanyRequestBody? request = null); - - /// - /// Delete a company - /// - /// - /// The *Delete company* endpoint permanently deletes a company, its connections and any cached data. This operation is irreversible.
- ///
- /// A company represents a business sharing access to their data.
- /// Each company can have multiple connections to different data sources, such as one connection to Xero for accounting data, two connections to Plaid for two bank accounts, and a connection to Zettle for POS data.
- /// - ///
- ///
- Task DeleteAsync(DeleteCompanyRequest? request = null); - - /// - /// Get company - /// - /// - /// The *Get company* endpoint returns a single company for a given `companyId`.
- ///
- /// A company represents a business sharing access to their data.
- /// Each company can have multiple connections to different data sources, such as one connection to Xero for accounting data, two connections to Plaid for two bank accounts, and a connection to Zettle for POS data.
- /// - ///
- ///
- Task GetAsync(GetCompanyRequest? request = null); - - /// - /// List companies - /// - /// - /// The *List companies* endpoint returns a list of [companies] associated to your instances.
- ///
- /// A company represents a business sharing access to their data.
- /// Each company can have multiple connections to different data sources, such as one connection to Xero for accounting data, two connections to Plaid for two bank accounts, and a connection to Zettle for POS data. - ///
- ///
- Task ListAsync(ListCompaniesRequest? request = null); - - /// - /// Update company - /// - /// - /// Use the *Update company* endpoint to update both the name and description of the company.
- /// If you use groups to manage a set of companies, use the Add company or Remove company endpoints to add or remove a company from a group.
- ///
- /// A company represents a business sharing access to their data.
- /// Each company can have multiple connections to different data sources, such as one connection to Xero for accounting data, two connections to Plaid for two bank accounts, and a connection to Zettle for POS data. - ///
- ///
- Task UpdateAsync(UpdateCompanyRequest? request = null); - } - - /// - /// Create and manage your Codat companies. - /// - public class Companies: ICompanies - { - public SDKConfig SDKConfiguration { get; private set; } - private const string _language = "csharp"; - private const string _sdkVersion = "3.0.0"; - private const string _sdkGenVersion = "2.257.2"; - private const string _openapiDocVersion = "3.0.0"; - private const string _userAgent = "speakeasy-sdk/csharp 3.0.0 2.257.2 3.0.0 Codat.Sync.Payroll"; - private string _serverUrl = ""; - private ISpeakeasyHttpClient _defaultClient; - private Func? _securitySource; - - public Companies(ISpeakeasyHttpClient defaultClient, Func? securitySource, string serverUrl, SDKConfig config) - { - _defaultClient = defaultClient; - _securitySource = securitySource; - _serverUrl = serverUrl; - SDKConfiguration = config; - } - - - public async Task CreateAsync(CompanyRequestBody? request = null) - { - string baseUrl = this.SDKConfiguration.GetTemplatedServerDetails(); - var urlString = baseUrl + "/companies"; - - var httpRequest = new HttpRequestMessage(HttpMethod.Post, urlString); - httpRequest.Headers.Add("user-agent", _userAgent); - - var serializedBody = RequestBodySerializer.Serialize(request, "Request", "json"); - if (serializedBody != null) - { - httpRequest.Content = serializedBody; - } - - var client = _defaultClient; - if (_securitySource != null) - { - client = SecuritySerializer.Apply(_defaultClient, _securitySource); - } - - var httpResponse = await client.SendAsync(httpRequest); - - var contentType = httpResponse.Content.Headers.ContentType?.MediaType; - - var response = new CreateCompanyResponse - { - StatusCode = (int)httpResponse.StatusCode, - ContentType = contentType, - RawResponse = httpResponse - }; - - if((response.StatusCode == 200)) - { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) - { - response.Company = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); - } - - return response; - } - if((response.StatusCode == 400) || (response.StatusCode == 401) || (response.StatusCode == 402) || (response.StatusCode == 403) || (response.StatusCode == 429) || (response.StatusCode == 500) || (response.StatusCode == 503)) - { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) - { - response.ErrorMessage = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); - } - - return response; - } - return response; - } - - - - public async Task DeleteAsync(DeleteCompanyRequest? request = null) - { - string baseUrl = this.SDKConfiguration.GetTemplatedServerDetails(); - var urlString = URLBuilder.Build(baseUrl, "/companies/{companyId}", request); - - var httpRequest = new HttpRequestMessage(HttpMethod.Delete, urlString); - httpRequest.Headers.Add("user-agent", _userAgent); - - - var client = _defaultClient; - if (_securitySource != null) - { - client = SecuritySerializer.Apply(_defaultClient, _securitySource); - } - - var httpResponse = await client.SendAsync(httpRequest); - - var contentType = httpResponse.Content.Headers.ContentType?.MediaType; - - var response = new DeleteCompanyResponse - { - StatusCode = (int)httpResponse.StatusCode, - ContentType = contentType, - RawResponse = httpResponse - }; - - if((response.StatusCode == 204)) - { - - return response; - } - if((response.StatusCode == 401) || (response.StatusCode == 402) || (response.StatusCode == 403) || (response.StatusCode == 404) || (response.StatusCode == 429) || (response.StatusCode == 500) || (response.StatusCode == 503)) - { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) - { - response.ErrorMessage = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); - } - - return response; - } - return response; - } - - - - public async Task GetAsync(GetCompanyRequest? request = null) - { - string baseUrl = this.SDKConfiguration.GetTemplatedServerDetails(); - var urlString = URLBuilder.Build(baseUrl, "/companies/{companyId}", request); - - var httpRequest = new HttpRequestMessage(HttpMethod.Get, urlString); - httpRequest.Headers.Add("user-agent", _userAgent); - - - var client = _defaultClient; - if (_securitySource != null) - { - client = SecuritySerializer.Apply(_defaultClient, _securitySource); - } - - var httpResponse = await client.SendAsync(httpRequest); - - var contentType = httpResponse.Content.Headers.ContentType?.MediaType; - - var response = new GetCompanyResponse - { - StatusCode = (int)httpResponse.StatusCode, - ContentType = contentType, - RawResponse = httpResponse - }; - - if((response.StatusCode == 200)) - { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) - { - response.Company = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); - } - - return response; - } - if((response.StatusCode == 401) || (response.StatusCode == 402) || (response.StatusCode == 403) || (response.StatusCode == 404) || (response.StatusCode == 429) || (response.StatusCode == 500) || (response.StatusCode == 503)) - { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) - { - response.ErrorMessage = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); - } - - return response; - } - return response; - } - - - - public async Task ListAsync(ListCompaniesRequest? request = null) - { - string baseUrl = this.SDKConfiguration.GetTemplatedServerDetails(); - var urlString = URLBuilder.Build(baseUrl, "/companies", request); - - var httpRequest = new HttpRequestMessage(HttpMethod.Get, urlString); - httpRequest.Headers.Add("user-agent", _userAgent); - - - var client = _defaultClient; - if (_securitySource != null) - { - client = SecuritySerializer.Apply(_defaultClient, _securitySource); - } - - var httpResponse = await client.SendAsync(httpRequest); - - var contentType = httpResponse.Content.Headers.ContentType?.MediaType; - - var response = new ListCompaniesResponse - { - StatusCode = (int)httpResponse.StatusCode, - ContentType = contentType, - RawResponse = httpResponse - }; - - if((response.StatusCode == 200)) - { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) - { - response.Companies = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); - } - - return response; - } - if((response.StatusCode == 400) || (response.StatusCode == 401) || (response.StatusCode == 402) || (response.StatusCode == 403) || (response.StatusCode == 404) || (response.StatusCode == 429) || (response.StatusCode == 500) || (response.StatusCode == 503)) - { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) - { - response.ErrorMessage = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); - } - - return response; - } - return response; - } - - - - public async Task UpdateAsync(UpdateCompanyRequest? request = null) - { - string baseUrl = this.SDKConfiguration.GetTemplatedServerDetails(); - var urlString = URLBuilder.Build(baseUrl, "/companies/{companyId}", request); - - var httpRequest = new HttpRequestMessage(HttpMethod.Put, urlString); - httpRequest.Headers.Add("user-agent", _userAgent); - - var serializedBody = RequestBodySerializer.Serialize(request, "CompanyRequestBody", "json"); - if (serializedBody != null) - { - httpRequest.Content = serializedBody; - } - - var client = _defaultClient; - if (_securitySource != null) - { - client = SecuritySerializer.Apply(_defaultClient, _securitySource); - } - - var httpResponse = await client.SendAsync(httpRequest); - - var contentType = httpResponse.Content.Headers.ContentType?.MediaType; - - var response = new UpdateCompanyResponse - { - StatusCode = (int)httpResponse.StatusCode, - ContentType = contentType, - RawResponse = httpResponse - }; - - if((response.StatusCode == 200)) - { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) - { - response.Company = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); - } - - return response; - } - if((response.StatusCode == 401) || (response.StatusCode == 402) || (response.StatusCode == 403) || (response.StatusCode == 404) || (response.StatusCode == 429) || (response.StatusCode == 500) || (response.StatusCode == 503)) - { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) - { - response.ErrorMessage = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); - } - - return response; - } - return response; - } - - - } -} \ No newline at end of file diff --git a/sync-for-payroll/CodatSyncPayroll/CompanyInfo.cs b/sync-for-payroll/CodatSyncPayroll/CompanyInfo.cs deleted file mode 100644 index 19853940a..000000000 --- a/sync-for-payroll/CodatSyncPayroll/CompanyInfo.cs +++ /dev/null @@ -1,111 +0,0 @@ - -//------------------------------------------------------------------------------ -// -// This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. -// -// Changes to this file may cause incorrect behavior and will be lost when -// the code is regenerated. -// -//------------------------------------------------------------------------------ -#nullable enable -namespace Codat.Sync.Payroll -{ - using Codat.Sync.Payroll.Models.Operations; - using Codat.Sync.Payroll.Models.Shared; - using Codat.Sync.Payroll.Utils; - using Newtonsoft.Json; - using System.Net.Http.Headers; - using System.Net.Http; - using System.Threading.Tasks; - using System; - - /// - /// View company information fetched from the source platform. - /// - public interface ICompanyInfo - { - - /// - /// Get company accounting profile - /// - /// - /// Gets the latest basic info for a company. - /// - /// - Task GetAccountingProfileAsync(GetAccountingProfileRequest? request = null); - } - - /// - /// View company information fetched from the source platform. - /// - public class CompanyInfo: ICompanyInfo - { - public SDKConfig SDKConfiguration { get; private set; } - private const string _language = "csharp"; - private const string _sdkVersion = "3.0.0"; - private const string _sdkGenVersion = "2.257.2"; - private const string _openapiDocVersion = "3.0.0"; - private const string _userAgent = "speakeasy-sdk/csharp 3.0.0 2.257.2 3.0.0 Codat.Sync.Payroll"; - private string _serverUrl = ""; - private ISpeakeasyHttpClient _defaultClient; - private Func? _securitySource; - - public CompanyInfo(ISpeakeasyHttpClient defaultClient, Func? securitySource, string serverUrl, SDKConfig config) - { - _defaultClient = defaultClient; - _securitySource = securitySource; - _serverUrl = serverUrl; - SDKConfiguration = config; - } - - - public async Task GetAccountingProfileAsync(GetAccountingProfileRequest? request = null) - { - string baseUrl = this.SDKConfiguration.GetTemplatedServerDetails(); - var urlString = URLBuilder.Build(baseUrl, "/companies/{companyId}/data/info", request); - - var httpRequest = new HttpRequestMessage(HttpMethod.Get, urlString); - httpRequest.Headers.Add("user-agent", _userAgent); - - - var client = _defaultClient; - if (_securitySource != null) - { - client = SecuritySerializer.Apply(_defaultClient, _securitySource); - } - - var httpResponse = await client.SendAsync(httpRequest); - - var contentType = httpResponse.Content.Headers.ContentType?.MediaType; - - var response = new GetAccountingProfileResponse - { - StatusCode = (int)httpResponse.StatusCode, - ContentType = contentType, - RawResponse = httpResponse - }; - - if((response.StatusCode == 200)) - { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) - { - response.CompanyInfo = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); - } - - return response; - } - if((response.StatusCode == 401) || (response.StatusCode == 402) || (response.StatusCode == 403) || (response.StatusCode == 404) || (response.StatusCode == 409) || (response.StatusCode == 429) || (response.StatusCode == 500) || (response.StatusCode == 503)) - { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) - { - response.ErrorMessage = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); - } - - return response; - } - return response; - } - - - } -} \ No newline at end of file diff --git a/sync-for-payroll/CodatSyncPayroll/Connections.cs b/sync-for-payroll/CodatSyncPayroll/Connections.cs deleted file mode 100644 index 418f1364e..000000000 --- a/sync-for-payroll/CodatSyncPayroll/Connections.cs +++ /dev/null @@ -1,352 +0,0 @@ - -//------------------------------------------------------------------------------ -// -// This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. -// -// Changes to this file may cause incorrect behavior and will be lost when -// the code is regenerated. -// -//------------------------------------------------------------------------------ -#nullable enable -namespace Codat.Sync.Payroll -{ - using Codat.Sync.Payroll.Models.Operations; - using Codat.Sync.Payroll.Models.Shared; - using Codat.Sync.Payroll.Utils; - using Newtonsoft.Json; - using System.Net.Http.Headers; - using System.Net.Http; - using System.Threading.Tasks; - using System; - - /// - /// Manage your companies' data connections. - /// - public interface IConnections - { - - /// - /// Create connection - /// - /// - /// Creates a connection for the company by providing a valid `platformKey`.
- ///
- /// Use the List Integrations endpoint to access valid platform keys. - ///
- ///
- Task CreateAsync(CreateConnectionRequest? request = null); - - /// - /// Delete connection - /// - /// - /// Revoke and remove a connection from a company.
- /// This operation is not reversible. The end user would need to reauthorize a new data connection if you wish to view new data for this company. - ///
- ///
- Task DeleteAsync(DeleteConnectionRequest? request = null); - - /// - /// Get connection - /// - /// - /// Returns a specific connection for a company when valid identifiers are provided. If the identifiers are for a deleted company and/or connection, a not found response is returned. - /// - /// - Task GetAsync(GetConnectionRequest? request = null); - - /// - /// List connections - /// - /// - /// List the connections for a company. - /// - /// - Task ListAsync(ListConnectionsRequest? request = null); - - /// - /// Unlink connection - /// - /// - /// This allows you to deauthorize a connection, without deleting it from Codat. This means you can still view any data that has previously been pulled into Codat, and also lets you re-authorize in future if your customer wishes to resume sharing their data. - /// - /// - Task UnlinkAsync(UnlinkConnectionRequest? request = null); - } - - /// - /// Manage your companies' data connections. - /// - public class Connections: IConnections - { - public SDKConfig SDKConfiguration { get; private set; } - private const string _language = "csharp"; - private const string _sdkVersion = "3.0.0"; - private const string _sdkGenVersion = "2.257.2"; - private const string _openapiDocVersion = "3.0.0"; - private const string _userAgent = "speakeasy-sdk/csharp 3.0.0 2.257.2 3.0.0 Codat.Sync.Payroll"; - private string _serverUrl = ""; - private ISpeakeasyHttpClient _defaultClient; - private Func? _securitySource; - - public Connections(ISpeakeasyHttpClient defaultClient, Func? securitySource, string serverUrl, SDKConfig config) - { - _defaultClient = defaultClient; - _securitySource = securitySource; - _serverUrl = serverUrl; - SDKConfiguration = config; - } - - - public async Task CreateAsync(CreateConnectionRequest? request = null) - { - string baseUrl = this.SDKConfiguration.GetTemplatedServerDetails(); - var urlString = URLBuilder.Build(baseUrl, "/companies/{companyId}/connections", request); - - var httpRequest = new HttpRequestMessage(HttpMethod.Post, urlString); - httpRequest.Headers.Add("user-agent", _userAgent); - - var serializedBody = RequestBodySerializer.Serialize(request, "RequestBody", "json"); - if (serializedBody != null) - { - httpRequest.Content = serializedBody; - } - - var client = _defaultClient; - if (_securitySource != null) - { - client = SecuritySerializer.Apply(_defaultClient, _securitySource); - } - - var httpResponse = await client.SendAsync(httpRequest); - - var contentType = httpResponse.Content.Headers.ContentType?.MediaType; - - var response = new CreateConnectionResponse - { - StatusCode = (int)httpResponse.StatusCode, - ContentType = contentType, - RawResponse = httpResponse - }; - - if((response.StatusCode == 200)) - { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) - { - response.Connection = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); - } - - return response; - } - if((response.StatusCode == 401) || (response.StatusCode == 402) || (response.StatusCode == 403) || (response.StatusCode == 404) || (response.StatusCode == 429) || (response.StatusCode == 500) || (response.StatusCode == 503)) - { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) - { - response.ErrorMessage = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); - } - - return response; - } - return response; - } - - - - public async Task DeleteAsync(DeleteConnectionRequest? request = null) - { - string baseUrl = this.SDKConfiguration.GetTemplatedServerDetails(); - var urlString = URLBuilder.Build(baseUrl, "/companies/{companyId}/connections/{connectionId}", request); - - var httpRequest = new HttpRequestMessage(HttpMethod.Delete, urlString); - httpRequest.Headers.Add("user-agent", _userAgent); - - - var client = _defaultClient; - if (_securitySource != null) - { - client = SecuritySerializer.Apply(_defaultClient, _securitySource); - } - - var httpResponse = await client.SendAsync(httpRequest); - - var contentType = httpResponse.Content.Headers.ContentType?.MediaType; - - var response = new DeleteConnectionResponse - { - StatusCode = (int)httpResponse.StatusCode, - ContentType = contentType, - RawResponse = httpResponse - }; - - if((response.StatusCode == 200)) - { - - return response; - } - if((response.StatusCode == 401) || (response.StatusCode == 402) || (response.StatusCode == 403) || (response.StatusCode == 404) || (response.StatusCode == 429) || (response.StatusCode == 500) || (response.StatusCode == 503)) - { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) - { - response.ErrorMessage = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); - } - - return response; - } - return response; - } - - - - public async Task GetAsync(GetConnectionRequest? request = null) - { - string baseUrl = this.SDKConfiguration.GetTemplatedServerDetails(); - var urlString = URLBuilder.Build(baseUrl, "/companies/{companyId}/connections/{connectionId}", request); - - var httpRequest = new HttpRequestMessage(HttpMethod.Get, urlString); - httpRequest.Headers.Add("user-agent", _userAgent); - - - var client = _defaultClient; - if (_securitySource != null) - { - client = SecuritySerializer.Apply(_defaultClient, _securitySource); - } - - var httpResponse = await client.SendAsync(httpRequest); - - var contentType = httpResponse.Content.Headers.ContentType?.MediaType; - - var response = new GetConnectionResponse - { - StatusCode = (int)httpResponse.StatusCode, - ContentType = contentType, - RawResponse = httpResponse - }; - - if((response.StatusCode == 200)) - { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) - { - response.Connection = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); - } - - return response; - } - if((response.StatusCode == 401) || (response.StatusCode == 402) || (response.StatusCode == 403) || (response.StatusCode == 404) || (response.StatusCode == 429) || (response.StatusCode == 500) || (response.StatusCode == 503)) - { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) - { - response.ErrorMessage = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); - } - - return response; - } - return response; - } - - - - public async Task ListAsync(ListConnectionsRequest? request = null) - { - string baseUrl = this.SDKConfiguration.GetTemplatedServerDetails(); - var urlString = URLBuilder.Build(baseUrl, "/companies/{companyId}/connections", request); - - var httpRequest = new HttpRequestMessage(HttpMethod.Get, urlString); - httpRequest.Headers.Add("user-agent", _userAgent); - - - var client = _defaultClient; - if (_securitySource != null) - { - client = SecuritySerializer.Apply(_defaultClient, _securitySource); - } - - var httpResponse = await client.SendAsync(httpRequest); - - var contentType = httpResponse.Content.Headers.ContentType?.MediaType; - - var response = new ListConnectionsResponse - { - StatusCode = (int)httpResponse.StatusCode, - ContentType = contentType, - RawResponse = httpResponse - }; - - if((response.StatusCode == 200)) - { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) - { - response.Connections = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); - } - - return response; - } - if((response.StatusCode == 400) || (response.StatusCode == 401) || (response.StatusCode == 402) || (response.StatusCode == 403) || (response.StatusCode == 404) || (response.StatusCode == 429) || (response.StatusCode == 500) || (response.StatusCode == 503)) - { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) - { - response.ErrorMessage = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); - } - - return response; - } - return response; - } - - - - public async Task UnlinkAsync(UnlinkConnectionRequest? request = null) - { - string baseUrl = this.SDKConfiguration.GetTemplatedServerDetails(); - var urlString = URLBuilder.Build(baseUrl, "/companies/{companyId}/connections/{connectionId}", request); - - var httpRequest = new HttpRequestMessage(HttpMethod.Patch, urlString); - httpRequest.Headers.Add("user-agent", _userAgent); - - var serializedBody = RequestBodySerializer.Serialize(request, "RequestBody", "json"); - if (serializedBody != null) - { - httpRequest.Content = serializedBody; - } - - var client = _defaultClient; - if (_securitySource != null) - { - client = SecuritySerializer.Apply(_defaultClient, _securitySource); - } - - var httpResponse = await client.SendAsync(httpRequest); - - var contentType = httpResponse.Content.Headers.ContentType?.MediaType; - - var response = new UnlinkConnectionResponse - { - StatusCode = (int)httpResponse.StatusCode, - ContentType = contentType, - RawResponse = httpResponse - }; - - if((response.StatusCode == 200)) - { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) - { - response.Connection = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); - } - - return response; - } - if((response.StatusCode == 401) || (response.StatusCode == 402) || (response.StatusCode == 403) || (response.StatusCode == 404) || (response.StatusCode == 429) || (response.StatusCode == 500) || (response.StatusCode == 503)) - { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) - { - response.ErrorMessage = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); - } - - return response; - } - return response; - } - - - } -} \ No newline at end of file diff --git a/sync-for-payroll/CodatSyncPayroll/JournalEntries.cs b/sync-for-payroll/CodatSyncPayroll/JournalEntries.cs deleted file mode 100644 index c8459b889..000000000 --- a/sync-for-payroll/CodatSyncPayroll/JournalEntries.cs +++ /dev/null @@ -1,407 +0,0 @@ - -//------------------------------------------------------------------------------ -// -// This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. -// -// Changes to this file may cause incorrect behavior and will be lost when -// the code is regenerated. -// -//------------------------------------------------------------------------------ -#nullable enable -namespace Codat.Sync.Payroll -{ - using Codat.Sync.Payroll.Models.Operations; - using Codat.Sync.Payroll.Models.Shared; - using Codat.Sync.Payroll.Utils; - using Newtonsoft.Json; - using System.Net.Http.Headers; - using System.Net.Http; - using System.Threading.Tasks; - using System; - - /// - /// Journal entries - /// - public interface IJournalEntries - { - - /// - /// Create journal entry - /// - /// - /// The *Create journal entry* endpoint creates a new journal entry for a given company's connection.
- ///
- /// Journal entries are made in a company's general ledger, or accounts, when transactions are approved.
- ///
- /// **Integration-specific behaviour**
- ///
- /// Required data may vary by integration. To see what data to post, first call Get create journal entry model.
- ///
- /// Check out our coverage explorer for integrations that support creating a journal entry.
- /// - ///
- ///
- Task CreateAsync(CreateJournalEntryRequest? request = null); - - /// - /// Delete journal entry - /// - /// - /// > **Use with caution**
- /// >
- /// >Because journal entries underpin every transaction in an accounting platform, deleting a journal entry can affect every transaction for a given company.
- /// >
- /// > **Before you proceed, make sure you understand the implications of deleting journal entries from an accounting perspective.**
- ///
- /// The *Delete journal entry* endpoint allows you to delete a specified journal entry from an accounting platform.
- ///
- /// Journal entries are made in a company's general ledger, or accounts, when transactions are approved.
- ///
- /// ### Process
- /// 1. Pass the `{journalEntryId}` to the *Delete journal entry* endpoint and store the `pushOperationKey` returned.
- /// 2. Check the status of the delete by checking the status of push operation either via
- /// 1. Push operation webhook (advised),
- /// 2. Push operation status endpoint.
- ///
- /// A `Success` status indicates that the journal entry object was deleted from the accounting platform.
- /// 3. (Optional) Check that the journal entry was deleted from the accounting platform.
- ///
- /// ### Effect on related objects
- ///
- /// Be aware that deleting a journal entry from an accounting platform might cause related objects to be modified. For example, if you delete the journal entry for a paid invoice in QuickBooks Online, the invoice is deleted but the payment against that invoice is not. The payment is converted to a payment on account.
- ///
- /// ## Integration specifics
- /// Integrations that support soft delete do not permanently delete the object in the accounting platform.
- ///
- /// | Integration | Soft Deleted |
- /// |-------------|--------------|
- /// | QuickBooks Online | Yes |
- /// - ///
- ///
- Task DeleteAsync(DeleteJournalEntryRequest? request = null); - - /// - /// Get journal entry - /// - /// - /// The *Get journal entry* endpoint returns a single journal entry for a given `journalEntryId`.
- ///
- /// Journal entries are made in a company's general ledger, or accounts, when transactions are approved.
- ///
- /// Check out our coverage explorer for integrations that support getting a specific journal entry.
- ///
- /// Before using this endpoint, you must have retrieved data for the company.
- /// - ///
- ///
- Task GetAsync(GetJournalEntryRequest? request = null); - - /// - /// Get create journal entry model - /// - /// - /// The *Get create journal entry model* endpoint returns the expected data for the request payload when creating a journal entry for a given company and integration.
- ///
- /// Journal entries are made in a company's general ledger, or accounts, when transactions are approved.
- ///
- /// **Integration-specific behaviour**
- ///
- /// See the *response examples* for integration-specific indicative models.
- ///
- /// Check out our coverage explorer for integrations that support creating a journal entry.
- /// - ///
- ///
- Task GetCreateModelAsync(GetCreateJournalEntryModelRequest? request = null); - - /// - /// List journal entries - /// - /// - /// The *List journal entries* endpoint returns a list of journal entries for a given company's connection.
- ///
- /// Journal entries are made in a company's general ledger, or accounts, when transactions are approved.
- ///
- /// Before using this endpoint, you must have retrieved data for the company.
- /// - ///
- ///
- Task ListAsync(ListJournalEntriesRequest? request = null); - } - - /// - /// Journal entries - /// - public class JournalEntries: IJournalEntries - { - public SDKConfig SDKConfiguration { get; private set; } - private const string _language = "csharp"; - private const string _sdkVersion = "3.0.0"; - private const string _sdkGenVersion = "2.257.2"; - private const string _openapiDocVersion = "3.0.0"; - private const string _userAgent = "speakeasy-sdk/csharp 3.0.0 2.257.2 3.0.0 Codat.Sync.Payroll"; - private string _serverUrl = ""; - private ISpeakeasyHttpClient _defaultClient; - private Func? _securitySource; - - public JournalEntries(ISpeakeasyHttpClient defaultClient, Func? securitySource, string serverUrl, SDKConfig config) - { - _defaultClient = defaultClient; - _securitySource = securitySource; - _serverUrl = serverUrl; - SDKConfiguration = config; - } - - - public async Task CreateAsync(CreateJournalEntryRequest? request = null) - { - string baseUrl = this.SDKConfiguration.GetTemplatedServerDetails(); - var urlString = URLBuilder.Build(baseUrl, "/companies/{companyId}/connections/{connectionId}/push/journalEntries", request); - - var httpRequest = new HttpRequestMessage(HttpMethod.Post, urlString); - httpRequest.Headers.Add("user-agent", _userAgent); - - var serializedBody = RequestBodySerializer.Serialize(request, "JournalEntry", "json"); - if (serializedBody != null) - { - httpRequest.Content = serializedBody; - } - - var client = _defaultClient; - if (_securitySource != null) - { - client = SecuritySerializer.Apply(_defaultClient, _securitySource); - } - - var httpResponse = await client.SendAsync(httpRequest); - - var contentType = httpResponse.Content.Headers.ContentType?.MediaType; - - var response = new Models.Operations.CreateJournalEntryResponse - { - StatusCode = (int)httpResponse.StatusCode, - ContentType = contentType, - RawResponse = httpResponse - }; - - if((response.StatusCode == 200)) - { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) - { - response.CreateJournalEntryResponseValue = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); - } - - return response; - } - if((response.StatusCode == 400) || (response.StatusCode == 401) || (response.StatusCode == 402) || (response.StatusCode == 403) || (response.StatusCode == 404) || (response.StatusCode == 429) || (response.StatusCode == 500) || (response.StatusCode == 503)) - { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) - { - response.ErrorMessage = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); - } - - return response; - } - return response; - } - - - - public async Task DeleteAsync(DeleteJournalEntryRequest? request = null) - { - string baseUrl = this.SDKConfiguration.GetTemplatedServerDetails(); - var urlString = URLBuilder.Build(baseUrl, "/companies/{companyId}/connections/{connectionId}/push/journalEntries/{journalEntryId}", request); - - var httpRequest = new HttpRequestMessage(HttpMethod.Delete, urlString); - httpRequest.Headers.Add("user-agent", _userAgent); - - - var client = _defaultClient; - if (_securitySource != null) - { - client = SecuritySerializer.Apply(_defaultClient, _securitySource); - } - - var httpResponse = await client.SendAsync(httpRequest); - - var contentType = httpResponse.Content.Headers.ContentType?.MediaType; - - var response = new DeleteJournalEntryResponse - { - StatusCode = (int)httpResponse.StatusCode, - ContentType = contentType, - RawResponse = httpResponse - }; - - if((response.StatusCode == 200)) - { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) - { - response.PushOperation = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); - } - - return response; - } - if((response.StatusCode == 401) || (response.StatusCode == 402) || (response.StatusCode == 403) || (response.StatusCode == 404) || (response.StatusCode == 429) || (response.StatusCode == 500) || (response.StatusCode == 503)) - { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) - { - response.ErrorMessage = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); - } - - return response; - } - return response; - } - - - - public async Task GetAsync(GetJournalEntryRequest? request = null) - { - string baseUrl = this.SDKConfiguration.GetTemplatedServerDetails(); - var urlString = URLBuilder.Build(baseUrl, "/companies/{companyId}/data/journalEntries/{journalEntryId}", request); - - var httpRequest = new HttpRequestMessage(HttpMethod.Get, urlString); - httpRequest.Headers.Add("user-agent", _userAgent); - - - var client = _defaultClient; - if (_securitySource != null) - { - client = SecuritySerializer.Apply(_defaultClient, _securitySource); - } - - var httpResponse = await client.SendAsync(httpRequest); - - var contentType = httpResponse.Content.Headers.ContentType?.MediaType; - - var response = new GetJournalEntryResponse - { - StatusCode = (int)httpResponse.StatusCode, - ContentType = contentType, - RawResponse = httpResponse - }; - - if((response.StatusCode == 200)) - { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) - { - response.JournalEntry = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); - } - - return response; - } - if((response.StatusCode == 401) || (response.StatusCode == 402) || (response.StatusCode == 403) || (response.StatusCode == 404) || (response.StatusCode == 409) || (response.StatusCode == 429) || (response.StatusCode == 500) || (response.StatusCode == 503)) - { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) - { - response.ErrorMessage = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); - } - - return response; - } - return response; - } - - - - public async Task GetCreateModelAsync(GetCreateJournalEntryModelRequest? request = null) - { - string baseUrl = this.SDKConfiguration.GetTemplatedServerDetails(); - var urlString = URLBuilder.Build(baseUrl, "/companies/{companyId}/connections/{connectionId}/options/journalEntries", request); - - var httpRequest = new HttpRequestMessage(HttpMethod.Get, urlString); - httpRequest.Headers.Add("user-agent", _userAgent); - - - var client = _defaultClient; - if (_securitySource != null) - { - client = SecuritySerializer.Apply(_defaultClient, _securitySource); - } - - var httpResponse = await client.SendAsync(httpRequest); - - var contentType = httpResponse.Content.Headers.ContentType?.MediaType; - - var response = new GetCreateJournalEntryModelResponse - { - StatusCode = (int)httpResponse.StatusCode, - ContentType = contentType, - RawResponse = httpResponse - }; - - if((response.StatusCode == 200)) - { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) - { - response.PushOption = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); - } - - return response; - } - if((response.StatusCode == 401) || (response.StatusCode == 402) || (response.StatusCode == 403) || (response.StatusCode == 404) || (response.StatusCode == 429) || (response.StatusCode == 500) || (response.StatusCode == 503)) - { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) - { - response.ErrorMessage = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); - } - - return response; - } - return response; - } - - - - public async Task ListAsync(ListJournalEntriesRequest? request = null) - { - string baseUrl = this.SDKConfiguration.GetTemplatedServerDetails(); - var urlString = URLBuilder.Build(baseUrl, "/companies/{companyId}/data/journalEntries", request); - - var httpRequest = new HttpRequestMessage(HttpMethod.Get, urlString); - httpRequest.Headers.Add("user-agent", _userAgent); - - - var client = _defaultClient; - if (_securitySource != null) - { - client = SecuritySerializer.Apply(_defaultClient, _securitySource); - } - - var httpResponse = await client.SendAsync(httpRequest); - - var contentType = httpResponse.Content.Headers.ContentType?.MediaType; - - var response = new ListJournalEntriesResponse - { - StatusCode = (int)httpResponse.StatusCode, - ContentType = contentType, - RawResponse = httpResponse - }; - - if((response.StatusCode == 200)) - { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) - { - response.JournalEntries = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); - } - - return response; - } - if((response.StatusCode == 400) || (response.StatusCode == 401) || (response.StatusCode == 402) || (response.StatusCode == 403) || (response.StatusCode == 404) || (response.StatusCode == 409) || (response.StatusCode == 429) || (response.StatusCode == 500) || (response.StatusCode == 503)) - { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) - { - response.ErrorMessage = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); - } - - return response; - } - return response; - } - - - } -} \ No newline at end of file diff --git a/sync-for-payroll/CodatSyncPayroll/Journals.cs b/sync-for-payroll/CodatSyncPayroll/Journals.cs deleted file mode 100644 index a2eea2540..000000000 --- a/sync-for-payroll/CodatSyncPayroll/Journals.cs +++ /dev/null @@ -1,320 +0,0 @@ - -//------------------------------------------------------------------------------ -// -// This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. -// -// Changes to this file may cause incorrect behavior and will be lost when -// the code is regenerated. -// -//------------------------------------------------------------------------------ -#nullable enable -namespace Codat.Sync.Payroll -{ - using Codat.Sync.Payroll.Models.Operations; - using Codat.Sync.Payroll.Models.Shared; - using Codat.Sync.Payroll.Utils; - using Newtonsoft.Json; - using System.Net.Http.Headers; - using System.Net.Http; - using System.Threading.Tasks; - using System; - - /// - /// Journals - /// - public interface IJournals - { - - /// - /// Create journal - /// - /// - /// The *Create journal* endpoint creates a new journal for a given company's connection.
- ///
- /// Journals are used to record all the financial transactions of a company.
- ///
- /// **Integration-specific behaviour**
- ///
- /// Required data may vary by integration. To see what data to post, first call Get create journal model.
- ///
- /// Check out our coverage explorer for integrations that support creating a journal.
- /// - ///
- ///
- Task CreateAsync(CreateJournalRequest? request = null); - - /// - /// Get journal - /// - /// - /// The *Get journal* endpoint returns a single journal for a given `journalId`.
- ///
- /// Journals are used to record all the financial transactions of a company.
- ///
- /// Check out our coverage explorer for integrations that support getting a specific journal.
- ///
- /// Before using this endpoint, you must have retrieved data for the company.
- /// - ///
- ///
- Task GetAsync(GetJournalRequest? request = null); - - /// - /// Get create journal model - /// - /// - /// The *Get create journal model* endpoint returns the expected data for the request payload when creating a journal for a given company and integration.
- ///
- /// Journals are used to record all the financial transactions of a company.
- ///
- /// **Integration-specific behaviour**
- ///
- /// See the *response examples* for integration-specific indicative models.
- ///
- /// Check out our coverage explorer for integrations that support creating a journal.
- /// - ///
- ///
- Task GetCreateModelAsync(GetCreateJournalModelRequest? request = null); - - /// - /// List journals - /// - /// - /// The *List journals* endpoint returns a list of journals for a given company's connection.
- ///
- /// Journals are used to record all the financial transactions of a company.
- ///
- /// Before using this endpoint, you must have retrieved data for the company.
- /// - ///
- ///
- Task ListAsync(ListJournalsRequest? request = null); - } - - /// - /// Journals - /// - public class Journals: IJournals - { - public SDKConfig SDKConfiguration { get; private set; } - private const string _language = "csharp"; - private const string _sdkVersion = "3.0.0"; - private const string _sdkGenVersion = "2.257.2"; - private const string _openapiDocVersion = "3.0.0"; - private const string _userAgent = "speakeasy-sdk/csharp 3.0.0 2.257.2 3.0.0 Codat.Sync.Payroll"; - private string _serverUrl = ""; - private ISpeakeasyHttpClient _defaultClient; - private Func? _securitySource; - - public Journals(ISpeakeasyHttpClient defaultClient, Func? securitySource, string serverUrl, SDKConfig config) - { - _defaultClient = defaultClient; - _securitySource = securitySource; - _serverUrl = serverUrl; - SDKConfiguration = config; - } - - - public async Task CreateAsync(CreateJournalRequest? request = null) - { - string baseUrl = this.SDKConfiguration.GetTemplatedServerDetails(); - var urlString = URLBuilder.Build(baseUrl, "/companies/{companyId}/connections/{connectionId}/push/journals", request); - - var httpRequest = new HttpRequestMessage(HttpMethod.Post, urlString); - httpRequest.Headers.Add("user-agent", _userAgent); - - var serializedBody = RequestBodySerializer.Serialize(request, "JournalPrototype", "json"); - if (serializedBody != null) - { - httpRequest.Content = serializedBody; - } - - var client = _defaultClient; - if (_securitySource != null) - { - client = SecuritySerializer.Apply(_defaultClient, _securitySource); - } - - var httpResponse = await client.SendAsync(httpRequest); - - var contentType = httpResponse.Content.Headers.ContentType?.MediaType; - - var response = new Models.Operations.CreateJournalResponse - { - StatusCode = (int)httpResponse.StatusCode, - ContentType = contentType, - RawResponse = httpResponse - }; - - if((response.StatusCode == 200)) - { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) - { - response.CreateJournalResponseValue = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); - } - - return response; - } - if((response.StatusCode == 400) || (response.StatusCode == 401) || (response.StatusCode == 402) || (response.StatusCode == 403) || (response.StatusCode == 404) || (response.StatusCode == 429) || (response.StatusCode == 500) || (response.StatusCode == 503)) - { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) - { - response.ErrorMessage = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); - } - - return response; - } - return response; - } - - - - public async Task GetAsync(GetJournalRequest? request = null) - { - string baseUrl = this.SDKConfiguration.GetTemplatedServerDetails(); - var urlString = URLBuilder.Build(baseUrl, "/companies/{companyId}/data/journals/{journalId}", request); - - var httpRequest = new HttpRequestMessage(HttpMethod.Get, urlString); - httpRequest.Headers.Add("user-agent", _userAgent); - - - var client = _defaultClient; - if (_securitySource != null) - { - client = SecuritySerializer.Apply(_defaultClient, _securitySource); - } - - var httpResponse = await client.SendAsync(httpRequest); - - var contentType = httpResponse.Content.Headers.ContentType?.MediaType; - - var response = new GetJournalResponse - { - StatusCode = (int)httpResponse.StatusCode, - ContentType = contentType, - RawResponse = httpResponse - }; - - if((response.StatusCode == 200)) - { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) - { - response.Journal = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); - } - - return response; - } - if((response.StatusCode == 401) || (response.StatusCode == 402) || (response.StatusCode == 403) || (response.StatusCode == 404) || (response.StatusCode == 409) || (response.StatusCode == 429) || (response.StatusCode == 500) || (response.StatusCode == 503)) - { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) - { - response.ErrorMessage = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); - } - - return response; - } - return response; - } - - - - public async Task GetCreateModelAsync(GetCreateJournalModelRequest? request = null) - { - string baseUrl = this.SDKConfiguration.GetTemplatedServerDetails(); - var urlString = URLBuilder.Build(baseUrl, "/companies/{companyId}/connections/{connectionId}/options/journals", request); - - var httpRequest = new HttpRequestMessage(HttpMethod.Get, urlString); - httpRequest.Headers.Add("user-agent", _userAgent); - - - var client = _defaultClient; - if (_securitySource != null) - { - client = SecuritySerializer.Apply(_defaultClient, _securitySource); - } - - var httpResponse = await client.SendAsync(httpRequest); - - var contentType = httpResponse.Content.Headers.ContentType?.MediaType; - - var response = new GetCreateJournalModelResponse - { - StatusCode = (int)httpResponse.StatusCode, - ContentType = contentType, - RawResponse = httpResponse - }; - - if((response.StatusCode == 200)) - { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) - { - response.PushOption = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); - } - - return response; - } - if((response.StatusCode == 401) || (response.StatusCode == 402) || (response.StatusCode == 403) || (response.StatusCode == 404) || (response.StatusCode == 429) || (response.StatusCode == 500) || (response.StatusCode == 503)) - { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) - { - response.ErrorMessage = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); - } - - return response; - } - return response; - } - - - - public async Task ListAsync(ListJournalsRequest? request = null) - { - string baseUrl = this.SDKConfiguration.GetTemplatedServerDetails(); - var urlString = URLBuilder.Build(baseUrl, "/companies/{companyId}/data/journals", request); - - var httpRequest = new HttpRequestMessage(HttpMethod.Get, urlString); - httpRequest.Headers.Add("user-agent", _userAgent); - - - var client = _defaultClient; - if (_securitySource != null) - { - client = SecuritySerializer.Apply(_defaultClient, _securitySource); - } - - var httpResponse = await client.SendAsync(httpRequest); - - var contentType = httpResponse.Content.Headers.ContentType?.MediaType; - - var response = new ListJournalsResponse - { - StatusCode = (int)httpResponse.StatusCode, - ContentType = contentType, - RawResponse = httpResponse - }; - - if((response.StatusCode == 200)) - { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) - { - response.Journals = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); - } - - return response; - } - if((response.StatusCode == 400) || (response.StatusCode == 401) || (response.StatusCode == 402) || (response.StatusCode == 403) || (response.StatusCode == 404) || (response.StatusCode == 409) || (response.StatusCode == 429) || (response.StatusCode == 500) || (response.StatusCode == 503)) - { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) - { - response.ErrorMessage = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); - } - - return response; - } - return response; - } - - - } -} \ No newline at end of file diff --git a/sync-for-payroll/CodatSyncPayroll/ManageData.cs b/sync-for-payroll/CodatSyncPayroll/ManageData.cs deleted file mode 100644 index de4652431..000000000 --- a/sync-for-payroll/CodatSyncPayroll/ManageData.cs +++ /dev/null @@ -1,462 +0,0 @@ - -//------------------------------------------------------------------------------ -// -// This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. -// -// Changes to this file may cause incorrect behavior and will be lost when -// the code is regenerated. -// -//------------------------------------------------------------------------------ -#nullable enable -namespace Codat.Sync.Payroll -{ - using Codat.Sync.Payroll.Models.Operations; - using Codat.Sync.Payroll.Models.Shared; - using Codat.Sync.Payroll.Utils; - using Newtonsoft.Json; - using System.Collections.Generic; - using System.Net.Http.Headers; - using System.Net.Http; - using System.Threading.Tasks; - using System; - - /// - /// Asynchronously retrieve data from an integration to refresh data in Codat. - /// - public interface IManageData - { - - /// - /// Get data status - /// - /// - /// Get the state of each data type for a company - /// - /// - Task GetDataStatusAsync(GetDataStatusRequest? request = null); - - /// - /// Get pull operation - /// - /// - /// Retrieve information about a single dataset or pull operation. - /// - /// - Task GetPullOperationAsync(GetPullOperationRequest? request = null); - - /// - /// Get push operation - /// - /// - /// Retrieve push operation. - /// - /// - Task GetPushOperationAsync(GetPushOperationRequest? request = null); - - /// - /// List push operations - /// - /// - /// List push operation records. - /// - /// - Task ListAsync(ListPushOperationsRequest? request = null); - - /// - /// List pull operations - /// - /// - /// Gets the pull operation history (datasets) for a given company. - /// - /// - Task ListPullOperationsAsync(ListPullOperationsRequest? request = null); - - /// - /// Refresh all data - /// - /// - /// Refreshes all data types with `fetch on first link` set to `true` for a given company.
- ///
- /// This is an asynchronous operation, and will bring updated data into Codat from the linked integration for you to view.
- ///
- /// Read more about data type settings and `fetch on first link`. - ///
- ///
- Task RefreshAllDataTypesAsync(RefreshAllDataTypesRequest? request = null); - - /// - /// Refresh data type - /// - /// - /// Refreshes a given data type for a given company.
- ///
- /// This is an asynchronous operation, and will bring updated data into Codat from the linked integration for you to view. - ///
- ///
- Task RefreshDataTypeAsync(RefreshDataTypeRequest? request = null); - } - - /// - /// Asynchronously retrieve data from an integration to refresh data in Codat. - /// - public class ManageData: IManageData - { - public SDKConfig SDKConfiguration { get; private set; } - private const string _language = "csharp"; - private const string _sdkVersion = "3.0.0"; - private const string _sdkGenVersion = "2.257.2"; - private const string _openapiDocVersion = "3.0.0"; - private const string _userAgent = "speakeasy-sdk/csharp 3.0.0 2.257.2 3.0.0 Codat.Sync.Payroll"; - private string _serverUrl = ""; - private ISpeakeasyHttpClient _defaultClient; - private Func? _securitySource; - - public ManageData(ISpeakeasyHttpClient defaultClient, Func? securitySource, string serverUrl, SDKConfig config) - { - _defaultClient = defaultClient; - _securitySource = securitySource; - _serverUrl = serverUrl; - SDKConfiguration = config; - } - - - public async Task GetDataStatusAsync(GetDataStatusRequest? request = null) - { - string baseUrl = this.SDKConfiguration.GetTemplatedServerDetails(); - var urlString = URLBuilder.Build(baseUrl, "/companies/{companyId}/dataStatus", request); - - var httpRequest = new HttpRequestMessage(HttpMethod.Get, urlString); - httpRequest.Headers.Add("user-agent", _userAgent); - - - var client = _defaultClient; - if (_securitySource != null) - { - client = SecuritySerializer.Apply(_defaultClient, _securitySource); - } - - var httpResponse = await client.SendAsync(httpRequest); - - var contentType = httpResponse.Content.Headers.ContentType?.MediaType; - - var response = new GetDataStatusResponse - { - StatusCode = (int)httpResponse.StatusCode, - ContentType = contentType, - RawResponse = httpResponse - }; - - if((response.StatusCode == 200)) - { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) - { - response.DataStatuses = JsonConvert.DeserializeObject>(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); - } - - return response; - } - if((response.StatusCode == 401) || (response.StatusCode == 402) || (response.StatusCode == 403) || (response.StatusCode == 404) || (response.StatusCode == 429) || (response.StatusCode == 500) || (response.StatusCode == 503)) - { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) - { - response.ErrorMessage = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); - } - - return response; - } - return response; - } - - - - public async Task GetPullOperationAsync(GetPullOperationRequest? request = null) - { - string baseUrl = this.SDKConfiguration.GetTemplatedServerDetails(); - var urlString = URLBuilder.Build(baseUrl, "/companies/{companyId}/data/history/{datasetId}", request); - - var httpRequest = new HttpRequestMessage(HttpMethod.Get, urlString); - httpRequest.Headers.Add("user-agent", _userAgent); - - - var client = _defaultClient; - if (_securitySource != null) - { - client = SecuritySerializer.Apply(_defaultClient, _securitySource); - } - - var httpResponse = await client.SendAsync(httpRequest); - - var contentType = httpResponse.Content.Headers.ContentType?.MediaType; - - var response = new GetPullOperationResponse - { - StatusCode = (int)httpResponse.StatusCode, - ContentType = contentType, - RawResponse = httpResponse - }; - - if((response.StatusCode == 200)) - { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) - { - response.PullOperation = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); - } - - return response; - } - if((response.StatusCode == 401) || (response.StatusCode == 402) || (response.StatusCode == 403) || (response.StatusCode == 404) || (response.StatusCode == 429) || (response.StatusCode == 500) || (response.StatusCode == 503)) - { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) - { - response.ErrorMessage = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); - } - - return response; - } - return response; - } - - - - public async Task GetPushOperationAsync(GetPushOperationRequest? request = null) - { - string baseUrl = this.SDKConfiguration.GetTemplatedServerDetails(); - var urlString = URLBuilder.Build(baseUrl, "/companies/{companyId}/push/{pushOperationKey}", request); - - var httpRequest = new HttpRequestMessage(HttpMethod.Get, urlString); - httpRequest.Headers.Add("user-agent", _userAgent); - - - var client = _defaultClient; - if (_securitySource != null) - { - client = SecuritySerializer.Apply(_defaultClient, _securitySource); - } - - var httpResponse = await client.SendAsync(httpRequest); - - var contentType = httpResponse.Content.Headers.ContentType?.MediaType; - - var response = new GetPushOperationResponse - { - StatusCode = (int)httpResponse.StatusCode, - ContentType = contentType, - RawResponse = httpResponse - }; - - if((response.StatusCode == 200)) - { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) - { - response.PushOperation = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); - } - - return response; - } - if((response.StatusCode == 401) || (response.StatusCode == 402) || (response.StatusCode == 403) || (response.StatusCode == 404) || (response.StatusCode == 429) || (response.StatusCode == 500) || (response.StatusCode == 503)) - { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) - { - response.ErrorMessage = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); - } - - return response; - } - return response; - } - - - - public async Task ListAsync(ListPushOperationsRequest? request = null) - { - string baseUrl = this.SDKConfiguration.GetTemplatedServerDetails(); - var urlString = URLBuilder.Build(baseUrl, "/companies/{companyId}/push", request); - - var httpRequest = new HttpRequestMessage(HttpMethod.Get, urlString); - httpRequest.Headers.Add("user-agent", _userAgent); - - - var client = _defaultClient; - if (_securitySource != null) - { - client = SecuritySerializer.Apply(_defaultClient, _securitySource); - } - - var httpResponse = await client.SendAsync(httpRequest); - - var contentType = httpResponse.Content.Headers.ContentType?.MediaType; - - var response = new ListPushOperationsResponse - { - StatusCode = (int)httpResponse.StatusCode, - ContentType = contentType, - RawResponse = httpResponse - }; - - if((response.StatusCode == 200)) - { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) - { - response.PushOperations = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); - } - - return response; - } - if((response.StatusCode == 400) || (response.StatusCode == 401) || (response.StatusCode == 402) || (response.StatusCode == 403) || (response.StatusCode == 404) || (response.StatusCode == 429) || (response.StatusCode == 500) || (response.StatusCode == 503)) - { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) - { - response.ErrorMessage = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); - } - - return response; - } - return response; - } - - - - public async Task ListPullOperationsAsync(ListPullOperationsRequest? request = null) - { - string baseUrl = this.SDKConfiguration.GetTemplatedServerDetails(); - var urlString = URLBuilder.Build(baseUrl, "/companies/{companyId}/data/history", request); - - var httpRequest = new HttpRequestMessage(HttpMethod.Get, urlString); - httpRequest.Headers.Add("user-agent", _userAgent); - - - var client = _defaultClient; - if (_securitySource != null) - { - client = SecuritySerializer.Apply(_defaultClient, _securitySource); - } - - var httpResponse = await client.SendAsync(httpRequest); - - var contentType = httpResponse.Content.Headers.ContentType?.MediaType; - - var response = new ListPullOperationsResponse - { - StatusCode = (int)httpResponse.StatusCode, - ContentType = contentType, - RawResponse = httpResponse - }; - - if((response.StatusCode == 200)) - { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) - { - response.PullOperations = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); - } - - return response; - } - if((response.StatusCode == 400) || (response.StatusCode == 401) || (response.StatusCode == 402) || (response.StatusCode == 403) || (response.StatusCode == 404) || (response.StatusCode == 429) || (response.StatusCode == 500) || (response.StatusCode == 503)) - { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) - { - response.ErrorMessage = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); - } - - return response; - } - return response; - } - - - - public async Task RefreshAllDataTypesAsync(RefreshAllDataTypesRequest? request = null) - { - string baseUrl = this.SDKConfiguration.GetTemplatedServerDetails(); - var urlString = URLBuilder.Build(baseUrl, "/companies/{companyId}/data/all", request); - - var httpRequest = new HttpRequestMessage(HttpMethod.Post, urlString); - httpRequest.Headers.Add("user-agent", _userAgent); - - - var client = _defaultClient; - if (_securitySource != null) - { - client = SecuritySerializer.Apply(_defaultClient, _securitySource); - } - - var httpResponse = await client.SendAsync(httpRequest); - - var contentType = httpResponse.Content.Headers.ContentType?.MediaType; - - var response = new RefreshAllDataTypesResponse - { - StatusCode = (int)httpResponse.StatusCode, - ContentType = contentType, - RawResponse = httpResponse - }; - - if((response.StatusCode == 204)) - { - - return response; - } - if((response.StatusCode == 401) || (response.StatusCode == 402) || (response.StatusCode == 403) || (response.StatusCode == 404) || (response.StatusCode == 429) || (response.StatusCode == 500) || (response.StatusCode == 503)) - { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) - { - response.ErrorMessage = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); - } - - return response; - } - return response; - } - - - - public async Task RefreshDataTypeAsync(RefreshDataTypeRequest? request = null) - { - string baseUrl = this.SDKConfiguration.GetTemplatedServerDetails(); - var urlString = URLBuilder.Build(baseUrl, "/companies/{companyId}/data/queue/{dataType}", request); - - var httpRequest = new HttpRequestMessage(HttpMethod.Post, urlString); - httpRequest.Headers.Add("user-agent", _userAgent); - - - var client = _defaultClient; - if (_securitySource != null) - { - client = SecuritySerializer.Apply(_defaultClient, _securitySource); - } - - var httpResponse = await client.SendAsync(httpRequest); - - var contentType = httpResponse.Content.Headers.ContentType?.MediaType; - - var response = new RefreshDataTypeResponse - { - StatusCode = (int)httpResponse.StatusCode, - ContentType = contentType, - RawResponse = httpResponse - }; - - if((response.StatusCode == 200)) - { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) - { - response.PullOperation = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); - } - - return response; - } - if((response.StatusCode == 401) || (response.StatusCode == 402) || (response.StatusCode == 403) || (response.StatusCode == 404) || (response.StatusCode == 429) || (response.StatusCode == 500) || (response.StatusCode == 503)) - { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) - { - response.ErrorMessage = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); - } - - return response; - } - return response; - } - - - } -} \ No newline at end of file diff --git a/sync-for-payroll/CodatSyncPayroll/TrackingCategories.cs b/sync-for-payroll/CodatSyncPayroll/TrackingCategories.cs deleted file mode 100644 index 5f3864124..000000000 --- a/sync-for-payroll/CodatSyncPayroll/TrackingCategories.cs +++ /dev/null @@ -1,181 +0,0 @@ - -//------------------------------------------------------------------------------ -// -// This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. -// -// Changes to this file may cause incorrect behavior and will be lost when -// the code is regenerated. -// -//------------------------------------------------------------------------------ -#nullable enable -namespace Codat.Sync.Payroll -{ - using Codat.Sync.Payroll.Models.Operations; - using Codat.Sync.Payroll.Models.Shared; - using Codat.Sync.Payroll.Utils; - using Newtonsoft.Json; - using System.Net.Http.Headers; - using System.Net.Http; - using System.Threading.Tasks; - using System; - - /// - /// Tracking categories - /// - public interface ITrackingCategories - { - - /// - /// Get tracking categories - /// - /// - /// The *Get tracking category* endpoint returns a single tracking category for a given `trackingCategoryId`.
- ///
- /// Tracking categories are used to monitor cost centres and control budgets that sit outside the standard set of accounts.
- ///
- /// Check out our coverage explorer for integrations that support getting a specific tracking category.
- ///
- /// Before using this endpoint, you must have retrieved data for the company.
- /// - ///
- ///
- Task GetAsync(GetTrackingCategoryRequest? request = null); - - /// - /// List tracking categories - /// - /// - /// The *List tracking categories* endpoint returns a list of tracking categories for a given company's connection.
- ///
- /// Tracking categories are used to monitor cost centres and control budgets that sit outside the standard set of accounts.
- ///
- /// Before using this endpoint, you must have retrieved data for the company.
- /// - ///
- ///
- Task ListAsync(ListTrackingCategoriesRequest? request = null); - } - - /// - /// Tracking categories - /// - public class TrackingCategories: ITrackingCategories - { - public SDKConfig SDKConfiguration { get; private set; } - private const string _language = "csharp"; - private const string _sdkVersion = "3.0.0"; - private const string _sdkGenVersion = "2.257.2"; - private const string _openapiDocVersion = "3.0.0"; - private const string _userAgent = "speakeasy-sdk/csharp 3.0.0 2.257.2 3.0.0 Codat.Sync.Payroll"; - private string _serverUrl = ""; - private ISpeakeasyHttpClient _defaultClient; - private Func? _securitySource; - - public TrackingCategories(ISpeakeasyHttpClient defaultClient, Func? securitySource, string serverUrl, SDKConfig config) - { - _defaultClient = defaultClient; - _securitySource = securitySource; - _serverUrl = serverUrl; - SDKConfiguration = config; - } - - - public async Task GetAsync(GetTrackingCategoryRequest? request = null) - { - string baseUrl = this.SDKConfiguration.GetTemplatedServerDetails(); - var urlString = URLBuilder.Build(baseUrl, "/companies/{companyId}/data/trackingCategories/{trackingCategoryId}", request); - - var httpRequest = new HttpRequestMessage(HttpMethod.Get, urlString); - httpRequest.Headers.Add("user-agent", _userAgent); - - - var client = _defaultClient; - if (_securitySource != null) - { - client = SecuritySerializer.Apply(_defaultClient, _securitySource); - } - - var httpResponse = await client.SendAsync(httpRequest); - - var contentType = httpResponse.Content.Headers.ContentType?.MediaType; - - var response = new GetTrackingCategoryResponse - { - StatusCode = (int)httpResponse.StatusCode, - ContentType = contentType, - RawResponse = httpResponse - }; - - if((response.StatusCode == 200)) - { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) - { - response.TrackingCategoryTree = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); - } - - return response; - } - if((response.StatusCode == 401) || (response.StatusCode == 402) || (response.StatusCode == 403) || (response.StatusCode == 404) || (response.StatusCode == 409) || (response.StatusCode == 429) || (response.StatusCode == 500) || (response.StatusCode == 503)) - { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) - { - response.ErrorMessage = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); - } - - return response; - } - return response; - } - - - - public async Task ListAsync(ListTrackingCategoriesRequest? request = null) - { - string baseUrl = this.SDKConfiguration.GetTemplatedServerDetails(); - var urlString = URLBuilder.Build(baseUrl, "/companies/{companyId}/data/trackingCategories", request); - - var httpRequest = new HttpRequestMessage(HttpMethod.Get, urlString); - httpRequest.Headers.Add("user-agent", _userAgent); - - - var client = _defaultClient; - if (_securitySource != null) - { - client = SecuritySerializer.Apply(_defaultClient, _securitySource); - } - - var httpResponse = await client.SendAsync(httpRequest); - - var contentType = httpResponse.Content.Headers.ContentType?.MediaType; - - var response = new ListTrackingCategoriesResponse - { - StatusCode = (int)httpResponse.StatusCode, - ContentType = contentType, - RawResponse = httpResponse - }; - - if((response.StatusCode == 200)) - { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) - { - response.TrackingCategories = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); - } - - return response; - } - if((response.StatusCode == 400) || (response.StatusCode == 401) || (response.StatusCode == 402) || (response.StatusCode == 403) || (response.StatusCode == 404) || (response.StatusCode == 409) || (response.StatusCode == 429) || (response.StatusCode == 500) || (response.StatusCode == 503)) - { - if(Utilities.IsContentTypeMatch("application/json",response.ContentType)) - { - response.ErrorMessage = JsonConvert.DeserializeObject(await httpResponse.Content.ReadAsStringAsync(), new JsonSerializerSettings(){ NullValueHandling = NullValueHandling.Ignore, Converters = new JsonConverter[] { new FlexibleObjectDeserializer(), new EnumSerializer() }}); - } - - return response; - } - return response; - } - - - } -} \ No newline at end of file diff --git a/sync-for-payroll/CodatSyncPayroll/Utils/SpeakeasyHttpClient.cs b/sync-for-payroll/CodatSyncPayroll/Utils/SpeakeasyHttpClient.cs deleted file mode 100644 index 3ee7a12b4..000000000 --- a/sync-for-payroll/CodatSyncPayroll/Utils/SpeakeasyHttpClient.cs +++ /dev/null @@ -1,96 +0,0 @@ - -//------------------------------------------------------------------------------ -// -// This code was generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. -// -// Changes to this file may cause incorrect behavior and will be lost when -// the code is regenerated. -// -//------------------------------------------------------------------------------ -#nullable enable -namespace Codat.Sync.Payroll.Utils -{ - using System; - using System.Collections.Generic; - using System.Net.Http; - using System.Threading.Tasks; - - public interface ISpeakeasyHttpClient - { - void AddHeader(string key, string value); - void AddQueryParam(string key, string value); - Task SendAsync(HttpRequestMessage message); - } - - public class SpeakeasyHttpClient : ISpeakeasyHttpClient - { - private ISpeakeasyHttpClient? client; - - private Dictionary> headers { get; } = - new Dictionary>(); - - private Dictionary> queryParams { get; } = - new Dictionary>(); - - internal SpeakeasyHttpClient(ISpeakeasyHttpClient? client = null) - { - this.client = client; - } - - public void AddHeader(string key, string value) - { - if (headers.ContainsKey(key)) - { - headers[key].Add(value); - } - else - { - headers.Add(key, new List { value }); - } - } - - public void AddQueryParam(string key, string value) - { - if (queryParams.ContainsKey(key)) - { - queryParams[key].Add(value); - } - else - { - queryParams.Add(key, new List { value }); - } - } - - public async Task SendAsync(HttpRequestMessage message) - { - foreach(var hh in headers) - { - foreach(var hv in hh.Value) - { - message.Headers.Add(hh.Key, hv); - } - } - - /*var qp = URLBuilder.SerializeQueryParams(queryParams); - - if (qp != "") - { - if (message.uri.Query == "") - { - message.url += "?" + qp; - } - else - { - message.url += "&" + qp; - } - }*/ - - if (client != null) - { - return await client.SendAsync(message); - } - - return await new HttpClient().SendAsync(message); - } - } -} \ No newline at end of file diff --git a/sync-for-payroll/README.md b/sync-for-payroll/README.md index 8c0edf761..2f8120283 100644 --- a/sync-for-payroll/README.md +++ b/sync-for-payroll/README.md @@ -31,6 +31,11 @@ var sdk = new CodatSyncPayroll(security: new Security() { CompanyRequestBody req = new CompanyRequestBody() { Description = "Requested early access to the new financing scheme.", + Groups = new List() { + new Items() { + Id = "60d2fa12-8a04-11ee-b9d1-0242ac120002", + }, + }, Name = "Bank of Dave", }; @@ -104,8 +109,6 @@ var res = await sdk.Companies.CreateAsync(req); ## Server Selection -## Server Selection - ### Select Server by Index You can override the default server globally by passing a server index to the `serverIndex: number` optional parameter when initializing the SDK client instance. The selected server will then be used as the default on the operations that use it. This table lists the indexes associated with the available servers: @@ -131,7 +134,7 @@ This SDK supports the following security scheme globally: | Name | Type | Scheme | | ------------ | ------------ | ------------ | -| `authHeader` | apiKey | API key | +| `AuthHeader` | apiKey | API key | You can set the security parameters through the `security` optional parameter when initializing the SDK client instance. For example: ```csharp @@ -145,6 +148,11 @@ var sdk = new CodatSyncPayroll(security: new Security() { CompanyRequestBody req = new CompanyRequestBody() { Description = "Requested early access to the new financing scheme.", + Groups = new List() { + new Items() { + Id = "60d2fa12-8a04-11ee-b9d1-0242ac120002", + }, + }, Name = "Bank of Dave", }; @@ -154,6 +162,59 @@ var res = await sdk.Companies.CreateAsync(req); ``` + +## Error Handling + +Handling errors in this SDK should largely match your expectations. All operations return a response object or thow an exception. If Error objects are specified in your OpenAPI Spec, the SDK will raise the appropriate type. + +| Error Object | Status Code | Content Type | +| --------------------------------------------- | --------------------------------------------- | --------------------------------------------- | +| Codat.Sync.Payroll.Models.Errors.ErrorMessage | 400,401,402,403,429,500,503 | application/json | +| Codat.Sync.Payroll.Models.Errors.SDKException | 4xx-5xx | */* | + +### Example + +```csharp +using Codat.Sync.Payroll; +using Codat.Sync.Payroll.Models.Shared; +using System; +using Codat.Sync.Payroll.Models.Errors; +using System.Collections.Generic; + +var sdk = new CodatSyncPayroll(security: new Security() { + AuthHeader = "Basic BASE_64_ENCODED(API_KEY)", + }); + +CompanyRequestBody req = new CompanyRequestBody() { + Description = "Requested early access to the new financing scheme.", + Groups = new List() { + new Items() { + Id = "60d2fa12-8a04-11ee-b9d1-0242ac120002", + }, + }, + Name = "Bank of Dave", +}; + +try +{ + var res = await sdk.Companies.CreateAsync(req); + // handle response +} +catch (Exception ex) +{ + if (ex is ErrorMessage) + { + // handle exception + } + else if (ex is Codat.Sync.Payroll.Models.Errors.SDKException) + { + // handle exception + } +} + +``` + + diff --git a/sync-for-payroll/RELEASES.md b/sync-for-payroll/RELEASES.md index b46867c62..a82dff22a 100644 --- a/sync-for-payroll/RELEASES.md +++ b/sync-for-payroll/RELEASES.md @@ -86,4 +86,14 @@ Based on: ### Generated - [csharp v3.0.0] sync-for-payroll ### Releases -- [NuGet v3.0.0] https://www.nuget.org/packages/Codat.Sync.Payroll/3.0.0 - sync-for-payroll \ No newline at end of file +- [NuGet v3.0.0] https://www.nuget.org/packages/Codat.Sync.Payroll/3.0.0 - sync-for-payroll + +## 2024-05-02 09:22:08 +### Changes +Based on: +- OpenAPI Doc 3.0.0 https://raw.githubusercontent.com/codatio/oas/main/yaml/Codat-Sync-Payroll.yaml +- Speakeasy CLI 1.277.6 (2.319.7) https://github.com/speakeasy-api/speakeasy +### Generated +- [csharp v3.1.0] sync-for-payroll +### Releases +- [NuGet v3.1.0] https://www.nuget.org/packages/Codat.Sync.Payroll/3.1.0 - sync-for-payroll \ No newline at end of file diff --git a/sync-for-payroll/USAGE.md b/sync-for-payroll/USAGE.md index 17f9d658e..7a497f1c0 100644 --- a/sync-for-payroll/USAGE.md +++ b/sync-for-payroll/USAGE.md @@ -10,6 +10,11 @@ var sdk = new CodatSyncPayroll(security: new Security() { CompanyRequestBody req = new CompanyRequestBody() { Description = "Requested early access to the new financing scheme.", + Groups = new List() { + new Items() { + Id = "60d2fa12-8a04-11ee-b9d1-0242ac120002", + }, + }, Name = "Bank of Dave", }; diff --git a/sync-for-payroll/docs/Models/Shared/ErrorMessage.md b/sync-for-payroll/docs/Models/Errors/ErrorMessage.md similarity index 99% rename from sync-for-payroll/docs/Models/Shared/ErrorMessage.md rename to sync-for-payroll/docs/Models/Errors/ErrorMessage.md index b771df488..8e598719b 100644 --- a/sync-for-payroll/docs/Models/Shared/ErrorMessage.md +++ b/sync-for-payroll/docs/Models/Errors/ErrorMessage.md @@ -1,5 +1,7 @@ # ErrorMessage +The request made is not valid. + ## Fields diff --git a/sync-for-payroll/docs/Models/Operations/CreateAccountResponse.md b/sync-for-payroll/docs/Models/Operations/CreateAccountResponse.md index 9836b39ae..aa7b878de 100644 --- a/sync-for-payroll/docs/Models/Operations/CreateAccountResponse.md +++ b/sync-for-payroll/docs/Models/Operations/CreateAccountResponse.md @@ -7,6 +7,5 @@ | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | | `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | | `CreateAccountResponse` | [Models.Shared.CreateAccountResponse](../../Models/Shared/CreateAccountResponse.md) | :heavy_minus_sign: | Success | -| `ErrorMessage` | [ErrorMessage](../../Models/Shared/ErrorMessage.md) | :heavy_minus_sign: | The request made is not valid. | | `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | | `RawResponse` | [HttpResponseMessage](https://learn.microsoft.com/en-us/dotnet/api/system.net.http.httpresponsemessage?view=net-5.0) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/sync-for-payroll/docs/Models/Operations/CreateCompanyResponse.md b/sync-for-payroll/docs/Models/Operations/CreateCompanyResponse.md index 05e1bff26..e55617d26 100644 --- a/sync-for-payroll/docs/Models/Operations/CreateCompanyResponse.md +++ b/sync-for-payroll/docs/Models/Operations/CreateCompanyResponse.md @@ -3,10 +3,9 @@ ## Fields -| Field | Type | Required | Description | Example | -| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `Company` | [Company](../../Models/Shared/Company.md) | :heavy_minus_sign: | OK | {"id":"0498e921-9b53-4396-a412-4f2f5983b0a2","name":"string","platform":"string","redirect":"https://link.codat.io/company/27628208-459c-46a2-a705-5641ce25f739","lastSync":"2022-01-01T12:00:00.000Z","created":"2022-01-01T12:00:00.000Z","createdByUserName":"string","dataConnections":[{"id":"ee2eb431-c0fa-4dc9-93fa-d29781c12bcd","integrationId":"bf083d72-62c7-493e-aec9-81b4dbba7e2c","integrationKey":"dfxm","sourceId":"bdd831ce-eebd-4896-89a7-20e5ee8989ee","platformName":"Basiq","linkUrl":"https://link-api.codat.io/companies/86bd88cb-44ab-4dfb-b32f-87b19b14287f/connections/ee2eb431-c0fa-4dc9-93fa-d29781c12bcd/start","status":"Linked","lastSync":"2022-10-27T10:22:43.6464237Z","created":"2022-10-27T09:53:29Z","sourceType":"Banking"}],"groups":[{"id":"d7a6c4b4-dc87-45f6-b803-62f466398680"}]} | -| `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | | -| `ErrorMessage` | [ErrorMessage](../../Models/Shared/ErrorMessage.md) | :heavy_minus_sign: | The request made is not valid. | | -| `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | | -| `RawResponse` | [HttpResponseMessage](https://learn.microsoft.com/en-us/dotnet/api/system.net.http.httpresponsemessage?view=net-5.0) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | | \ No newline at end of file +| Field | Type | Required | Description | Example | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `Company` | [Company](../../Models/Shared/Company.md) | :heavy_minus_sign: | OK | {
"id": "0498e921-9b53-4396-a412-4f2f5983b0a2",
"name": "string",
"platform": "string",
"redirect": "https://link.codat.io/company/27628208-459c-46a2-a705-5641ce25f739",
"lastSync": "2022-01-01T12:00:00.000Z",
"created": "2022-01-01T12:00:00.000Z",
"createdByUserName": "string",
"dataConnections": [
{
"id": "ee2eb431-c0fa-4dc9-93fa-d29781c12bcd",
"integrationId": "bf083d72-62c7-493e-aec9-81b4dbba7e2c",
"integrationKey": "dfxm",
"sourceId": "bdd831ce-eebd-4896-89a7-20e5ee8989ee",
"platformName": "Basiq",
"linkUrl": "https://link-api.codat.io/companies/86bd88cb-44ab-4dfb-b32f-87b19b14287f/connections/ee2eb431-c0fa-4dc9-93fa-d29781c12bcd/start",
"status": "Linked",
"lastSync": "2022-10-27T10:22:43.6464237Z",
"created": "2022-10-27T09:53:29Z",
"sourceType": "Banking"
}
],
"groups": [
{
"id": "d7a6c4b4-dc87-45f6-b803-62f466398680"
}
]
} | +| `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | | +| `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | | +| `RawResponse` | [HttpResponseMessage](https://learn.microsoft.com/en-us/dotnet/api/system.net.http.httpresponsemessage?view=net-5.0) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | | \ No newline at end of file diff --git a/sync-for-payroll/docs/Models/Operations/CreateConnectionResponse.md b/sync-for-payroll/docs/Models/Operations/CreateConnectionResponse.md index 466502b00..d80303d9d 100644 --- a/sync-for-payroll/docs/Models/Operations/CreateConnectionResponse.md +++ b/sync-for-payroll/docs/Models/Operations/CreateConnectionResponse.md @@ -3,10 +3,9 @@ ## Fields -| Field | Type | Required | Description | Example | -| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `Connection` | [Connection](../../Models/Shared/Connection.md) | :heavy_minus_sign: | OK | {"id":"ee2eb431-c0fa-4dc9-93fa-d29781c12bcd","integrationId":"bf083d72-62c7-493e-aec9-81b4dbba7e2c","integrationKey":"dfxm","sourceId":"bdd831ce-eebd-4896-89a7-20e5ee8989ee","platformName":"Basiq","linkUrl":"https://link-api.codat.io/companies/86bd88cb-44ab-4dfb-b32f-87b19b14287f/connections/ee2eb431-c0fa-4dc9-93fa-d29781c12bcd/start","status":"Linked","lastSync":"2022-10-27T10:22:43.6464237Z","created":"2022-10-27T09:53:29Z","sourceType":"Banking"} | -| `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | | -| `ErrorMessage` | [ErrorMessage](../../Models/Shared/ErrorMessage.md) | :heavy_minus_sign: | Your API request was not properly authorized. | | -| `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | | -| `RawResponse` | [HttpResponseMessage](https://learn.microsoft.com/en-us/dotnet/api/system.net.http.httpresponsemessage?view=net-5.0) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `Connection` | [Connection](../../Models/Shared/Connection.md) | :heavy_minus_sign: | OK | {
"id": "ee2eb431-c0fa-4dc9-93fa-d29781c12bcd",
"integrationId": "bf083d72-62c7-493e-aec9-81b4dbba7e2c",
"integrationKey": "dfxm",
"sourceId": "bdd831ce-eebd-4896-89a7-20e5ee8989ee",
"platformName": "Basiq",
"linkUrl": "https://link-api.codat.io/companies/86bd88cb-44ab-4dfb-b32f-87b19b14287f/connections/ee2eb431-c0fa-4dc9-93fa-d29781c12bcd/start",
"status": "Linked",
"lastSync": "2022-10-27T10:22:43.6464237Z",
"created": "2022-10-27T09:53:29Z",
"sourceType": "Banking"
} | +| `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | | +| `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | | +| `RawResponse` | [HttpResponseMessage](https://learn.microsoft.com/en-us/dotnet/api/system.net.http.httpresponsemessage?view=net-5.0) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | | \ No newline at end of file diff --git a/sync-for-payroll/docs/Models/Operations/CreateJournalEntryResponse.md b/sync-for-payroll/docs/Models/Operations/CreateJournalEntryResponse.md index b401f0010..adf890e91 100644 --- a/sync-for-payroll/docs/Models/Operations/CreateJournalEntryResponse.md +++ b/sync-for-payroll/docs/Models/Operations/CreateJournalEntryResponse.md @@ -7,6 +7,5 @@ | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | | `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | | `CreateJournalEntryResponse` | [Models.Shared.CreateJournalEntryResponse](../../Models/Shared/CreateJournalEntryResponse.md) | :heavy_minus_sign: | Success | -| `ErrorMessage` | [ErrorMessage](../../Models/Shared/ErrorMessage.md) | :heavy_minus_sign: | The request made is not valid. | | `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | | `RawResponse` | [HttpResponseMessage](https://learn.microsoft.com/en-us/dotnet/api/system.net.http.httpresponsemessage?view=net-5.0) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/sync-for-payroll/docs/Models/Operations/CreateJournalResponse.md b/sync-for-payroll/docs/Models/Operations/CreateJournalResponse.md index 98bce03d4..950e2733b 100644 --- a/sync-for-payroll/docs/Models/Operations/CreateJournalResponse.md +++ b/sync-for-payroll/docs/Models/Operations/CreateJournalResponse.md @@ -7,6 +7,5 @@ | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | | `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | | `CreateJournalResponse` | [Models.Shared.CreateJournalResponse](../../Models/Shared/CreateJournalResponse.md) | :heavy_minus_sign: | Success | -| `ErrorMessage` | [ErrorMessage](../../Models/Shared/ErrorMessage.md) | :heavy_minus_sign: | The request made is not valid. | | `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | | `RawResponse` | [HttpResponseMessage](https://learn.microsoft.com/en-us/dotnet/api/system.net.http.httpresponsemessage?view=net-5.0) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/sync-for-payroll/docs/Models/Operations/DeleteCompanyResponse.md b/sync-for-payroll/docs/Models/Operations/DeleteCompanyResponse.md index 588514844..503ad0221 100644 --- a/sync-for-payroll/docs/Models/Operations/DeleteCompanyResponse.md +++ b/sync-for-payroll/docs/Models/Operations/DeleteCompanyResponse.md @@ -6,6 +6,5 @@ | Field | Type | Required | Description | | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | | `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | -| `ErrorMessage` | [ErrorMessage](../../Models/Shared/ErrorMessage.md) | :heavy_minus_sign: | Your API request was not properly authorized. | | `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | | `RawResponse` | [HttpResponseMessage](https://learn.microsoft.com/en-us/dotnet/api/system.net.http.httpresponsemessage?view=net-5.0) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/sync-for-payroll/docs/Models/Operations/DeleteConnectionResponse.md b/sync-for-payroll/docs/Models/Operations/DeleteConnectionResponse.md index e3485fe46..ce373caba 100644 --- a/sync-for-payroll/docs/Models/Operations/DeleteConnectionResponse.md +++ b/sync-for-payroll/docs/Models/Operations/DeleteConnectionResponse.md @@ -6,6 +6,5 @@ | Field | Type | Required | Description | | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | | `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | -| `ErrorMessage` | [ErrorMessage](../../Models/Shared/ErrorMessage.md) | :heavy_minus_sign: | Your API request was not properly authorized. | | `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | | `RawResponse` | [HttpResponseMessage](https://learn.microsoft.com/en-us/dotnet/api/system.net.http.httpresponsemessage?view=net-5.0) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/sync-for-payroll/docs/Models/Operations/DeleteJournalEntryResponse.md b/sync-for-payroll/docs/Models/Operations/DeleteJournalEntryResponse.md index e69ef53ee..a934ca574 100644 --- a/sync-for-payroll/docs/Models/Operations/DeleteJournalEntryResponse.md +++ b/sync-for-payroll/docs/Models/Operations/DeleteJournalEntryResponse.md @@ -6,7 +6,6 @@ | Field | Type | Required | Description | | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | | `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | -| `ErrorMessage` | [ErrorMessage](../../Models/Shared/ErrorMessage.md) | :heavy_minus_sign: | Your API request was not properly authorized. | | `PushOperation` | [PushOperation](../../Models/Shared/PushOperation.md) | :heavy_minus_sign: | OK | | `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | | `RawResponse` | [HttpResponseMessage](https://learn.microsoft.com/en-us/dotnet/api/system.net.http.httpresponsemessage?view=net-5.0) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/sync-for-payroll/docs/Models/Operations/GetAccountResponse.md b/sync-for-payroll/docs/Models/Operations/GetAccountResponse.md index 0b54c9dd7..e88a766ca 100644 --- a/sync-for-payroll/docs/Models/Operations/GetAccountResponse.md +++ b/sync-for-payroll/docs/Models/Operations/GetAccountResponse.md @@ -7,6 +7,5 @@ | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | | `Account` | [Account](../../Models/Shared/Account.md) | :heavy_minus_sign: | Success | | `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | -| `ErrorMessage` | [ErrorMessage](../../Models/Shared/ErrorMessage.md) | :heavy_minus_sign: | Your API request was not properly authorized. | | `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | | `RawResponse` | [HttpResponseMessage](https://learn.microsoft.com/en-us/dotnet/api/system.net.http.httpresponsemessage?view=net-5.0) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/sync-for-payroll/docs/Models/Operations/GetAccountingProfileResponse.md b/sync-for-payroll/docs/Models/Operations/GetAccountingProfileResponse.md index 4c8d7b83e..d86c70da6 100644 --- a/sync-for-payroll/docs/Models/Operations/GetAccountingProfileResponse.md +++ b/sync-for-payroll/docs/Models/Operations/GetAccountingProfileResponse.md @@ -3,10 +3,9 @@ ## Fields -| Field | Type | Required | Description | Example | -| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `CompanyInfo` | [Models.Shared.CompanyInfo](../../Models/Shared/CompanyInfo.md) | :heavy_minus_sign: | Success | {"companyName":"ACME Corporation","accountingPlatformRef":"4444e827-401b-4925-92cb-d79086bf3b6b","companyLegalName":"ACME Corporation Ltd.","addresses":[{"type":"Billing","line1":"Warner House","line2":"98 Theobald's Road","city":"London","region":"","country":"United Kingdom","postalcode":"WC1X 8WB"},{"type":"Unknown","line1":"123 Sierra Way","line2":"","city":"San Pablo","region":"CA","country":"","postalCode":"87999"}],"phoneNumbers":[{"number":"010 1234 5678","type":"Landline"}],"webLinks":[{"type":"Website","url":"https://www.wbsl.com/"}],"ledgerLockDate":"2019-03-04T12:08:01.881Z","registrationNumber":"1234567890","taxNumber":"GB 123456789","financialYearStartDate":"2019-04-01T00:00:00Z","baseCurrency":"USD","sourceUrls":{"url1":"https://go.xero.com/organisationlogin/default.aspx?shortcode=!rxs0Q","url2":"https://reporting.xero.com/!rxs0Q"},"createdDate":"2020-02-03T16:42:02Z"} | -| `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | | -| `ErrorMessage` | [ErrorMessage](../../Models/Shared/ErrorMessage.md) | :heavy_minus_sign: | Your API request was not properly authorized. | | -| `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | | -| `RawResponse` | [HttpResponseMessage](https://learn.microsoft.com/en-us/dotnet/api/system.net.http.httpresponsemessage?view=net-5.0) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | | \ No newline at end of file +| Field | Type | Required | Description | Example | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `CompanyInfo` | [Models.Shared.CompanyInfo](../../Models/Shared/CompanyInfo.md) | :heavy_minus_sign: | Success | {
"companyName": "ACME Corporation",
"accountingPlatformRef": "4444e827-401b-4925-92cb-d79086bf3b6b",
"companyLegalName": "ACME Corporation Ltd.",
"addresses": [
{
"type": "Billing",
"line1": "Warner House",
"line2": "98 Theobald's Road",
"city": "London",
"region": "",
"country": "United Kingdom",
"postalcode": "WC1X 8WB"
},
{
"type": "Unknown",
"line1": "123 Sierra Way",
"line2": "",
"city": "San Pablo",
"region": "CA",
"country": "",
"postalCode": "87999"
}
],
"phoneNumbers": [
{
"number": "010 1234 5678",
"type": "Landline"
}
],
"webLinks": [
{
"type": "Website",
"url": "https://www.wbsl.com/"
}
],
"ledgerLockDate": "2019-03-04T12:08:01.881Z",
"registrationNumber": "1234567890",
"taxNumber": "GB 123456789",
"financialYearStartDate": "2019-04-01T00:00:00Z",
"baseCurrency": "USD",
"sourceUrls": {
"url1": "https://go.xero.com/organisationlogin/default.aspx?shortcode=!rxs0Q",
"url2": "https://reporting.xero.com/!rxs0Q"
},
"createdDate": "2020-02-03T16:42:02Z"
} | +| `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | | +| `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | | +| `RawResponse` | [HttpResponseMessage](https://learn.microsoft.com/en-us/dotnet/api/system.net.http.httpresponsemessage?view=net-5.0) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | | \ No newline at end of file diff --git a/sync-for-payroll/docs/Models/Operations/GetCompanyResponse.md b/sync-for-payroll/docs/Models/Operations/GetCompanyResponse.md index 4185a97cc..b900d0525 100644 --- a/sync-for-payroll/docs/Models/Operations/GetCompanyResponse.md +++ b/sync-for-payroll/docs/Models/Operations/GetCompanyResponse.md @@ -3,10 +3,9 @@ ## Fields -| Field | Type | Required | Description | Example | -| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `Company` | [Company](../../Models/Shared/Company.md) | :heavy_minus_sign: | OK | {"id":"0498e921-9b53-4396-a412-4f2f5983b0a2","name":"string","platform":"string","redirect":"https://link.codat.io/company/27628208-459c-46a2-a705-5641ce25f739","lastSync":"2022-01-01T12:00:00.000Z","created":"2022-01-01T12:00:00.000Z","createdByUserName":"string","dataConnections":[{"id":"ee2eb431-c0fa-4dc9-93fa-d29781c12bcd","integrationId":"bf083d72-62c7-493e-aec9-81b4dbba7e2c","integrationKey":"dfxm","sourceId":"bdd831ce-eebd-4896-89a7-20e5ee8989ee","platformName":"Basiq","linkUrl":"https://link-api.codat.io/companies/86bd88cb-44ab-4dfb-b32f-87b19b14287f/connections/ee2eb431-c0fa-4dc9-93fa-d29781c12bcd/start","status":"Linked","lastSync":"2022-10-27T10:22:43.6464237Z","created":"2022-10-27T09:53:29Z","sourceType":"Banking"}],"groups":[{"id":"d7a6c4b4-dc87-45f6-b803-62f466398680"}]} | -| `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | | -| `ErrorMessage` | [ErrorMessage](../../Models/Shared/ErrorMessage.md) | :heavy_minus_sign: | Your API request was not properly authorized. | | -| `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | | -| `RawResponse` | [HttpResponseMessage](https://learn.microsoft.com/en-us/dotnet/api/system.net.http.httpresponsemessage?view=net-5.0) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | | \ No newline at end of file +| Field | Type | Required | Description | Example | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `Company` | [Company](../../Models/Shared/Company.md) | :heavy_minus_sign: | OK | {
"id": "0498e921-9b53-4396-a412-4f2f5983b0a2",
"name": "string",
"platform": "string",
"redirect": "https://link.codat.io/company/27628208-459c-46a2-a705-5641ce25f739",
"lastSync": "2022-01-01T12:00:00.000Z",
"created": "2022-01-01T12:00:00.000Z",
"createdByUserName": "string",
"dataConnections": [
{
"id": "ee2eb431-c0fa-4dc9-93fa-d29781c12bcd",
"integrationId": "bf083d72-62c7-493e-aec9-81b4dbba7e2c",
"integrationKey": "dfxm",
"sourceId": "bdd831ce-eebd-4896-89a7-20e5ee8989ee",
"platformName": "Basiq",
"linkUrl": "https://link-api.codat.io/companies/86bd88cb-44ab-4dfb-b32f-87b19b14287f/connections/ee2eb431-c0fa-4dc9-93fa-d29781c12bcd/start",
"status": "Linked",
"lastSync": "2022-10-27T10:22:43.6464237Z",
"created": "2022-10-27T09:53:29Z",
"sourceType": "Banking"
}
],
"groups": [
{
"id": "d7a6c4b4-dc87-45f6-b803-62f466398680"
}
]
} | +| `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | | +| `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | | +| `RawResponse` | [HttpResponseMessage](https://learn.microsoft.com/en-us/dotnet/api/system.net.http.httpresponsemessage?view=net-5.0) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | | \ No newline at end of file diff --git a/sync-for-payroll/docs/Models/Operations/GetConnectionResponse.md b/sync-for-payroll/docs/Models/Operations/GetConnectionResponse.md index 7ba79531f..76a252015 100644 --- a/sync-for-payroll/docs/Models/Operations/GetConnectionResponse.md +++ b/sync-for-payroll/docs/Models/Operations/GetConnectionResponse.md @@ -3,10 +3,9 @@ ## Fields -| Field | Type | Required | Description | Example | -| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `Connection` | [Connection](../../Models/Shared/Connection.md) | :heavy_minus_sign: | OK | {"id":"ee2eb431-c0fa-4dc9-93fa-d29781c12bcd","integrationId":"bf083d72-62c7-493e-aec9-81b4dbba7e2c","integrationKey":"dfxm","sourceId":"bdd831ce-eebd-4896-89a7-20e5ee8989ee","platformName":"Basiq","linkUrl":"https://link-api.codat.io/companies/86bd88cb-44ab-4dfb-b32f-87b19b14287f/connections/ee2eb431-c0fa-4dc9-93fa-d29781c12bcd/start","status":"Linked","lastSync":"2022-10-27T10:22:43.6464237Z","created":"2022-10-27T09:53:29Z","sourceType":"Banking"} | -| `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | | -| `ErrorMessage` | [ErrorMessage](../../Models/Shared/ErrorMessage.md) | :heavy_minus_sign: | Your API request was not properly authorized. | | -| `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | | -| `RawResponse` | [HttpResponseMessage](https://learn.microsoft.com/en-us/dotnet/api/system.net.http.httpresponsemessage?view=net-5.0) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `Connection` | [Connection](../../Models/Shared/Connection.md) | :heavy_minus_sign: | OK | {
"id": "ee2eb431-c0fa-4dc9-93fa-d29781c12bcd",
"integrationId": "bf083d72-62c7-493e-aec9-81b4dbba7e2c",
"integrationKey": "dfxm",
"sourceId": "bdd831ce-eebd-4896-89a7-20e5ee8989ee",
"platformName": "Basiq",
"linkUrl": "https://link-api.codat.io/companies/86bd88cb-44ab-4dfb-b32f-87b19b14287f/connections/ee2eb431-c0fa-4dc9-93fa-d29781c12bcd/start",
"status": "Linked",
"lastSync": "2022-10-27T10:22:43.6464237Z",
"created": "2022-10-27T09:53:29Z",
"sourceType": "Banking"
} | +| `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | | +| `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | | +| `RawResponse` | [HttpResponseMessage](https://learn.microsoft.com/en-us/dotnet/api/system.net.http.httpresponsemessage?view=net-5.0) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | | \ No newline at end of file diff --git a/sync-for-payroll/docs/Models/Operations/GetCreateAccountsModelResponse.md b/sync-for-payroll/docs/Models/Operations/GetCreateAccountsModelResponse.md index 074c384ff..1cff04d88 100644 --- a/sync-for-payroll/docs/Models/Operations/GetCreateAccountsModelResponse.md +++ b/sync-for-payroll/docs/Models/Operations/GetCreateAccountsModelResponse.md @@ -6,7 +6,6 @@ | Field | Type | Required | Description | | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | | `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | -| `ErrorMessage` | [ErrorMessage](../../Models/Shared/ErrorMessage.md) | :heavy_minus_sign: | Your API request was not properly authorized. | | `PushOption` | [PushOption](../../Models/Shared/PushOption.md) | :heavy_minus_sign: | OK | | `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | | `RawResponse` | [HttpResponseMessage](https://learn.microsoft.com/en-us/dotnet/api/system.net.http.httpresponsemessage?view=net-5.0) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/sync-for-payroll/docs/Models/Operations/GetCreateJournalEntryModelResponse.md b/sync-for-payroll/docs/Models/Operations/GetCreateJournalEntryModelResponse.md index 967b84d6e..9fc7bc193 100644 --- a/sync-for-payroll/docs/Models/Operations/GetCreateJournalEntryModelResponse.md +++ b/sync-for-payroll/docs/Models/Operations/GetCreateJournalEntryModelResponse.md @@ -6,7 +6,6 @@ | Field | Type | Required | Description | | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | | `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | -| `ErrorMessage` | [ErrorMessage](../../Models/Shared/ErrorMessage.md) | :heavy_minus_sign: | Your API request was not properly authorized. | | `PushOption` | [PushOption](../../Models/Shared/PushOption.md) | :heavy_minus_sign: | OK | | `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | | `RawResponse` | [HttpResponseMessage](https://learn.microsoft.com/en-us/dotnet/api/system.net.http.httpresponsemessage?view=net-5.0) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/sync-for-payroll/docs/Models/Operations/GetCreateJournalModelResponse.md b/sync-for-payroll/docs/Models/Operations/GetCreateJournalModelResponse.md index ef37b5e99..4d37b3c9a 100644 --- a/sync-for-payroll/docs/Models/Operations/GetCreateJournalModelResponse.md +++ b/sync-for-payroll/docs/Models/Operations/GetCreateJournalModelResponse.md @@ -6,7 +6,6 @@ | Field | Type | Required | Description | | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | | `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | -| `ErrorMessage` | [ErrorMessage](../../Models/Shared/ErrorMessage.md) | :heavy_minus_sign: | Your API request was not properly authorized. | | `PushOption` | [PushOption](../../Models/Shared/PushOption.md) | :heavy_minus_sign: | OK | | `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | | `RawResponse` | [HttpResponseMessage](https://learn.microsoft.com/en-us/dotnet/api/system.net.http.httpresponsemessage?view=net-5.0) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/sync-for-payroll/docs/Models/Operations/GetDataStatusDataStatuses.md b/sync-for-payroll/docs/Models/Operations/GetDataStatusDataStatuses.md new file mode 100644 index 000000000..39d851e3d --- /dev/null +++ b/sync-for-payroll/docs/Models/Operations/GetDataStatusDataStatuses.md @@ -0,0 +1,52 @@ +# GetDataStatusDataStatuses + +OK + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `AccountTransactions` | [DataStatus](../../Models/Shared/DataStatus.md) | :heavy_minus_sign: | Describes the state of data in the Codat cache for a company and data type | {
"dataType": "string",
"lastSuccessfulSync": "2022-01-01T13:00:00.000Z",
"currentStatus": "string",
"latestSyncId": "ad474a37-2003-478e-baee-9af9f1ec2fe3",
"latestSuccessfulSyncId": "8220fc90-55b6-47bc-9417-48ac6ea93101"
} | +| `BalanceSheet` | [DataStatus](../../Models/Shared/DataStatus.md) | :heavy_minus_sign: | Describes the state of data in the Codat cache for a company and data type | {
"dataType": "string",
"lastSuccessfulSync": "2022-01-01T13:00:00.000Z",
"currentStatus": "string",
"latestSyncId": "ad474a37-2003-478e-baee-9af9f1ec2fe3",
"latestSuccessfulSyncId": "8220fc90-55b6-47bc-9417-48ac6ea93101"
} | +| `BankAccounts` | [DataStatus](../../Models/Shared/DataStatus.md) | :heavy_minus_sign: | Describes the state of data in the Codat cache for a company and data type | {
"dataType": "string",
"lastSuccessfulSync": "2022-01-01T13:00:00.000Z",
"currentStatus": "string",
"latestSyncId": "ad474a37-2003-478e-baee-9af9f1ec2fe3",
"latestSuccessfulSyncId": "8220fc90-55b6-47bc-9417-48ac6ea93101"
} | +| `BankTransactions` | [DataStatus](../../Models/Shared/DataStatus.md) | :heavy_minus_sign: | Describes the state of data in the Codat cache for a company and data type | {
"dataType": "string",
"lastSuccessfulSync": "2022-01-01T13:00:00.000Z",
"currentStatus": "string",
"latestSyncId": "ad474a37-2003-478e-baee-9af9f1ec2fe3",
"latestSuccessfulSyncId": "8220fc90-55b6-47bc-9417-48ac6ea93101"
} | +| `BankingAccountBalances` | [DataStatus](../../Models/Shared/DataStatus.md) | :heavy_minus_sign: | Describes the state of data in the Codat cache for a company and data type | {
"dataType": "string",
"lastSuccessfulSync": "2022-01-01T13:00:00.000Z",
"currentStatus": "string",
"latestSyncId": "ad474a37-2003-478e-baee-9af9f1ec2fe3",
"latestSuccessfulSyncId": "8220fc90-55b6-47bc-9417-48ac6ea93101"
} | +| `BankingAccounts` | [DataStatus](../../Models/Shared/DataStatus.md) | :heavy_minus_sign: | Describes the state of data in the Codat cache for a company and data type | {
"dataType": "string",
"lastSuccessfulSync": "2022-01-01T13:00:00.000Z",
"currentStatus": "string",
"latestSyncId": "ad474a37-2003-478e-baee-9af9f1ec2fe3",
"latestSuccessfulSyncId": "8220fc90-55b6-47bc-9417-48ac6ea93101"
} | +| `BankingTransactionCategories` | [DataStatus](../../Models/Shared/DataStatus.md) | :heavy_minus_sign: | Describes the state of data in the Codat cache for a company and data type | {
"dataType": "string",
"lastSuccessfulSync": "2022-01-01T13:00:00.000Z",
"currentStatus": "string",
"latestSyncId": "ad474a37-2003-478e-baee-9af9f1ec2fe3",
"latestSuccessfulSyncId": "8220fc90-55b6-47bc-9417-48ac6ea93101"
} | +| `BankingTransactions` | [DataStatus](../../Models/Shared/DataStatus.md) | :heavy_minus_sign: | Describes the state of data in the Codat cache for a company and data type | {
"dataType": "string",
"lastSuccessfulSync": "2022-01-01T13:00:00.000Z",
"currentStatus": "string",
"latestSyncId": "ad474a37-2003-478e-baee-9af9f1ec2fe3",
"latestSuccessfulSyncId": "8220fc90-55b6-47bc-9417-48ac6ea93101"
} | +| `BillCreditNotes` | [DataStatus](../../Models/Shared/DataStatus.md) | :heavy_minus_sign: | Describes the state of data in the Codat cache for a company and data type | {
"dataType": "string",
"lastSuccessfulSync": "2022-01-01T13:00:00.000Z",
"currentStatus": "string",
"latestSyncId": "ad474a37-2003-478e-baee-9af9f1ec2fe3",
"latestSuccessfulSyncId": "8220fc90-55b6-47bc-9417-48ac6ea93101"
} | +| `BillPayments` | [DataStatus](../../Models/Shared/DataStatus.md) | :heavy_minus_sign: | Describes the state of data in the Codat cache for a company and data type | {
"dataType": "string",
"lastSuccessfulSync": "2022-01-01T13:00:00.000Z",
"currentStatus": "string",
"latestSyncId": "ad474a37-2003-478e-baee-9af9f1ec2fe3",
"latestSuccessfulSyncId": "8220fc90-55b6-47bc-9417-48ac6ea93101"
} | +| `Bills` | [DataStatus](../../Models/Shared/DataStatus.md) | :heavy_minus_sign: | Describes the state of data in the Codat cache for a company and data type | {
"dataType": "string",
"lastSuccessfulSync": "2022-01-01T13:00:00.000Z",
"currentStatus": "string",
"latestSyncId": "ad474a37-2003-478e-baee-9af9f1ec2fe3",
"latestSuccessfulSyncId": "8220fc90-55b6-47bc-9417-48ac6ea93101"
} | +| `CashFlowStatement` | [DataStatus](../../Models/Shared/DataStatus.md) | :heavy_minus_sign: | Describes the state of data in the Codat cache for a company and data type | {
"dataType": "string",
"lastSuccessfulSync": "2022-01-01T13:00:00.000Z",
"currentStatus": "string",
"latestSyncId": "ad474a37-2003-478e-baee-9af9f1ec2fe3",
"latestSuccessfulSyncId": "8220fc90-55b6-47bc-9417-48ac6ea93101"
} | +| `ChartOfAccounts` | [DataStatus](../../Models/Shared/DataStatus.md) | :heavy_minus_sign: | Describes the state of data in the Codat cache for a company and data type | {
"dataType": "string",
"lastSuccessfulSync": "2022-01-01T13:00:00.000Z",
"currentStatus": "string",
"latestSyncId": "ad474a37-2003-478e-baee-9af9f1ec2fe3",
"latestSuccessfulSyncId": "8220fc90-55b6-47bc-9417-48ac6ea93101"
} | +| `CommerceCompanyInfo` | [DataStatus](../../Models/Shared/DataStatus.md) | :heavy_minus_sign: | Describes the state of data in the Codat cache for a company and data type | {
"dataType": "string",
"lastSuccessfulSync": "2022-01-01T13:00:00.000Z",
"currentStatus": "string",
"latestSyncId": "ad474a37-2003-478e-baee-9af9f1ec2fe3",
"latestSuccessfulSyncId": "8220fc90-55b6-47bc-9417-48ac6ea93101"
} | +| `CommerceCustomers` | [DataStatus](../../Models/Shared/DataStatus.md) | :heavy_minus_sign: | Describes the state of data in the Codat cache for a company and data type | {
"dataType": "string",
"lastSuccessfulSync": "2022-01-01T13:00:00.000Z",
"currentStatus": "string",
"latestSyncId": "ad474a37-2003-478e-baee-9af9f1ec2fe3",
"latestSuccessfulSyncId": "8220fc90-55b6-47bc-9417-48ac6ea93101"
} | +| `CommerceDisputes` | [DataStatus](../../Models/Shared/DataStatus.md) | :heavy_minus_sign: | Describes the state of data in the Codat cache for a company and data type | {
"dataType": "string",
"lastSuccessfulSync": "2022-01-01T13:00:00.000Z",
"currentStatus": "string",
"latestSyncId": "ad474a37-2003-478e-baee-9af9f1ec2fe3",
"latestSuccessfulSyncId": "8220fc90-55b6-47bc-9417-48ac6ea93101"
} | +| `CommerceLocations` | [DataStatus](../../Models/Shared/DataStatus.md) | :heavy_minus_sign: | Describes the state of data in the Codat cache for a company and data type | {
"dataType": "string",
"lastSuccessfulSync": "2022-01-01T13:00:00.000Z",
"currentStatus": "string",
"latestSyncId": "ad474a37-2003-478e-baee-9af9f1ec2fe3",
"latestSuccessfulSyncId": "8220fc90-55b6-47bc-9417-48ac6ea93101"
} | +| `CommerceOrders` | [DataStatus](../../Models/Shared/DataStatus.md) | :heavy_minus_sign: | Describes the state of data in the Codat cache for a company and data type | {
"dataType": "string",
"lastSuccessfulSync": "2022-01-01T13:00:00.000Z",
"currentStatus": "string",
"latestSyncId": "ad474a37-2003-478e-baee-9af9f1ec2fe3",
"latestSuccessfulSyncId": "8220fc90-55b6-47bc-9417-48ac6ea93101"
} | +| `CommercePaymentMethods` | [DataStatus](../../Models/Shared/DataStatus.md) | :heavy_minus_sign: | Describes the state of data in the Codat cache for a company and data type | {
"dataType": "string",
"lastSuccessfulSync": "2022-01-01T13:00:00.000Z",
"currentStatus": "string",
"latestSyncId": "ad474a37-2003-478e-baee-9af9f1ec2fe3",
"latestSuccessfulSyncId": "8220fc90-55b6-47bc-9417-48ac6ea93101"
} | +| `CommercePayments` | [DataStatus](../../Models/Shared/DataStatus.md) | :heavy_minus_sign: | Describes the state of data in the Codat cache for a company and data type | {
"dataType": "string",
"lastSuccessfulSync": "2022-01-01T13:00:00.000Z",
"currentStatus": "string",
"latestSyncId": "ad474a37-2003-478e-baee-9af9f1ec2fe3",
"latestSuccessfulSyncId": "8220fc90-55b6-47bc-9417-48ac6ea93101"
} | +| `CommerceProductCategories` | [DataStatus](../../Models/Shared/DataStatus.md) | :heavy_minus_sign: | Describes the state of data in the Codat cache for a company and data type | {
"dataType": "string",
"lastSuccessfulSync": "2022-01-01T13:00:00.000Z",
"currentStatus": "string",
"latestSyncId": "ad474a37-2003-478e-baee-9af9f1ec2fe3",
"latestSuccessfulSyncId": "8220fc90-55b6-47bc-9417-48ac6ea93101"
} | +| `CommerceProducts` | [DataStatus](../../Models/Shared/DataStatus.md) | :heavy_minus_sign: | Describes the state of data in the Codat cache for a company and data type | {
"dataType": "string",
"lastSuccessfulSync": "2022-01-01T13:00:00.000Z",
"currentStatus": "string",
"latestSyncId": "ad474a37-2003-478e-baee-9af9f1ec2fe3",
"latestSuccessfulSyncId": "8220fc90-55b6-47bc-9417-48ac6ea93101"
} | +| `CommerceTaxComponents` | [DataStatus](../../Models/Shared/DataStatus.md) | :heavy_minus_sign: | Describes the state of data in the Codat cache for a company and data type | {
"dataType": "string",
"lastSuccessfulSync": "2022-01-01T13:00:00.000Z",
"currentStatus": "string",
"latestSyncId": "ad474a37-2003-478e-baee-9af9f1ec2fe3",
"latestSuccessfulSyncId": "8220fc90-55b6-47bc-9417-48ac6ea93101"
} | +| `CommerceTransactions` | [DataStatus](../../Models/Shared/DataStatus.md) | :heavy_minus_sign: | Describes the state of data in the Codat cache for a company and data type | {
"dataType": "string",
"lastSuccessfulSync": "2022-01-01T13:00:00.000Z",
"currentStatus": "string",
"latestSyncId": "ad474a37-2003-478e-baee-9af9f1ec2fe3",
"latestSuccessfulSyncId": "8220fc90-55b6-47bc-9417-48ac6ea93101"
} | +| `Company` | [DataStatus](../../Models/Shared/DataStatus.md) | :heavy_minus_sign: | Describes the state of data in the Codat cache for a company and data type | {
"dataType": "string",
"lastSuccessfulSync": "2022-01-01T13:00:00.000Z",
"currentStatus": "string",
"latestSyncId": "ad474a37-2003-478e-baee-9af9f1ec2fe3",
"latestSuccessfulSyncId": "8220fc90-55b6-47bc-9417-48ac6ea93101"
} | +| `CreditNotes` | [DataStatus](../../Models/Shared/DataStatus.md) | :heavy_minus_sign: | Describes the state of data in the Codat cache for a company and data type | {
"dataType": "string",
"lastSuccessfulSync": "2022-01-01T13:00:00.000Z",
"currentStatus": "string",
"latestSyncId": "ad474a37-2003-478e-baee-9af9f1ec2fe3",
"latestSuccessfulSyncId": "8220fc90-55b6-47bc-9417-48ac6ea93101"
} | +| `Customers` | [DataStatus](../../Models/Shared/DataStatus.md) | :heavy_minus_sign: | Describes the state of data in the Codat cache for a company and data type | {
"dataType": "string",
"lastSuccessfulSync": "2022-01-01T13:00:00.000Z",
"currentStatus": "string",
"latestSyncId": "ad474a37-2003-478e-baee-9af9f1ec2fe3",
"latestSuccessfulSyncId": "8220fc90-55b6-47bc-9417-48ac6ea93101"
} | +| `DirectCosts` | [DataStatus](../../Models/Shared/DataStatus.md) | :heavy_minus_sign: | Describes the state of data in the Codat cache for a company and data type | {
"dataType": "string",
"lastSuccessfulSync": "2022-01-01T13:00:00.000Z",
"currentStatus": "string",
"latestSyncId": "ad474a37-2003-478e-baee-9af9f1ec2fe3",
"latestSuccessfulSyncId": "8220fc90-55b6-47bc-9417-48ac6ea93101"
} | +| `DirectIncomes` | [DataStatus](../../Models/Shared/DataStatus.md) | :heavy_minus_sign: | Describes the state of data in the Codat cache for a company and data type | {
"dataType": "string",
"lastSuccessfulSync": "2022-01-01T13:00:00.000Z",
"currentStatus": "string",
"latestSyncId": "ad474a37-2003-478e-baee-9af9f1ec2fe3",
"latestSuccessfulSyncId": "8220fc90-55b6-47bc-9417-48ac6ea93101"
} | +| `Invoices` | [DataStatus](../../Models/Shared/DataStatus.md) | :heavy_minus_sign: | Describes the state of data in the Codat cache for a company and data type | {
"dataType": "string",
"lastSuccessfulSync": "2022-01-01T13:00:00.000Z",
"currentStatus": "string",
"latestSyncId": "ad474a37-2003-478e-baee-9af9f1ec2fe3",
"latestSuccessfulSyncId": "8220fc90-55b6-47bc-9417-48ac6ea93101"
} | +| `ItemReceipts` | [DataStatus](../../Models/Shared/DataStatus.md) | :heavy_minus_sign: | Describes the state of data in the Codat cache for a company and data type | {
"dataType": "string",
"lastSuccessfulSync": "2022-01-01T13:00:00.000Z",
"currentStatus": "string",
"latestSyncId": "ad474a37-2003-478e-baee-9af9f1ec2fe3",
"latestSuccessfulSyncId": "8220fc90-55b6-47bc-9417-48ac6ea93101"
} | +| `Items` | [DataStatus](../../Models/Shared/DataStatus.md) | :heavy_minus_sign: | Describes the state of data in the Codat cache for a company and data type | {
"dataType": "string",
"lastSuccessfulSync": "2022-01-01T13:00:00.000Z",
"currentStatus": "string",
"latestSyncId": "ad474a37-2003-478e-baee-9af9f1ec2fe3",
"latestSuccessfulSyncId": "8220fc90-55b6-47bc-9417-48ac6ea93101"
} | +| `JournalEntries` | [DataStatus](../../Models/Shared/DataStatus.md) | :heavy_minus_sign: | Describes the state of data in the Codat cache for a company and data type | {
"dataType": "string",
"lastSuccessfulSync": "2022-01-01T13:00:00.000Z",
"currentStatus": "string",
"latestSyncId": "ad474a37-2003-478e-baee-9af9f1ec2fe3",
"latestSuccessfulSyncId": "8220fc90-55b6-47bc-9417-48ac6ea93101"
} | +| `Journals` | [DataStatus](../../Models/Shared/DataStatus.md) | :heavy_minus_sign: | Describes the state of data in the Codat cache for a company and data type | {
"dataType": "string",
"lastSuccessfulSync": "2022-01-01T13:00:00.000Z",
"currentStatus": "string",
"latestSyncId": "ad474a37-2003-478e-baee-9af9f1ec2fe3",
"latestSuccessfulSyncId": "8220fc90-55b6-47bc-9417-48ac6ea93101"
} | +| `PaymentMethods` | [DataStatus](../../Models/Shared/DataStatus.md) | :heavy_minus_sign: | Describes the state of data in the Codat cache for a company and data type | {
"dataType": "string",
"lastSuccessfulSync": "2022-01-01T13:00:00.000Z",
"currentStatus": "string",
"latestSyncId": "ad474a37-2003-478e-baee-9af9f1ec2fe3",
"latestSuccessfulSyncId": "8220fc90-55b6-47bc-9417-48ac6ea93101"
} | +| `Payments` | [DataStatus](../../Models/Shared/DataStatus.md) | :heavy_minus_sign: | Describes the state of data in the Codat cache for a company and data type | {
"dataType": "string",
"lastSuccessfulSync": "2022-01-01T13:00:00.000Z",
"currentStatus": "string",
"latestSyncId": "ad474a37-2003-478e-baee-9af9f1ec2fe3",
"latestSuccessfulSyncId": "8220fc90-55b6-47bc-9417-48ac6ea93101"
} | +| `ProfitAndLoss` | [DataStatus](../../Models/Shared/DataStatus.md) | :heavy_minus_sign: | Describes the state of data in the Codat cache for a company and data type | {
"dataType": "string",
"lastSuccessfulSync": "2022-01-01T13:00:00.000Z",
"currentStatus": "string",
"latestSyncId": "ad474a37-2003-478e-baee-9af9f1ec2fe3",
"latestSuccessfulSyncId": "8220fc90-55b6-47bc-9417-48ac6ea93101"
} | +| `PurchaseOrders` | [DataStatus](../../Models/Shared/DataStatus.md) | :heavy_minus_sign: | Describes the state of data in the Codat cache for a company and data type | {
"dataType": "string",
"lastSuccessfulSync": "2022-01-01T13:00:00.000Z",
"currentStatus": "string",
"latestSyncId": "ad474a37-2003-478e-baee-9af9f1ec2fe3",
"latestSuccessfulSyncId": "8220fc90-55b6-47bc-9417-48ac6ea93101"
} | +| `SalesOrders` | [DataStatus](../../Models/Shared/DataStatus.md) | :heavy_minus_sign: | Describes the state of data in the Codat cache for a company and data type | {
"dataType": "string",
"lastSuccessfulSync": "2022-01-01T13:00:00.000Z",
"currentStatus": "string",
"latestSyncId": "ad474a37-2003-478e-baee-9af9f1ec2fe3",
"latestSuccessfulSyncId": "8220fc90-55b6-47bc-9417-48ac6ea93101"
} | +| `Suppliers` | [DataStatus](../../Models/Shared/DataStatus.md) | :heavy_minus_sign: | Describes the state of data in the Codat cache for a company and data type | {
"dataType": "string",
"lastSuccessfulSync": "2022-01-01T13:00:00.000Z",
"currentStatus": "string",
"latestSyncId": "ad474a37-2003-478e-baee-9af9f1ec2fe3",
"latestSuccessfulSyncId": "8220fc90-55b6-47bc-9417-48ac6ea93101"
} | +| `TaxRates` | [DataStatus](../../Models/Shared/DataStatus.md) | :heavy_minus_sign: | Describes the state of data in the Codat cache for a company and data type | {
"dataType": "string",
"lastSuccessfulSync": "2022-01-01T13:00:00.000Z",
"currentStatus": "string",
"latestSyncId": "ad474a37-2003-478e-baee-9af9f1ec2fe3",
"latestSuccessfulSyncId": "8220fc90-55b6-47bc-9417-48ac6ea93101"
} | +| `TrackingCategories` | [DataStatus](../../Models/Shared/DataStatus.md) | :heavy_minus_sign: | Describes the state of data in the Codat cache for a company and data type | {
"dataType": "string",
"lastSuccessfulSync": "2022-01-01T13:00:00.000Z",
"currentStatus": "string",
"latestSyncId": "ad474a37-2003-478e-baee-9af9f1ec2fe3",
"latestSuccessfulSyncId": "8220fc90-55b6-47bc-9417-48ac6ea93101"
} | +| `Transfers` | [DataStatus](../../Models/Shared/DataStatus.md) | :heavy_minus_sign: | Describes the state of data in the Codat cache for a company and data type | {
"dataType": "string",
"lastSuccessfulSync": "2022-01-01T13:00:00.000Z",
"currentStatus": "string",
"latestSyncId": "ad474a37-2003-478e-baee-9af9f1ec2fe3",
"latestSuccessfulSyncId": "8220fc90-55b6-47bc-9417-48ac6ea93101"
} | \ No newline at end of file diff --git a/sync-for-payroll/docs/Models/Operations/GetDataStatusResponse.md b/sync-for-payroll/docs/Models/Operations/GetDataStatusResponse.md index eb5b1c9c8..2c2fd5f69 100644 --- a/sync-for-payroll/docs/Models/Operations/GetDataStatusResponse.md +++ b/sync-for-payroll/docs/Models/Operations/GetDataStatusResponse.md @@ -6,7 +6,6 @@ | Field | Type | Required | Description | | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | | `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | -| `DataStatuses` | Dictionary | :heavy_minus_sign: | OK | -| `ErrorMessage` | [ErrorMessage](../../Models/Shared/ErrorMessage.md) | :heavy_minus_sign: | Your API request was not properly authorized. | +| `DataStatuses` | [GetDataStatusDataStatuses](../../Models/Operations/GetDataStatusDataStatuses.md) | :heavy_minus_sign: | OK | | `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | | `RawResponse` | [HttpResponseMessage](https://learn.microsoft.com/en-us/dotnet/api/system.net.http.httpresponsemessage?view=net-5.0) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/sync-for-payroll/docs/Models/Operations/GetJournalEntryResponse.md b/sync-for-payroll/docs/Models/Operations/GetJournalEntryResponse.md index 4154d0090..b700d5611 100644 --- a/sync-for-payroll/docs/Models/Operations/GetJournalEntryResponse.md +++ b/sync-for-payroll/docs/Models/Operations/GetJournalEntryResponse.md @@ -6,7 +6,6 @@ | Field | Type | Required | Description | | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | | `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | -| `ErrorMessage` | [ErrorMessage](../../Models/Shared/ErrorMessage.md) | :heavy_minus_sign: | Your API request was not properly authorized. | | `JournalEntry` | [JournalEntry](../../Models/Shared/JournalEntry.md) | :heavy_minus_sign: | Success | | `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | | `RawResponse` | [HttpResponseMessage](https://learn.microsoft.com/en-us/dotnet/api/system.net.http.httpresponsemessage?view=net-5.0) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/sync-for-payroll/docs/Models/Operations/GetJournalResponse.md b/sync-for-payroll/docs/Models/Operations/GetJournalResponse.md index db2ad669d..8b31247c4 100644 --- a/sync-for-payroll/docs/Models/Operations/GetJournalResponse.md +++ b/sync-for-payroll/docs/Models/Operations/GetJournalResponse.md @@ -6,7 +6,6 @@ | Field | Type | Required | Description | | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | | `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | -| `ErrorMessage` | [ErrorMessage](../../Models/Shared/ErrorMessage.md) | :heavy_minus_sign: | Your API request was not properly authorized. | | `Journal` | [Journal](../../Models/Shared/Journal.md) | :heavy_minus_sign: | Success | | `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | | `RawResponse` | [HttpResponseMessage](https://learn.microsoft.com/en-us/dotnet/api/system.net.http.httpresponsemessage?view=net-5.0) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/sync-for-payroll/docs/Models/Operations/GetPullOperationResponse.md b/sync-for-payroll/docs/Models/Operations/GetPullOperationResponse.md index 7254aff6b..1c7449ba5 100644 --- a/sync-for-payroll/docs/Models/Operations/GetPullOperationResponse.md +++ b/sync-for-payroll/docs/Models/Operations/GetPullOperationResponse.md @@ -3,10 +3,9 @@ ## Fields -| Field | Type | Required | Description | Example | -| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | | -| `ErrorMessage` | [ErrorMessage](../../Models/Shared/ErrorMessage.md) | :heavy_minus_sign: | Your API request was not properly authorized. | | -| `PullOperation` | [PullOperation](../../Models/Shared/PullOperation.md) | :heavy_minus_sign: | OK | {"id":"97d60846-f07a-4d42-b5a0-0bdcc6ebf56b","companyId":"4645bd78-8988-45bc-ac9e-67ba5df6e4e5","connectionId":"51baa045-4836-4317-a42e-3542e991e581","dataType":"invoices","status":"Initial","statusDescription":"Paused until 2022-10-23T00:00:00.000Z","requested":"2022-11-14T11:18:37.2798351Z","progress":10,"isCompleted":false,"isErrored":false} | -| `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | | -| `RawResponse` | [HttpResponseMessage](https://learn.microsoft.com/en-us/dotnet/api/system.net.http.httpresponsemessage?view=net-5.0) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | | +| `PullOperation` | [PullOperation](../../Models/Shared/PullOperation.md) | :heavy_minus_sign: | OK | {
"id": "97d60846-f07a-4d42-b5a0-0bdcc6ebf56b",
"companyId": "4645bd78-8988-45bc-ac9e-67ba5df6e4e5",
"connectionId": "51baa045-4836-4317-a42e-3542e991e581",
"dataType": "invoices",
"status": "Initial",
"statusDescription": "Paused until 2022-10-23T00:00:00.000Z",
"requested": "2022-11-14T11:18:37.2798351Z",
"progress": 10,
"isCompleted": false,
"isErrored": false
} | +| `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | | +| `RawResponse` | [HttpResponseMessage](https://learn.microsoft.com/en-us/dotnet/api/system.net.http.httpresponsemessage?view=net-5.0) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | | \ No newline at end of file diff --git a/sync-for-payroll/docs/Models/Operations/GetPushOperationResponse.md b/sync-for-payroll/docs/Models/Operations/GetPushOperationResponse.md index d2b5de6b1..3781b7f46 100644 --- a/sync-for-payroll/docs/Models/Operations/GetPushOperationResponse.md +++ b/sync-for-payroll/docs/Models/Operations/GetPushOperationResponse.md @@ -6,7 +6,6 @@ | Field | Type | Required | Description | | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | | `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | -| `ErrorMessage` | [ErrorMessage](../../Models/Shared/ErrorMessage.md) | :heavy_minus_sign: | Your API request was not properly authorized. | | `PushOperation` | [PushOperation](../../Models/Shared/PushOperation.md) | :heavy_minus_sign: | OK | | `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | | `RawResponse` | [HttpResponseMessage](https://learn.microsoft.com/en-us/dotnet/api/system.net.http.httpresponsemessage?view=net-5.0) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/sync-for-payroll/docs/Models/Operations/GetTrackingCategoryResponse.md b/sync-for-payroll/docs/Models/Operations/GetTrackingCategoryResponse.md index 221763ee1..c35f10aa1 100644 --- a/sync-for-payroll/docs/Models/Operations/GetTrackingCategoryResponse.md +++ b/sync-for-payroll/docs/Models/Operations/GetTrackingCategoryResponse.md @@ -6,7 +6,6 @@ | Field | Type | Required | Description | | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | | `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | -| `ErrorMessage` | [ErrorMessage](../../Models/Shared/ErrorMessage.md) | :heavy_minus_sign: | Your API request was not properly authorized. | | `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | | `RawResponse` | [HttpResponseMessage](https://learn.microsoft.com/en-us/dotnet/api/system.net.http.httpresponsemessage?view=net-5.0) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | | `TrackingCategoryTree` | [TrackingCategoryTree](../../Models/Shared/TrackingCategoryTree.md) | :heavy_minus_sign: | Success | \ No newline at end of file diff --git a/sync-for-payroll/docs/Models/Operations/ListAccountsResponse.md b/sync-for-payroll/docs/Models/Operations/ListAccountsResponse.md index b5c3dea15..1cb3fd0be 100644 --- a/sync-for-payroll/docs/Models/Operations/ListAccountsResponse.md +++ b/sync-for-payroll/docs/Models/Operations/ListAccountsResponse.md @@ -3,10 +3,9 @@ ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `Accounts` | [Models.Shared.Accounts](../../Models/Shared/Accounts.md) | :heavy_minus_sign: | Success | {"_links":{"pageNumber":1,"pageSize":10,"totalResults":1,"self":{"href":"/companies/{id}/data/{dataType}"},"current":{"href":"/companies/{id}/data/{dataType}?page=1&pageSize=10"}}} | -| `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | | -| `ErrorMessage` | [ErrorMessage](../../Models/Shared/ErrorMessage.md) | :heavy_minus_sign: | Your `query` parameter was not correctly formed | | -| `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | | -| `RawResponse` | [HttpResponseMessage](https://learn.microsoft.com/en-us/dotnet/api/system.net.http.httpresponsemessage?view=net-5.0) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `Accounts` | [Models.Shared.Accounts](../../Models/Shared/Accounts.md) | :heavy_minus_sign: | Success | {
"pageNumber": 1,
"pageSize": 10,
"totalResults": 1,
"_links": {
"self": {
"href": "/companies/{id}/data/{dataType}"
},
"current": {
"href": "/companies/{id}/data/{dataType}?page=1\u0026pageSize=10"
}
}
} | +| `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | | +| `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | | +| `RawResponse` | [HttpResponseMessage](https://learn.microsoft.com/en-us/dotnet/api/system.net.http.httpresponsemessage?view=net-5.0) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | | \ No newline at end of file diff --git a/sync-for-payroll/docs/Models/Operations/ListCompaniesResponse.md b/sync-for-payroll/docs/Models/Operations/ListCompaniesResponse.md index f8c5c84c8..f4b4444b4 100644 --- a/sync-for-payroll/docs/Models/Operations/ListCompaniesResponse.md +++ b/sync-for-payroll/docs/Models/Operations/ListCompaniesResponse.md @@ -3,10 +3,9 @@ ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `Companies` | [Models.Shared.Companies](../../Models/Shared/Companies.md) | :heavy_minus_sign: | OK | {"_links":{"pageNumber":1,"pageSize":10,"totalResults":1,"self":{"href":"/companies/{id}/data/{dataType}"},"current":{"href":"/companies/{id}/data/{dataType}?page=1&pageSize=10"}}} | -| `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | | -| `ErrorMessage` | [ErrorMessage](../../Models/Shared/ErrorMessage.md) | :heavy_minus_sign: | Your `query` parameter was not correctly formed | | -| `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | | -| `RawResponse` | [HttpResponseMessage](https://learn.microsoft.com/en-us/dotnet/api/system.net.http.httpresponsemessage?view=net-5.0) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `Companies` | [Models.Shared.Companies](../../Models/Shared/Companies.md) | :heavy_minus_sign: | OK | {
"pageNumber": 1,
"pageSize": 10,
"totalResults": 1,
"_links": {
"self": {
"href": "/companies/{id}/data/{dataType}"
},
"current": {
"href": "/companies/{id}/data/{dataType}?page=1\u0026pageSize=10"
}
}
} | +| `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | | +| `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | | +| `RawResponse` | [HttpResponseMessage](https://learn.microsoft.com/en-us/dotnet/api/system.net.http.httpresponsemessage?view=net-5.0) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | | \ No newline at end of file diff --git a/sync-for-payroll/docs/Models/Operations/ListConnectionsResponse.md b/sync-for-payroll/docs/Models/Operations/ListConnectionsResponse.md index f7dcdbf03..92f97d81c 100644 --- a/sync-for-payroll/docs/Models/Operations/ListConnectionsResponse.md +++ b/sync-for-payroll/docs/Models/Operations/ListConnectionsResponse.md @@ -3,10 +3,9 @@ ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `Connections` | [Models.Shared.Connections](../../Models/Shared/Connections.md) | :heavy_minus_sign: | OK | {"_links":{"pageNumber":1,"pageSize":10,"totalResults":1,"self":{"href":"/companies/{id}/data/{dataType}"},"current":{"href":"/companies/{id}/data/{dataType}?page=1&pageSize=10"}}} | -| `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | | -| `ErrorMessage` | [ErrorMessage](../../Models/Shared/ErrorMessage.md) | :heavy_minus_sign: | Your `query` parameter was not correctly formed | | -| `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | | -| `RawResponse` | [HttpResponseMessage](https://learn.microsoft.com/en-us/dotnet/api/system.net.http.httpresponsemessage?view=net-5.0) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `Connections` | [Models.Shared.Connections](../../Models/Shared/Connections.md) | :heavy_minus_sign: | OK | {
"pageNumber": 1,
"pageSize": 10,
"totalResults": 1,
"_links": {
"self": {
"href": "/companies/{id}/data/{dataType}"
},
"current": {
"href": "/companies/{id}/data/{dataType}?page=1\u0026pageSize=10"
}
}
} | +| `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | | +| `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | | +| `RawResponse` | [HttpResponseMessage](https://learn.microsoft.com/en-us/dotnet/api/system.net.http.httpresponsemessage?view=net-5.0) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | | \ No newline at end of file diff --git a/sync-for-payroll/docs/Models/Operations/ListJournalEntriesResponse.md b/sync-for-payroll/docs/Models/Operations/ListJournalEntriesResponse.md index 020ffb089..bea67e453 100644 --- a/sync-for-payroll/docs/Models/Operations/ListJournalEntriesResponse.md +++ b/sync-for-payroll/docs/Models/Operations/ListJournalEntriesResponse.md @@ -3,10 +3,9 @@ ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | | -| `ErrorMessage` | [ErrorMessage](../../Models/Shared/ErrorMessage.md) | :heavy_minus_sign: | Your `query` parameter was not correctly formed | | -| `JournalEntries` | [Models.Shared.JournalEntries](../../Models/Shared/JournalEntries.md) | :heavy_minus_sign: | Success | {"_links":{"pageNumber":1,"pageSize":10,"totalResults":1,"self":{"href":"/companies/{id}/data/{dataType}"},"current":{"href":"/companies/{id}/data/{dataType}?page=1&pageSize=10"}}} | -| `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | | -| `RawResponse` | [HttpResponseMessage](https://learn.microsoft.com/en-us/dotnet/api/system.net.http.httpresponsemessage?view=net-5.0) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | | +| `JournalEntries` | [Models.Shared.JournalEntries](../../Models/Shared/JournalEntries.md) | :heavy_minus_sign: | Success | {
"pageNumber": 1,
"pageSize": 10,
"totalResults": 1,
"_links": {
"self": {
"href": "/companies/{id}/data/{dataType}"
},
"current": {
"href": "/companies/{id}/data/{dataType}?page=1\u0026pageSize=10"
}
}
} | +| `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | | +| `RawResponse` | [HttpResponseMessage](https://learn.microsoft.com/en-us/dotnet/api/system.net.http.httpresponsemessage?view=net-5.0) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | | \ No newline at end of file diff --git a/sync-for-payroll/docs/Models/Operations/ListJournalsResponse.md b/sync-for-payroll/docs/Models/Operations/ListJournalsResponse.md index 5f04b14ad..3b0bb45ab 100644 --- a/sync-for-payroll/docs/Models/Operations/ListJournalsResponse.md +++ b/sync-for-payroll/docs/Models/Operations/ListJournalsResponse.md @@ -3,10 +3,9 @@ ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | | -| `ErrorMessage` | [ErrorMessage](../../Models/Shared/ErrorMessage.md) | :heavy_minus_sign: | Your `query` parameter was not correctly formed | | -| `Journals` | [Models.Shared.Journals](../../Models/Shared/Journals.md) | :heavy_minus_sign: | Success | {"_links":{"pageNumber":1,"pageSize":10,"totalResults":1,"self":{"href":"/companies/{id}/data/{dataType}"},"current":{"href":"/companies/{id}/data/{dataType}?page=1&pageSize=10"}}} | -| `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | | -| `RawResponse` | [HttpResponseMessage](https://learn.microsoft.com/en-us/dotnet/api/system.net.http.httpresponsemessage?view=net-5.0) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | | +| `Journals` | [Models.Shared.Journals](../../Models/Shared/Journals.md) | :heavy_minus_sign: | Success | {
"pageNumber": 1,
"pageSize": 10,
"totalResults": 1,
"_links": {
"self": {
"href": "/companies/{id}/data/{dataType}"
},
"current": {
"href": "/companies/{id}/data/{dataType}?page=1\u0026pageSize=10"
}
}
} | +| `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | | +| `RawResponse` | [HttpResponseMessage](https://learn.microsoft.com/en-us/dotnet/api/system.net.http.httpresponsemessage?view=net-5.0) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | | \ No newline at end of file diff --git a/sync-for-payroll/docs/Models/Operations/ListPullOperationsResponse.md b/sync-for-payroll/docs/Models/Operations/ListPullOperationsResponse.md index e1c074772..b541432d2 100644 --- a/sync-for-payroll/docs/Models/Operations/ListPullOperationsResponse.md +++ b/sync-for-payroll/docs/Models/Operations/ListPullOperationsResponse.md @@ -3,10 +3,9 @@ ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | | -| `ErrorMessage` | [ErrorMessage](../../Models/Shared/ErrorMessage.md) | :heavy_minus_sign: | Your `query` parameter was not correctly formed | | -| `PullOperations` | [PullOperations](../../Models/Shared/PullOperations.md) | :heavy_minus_sign: | OK | {"_links":{"pageNumber":1,"pageSize":10,"totalResults":1,"self":{"href":"/companies/{id}/data/{dataType}"},"current":{"href":"/companies/{id}/data/{dataType}?page=1&pageSize=10"}}} | -| `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | | -| `RawResponse` | [HttpResponseMessage](https://learn.microsoft.com/en-us/dotnet/api/system.net.http.httpresponsemessage?view=net-5.0) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | | +| `PullOperations` | [PullOperations](../../Models/Shared/PullOperations.md) | :heavy_minus_sign: | OK | {
"pageNumber": 1,
"pageSize": 10,
"totalResults": 1,
"_links": {
"self": {
"href": "/companies/{id}/data/{dataType}"
},
"current": {
"href": "/companies/{id}/data/{dataType}?page=1\u0026pageSize=10"
}
}
} | +| `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | | +| `RawResponse` | [HttpResponseMessage](https://learn.microsoft.com/en-us/dotnet/api/system.net.http.httpresponsemessage?view=net-5.0) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | | \ No newline at end of file diff --git a/sync-for-payroll/docs/Models/Operations/ListPushOperationsResponse.md b/sync-for-payroll/docs/Models/Operations/ListPushOperationsResponse.md index 72a4570e1..c1fbf8f93 100644 --- a/sync-for-payroll/docs/Models/Operations/ListPushOperationsResponse.md +++ b/sync-for-payroll/docs/Models/Operations/ListPushOperationsResponse.md @@ -3,10 +3,9 @@ ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | | -| `ErrorMessage` | [ErrorMessage](../../Models/Shared/ErrorMessage.md) | :heavy_minus_sign: | Your `query` parameter was not correctly formed | | -| `PushOperations` | [PushOperations](../../Models/Shared/PushOperations.md) | :heavy_minus_sign: | OK | {"_links":{"pageNumber":1,"pageSize":10,"totalResults":1,"self":{"href":"/companies/{id}/data/{dataType}"},"current":{"href":"/companies/{id}/data/{dataType}?page=1&pageSize=10"}}} | -| `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | | -| `RawResponse` | [HttpResponseMessage](https://learn.microsoft.com/en-us/dotnet/api/system.net.http.httpresponsemessage?view=net-5.0) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | | +| `PushOperations` | [PushOperations](../../Models/Shared/PushOperations.md) | :heavy_minus_sign: | OK | {
"pageNumber": 1,
"pageSize": 10,
"totalResults": 1,
"_links": {
"self": {
"href": "/companies/{id}/data/{dataType}"
},
"current": {
"href": "/companies/{id}/data/{dataType}?page=1\u0026pageSize=10"
}
}
} | +| `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | | +| `RawResponse` | [HttpResponseMessage](https://learn.microsoft.com/en-us/dotnet/api/system.net.http.httpresponsemessage?view=net-5.0) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | | \ No newline at end of file diff --git a/sync-for-payroll/docs/Models/Operations/ListTrackingCategoriesResponse.md b/sync-for-payroll/docs/Models/Operations/ListTrackingCategoriesResponse.md index 8ee48c3f7..23eaa4146 100644 --- a/sync-for-payroll/docs/Models/Operations/ListTrackingCategoriesResponse.md +++ b/sync-for-payroll/docs/Models/Operations/ListTrackingCategoriesResponse.md @@ -3,10 +3,9 @@ ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | | -| `ErrorMessage` | [ErrorMessage](../../Models/Shared/ErrorMessage.md) | :heavy_minus_sign: | Your `query` parameter was not correctly formed | | -| `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | | -| `RawResponse` | [HttpResponseMessage](https://learn.microsoft.com/en-us/dotnet/api/system.net.http.httpresponsemessage?view=net-5.0) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | | -| `TrackingCategories` | [Models.Shared.TrackingCategories](../../Models/Shared/TrackingCategories.md) | :heavy_minus_sign: | Success | {"_links":{"pageNumber":1,"pageSize":10,"totalResults":1,"self":{"href":"/companies/{id}/data/{dataType}"},"current":{"href":"/companies/{id}/data/{dataType}?page=1&pageSize=10"}}} | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | | +| `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | | +| `RawResponse` | [HttpResponseMessage](https://learn.microsoft.com/en-us/dotnet/api/system.net.http.httpresponsemessage?view=net-5.0) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | | +| `TrackingCategories` | [Models.Shared.TrackingCategories](../../Models/Shared/TrackingCategories.md) | :heavy_minus_sign: | Success | {
"pageNumber": 1,
"pageSize": 10,
"totalResults": 1,
"_links": {
"self": {
"href": "/companies/{id}/data/{dataType}"
},
"current": {
"href": "/companies/{id}/data/{dataType}?page=1\u0026pageSize=10"
}
}
} | \ No newline at end of file diff --git a/sync-for-payroll/docs/Models/Operations/RefreshAllDataTypesResponse.md b/sync-for-payroll/docs/Models/Operations/RefreshAllDataTypesResponse.md index 2cf53213a..d72710323 100644 --- a/sync-for-payroll/docs/Models/Operations/RefreshAllDataTypesResponse.md +++ b/sync-for-payroll/docs/Models/Operations/RefreshAllDataTypesResponse.md @@ -6,6 +6,5 @@ | Field | Type | Required | Description | | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | | `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | -| `ErrorMessage` | [ErrorMessage](../../Models/Shared/ErrorMessage.md) | :heavy_minus_sign: | Your API request was not properly authorized. | | `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | | `RawResponse` | [HttpResponseMessage](https://learn.microsoft.com/en-us/dotnet/api/system.net.http.httpresponsemessage?view=net-5.0) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/sync-for-payroll/docs/Models/Operations/RefreshDataTypeResponse.md b/sync-for-payroll/docs/Models/Operations/RefreshDataTypeResponse.md index c2fba417e..2031cc7c6 100644 --- a/sync-for-payroll/docs/Models/Operations/RefreshDataTypeResponse.md +++ b/sync-for-payroll/docs/Models/Operations/RefreshDataTypeResponse.md @@ -3,10 +3,9 @@ ## Fields -| Field | Type | Required | Description | Example | -| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | | -| `ErrorMessage` | [ErrorMessage](../../Models/Shared/ErrorMessage.md) | :heavy_minus_sign: | Your API request was not properly authorized. | | -| `PullOperation` | [PullOperation](../../Models/Shared/PullOperation.md) | :heavy_minus_sign: | OK | {"id":"97d60846-f07a-4d42-b5a0-0bdcc6ebf56b","companyId":"4645bd78-8988-45bc-ac9e-67ba5df6e4e5","connectionId":"51baa045-4836-4317-a42e-3542e991e581","dataType":"invoices","status":"Initial","statusDescription":"Paused until 2022-10-23T00:00:00.000Z","requested":"2022-11-14T11:18:37.2798351Z","progress":10,"isCompleted":false,"isErrored":false} | -| `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | | -| `RawResponse` | [HttpResponseMessage](https://learn.microsoft.com/en-us/dotnet/api/system.net.http.httpresponsemessage?view=net-5.0) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | | +| `PullOperation` | [PullOperation](../../Models/Shared/PullOperation.md) | :heavy_minus_sign: | OK | {
"id": "97d60846-f07a-4d42-b5a0-0bdcc6ebf56b",
"companyId": "4645bd78-8988-45bc-ac9e-67ba5df6e4e5",
"connectionId": "51baa045-4836-4317-a42e-3542e991e581",
"dataType": "invoices",
"status": "Initial",
"statusDescription": "Paused until 2022-10-23T00:00:00.000Z",
"requested": "2022-11-14T11:18:37.2798351Z",
"progress": 10,
"isCompleted": false,
"isErrored": false
} | +| `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | | +| `RawResponse` | [HttpResponseMessage](https://learn.microsoft.com/en-us/dotnet/api/system.net.http.httpresponsemessage?view=net-5.0) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | | \ No newline at end of file diff --git a/sync-for-payroll/docs/Models/Operations/UnlinkConnectionResponse.md b/sync-for-payroll/docs/Models/Operations/UnlinkConnectionResponse.md index c8983f9d4..a2620d44d 100644 --- a/sync-for-payroll/docs/Models/Operations/UnlinkConnectionResponse.md +++ b/sync-for-payroll/docs/Models/Operations/UnlinkConnectionResponse.md @@ -3,10 +3,9 @@ ## Fields -| Field | Type | Required | Description | Example | -| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `Connection` | [Connection](../../Models/Shared/Connection.md) | :heavy_minus_sign: | OK | {"id":"ee2eb431-c0fa-4dc9-93fa-d29781c12bcd","integrationId":"bf083d72-62c7-493e-aec9-81b4dbba7e2c","integrationKey":"dfxm","sourceId":"bdd831ce-eebd-4896-89a7-20e5ee8989ee","platformName":"Basiq","linkUrl":"https://link-api.codat.io/companies/86bd88cb-44ab-4dfb-b32f-87b19b14287f/connections/ee2eb431-c0fa-4dc9-93fa-d29781c12bcd/start","status":"Linked","lastSync":"2022-10-27T10:22:43.6464237Z","created":"2022-10-27T09:53:29Z","sourceType":"Banking"} | -| `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | | -| `ErrorMessage` | [ErrorMessage](../../Models/Shared/ErrorMessage.md) | :heavy_minus_sign: | Your API request was not properly authorized. | | -| `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | | -| `RawResponse` | [HttpResponseMessage](https://learn.microsoft.com/en-us/dotnet/api/system.net.http.httpresponsemessage?view=net-5.0) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `Connection` | [Connection](../../Models/Shared/Connection.md) | :heavy_minus_sign: | OK | {
"id": "ee2eb431-c0fa-4dc9-93fa-d29781c12bcd",
"integrationId": "bf083d72-62c7-493e-aec9-81b4dbba7e2c",
"integrationKey": "dfxm",
"sourceId": "bdd831ce-eebd-4896-89a7-20e5ee8989ee",
"platformName": "Basiq",
"linkUrl": "https://link-api.codat.io/companies/86bd88cb-44ab-4dfb-b32f-87b19b14287f/connections/ee2eb431-c0fa-4dc9-93fa-d29781c12bcd/start",
"status": "Linked",
"lastSync": "2022-10-27T10:22:43.6464237Z",
"created": "2022-10-27T09:53:29Z",
"sourceType": "Banking"
} | +| `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | | +| `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | | +| `RawResponse` | [HttpResponseMessage](https://learn.microsoft.com/en-us/dotnet/api/system.net.http.httpresponsemessage?view=net-5.0) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | | \ No newline at end of file diff --git a/sync-for-payroll/docs/Models/Operations/UpdateCompanyResponse.md b/sync-for-payroll/docs/Models/Operations/UpdateCompanyResponse.md index 4ed75e0b4..173741a17 100644 --- a/sync-for-payroll/docs/Models/Operations/UpdateCompanyResponse.md +++ b/sync-for-payroll/docs/Models/Operations/UpdateCompanyResponse.md @@ -3,10 +3,9 @@ ## Fields -| Field | Type | Required | Description | Example | -| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `Company` | [Company](../../Models/Shared/Company.md) | :heavy_minus_sign: | OK | {"id":"0498e921-9b53-4396-a412-4f2f5983b0a2","name":"string","platform":"string","redirect":"https://link.codat.io/company/27628208-459c-46a2-a705-5641ce25f739","lastSync":"2022-01-01T12:00:00.000Z","created":"2022-01-01T12:00:00.000Z","createdByUserName":"string","dataConnections":[{"id":"ee2eb431-c0fa-4dc9-93fa-d29781c12bcd","integrationId":"bf083d72-62c7-493e-aec9-81b4dbba7e2c","integrationKey":"dfxm","sourceId":"bdd831ce-eebd-4896-89a7-20e5ee8989ee","platformName":"Basiq","linkUrl":"https://link-api.codat.io/companies/86bd88cb-44ab-4dfb-b32f-87b19b14287f/connections/ee2eb431-c0fa-4dc9-93fa-d29781c12bcd/start","status":"Linked","lastSync":"2022-10-27T10:22:43.6464237Z","created":"2022-10-27T09:53:29Z","sourceType":"Banking"}],"groups":[{"id":"d7a6c4b4-dc87-45f6-b803-62f466398680"}]} | -| `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | | -| `ErrorMessage` | [ErrorMessage](../../Models/Shared/ErrorMessage.md) | :heavy_minus_sign: | Your API request was not properly authorized. | | -| `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | | -| `RawResponse` | [HttpResponseMessage](https://learn.microsoft.com/en-us/dotnet/api/system.net.http.httpresponsemessage?view=net-5.0) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | | \ No newline at end of file +| Field | Type | Required | Description | Example | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `Company` | [Company](../../Models/Shared/Company.md) | :heavy_minus_sign: | OK | {
"id": "0498e921-9b53-4396-a412-4f2f5983b0a2",
"name": "string",
"platform": "string",
"redirect": "https://link.codat.io/company/27628208-459c-46a2-a705-5641ce25f739",
"lastSync": "2022-01-01T12:00:00.000Z",
"created": "2022-01-01T12:00:00.000Z",
"createdByUserName": "string",
"dataConnections": [
{
"id": "ee2eb431-c0fa-4dc9-93fa-d29781c12bcd",
"integrationId": "bf083d72-62c7-493e-aec9-81b4dbba7e2c",
"integrationKey": "dfxm",
"sourceId": "bdd831ce-eebd-4896-89a7-20e5ee8989ee",
"platformName": "Basiq",
"linkUrl": "https://link-api.codat.io/companies/86bd88cb-44ab-4dfb-b32f-87b19b14287f/connections/ee2eb431-c0fa-4dc9-93fa-d29781c12bcd/start",
"status": "Linked",
"lastSync": "2022-10-27T10:22:43.6464237Z",
"created": "2022-10-27T09:53:29Z",
"sourceType": "Banking"
}
],
"groups": [
{
"id": "d7a6c4b4-dc87-45f6-b803-62f466398680"
}
]
} | +| `ContentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | | +| `StatusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | | +| `RawResponse` | [HttpResponseMessage](https://learn.microsoft.com/en-us/dotnet/api/system.net.http.httpresponsemessage?view=net-5.0) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | | \ No newline at end of file diff --git a/sync-for-payroll/docs/Models/Shared/Accounts.md b/sync-for-payroll/docs/Models/Shared/Accounts.md index 9d1ec4028..61c01df93 100644 --- a/sync-for-payroll/docs/Models/Shared/Accounts.md +++ b/sync-for-payroll/docs/Models/Shared/Accounts.md @@ -3,10 +3,10 @@ ## Fields -| Field | Type | Required | Description | Example | -| --------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- | -| `Links` | [Links](../../Models/Shared/Links.md) | :heavy_check_mark: | N/A | {"self":{"href":"/companies/{id}/data/{dataType}"},"current":{"href":"/companies/{id}/data/{dataType}?page=1&pageSize=10"}} | -| `PageNumber` | *long* | :heavy_check_mark: | Current page number. | | -| `PageSize` | *long* | :heavy_check_mark: | Number of items to return in results array. | | -| `Results` | List<[Account](../../Models/Shared/Account.md)> | :heavy_minus_sign: | N/A | | -| `TotalResults` | *long* | :heavy_check_mark: | Total number of items. | | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | +| `Links` | [Links](../../Models/Shared/Links.md) | :heavy_check_mark: | N/A | {
"self": {
"href": "/companies"
},
"current": {
"href": "/companies?page=1\u0026pageSize=10"
}
} | +| `PageNumber` | *long* | :heavy_check_mark: | Current page number. | | +| `PageSize` | *long* | :heavy_check_mark: | Number of items to return in results array. | | +| `Results` | List<[Account](../../Models/Shared/Account.md)> | :heavy_minus_sign: | N/A | | +| `TotalResults` | *long* | :heavy_check_mark: | Total number of items. | | \ No newline at end of file diff --git a/sync-for-payroll/docs/Models/Shared/ClientRateLimitReachedWebhook.md b/sync-for-payroll/docs/Models/Shared/ClientRateLimitReachedWebhook.md index 8567b7abc..190d22c68 100644 --- a/sync-for-payroll/docs/Models/Shared/ClientRateLimitReachedWebhook.md +++ b/sync-for-payroll/docs/Models/Shared/ClientRateLimitReachedWebhook.md @@ -5,12 +5,12 @@ Webhook request body for a client that has reached their rate limit. ## Fields -| Field | Type | Required | Description | -| --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | -| `AlertId` | *string* | :heavy_minus_sign: | Unique identifier of the webhook event. | -| `ClientId` | *string* | :heavy_minus_sign: | Unique identifier for your client in Codat. | -| `ClientName` | *string* | :heavy_minus_sign: | Name of your client in Codat. | -| `Data` | [ClientRateLimitReachedWebhookData](../../Models/Shared/ClientRateLimitReachedWebhookData.md) | :heavy_minus_sign: | N/A | -| `Message` | *string* | :heavy_minus_sign: | A human readable message about the webhook. | -| `RuleId` | *string* | :heavy_minus_sign: | Unique identifier for the rule. | -| `RuleType` | *string* | :heavy_minus_sign: | The type of rule. | \ No newline at end of file +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `AlertId` | *string* | :heavy_minus_sign: | Unique identifier of the webhook event. | +| `ClientId` | *string* | :heavy_minus_sign: | Unique identifier for your client in Codat. | +| `ClientName` | *string* | :heavy_minus_sign: | Name of your client in Codat. | +| `Data` | [ClientRateLimitReachedWebhookData](../../Models/Shared/ClientRateLimitReachedWebhookData.md) | :heavy_minus_sign: | N/A | +| `Message` | *string* | :heavy_minus_sign: | A human-readable message about the webhook. | +| ~~`RuleId`~~ | *string* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.

Unique identifier for the rule. | +| `RuleType` | *string* | :heavy_minus_sign: | The type of rule. | \ No newline at end of file diff --git a/sync-for-payroll/docs/Models/Shared/ClientRateLimitResetWebhook.md b/sync-for-payroll/docs/Models/Shared/ClientRateLimitResetWebhook.md index 8b39d9a97..f2ab13131 100644 --- a/sync-for-payroll/docs/Models/Shared/ClientRateLimitResetWebhook.md +++ b/sync-for-payroll/docs/Models/Shared/ClientRateLimitResetWebhook.md @@ -5,12 +5,12 @@ Webhook request body for a client that has had their rate limit reset. ## Fields -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | -| `AlertId` | *string* | :heavy_minus_sign: | Unique identifier of the webhook event. | -| `ClientId` | *string* | :heavy_minus_sign: | Unique identifier for your client in Codat. | -| `ClientName` | *string* | :heavy_minus_sign: | Name of your client in Codat. | -| `Data` | [ClientRateLimitResetWebhookData](../../Models/Shared/ClientRateLimitResetWebhookData.md) | :heavy_minus_sign: | N/A | -| `Message` | *string* | :heavy_minus_sign: | A human readable message about the webhook. | -| `RuleId` | *string* | :heavy_minus_sign: | Unique identifier for the rule. | -| `RuleType` | *string* | :heavy_minus_sign: | The type of rule. | \ No newline at end of file +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `AlertId` | *string* | :heavy_minus_sign: | Unique identifier of the webhook event. | +| `ClientId` | *string* | :heavy_minus_sign: | Unique identifier for your client in Codat. | +| `ClientName` | *string* | :heavy_minus_sign: | Name of your client in Codat. | +| `Data` | [ClientRateLimitResetWebhookData](../../Models/Shared/ClientRateLimitResetWebhookData.md) | :heavy_minus_sign: | N/A | +| `Message` | *string* | :heavy_minus_sign: | A human-readable message about the webhook. | +| ~~`RuleId`~~ | *string* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.

Unique identifier for the rule. | +| `RuleType` | *string* | :heavy_minus_sign: | The type of rule. | \ No newline at end of file diff --git a/sync-for-payroll/docs/Models/Shared/ClientRateLimitResetWebhookData.md b/sync-for-payroll/docs/Models/Shared/ClientRateLimitResetWebhookData.md index a84a743ab..a9bf0441a 100644 --- a/sync-for-payroll/docs/Models/Shared/ClientRateLimitResetWebhookData.md +++ b/sync-for-payroll/docs/Models/Shared/ClientRateLimitResetWebhookData.md @@ -7,5 +7,5 @@ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `DailyQuota` | *long* | :heavy_minus_sign: | The number of available requests per day. | | | `ExpiresUtc` | *string* | :heavy_minus_sign: | In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:

```
2020-10-08T22:40:50Z
2021-01-01T00:00:00
```



When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:

- Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
- Unqualified local time: `2021-11-15T01:00:00`
- UTC time offsets: `2021-11-15T01:00:00-05:00`

> Time zones
>
> Not all dates from Codat will contain information about time zones.
> Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced. | 2022-10-23 00:00:00 +0000 UTC | -| `QuotaRemaining` | *long* | :heavy_minus_sign: | Total number of request remaining for your client. | | +| `QuotaRemaining` | *long* | :heavy_minus_sign: | Total number of requests remaining for your client. | | | `ResetReason` | *string* | :heavy_minus_sign: | The reason for your rate limit quota being reset. | | \ No newline at end of file diff --git a/sync-for-payroll/docs/Models/Shared/Companies.md b/sync-for-payroll/docs/Models/Shared/Companies.md index 85d560ec0..6c71611c7 100644 --- a/sync-for-payroll/docs/Models/Shared/Companies.md +++ b/sync-for-payroll/docs/Models/Shared/Companies.md @@ -3,10 +3,10 @@ ## Fields -| Field | Type | Required | Description | Example | -| --------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- | -| `Links` | [Links](../../Models/Shared/Links.md) | :heavy_check_mark: | N/A | {"self":{"href":"/companies/{id}/data/{dataType}"},"current":{"href":"/companies/{id}/data/{dataType}?page=1&pageSize=10"}} | -| `PageNumber` | *long* | :heavy_check_mark: | Current page number. | | -| `PageSize` | *long* | :heavy_check_mark: | Number of items to return in results array. | | -| `Results` | List<[Company](../../Models/Shared/Company.md)> | :heavy_minus_sign: | N/A | | -| `TotalResults` | *long* | :heavy_check_mark: | Total number of items. | | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | +| `Links` | [Links](../../Models/Shared/Links.md) | :heavy_check_mark: | N/A | {
"self": {
"href": "/companies"
},
"current": {
"href": "/companies?page=1\u0026pageSize=10"
}
} | +| `PageNumber` | *long* | :heavy_check_mark: | Current page number. | | +| `PageSize` | *long* | :heavy_check_mark: | Number of items to return in results array. | | +| `Results` | List<[Company](../../Models/Shared/Company.md)> | :heavy_minus_sign: | N/A | | +| `TotalResults` | *long* | :heavy_check_mark: | Total number of items. | | \ No newline at end of file diff --git a/sync-for-payroll/docs/Models/Shared/Connections.md b/sync-for-payroll/docs/Models/Shared/Connections.md index be0aa0d26..73aab6ed1 100644 --- a/sync-for-payroll/docs/Models/Shared/Connections.md +++ b/sync-for-payroll/docs/Models/Shared/Connections.md @@ -3,10 +3,10 @@ ## Fields -| Field | Type | Required | Description | Example | -| --------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- | -| `Links` | [Links](../../Models/Shared/Links.md) | :heavy_check_mark: | N/A | {"self":{"href":"/companies/{id}/data/{dataType}"},"current":{"href":"/companies/{id}/data/{dataType}?page=1&pageSize=10"}} | -| `PageNumber` | *long* | :heavy_check_mark: | Current page number. | | -| `PageSize` | *long* | :heavy_check_mark: | Number of items to return in results array. | | -| `Results` | List<[Connection](../../Models/Shared/Connection.md)> | :heavy_minus_sign: | N/A | | -| `TotalResults` | *long* | :heavy_check_mark: | Total number of items. | | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | +| `Links` | [Links](../../Models/Shared/Links.md) | :heavy_check_mark: | N/A | {
"self": {
"href": "/companies"
},
"current": {
"href": "/companies?page=1\u0026pageSize=10"
}
} | +| `PageNumber` | *long* | :heavy_check_mark: | Current page number. | | +| `PageSize` | *long* | :heavy_check_mark: | Number of items to return in results array. | | +| `Results` | List<[Connection](../../Models/Shared/Connection.md)> | :heavy_minus_sign: | N/A | | +| `TotalResults` | *long* | :heavy_check_mark: | Total number of items. | | \ No newline at end of file diff --git a/sync-for-payroll/docs/Models/Shared/CreateAccountResponse.md b/sync-for-payroll/docs/Models/Shared/CreateAccountResponse.md index ac6d6e697..9b3354dfe 100644 --- a/sync-for-payroll/docs/Models/Shared/CreateAccountResponse.md +++ b/sync-for-payroll/docs/Models/Shared/CreateAccountResponse.md @@ -10,7 +10,7 @@ | `CompletedOnUtc` | *string* | :heavy_minus_sign: | In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:

```
2020-10-08T22:40:50Z
2021-01-01T00:00:00
```



When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:

- Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
- Unqualified local time: `2021-11-15T01:00:00`
- UTC time offsets: `2021-11-15T01:00:00-05:00`

> Time zones
>
> Not all dates from Codat will contain information about time zones.
> Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced. | 2022-10-23 00:00:00 +0000 UTC | | `Data` | [AccountingAccount](../../Models/Shared/AccountingAccount.md) | :heavy_minus_sign: | N/A | | | `DataConnectionKey` | *string* | :heavy_check_mark: | Unique identifier for a company's data connection. | 2e9d2c44-f675-40ba-8049-353bfcb5e171 | -| `DataType` | [DataType](../../Models/Shared/DataType.md) | :heavy_minus_sign: | Available Data types | invoices | +| `DataType` | [DataType](../../Models/Shared/DataType.md) | :heavy_minus_sign: | Available data types | invoices | | `ErrorMessage` | *string* | :heavy_minus_sign: | A message about the error. | | | `PushOperationKey` | *string* | :heavy_check_mark: | A unique identifier generated by Codat to represent this single push operation. This identifier can be used to track the status of the push, and should be persisted. | | | `RequestedOnUtc` | *string* | :heavy_check_mark: | In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:

```
2020-10-08T22:40:50Z
2021-01-01T00:00:00
```



When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:

- Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
- Unqualified local time: `2021-11-15T01:00:00`
- UTC time offsets: `2021-11-15T01:00:00-05:00`

> Time zones
>
> Not all dates from Codat will contain information about time zones.
> Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced. | 2022-10-23 00:00:00 +0000 UTC | diff --git a/sync-for-payroll/docs/Models/Shared/CreateJournalEntryResponse.md b/sync-for-payroll/docs/Models/Shared/CreateJournalEntryResponse.md index 8c71b9838..b2b8b993d 100644 --- a/sync-for-payroll/docs/Models/Shared/CreateJournalEntryResponse.md +++ b/sync-for-payroll/docs/Models/Shared/CreateJournalEntryResponse.md @@ -10,7 +10,7 @@ | `CompletedOnUtc` | *string* | :heavy_minus_sign: | In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:

```
2020-10-08T22:40:50Z
2021-01-01T00:00:00
```



When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:

- Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
- Unqualified local time: `2021-11-15T01:00:00`
- UTC time offsets: `2021-11-15T01:00:00-05:00`

> Time zones
>
> Not all dates from Codat will contain information about time zones.
> Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced. | 2022-10-23 00:00:00 +0000 UTC | | `Data` | [AccountingJournalEntry](../../Models/Shared/AccountingJournalEntry.md) | :heavy_minus_sign: | N/A | | | `DataConnectionKey` | *string* | :heavy_check_mark: | Unique identifier for a company's data connection. | 2e9d2c44-f675-40ba-8049-353bfcb5e171 | -| `DataType` | [DataType](../../Models/Shared/DataType.md) | :heavy_minus_sign: | Available Data types | invoices | +| `DataType` | [DataType](../../Models/Shared/DataType.md) | :heavy_minus_sign: | Available data types | invoices | | `ErrorMessage` | *string* | :heavy_minus_sign: | A message about the error. | | | `PushOperationKey` | *string* | :heavy_check_mark: | A unique identifier generated by Codat to represent this single push operation. This identifier can be used to track the status of the push, and should be persisted. | | | `RequestedOnUtc` | *string* | :heavy_check_mark: | In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:

```
2020-10-08T22:40:50Z
2021-01-01T00:00:00
```



When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:

- Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
- Unqualified local time: `2021-11-15T01:00:00`
- UTC time offsets: `2021-11-15T01:00:00-05:00`

> Time zones
>
> Not all dates from Codat will contain information about time zones.
> Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced. | 2022-10-23 00:00:00 +0000 UTC | diff --git a/sync-for-payroll/docs/Models/Shared/CreateJournalResponse.md b/sync-for-payroll/docs/Models/Shared/CreateJournalResponse.md index faca05461..795d90179 100644 --- a/sync-for-payroll/docs/Models/Shared/CreateJournalResponse.md +++ b/sync-for-payroll/docs/Models/Shared/CreateJournalResponse.md @@ -10,7 +10,7 @@ | `CompletedOnUtc` | *string* | :heavy_minus_sign: | In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:

```
2020-10-08T22:40:50Z
2021-01-01T00:00:00
```



When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:

- Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
- Unqualified local time: `2021-11-15T01:00:00`
- UTC time offsets: `2021-11-15T01:00:00-05:00`

> Time zones
>
> Not all dates from Codat will contain information about time zones.
> Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced. | 2022-10-23 00:00:00 +0000 UTC | | `Data` | [AccountingJournal](../../Models/Shared/AccountingJournal.md) | :heavy_minus_sign: | N/A | | | `DataConnectionKey` | *string* | :heavy_check_mark: | Unique identifier for a company's data connection. | 2e9d2c44-f675-40ba-8049-353bfcb5e171 | -| `DataType` | [DataType](../../Models/Shared/DataType.md) | :heavy_minus_sign: | Available Data types | invoices | +| `DataType` | [DataType](../../Models/Shared/DataType.md) | :heavy_minus_sign: | Available data types | invoices | | `ErrorMessage` | *string* | :heavy_minus_sign: | A message about the error. | | | `PushOperationKey` | *string* | :heavy_check_mark: | A unique identifier generated by Codat to represent this single push operation. This identifier can be used to track the status of the push, and should be persisted. | | | `RequestedOnUtc` | *string* | :heavy_check_mark: | In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:

```
2020-10-08T22:40:50Z
2021-01-01T00:00:00
```



When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:

- Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
- Unqualified local time: `2021-11-15T01:00:00`
- UTC time offsets: `2021-11-15T01:00:00-05:00`

> Time zones
>
> Not all dates from Codat will contain information about time zones.
> Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced. | 2022-10-23 00:00:00 +0000 UTC | diff --git a/sync-for-payroll/docs/Models/Shared/DataStatus.md b/sync-for-payroll/docs/Models/Shared/DataStatus.md index 6df9ac958..47e0732f1 100644 --- a/sync-for-payroll/docs/Models/Shared/DataStatus.md +++ b/sync-for-payroll/docs/Models/Shared/DataStatus.md @@ -7,8 +7,8 @@ Describes the state of data in the Codat cache for a company and data type | Field | Type | Required | Description | Example | | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `CurrentStatus` | *string* | :heavy_check_mark: | The current status of the dataset in Codat's cache. | | -| `DataType` | [DataTypes](../../Models/Shared/DataTypes.md) | :heavy_check_mark: | Available Data types | invoices | +| `CurrentStatus` | [PropertieStatus](../../Models/Shared/PropertieStatus.md) | :heavy_check_mark: | The current status of the dataset. | | +| `DataType` | [DataTypes](../../Models/Shared/DataTypes.md) | :heavy_check_mark: | Available data types | invoices | | `LastSuccessfulSync` | *string* | :heavy_check_mark: | In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:

```
2020-10-08T22:40:50Z
2021-01-01T00:00:00
```



When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:

- Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
- Unqualified local time: `2021-11-15T01:00:00`
- UTC time offsets: `2021-11-15T01:00:00-05:00`

> Time zones
>
> Not all dates from Codat will contain information about time zones.
> Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced. | 2022-10-23 00:00:00 +0000 UTC | | `LatestSuccessfulSyncId` | *string* | :heavy_minus_sign: | Unique identifier for the most recent successful sync of data type. | 8220fc90-55b6-47bc-9417-48ac6ea93101 | | `LatestSyncId` | *string* | :heavy_minus_sign: | Unique identifier for most recent sync of data type. | ad474a37-2003-478e-baee-9af9f1ec2fe3 | \ No newline at end of file diff --git a/sync-for-payroll/docs/Models/Shared/DataType.md b/sync-for-payroll/docs/Models/Shared/DataType.md index 004778187..4f6ed3417 100644 --- a/sync-for-payroll/docs/Models/Shared/DataType.md +++ b/sync-for-payroll/docs/Models/Shared/DataType.md @@ -1,6 +1,6 @@ # DataType -Available Data types +Available data types ## Values diff --git a/sync-for-payroll/docs/Models/Shared/DataTypes.md b/sync-for-payroll/docs/Models/Shared/DataTypes.md index 8fde422da..3ea6fa56e 100644 --- a/sync-for-payroll/docs/Models/Shared/DataTypes.md +++ b/sync-for-payroll/docs/Models/Shared/DataTypes.md @@ -1,6 +1,6 @@ # DataTypes -Available Data types +Available data types ## Values diff --git a/sync-for-payroll/docs/Models/Shared/PullOperationStatus.md b/sync-for-payroll/docs/Models/Shared/DatasetStatus.md similarity index 87% rename from sync-for-payroll/docs/Models/Shared/PullOperationStatus.md rename to sync-for-payroll/docs/Models/Shared/DatasetStatus.md index 240317c20..d5bf9440f 100644 --- a/sync-for-payroll/docs/Models/Shared/PullOperationStatus.md +++ b/sync-for-payroll/docs/Models/Shared/DatasetStatus.md @@ -1,6 +1,6 @@ -# PullOperationStatus +# DatasetStatus -The current status of the pull operation. +The current status of the dataset. ## Values @@ -24,8 +24,6 @@ The current status of the pull operation. | `ValidationError` | ValidationError | | `AuthError` | AuthError | | `Cancelled` | Cancelled | -| `Routing` | Routing | -| `RoutingError` | RoutingError | | `NotSupported` | NotSupported | | `RateLimitError` | RateLimitError | | `PermissionsError` | PermissionsError | diff --git a/sync-for-payroll/docs/Models/Shared/JournalEntries.md b/sync-for-payroll/docs/Models/Shared/JournalEntries.md index 2b69f6af5..bc9de7944 100644 --- a/sync-for-payroll/docs/Models/Shared/JournalEntries.md +++ b/sync-for-payroll/docs/Models/Shared/JournalEntries.md @@ -3,10 +3,10 @@ ## Fields -| Field | Type | Required | Description | Example | -| --------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- | -| `Links` | [Links](../../Models/Shared/Links.md) | :heavy_check_mark: | N/A | {"self":{"href":"/companies/{id}/data/{dataType}"},"current":{"href":"/companies/{id}/data/{dataType}?page=1&pageSize=10"}} | -| `PageNumber` | *long* | :heavy_check_mark: | Current page number. | | -| `PageSize` | *long* | :heavy_check_mark: | Number of items to return in results array. | | -| `Results` | List<[JournalEntry](../../Models/Shared/JournalEntry.md)> | :heavy_minus_sign: | N/A | | -| `TotalResults` | *long* | :heavy_check_mark: | Total number of items. | | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | +| `Links` | [Links](../../Models/Shared/Links.md) | :heavy_check_mark: | N/A | {
"self": {
"href": "/companies"
},
"current": {
"href": "/companies?page=1\u0026pageSize=10"
}
} | +| `PageNumber` | *long* | :heavy_check_mark: | Current page number. | | +| `PageSize` | *long* | :heavy_check_mark: | Number of items to return in results array. | | +| `Results` | List<[JournalEntry](../../Models/Shared/JournalEntry.md)> | :heavy_minus_sign: | N/A | | +| `TotalResults` | *long* | :heavy_check_mark: | Total number of items. | | \ No newline at end of file diff --git a/sync-for-payroll/docs/Models/Shared/Journals.md b/sync-for-payroll/docs/Models/Shared/Journals.md index ae20e0c13..44dadc0a8 100644 --- a/sync-for-payroll/docs/Models/Shared/Journals.md +++ b/sync-for-payroll/docs/Models/Shared/Journals.md @@ -3,10 +3,10 @@ ## Fields -| Field | Type | Required | Description | Example | -| --------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- | -| `Links` | [Links](../../Models/Shared/Links.md) | :heavy_check_mark: | N/A | {"self":{"href":"/companies/{id}/data/{dataType}"},"current":{"href":"/companies/{id}/data/{dataType}?page=1&pageSize=10"}} | -| `PageNumber` | *long* | :heavy_check_mark: | Current page number. | | -| `PageSize` | *long* | :heavy_check_mark: | Number of items to return in results array. | | -| `Results` | List<[Journal](../../Models/Shared/Journal.md)> | :heavy_minus_sign: | N/A | | -| `TotalResults` | *long* | :heavy_check_mark: | Total number of items. | | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | +| `Links` | [Links](../../Models/Shared/Links.md) | :heavy_check_mark: | N/A | {
"self": {
"href": "/companies"
},
"current": {
"href": "/companies?page=1\u0026pageSize=10"
}
} | +| `PageNumber` | *long* | :heavy_check_mark: | Current page number. | | +| `PageSize` | *long* | :heavy_check_mark: | Number of items to return in results array. | | +| `Results` | List<[Journal](../../Models/Shared/Journal.md)> | :heavy_minus_sign: | N/A | | +| `TotalResults` | *long* | :heavy_check_mark: | Total number of items. | | \ No newline at end of file diff --git a/sync-for-payroll/docs/Models/Shared/PhoneNumber.md b/sync-for-payroll/docs/Models/Shared/PhoneNumber.md index d2980a816..261e21607 100644 --- a/sync-for-payroll/docs/Models/Shared/PhoneNumber.md +++ b/sync-for-payroll/docs/Models/Shared/PhoneNumber.md @@ -5,5 +5,5 @@ | Field | Type | Required | Description | Example | | --------------------------------------------------------- | --------------------------------------------------------- | --------------------------------------------------------- | --------------------------------------------------------- | --------------------------------------------------------- | -| `Number` | *string* | :heavy_check_mark: | A phone number. | +44 25691 154789 | +| `Number` | *string* | :heavy_minus_sign: | A phone number. | +44 25691 154789 | | `Type` | [PhoneNumberType](../../Models/Shared/PhoneNumberType.md) | :heavy_check_mark: | The type of phone number | | \ No newline at end of file diff --git a/sync-for-payroll/docs/Models/Shared/PropertieStatus.md b/sync-for-payroll/docs/Models/Shared/PropertieStatus.md new file mode 100644 index 000000000..b67d3cac6 --- /dev/null +++ b/sync-for-payroll/docs/Models/Shared/PropertieStatus.md @@ -0,0 +1,30 @@ +# PropertieStatus + +The current status of the dataset. + + +## Values + +| Name | Value | +| -------------------- | -------------------- | +| `Initial` | Initial | +| `Queued` | Queued | +| `Fetching` | Fetching | +| `MapQueued` | MapQueued | +| `Mapping` | Mapping | +| `Complete` | Complete | +| `FetchError` | FetchError | +| `MapError` | MapError | +| `InternalError` | InternalError | +| `ProcessingQueued` | ProcessingQueued | +| `Processing` | Processing | +| `ProcessingError` | ProcessingError | +| `ValidationQueued` | ValidationQueued | +| `Validating` | Validating | +| `ValidationError` | ValidationError | +| `AuthError` | AuthError | +| `Cancelled` | Cancelled | +| `NotSupported` | NotSupported | +| `RateLimitError` | RateLimitError | +| `PermissionsError` | PermissionsError | +| `PrerequisiteNotMet` | PrerequisiteNotMet | \ No newline at end of file diff --git a/sync-for-payroll/docs/Models/Shared/PullOperation.md b/sync-for-payroll/docs/Models/Shared/PullOperation.md index e8360f7ff..f48846ef9 100644 --- a/sync-for-payroll/docs/Models/Shared/PullOperation.md +++ b/sync-for-payroll/docs/Models/Shared/PullOperation.md @@ -18,5 +18,5 @@ Information about a queued, in progress or completed pull operation. | `IsErrored` | *bool* | :heavy_check_mark: | `True` if the pull operation entered an error state. | | | `Progress` | *long* | :heavy_check_mark: | An integer signifying the progress of the pull operation. | | | `Requested` | *string* | :heavy_check_mark: | In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:

```
2020-10-08T22:40:50Z
2021-01-01T00:00:00
```



When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:

- Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
- Unqualified local time: `2021-11-15T01:00:00`
- UTC time offsets: `2021-11-15T01:00:00-05:00`

> Time zones
>
> Not all dates from Codat will contain information about time zones.
> Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced. | 2022-10-23 00:00:00 +0000 UTC | -| `Status` | [PullOperationStatus](../../Models/Shared/PullOperationStatus.md) | :heavy_check_mark: | The current status of the pull operation. | Complete | +| `Status` | [DatasetStatus](../../Models/Shared/DatasetStatus.md) | :heavy_check_mark: | The current status of the dataset. | | | `StatusDescription` | *string* | :heavy_minus_sign: | Additional information about the dataset status. | Paused until 2022-10-23T00:00:00.000Z | \ No newline at end of file diff --git a/sync-for-payroll/docs/Models/Shared/PullOperations.md b/sync-for-payroll/docs/Models/Shared/PullOperations.md index 9f32a4194..8f2d4a6a9 100644 --- a/sync-for-payroll/docs/Models/Shared/PullOperations.md +++ b/sync-for-payroll/docs/Models/Shared/PullOperations.md @@ -3,10 +3,10 @@ ## Fields -| Field | Type | Required | Description | Example | -| --------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- | -| `Links` | [Links](../../Models/Shared/Links.md) | :heavy_check_mark: | N/A | {"self":{"href":"/companies/{id}/data/{dataType}"},"current":{"href":"/companies/{id}/data/{dataType}?page=1&pageSize=10"}} | -| `PageNumber` | *long* | :heavy_check_mark: | Current page number. | | -| `PageSize` | *long* | :heavy_check_mark: | Number of items to return in results array. | | -| `Results` | List<[PullOperation](../../Models/Shared/PullOperation.md)> | :heavy_minus_sign: | N/A | | -| `TotalResults` | *long* | :heavy_check_mark: | Total number of items. | | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | +| `Links` | [Links](../../Models/Shared/Links.md) | :heavy_check_mark: | N/A | {
"self": {
"href": "/companies"
},
"current": {
"href": "/companies?page=1\u0026pageSize=10"
}
} | +| `PageNumber` | *long* | :heavy_check_mark: | Current page number. | | +| `PageSize` | *long* | :heavy_check_mark: | Number of items to return in results array. | | +| `Results` | List<[PullOperation](../../Models/Shared/PullOperation.md)> | :heavy_minus_sign: | N/A | | +| `TotalResults` | *long* | :heavy_check_mark: | Total number of items. | | \ No newline at end of file diff --git a/sync-for-payroll/docs/Models/Shared/PushOperation.md b/sync-for-payroll/docs/Models/Shared/PushOperation.md index 242544e8b..02fc1688a 100644 --- a/sync-for-payroll/docs/Models/Shared/PushOperation.md +++ b/sync-for-payroll/docs/Models/Shared/PushOperation.md @@ -9,7 +9,7 @@ | `CompanyId` | *string* | :heavy_check_mark: | Unique identifier for your SMB in Codat. | 8a210b68-6988-11ed-a1eb-0242ac120002 | | `CompletedOnUtc` | *string* | :heavy_minus_sign: | In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:

```
2020-10-08T22:40:50Z
2021-01-01T00:00:00
```



When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:

- Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
- Unqualified local time: `2021-11-15T01:00:00`
- UTC time offsets: `2021-11-15T01:00:00-05:00`

> Time zones
>
> Not all dates from Codat will contain information about time zones.
> Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced. | 2022-10-23 00:00:00 +0000 UTC | | `DataConnectionKey` | *string* | :heavy_check_mark: | Unique identifier for a company's data connection. | 2e9d2c44-f675-40ba-8049-353bfcb5e171 | -| `DataType` | [DataType](../../Models/Shared/DataType.md) | :heavy_minus_sign: | Available Data types | invoices | +| `DataType` | [DataType](../../Models/Shared/DataType.md) | :heavy_minus_sign: | Available data types | invoices | | `ErrorMessage` | *string* | :heavy_minus_sign: | A message about the error. | | | `PushOperationKey` | *string* | :heavy_check_mark: | A unique identifier generated by Codat to represent this single push operation. This identifier can be used to track the status of the push, and should be persisted. | | | `RequestedOnUtc` | *string* | :heavy_check_mark: | In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:

```
2020-10-08T22:40:50Z
2021-01-01T00:00:00
```



When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:

- Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
- Unqualified local time: `2021-11-15T01:00:00`
- UTC time offsets: `2021-11-15T01:00:00-05:00`

> Time zones
>
> Not all dates from Codat will contain information about time zones.
> Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced. | 2022-10-23 00:00:00 +0000 UTC | diff --git a/sync-for-payroll/docs/Models/Shared/PushOperationRef.md b/sync-for-payroll/docs/Models/Shared/PushOperationRef.md index 159f7bde1..b5af1b4cb 100644 --- a/sync-for-payroll/docs/Models/Shared/PushOperationRef.md +++ b/sync-for-payroll/docs/Models/Shared/PushOperationRef.md @@ -5,5 +5,5 @@ | Field | Type | Required | Description | Example | | ------------------------------------------- | ------------------------------------------- | ------------------------------------------- | ------------------------------------------- | ------------------------------------------- | -| `DataType` | [DataType](../../Models/Shared/DataType.md) | :heavy_minus_sign: | Available Data types | invoices | +| `DataType` | [DataType](../../Models/Shared/DataType.md) | :heavy_minus_sign: | Available data types | invoices | | `Id` | *string* | :heavy_minus_sign: | Unique identifier for a push operation. | | \ No newline at end of file diff --git a/sync-for-payroll/docs/Models/Shared/PushOperations.md b/sync-for-payroll/docs/Models/Shared/PushOperations.md index 80adf716a..2f4b479d7 100644 --- a/sync-for-payroll/docs/Models/Shared/PushOperations.md +++ b/sync-for-payroll/docs/Models/Shared/PushOperations.md @@ -3,10 +3,10 @@ ## Fields -| Field | Type | Required | Description | Example | -| --------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- | -| `Links` | [Links](../../Models/Shared/Links.md) | :heavy_check_mark: | N/A | {"self":{"href":"/companies/{id}/data/{dataType}"},"current":{"href":"/companies/{id}/data/{dataType}?page=1&pageSize=10"}} | -| `PageNumber` | *long* | :heavy_check_mark: | Current page number. | | -| `PageSize` | *long* | :heavy_check_mark: | Number of items to return in results array. | | -| `Results` | List<[PushOperation](../../Models/Shared/PushOperation.md)> | :heavy_minus_sign: | N/A | | -| `TotalResults` | *long* | :heavy_check_mark: | Total number of items. | | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | +| `Links` | [Links](../../Models/Shared/Links.md) | :heavy_check_mark: | N/A | {
"self": {
"href": "/companies"
},
"current": {
"href": "/companies?page=1\u0026pageSize=10"
}
} | +| `PageNumber` | *long* | :heavy_check_mark: | Current page number. | | +| `PageSize` | *long* | :heavy_check_mark: | Number of items to return in results array. | | +| `Results` | List<[PushOperation](../../Models/Shared/PushOperation.md)> | :heavy_minus_sign: | N/A | | +| `TotalResults` | *long* | :heavy_check_mark: | Total number of items. | | \ No newline at end of file diff --git a/sync-for-payroll/docs/Models/Shared/SchemaDataType.md b/sync-for-payroll/docs/Models/Shared/SchemaDataType.md index 5bfda9720..a7945dd5c 100644 --- a/sync-for-payroll/docs/Models/Shared/SchemaDataType.md +++ b/sync-for-payroll/docs/Models/Shared/SchemaDataType.md @@ -1,6 +1,6 @@ # SchemaDataType -Available Data types +Available data types ## Values diff --git a/sync-for-payroll/docs/Models/Shared/TrackingCategories.md b/sync-for-payroll/docs/Models/Shared/TrackingCategories.md index aaf1aa2d1..67cf0980e 100644 --- a/sync-for-payroll/docs/Models/Shared/TrackingCategories.md +++ b/sync-for-payroll/docs/Models/Shared/TrackingCategories.md @@ -3,10 +3,10 @@ ## Fields -| Field | Type | Required | Description | Example | -| --------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- | -| `Links` | [Links](../../Models/Shared/Links.md) | :heavy_check_mark: | N/A | {"self":{"href":"/companies/{id}/data/{dataType}"},"current":{"href":"/companies/{id}/data/{dataType}?page=1&pageSize=10"}} | -| `PageNumber` | *long* | :heavy_check_mark: | Current page number. | | -| `PageSize` | *long* | :heavy_check_mark: | Number of items to return in results array. | | -| `Results` | List<[TrackingCategory](../../Models/Shared/TrackingCategory.md)> | :heavy_minus_sign: | N/A | | -| `TotalResults` | *long* | :heavy_check_mark: | Total number of items. | | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | +| `Links` | [Links](../../Models/Shared/Links.md) | :heavy_check_mark: | N/A | {
"self": {
"href": "/companies"
},
"current": {
"href": "/companies?page=1\u0026pageSize=10"
}
} | +| `PageNumber` | *long* | :heavy_check_mark: | Current page number. | | +| `PageSize` | *long* | :heavy_check_mark: | Number of items to return in results array. | | +| `Results` | List<[TrackingCategory](../../Models/Shared/TrackingCategory.md)> | :heavy_minus_sign: | N/A | | +| `TotalResults` | *long* | :heavy_check_mark: | Total number of items. | | \ No newline at end of file diff --git a/sync-for-payroll/docs/sdks/accounts/README.md b/sync-for-payroll/docs/sdks/accounts/README.md index 4f398cd40..4052622b2 100644 --- a/sync-for-payroll/docs/sdks/accounts/README.md +++ b/sync-for-payroll/docs/sdks/accounts/README.md @@ -3,7 +3,7 @@ ## Overview -Accounts +Get, create, and update Accounts. ### Available Operations @@ -38,6 +38,17 @@ var sdk = new CodatSyncPayroll(security: new Security() { }); CreateAccountRequest req = new CreateAccountRequest() { + AccountPrototype = new AccountPrototype() { + Currency = "USD", + CurrentBalance = 0M, + Description = "Invoices the business has issued but has not yet collected payment on.", + FullyQualifiedCategory = "Asset.Current", + FullyQualifiedName = "Cash On Hand", + Name = "Accounts Receivable", + NominalCode = "610", + Status = AccountStatus.Active, + Type = AccountType.Asset, + }, CompanyId = "8a210b68-6988-11ed-a1eb-0242ac120002", ConnectionId = "2e9d2c44-f675-40ba-8049-353bfcb5e171", }; @@ -57,7 +68,12 @@ var res = await sdk.Accounts.CreateAsync(req); ### Response **[Models.Operations.CreateAccountResponse](../../Models/Operations/CreateAccountResponse.md)** +### Errors +| Error Object | Status Code | Content Type | +| --------------------------------------------- | --------------------------------------------- | --------------------------------------------- | +| Codat.Sync.Payroll.Models.Errors.ErrorMessage | 400,401,402,403,404,429,500,503 | application/json | +| Codat.Sync.Payroll.Models.Errors.SDKException | 4xx-5xx | */* | ## Get @@ -101,7 +117,12 @@ var res = await sdk.Accounts.GetAsync(req); ### Response **[GetAccountResponse](../../Models/Operations/GetAccountResponse.md)** +### Errors +| Error Object | Status Code | Content Type | +| --------------------------------------------- | --------------------------------------------- | --------------------------------------------- | +| Codat.Sync.Payroll.Models.Errors.ErrorMessage | 401,402,403,404,409,429,500,503 | application/json | +| Codat.Sync.Payroll.Models.Errors.SDKException | 4xx-5xx | */* | ## GetCreateModel @@ -147,7 +168,12 @@ var res = await sdk.Accounts.GetCreateModelAsync(req); ### Response **[GetCreateAccountsModelResponse](../../Models/Operations/GetCreateAccountsModelResponse.md)** +### Errors +| Error Object | Status Code | Content Type | +| --------------------------------------------- | --------------------------------------------- | --------------------------------------------- | +| Codat.Sync.Payroll.Models.Errors.ErrorMessage | 401,402,403,404,429,500,503 | application/json | +| Codat.Sync.Payroll.Models.Errors.SDKException | 4xx-5xx | */* | ## List @@ -190,4 +216,9 @@ var res = await sdk.Accounts.ListAsync(req); ### Response **[ListAccountsResponse](../../Models/Operations/ListAccountsResponse.md)** +### Errors +| Error Object | Status Code | Content Type | +| --------------------------------------------- | --------------------------------------------- | --------------------------------------------- | +| Codat.Sync.Payroll.Models.Errors.ErrorMessage | 400,401,402,403,404,409,429,500,503 | application/json | +| Codat.Sync.Payroll.Models.Errors.SDKException | 4xx-5xx | */* | diff --git a/sync-for-payroll/docs/sdks/codatsyncpayroll/README.md b/sync-for-payroll/docs/sdks/codatsyncpayroll/README.md index 8afd84f5f..2e2335e1c 100644 --- a/sync-for-payroll/docs/sdks/codatsyncpayroll/README.md +++ b/sync-for-payroll/docs/sdks/codatsyncpayroll/README.md @@ -11,18 +11,20 @@ Sync for Payroll is an API and a set of supporting tools built to help integrate --- + ## Endpoints -| Endpoints | Description | -|:---------------------|:-----------------------------------------------------------------------------------------------------------| -| Companies | Create and manage your SMB users' companies. | -| Connections | Create new and manage existing data connections for a company. | -| Accounts | Get, create, and update Accounts. | -| Journal entries | Get, create, and update Journal entries. | -| Journals | Get, create, and update Journals. | -| Tracking categories | Get, create, and update Tracking Categories for additional categorization of payroll components. | -| Company info | View company profile from the source platform. | -| Manage data | Control how data is retrieved from an integration. | +| Endpoints | Description | +| :- |:- | +| Companies | Create and manage your SMB users' companies. | +| Connections | Create new and manage existing data connections for a company. | +| Accounts | Get, create, and update Accounts. | +| Journal entries | Get, create, and update Journal entries. | +| Journals | Get, create, and update Journals. | +| Tracking categories | Get, create, and update Tracking Categories for additional categorization of payroll components. | +| Company info | View company profile from the source platform. | +| Manage data | Control how data is retrieved from an integration. | + ### Available Operations diff --git a/sync-for-payroll/docs/sdks/companies/README.md b/sync-for-payroll/docs/sdks/companies/README.md index 39b9ca516..e10783963 100644 --- a/sync-for-payroll/docs/sdks/companies/README.md +++ b/sync-for-payroll/docs/sdks/companies/README.md @@ -3,7 +3,7 @@ ## Overview -Create and manage your Codat companies. +Create and manage your SMB users' companies. ### Available Operations @@ -35,6 +35,11 @@ var sdk = new CodatSyncPayroll(security: new Security() { CompanyRequestBody req = new CompanyRequestBody() { Description = "Requested early access to the new financing scheme.", + Groups = new List() { + new Items() { + Id = "60d2fa12-8a04-11ee-b9d1-0242ac120002", + }, + }, Name = "Bank of Dave", }; @@ -53,7 +58,12 @@ var res = await sdk.Companies.CreateAsync(req); ### Response **[CreateCompanyResponse](../../Models/Operations/CreateCompanyResponse.md)** +### Errors +| Error Object | Status Code | Content Type | +| --------------------------------------------- | --------------------------------------------- | --------------------------------------------- | +| Codat.Sync.Payroll.Models.Errors.ErrorMessage | 400,401,402,403,429,500,503 | application/json | +| Codat.Sync.Payroll.Models.Errors.SDKException | 4xx-5xx | */* | ## Delete @@ -93,7 +103,12 @@ var res = await sdk.Companies.DeleteAsync(req); ### Response **[DeleteCompanyResponse](../../Models/Operations/DeleteCompanyResponse.md)** +### Errors +| Error Object | Status Code | Content Type | +| --------------------------------------------- | --------------------------------------------- | --------------------------------------------- | +| Codat.Sync.Payroll.Models.Errors.ErrorMessage | 401,402,403,404,429,500,503 | application/json | +| Codat.Sync.Payroll.Models.Errors.SDKException | 4xx-5xx | */* | ## Get @@ -133,7 +148,12 @@ var res = await sdk.Companies.GetAsync(req); ### Response **[GetCompanyResponse](../../Models/Operations/GetCompanyResponse.md)** +### Errors +| Error Object | Status Code | Content Type | +| --------------------------------------------- | --------------------------------------------- | --------------------------------------------- | +| Codat.Sync.Payroll.Models.Errors.ErrorMessage | 401,402,403,404,429,500,503 | application/json | +| Codat.Sync.Payroll.Models.Errors.SDKException | 4xx-5xx | */* | ## List @@ -174,7 +194,12 @@ var res = await sdk.Companies.ListAsync(req); ### Response **[ListCompaniesResponse](../../Models/Operations/ListCompaniesResponse.md)** +### Errors +| Error Object | Status Code | Content Type | +| --------------------------------------------- | --------------------------------------------- | --------------------------------------------- | +| Codat.Sync.Payroll.Models.Errors.ErrorMessage | 400,401,402,403,404,429,500,503 | application/json | +| Codat.Sync.Payroll.Models.Errors.SDKException | 4xx-5xx | */* | ## Update @@ -197,6 +222,15 @@ var sdk = new CodatSyncPayroll(security: new Security() { }); UpdateCompanyRequest req = new UpdateCompanyRequest() { + CompanyRequestBody = new CompanyRequestBody() { + Description = "Requested early access to the new financing scheme.", + Groups = new List() { + new Items() { + Id = "60d2fa12-8a04-11ee-b9d1-0242ac120002", + }, + }, + Name = "Bank of Dave", + }, CompanyId = "8a210b68-6988-11ed-a1eb-0242ac120002", }; @@ -215,4 +249,9 @@ var res = await sdk.Companies.UpdateAsync(req); ### Response **[UpdateCompanyResponse](../../Models/Operations/UpdateCompanyResponse.md)** +### Errors +| Error Object | Status Code | Content Type | +| --------------------------------------------- | --------------------------------------------- | --------------------------------------------- | +| Codat.Sync.Payroll.Models.Errors.ErrorMessage | 401,402,403,404,429,500,503 | application/json | +| Codat.Sync.Payroll.Models.Errors.SDKException | 4xx-5xx | */* | diff --git a/sync-for-payroll/docs/sdks/companyinfo/README.md b/sync-for-payroll/docs/sdks/companyinfo/README.md index 4b567ce0c..733048b2a 100644 --- a/sync-for-payroll/docs/sdks/companyinfo/README.md +++ b/sync-for-payroll/docs/sdks/companyinfo/README.md @@ -3,7 +3,7 @@ ## Overview -View company information fetched from the source platform. +View company profile from the source platform. ### Available Operations @@ -43,4 +43,9 @@ var res = await sdk.CompanyInfo.GetAccountingProfileAsync(req); ### Response **[GetAccountingProfileResponse](../../Models/Operations/GetAccountingProfileResponse.md)** +### Errors +| Error Object | Status Code | Content Type | +| --------------------------------------------- | --------------------------------------------- | --------------------------------------------- | +| Codat.Sync.Payroll.Models.Errors.ErrorMessage | 401,402,403,404,409,429,500,503 | application/json | +| Codat.Sync.Payroll.Models.Errors.SDKException | 4xx-5xx | */* | diff --git a/sync-for-payroll/docs/sdks/connections/README.md b/sync-for-payroll/docs/sdks/connections/README.md index 81ddbea3c..08b608817 100644 --- a/sync-for-payroll/docs/sdks/connections/README.md +++ b/sync-for-payroll/docs/sdks/connections/README.md @@ -3,7 +3,7 @@ ## Overview -Manage your companies' data connections. +Create new and manage existing data connections for a company. ### Available Operations @@ -31,6 +31,9 @@ var sdk = new CodatSyncPayroll(security: new Security() { }); CreateConnectionRequest req = new CreateConnectionRequest() { + RequestBody = new CreateConnectionRequestBody() { + PlatformKey = "gbol", + }, CompanyId = "8a210b68-6988-11ed-a1eb-0242ac120002", }; @@ -49,7 +52,12 @@ var res = await sdk.Connections.CreateAsync(req); ### Response **[CreateConnectionResponse](../../Models/Operations/CreateConnectionResponse.md)** +### Errors +| Error Object | Status Code | Content Type | +| --------------------------------------------- | --------------------------------------------- | --------------------------------------------- | +| Codat.Sync.Payroll.Models.Errors.ErrorMessage | 401,402,403,404,429,500,503 | application/json | +| Codat.Sync.Payroll.Models.Errors.SDKException | 4xx-5xx | */* | ## Delete @@ -87,7 +95,12 @@ var res = await sdk.Connections.DeleteAsync(req); ### Response **[DeleteConnectionResponse](../../Models/Operations/DeleteConnectionResponse.md)** +### Errors +| Error Object | Status Code | Content Type | +| --------------------------------------------- | --------------------------------------------- | --------------------------------------------- | +| Codat.Sync.Payroll.Models.Errors.ErrorMessage | 401,402,403,404,429,500,503 | application/json | +| Codat.Sync.Payroll.Models.Errors.SDKException | 4xx-5xx | */* | ## Get @@ -124,7 +137,12 @@ var res = await sdk.Connections.GetAsync(req); ### Response **[GetConnectionResponse](../../Models/Operations/GetConnectionResponse.md)** +### Errors +| Error Object | Status Code | Content Type | +| --------------------------------------------- | --------------------------------------------- | --------------------------------------------- | +| Codat.Sync.Payroll.Models.Errors.ErrorMessage | 401,402,403,404,429,500,503 | application/json | +| Codat.Sync.Payroll.Models.Errors.SDKException | 4xx-5xx | */* | ## List @@ -163,7 +181,12 @@ var res = await sdk.Connections.ListAsync(req); ### Response **[ListConnectionsResponse](../../Models/Operations/ListConnectionsResponse.md)** +### Errors +| Error Object | Status Code | Content Type | +| --------------------------------------------- | --------------------------------------------- | --------------------------------------------- | +| Codat.Sync.Payroll.Models.Errors.ErrorMessage | 400,401,402,403,404,429,500,503 | application/json | +| Codat.Sync.Payroll.Models.Errors.SDKException | 4xx-5xx | */* | ## Unlink @@ -200,4 +223,9 @@ var res = await sdk.Connections.UnlinkAsync(req); ### Response **[UnlinkConnectionResponse](../../Models/Operations/UnlinkConnectionResponse.md)** +### Errors +| Error Object | Status Code | Content Type | +| --------------------------------------------- | --------------------------------------------- | --------------------------------------------- | +| Codat.Sync.Payroll.Models.Errors.ErrorMessage | 401,402,403,404,429,500,503 | application/json | +| Codat.Sync.Payroll.Models.Errors.SDKException | 4xx-5xx | */* | diff --git a/sync-for-payroll/docs/sdks/journalentries/README.md b/sync-for-payroll/docs/sdks/journalentries/README.md index a77164b78..13553c792 100644 --- a/sync-for-payroll/docs/sdks/journalentries/README.md +++ b/sync-for-payroll/docs/sdks/journalentries/README.md @@ -3,7 +3,7 @@ ## Overview -Journal entries +Get, create, and update Journal entries. ### Available Operations @@ -39,6 +39,28 @@ var sdk = new CodatSyncPayroll(security: new Security() { }); CreateJournalEntryRequest req = new CreateJournalEntryRequest() { + JournalEntry = new JournalEntry() { + CreatedOn = "2022-10-23T00:00:00Z", + JournalLines = new List() { + new JournalLine() { + NetAmount = 4893.82M, + Tracking = new Tracking() { + RecordRefs = new List() { + new TrackingRecordRef() { + DataType = TrackingRecordRefDataType.TrackingCategories, + }, + }, + }, + }, + }, + ModifiedDate = "2022-10-23T00:00:00Z", + PostedOn = "2022-10-23T00:00:00Z", + RecordRef = new JournalEntryRecordRef() { + DataType = JournalEntryRecordRefDataType.Transfers, + }, + SourceModifiedDate = "2022-10-23T00:00:00Z", + UpdatedOn = "2022-10-23T00:00:00Z", + }, CompanyId = "8a210b68-6988-11ed-a1eb-0242ac120002", ConnectionId = "2e9d2c44-f675-40ba-8049-353bfcb5e171", }; @@ -58,7 +80,12 @@ var res = await sdk.JournalEntries.CreateAsync(req); ### Response **[Models.Operations.CreateJournalEntryResponse](../../Models/Operations/CreateJournalEntryResponse.md)** +### Errors +| Error Object | Status Code | Content Type | +| --------------------------------------------- | --------------------------------------------- | --------------------------------------------- | +| Codat.Sync.Payroll.Models.Errors.ErrorMessage | 400,401,402,403,404,429,500,503 | application/json | +| Codat.Sync.Payroll.Models.Errors.SDKException | 4xx-5xx | */* | ## Delete @@ -125,7 +152,12 @@ var res = await sdk.JournalEntries.DeleteAsync(req); ### Response **[DeleteJournalEntryResponse](../../Models/Operations/DeleteJournalEntryResponse.md)** +### Errors +| Error Object | Status Code | Content Type | +| --------------------------------------------- | --------------------------------------------- | --------------------------------------------- | +| Codat.Sync.Payroll.Models.Errors.ErrorMessage | 401,402,403,404,429,500,503 | application/json | +| Codat.Sync.Payroll.Models.Errors.SDKException | 4xx-5xx | */* | ## Get @@ -169,7 +201,12 @@ var res = await sdk.JournalEntries.GetAsync(req); ### Response **[GetJournalEntryResponse](../../Models/Operations/GetJournalEntryResponse.md)** +### Errors +| Error Object | Status Code | Content Type | +| --------------------------------------------- | --------------------------------------------- | --------------------------------------------- | +| Codat.Sync.Payroll.Models.Errors.ErrorMessage | 401,402,403,404,409,429,500,503 | application/json | +| Codat.Sync.Payroll.Models.Errors.SDKException | 4xx-5xx | */* | ## GetCreateModel @@ -215,7 +252,12 @@ var res = await sdk.JournalEntries.GetCreateModelAsync(req); ### Response **[GetCreateJournalEntryModelResponse](../../Models/Operations/GetCreateJournalEntryModelResponse.md)** +### Errors +| Error Object | Status Code | Content Type | +| --------------------------------------------- | --------------------------------------------- | --------------------------------------------- | +| Codat.Sync.Payroll.Models.Errors.ErrorMessage | 401,402,403,404,429,500,503 | application/json | +| Codat.Sync.Payroll.Models.Errors.SDKException | 4xx-5xx | */* | ## List @@ -259,4 +301,9 @@ var res = await sdk.JournalEntries.ListAsync(req); ### Response **[ListJournalEntriesResponse](../../Models/Operations/ListJournalEntriesResponse.md)** +### Errors +| Error Object | Status Code | Content Type | +| --------------------------------------------- | --------------------------------------------- | --------------------------------------------- | +| Codat.Sync.Payroll.Models.Errors.ErrorMessage | 400,401,402,403,404,409,429,500,503 | application/json | +| Codat.Sync.Payroll.Models.Errors.SDKException | 4xx-5xx | */* | diff --git a/sync-for-payroll/docs/sdks/journals/README.md b/sync-for-payroll/docs/sdks/journals/README.md index 4814ca53a..3803d3857 100644 --- a/sync-for-payroll/docs/sdks/journals/README.md +++ b/sync-for-payroll/docs/sdks/journals/README.md @@ -3,7 +3,7 @@ ## Overview -Journals +Get, create, and update Journals. ### Available Operations @@ -39,6 +39,9 @@ var sdk = new CodatSyncPayroll(security: new Security() { CreateJournalRequest req = new CreateJournalRequest() { CompanyId = "8a210b68-6988-11ed-a1eb-0242ac120002", ConnectionId = "2e9d2c44-f675-40ba-8049-353bfcb5e171", + JournalPrototype = new JournalPrototype() { + CreatedOn = "2022-10-23T00:00:00Z", + }, }; var res = await sdk.Journals.CreateAsync(req); @@ -56,7 +59,12 @@ var res = await sdk.Journals.CreateAsync(req); ### Response **[Models.Operations.CreateJournalResponse](../../Models/Operations/CreateJournalResponse.md)** +### Errors +| Error Object | Status Code | Content Type | +| --------------------------------------------- | --------------------------------------------- | --------------------------------------------- | +| Codat.Sync.Payroll.Models.Errors.ErrorMessage | 400,401,402,403,404,429,500,503 | application/json | +| Codat.Sync.Payroll.Models.Errors.SDKException | 4xx-5xx | */* | ## Get @@ -100,7 +108,12 @@ var res = await sdk.Journals.GetAsync(req); ### Response **[GetJournalResponse](../../Models/Operations/GetJournalResponse.md)** +### Errors +| Error Object | Status Code | Content Type | +| --------------------------------------------- | --------------------------------------------- | --------------------------------------------- | +| Codat.Sync.Payroll.Models.Errors.ErrorMessage | 401,402,403,404,409,429,500,503 | application/json | +| Codat.Sync.Payroll.Models.Errors.SDKException | 4xx-5xx | */* | ## GetCreateModel @@ -146,7 +159,12 @@ var res = await sdk.Journals.GetCreateModelAsync(req); ### Response **[GetCreateJournalModelResponse](../../Models/Operations/GetCreateJournalModelResponse.md)** +### Errors +| Error Object | Status Code | Content Type | +| --------------------------------------------- | --------------------------------------------- | --------------------------------------------- | +| Codat.Sync.Payroll.Models.Errors.ErrorMessage | 401,402,403,404,429,500,503 | application/json | +| Codat.Sync.Payroll.Models.Errors.SDKException | 4xx-5xx | */* | ## List @@ -190,4 +208,9 @@ var res = await sdk.Journals.ListAsync(req); ### Response **[ListJournalsResponse](../../Models/Operations/ListJournalsResponse.md)** +### Errors +| Error Object | Status Code | Content Type | +| --------------------------------------------- | --------------------------------------------- | --------------------------------------------- | +| Codat.Sync.Payroll.Models.Errors.ErrorMessage | 400,401,402,403,404,409,429,500,503 | application/json | +| Codat.Sync.Payroll.Models.Errors.SDKException | 4xx-5xx | */* | diff --git a/sync-for-payroll/docs/sdks/managedata/README.md b/sync-for-payroll/docs/sdks/managedata/README.md index 263031024..2b1b2d0a9 100644 --- a/sync-for-payroll/docs/sdks/managedata/README.md +++ b/sync-for-payroll/docs/sdks/managedata/README.md @@ -3,7 +3,7 @@ ## Overview -Asynchronously retrieve data from an integration to refresh data in Codat. +Control how data is retrieved from an integration. ### Available Operations @@ -49,7 +49,12 @@ var res = await sdk.ManageData.GetDataStatusAsync(req); ### Response **[GetDataStatusResponse](../../Models/Operations/GetDataStatusResponse.md)** +### Errors +| Error Object | Status Code | Content Type | +| --------------------------------------------- | --------------------------------------------- | --------------------------------------------- | +| Codat.Sync.Payroll.Models.Errors.ErrorMessage | 401,402,403,404,429,500,503 | application/json | +| Codat.Sync.Payroll.Models.Errors.SDKException | 4xx-5xx | */* | ## GetPullOperation @@ -86,7 +91,12 @@ var res = await sdk.ManageData.GetPullOperationAsync(req); ### Response **[GetPullOperationResponse](../../Models/Operations/GetPullOperationResponse.md)** +### Errors +| Error Object | Status Code | Content Type | +| --------------------------------------------- | --------------------------------------------- | --------------------------------------------- | +| Codat.Sync.Payroll.Models.Errors.ErrorMessage | 401,402,403,404,429,500,503 | application/json | +| Codat.Sync.Payroll.Models.Errors.SDKException | 4xx-5xx | */* | ## GetPushOperation @@ -123,7 +133,12 @@ var res = await sdk.ManageData.GetPushOperationAsync(req); ### Response **[GetPushOperationResponse](../../Models/Operations/GetPushOperationResponse.md)** +### Errors +| Error Object | Status Code | Content Type | +| --------------------------------------------- | --------------------------------------------- | --------------------------------------------- | +| Codat.Sync.Payroll.Models.Errors.ErrorMessage | 401,402,403,404,429,500,503 | application/json | +| Codat.Sync.Payroll.Models.Errors.SDKException | 4xx-5xx | */* | ## List @@ -162,7 +177,12 @@ var res = await sdk.ManageData.ListAsync(req); ### Response **[ListPushOperationsResponse](../../Models/Operations/ListPushOperationsResponse.md)** +### Errors +| Error Object | Status Code | Content Type | +| --------------------------------------------- | --------------------------------------------- | --------------------------------------------- | +| Codat.Sync.Payroll.Models.Errors.ErrorMessage | 400,401,402,403,404,429,500,503 | application/json | +| Codat.Sync.Payroll.Models.Errors.SDKException | 4xx-5xx | */* | ## ListPullOperations @@ -201,7 +221,12 @@ var res = await sdk.ManageData.ListPullOperationsAsync(req); ### Response **[ListPullOperationsResponse](../../Models/Operations/ListPullOperationsResponse.md)** +### Errors +| Error Object | Status Code | Content Type | +| --------------------------------------------- | --------------------------------------------- | --------------------------------------------- | +| Codat.Sync.Payroll.Models.Errors.ErrorMessage | 400,401,402,403,404,429,500,503 | application/json | +| Codat.Sync.Payroll.Models.Errors.SDKException | 4xx-5xx | */* | ## RefreshAllDataTypes @@ -241,7 +266,12 @@ var res = await sdk.ManageData.RefreshAllDataTypesAsync(req); ### Response **[RefreshAllDataTypesResponse](../../Models/Operations/RefreshAllDataTypesResponse.md)** +### Errors +| Error Object | Status Code | Content Type | +| --------------------------------------------- | --------------------------------------------- | --------------------------------------------- | +| Codat.Sync.Payroll.Models.Errors.ErrorMessage | 401,402,403,404,429,500,503 | application/json | +| Codat.Sync.Payroll.Models.Errors.SDKException | 4xx-5xx | */* | ## RefreshDataType @@ -262,7 +292,7 @@ var sdk = new CodatSyncPayroll(security: new Security() { RefreshDataTypeRequest req = new RefreshDataTypeRequest() { CompanyId = "8a210b68-6988-11ed-a1eb-0242ac120002", - DataType = SchemaDataType.Invoices, + DataType = Codat.Sync.Payroll.Models.Shared.SchemaDataType.Invoices, }; var res = await sdk.ManageData.RefreshDataTypeAsync(req); @@ -280,4 +310,9 @@ var res = await sdk.ManageData.RefreshDataTypeAsync(req); ### Response **[RefreshDataTypeResponse](../../Models/Operations/RefreshDataTypeResponse.md)** +### Errors +| Error Object | Status Code | Content Type | +| --------------------------------------------- | --------------------------------------------- | --------------------------------------------- | +| Codat.Sync.Payroll.Models.Errors.ErrorMessage | 401,402,403,404,429,500,503 | application/json | +| Codat.Sync.Payroll.Models.Errors.SDKException | 4xx-5xx | */* | diff --git a/sync-for-payroll/docs/sdks/trackingcategories/README.md b/sync-for-payroll/docs/sdks/trackingcategories/README.md index b01c25355..0ea6ad136 100644 --- a/sync-for-payroll/docs/sdks/trackingcategories/README.md +++ b/sync-for-payroll/docs/sdks/trackingcategories/README.md @@ -3,7 +3,7 @@ ## Overview -Tracking categories +Get, create, and update Tracking Categories for additional categorization of payroll components. ### Available Operations @@ -52,7 +52,12 @@ var res = await sdk.TrackingCategories.GetAsync(req); ### Response **[GetTrackingCategoryResponse](../../Models/Operations/GetTrackingCategoryResponse.md)** +### Errors +| Error Object | Status Code | Content Type | +| --------------------------------------------- | --------------------------------------------- | --------------------------------------------- | +| Codat.Sync.Payroll.Models.Errors.ErrorMessage | 401,402,403,404,409,429,500,503 | application/json | +| Codat.Sync.Payroll.Models.Errors.SDKException | 4xx-5xx | */* | ## List @@ -96,4 +101,9 @@ var res = await sdk.TrackingCategories.ListAsync(req); ### Response **[ListTrackingCategoriesResponse](../../Models/Operations/ListTrackingCategoriesResponse.md)** +### Errors +| Error Object | Status Code | Content Type | +| --------------------------------------------- | --------------------------------------------- | --------------------------------------------- | +| Codat.Sync.Payroll.Models.Errors.ErrorMessage | 400,401,402,403,404,409,429,500,503 | application/json | +| Codat.Sync.Payroll.Models.Errors.SDKException | 4xx-5xx | */* | diff --git a/sync-for-payroll/gen.yaml b/sync-for-payroll/gen.yaml index 246505ae9..0eef8b027 100644 --- a/sync-for-payroll/gen.yaml +++ b/sync-for-payroll/gen.yaml @@ -7,11 +7,16 @@ generation: nameResolutionDec2023: false parameterOrderingFeb2024: false requestResponseComponentNamesFeb2024: false + auth: + oAuth2ClientCredentialsEnabled: false telemetryEnabled: true csharp: - version: 3.0.0 + version: 3.1.0 + additionalDependencies: [] author: Codat + clientServerStatusCodesAsErrors: true description: Push payroll to accounting platforms. + disableNamespacePascalCasingApr2024: false dotnetVersion: net6.0 flattenGlobalSecurity: false imports: @@ -26,3 +31,4 @@ csharp: maxMethodParams: 0 outputModelSuffix: output packageName: Codat.Sync.Payroll + responseFormat: envelope diff --git a/sync-for-payroll/global.json b/sync-for-payroll/global.json new file mode 100644 index 000000000..39c6b2556 --- /dev/null +++ b/sync-for-payroll/global.json @@ -0,0 +1,6 @@ +{ + "sdk": { + "version": "6.0.0", + "rollForward": "latestMinor" + } +}