diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock index 43c73b6c..02c8022f 100644 --- a/.speakeasy/workflow.lock +++ b/.speakeasy/workflow.lock @@ -1,4 +1,4 @@ -speakeasyVersion: 1.446.1 +speakeasyVersion: 1.447.0 sources: accounting-source: sourceNamespace: accounting-source @@ -39,11 +39,12 @@ sources: - 3.0.0 sync-for-commerce-source: sourceNamespace: sync-for-commerce-source - sourceRevisionDigest: sha256:cb5d21b0772d51cab179e51e610a8a801e4535bf1beb0deef33f63bd8ca7a5cc - sourceBlobDigest: sha256:ab64a148f650a63d3411abb1686ffdcc252ddb1525415957d2dcd7e818882594 + sourceRevisionDigest: sha256:e4039a2e5064b36672841a4e0fc7a0e1636dc9e4bc0cb78652e1ae3e59adc660 + sourceBlobDigest: sha256:1d1592cd53dae647bff1e58e43cb64f19f9da714cfc6f6198c43659b89b05369 tags: - latest - - main + - speakeasy-sdk-regen-1732638650 + - "1.1" sync-for-expenses-source: sourceNamespace: sync-for-expenses-source sourceRevisionDigest: sha256:b5eb22d9cecae898f800d1dd163828079b3e370e151cb6dbf02122f0c8cff9cc @@ -100,8 +101,10 @@ targets: sync-for-commerce-library: source: sync-for-commerce-source sourceNamespace: sync-for-commerce-source - sourceRevisionDigest: sha256:cb5d21b0772d51cab179e51e610a8a801e4535bf1beb0deef33f63bd8ca7a5cc - sourceBlobDigest: sha256:ab64a148f650a63d3411abb1686ffdcc252ddb1525415957d2dcd7e818882594 + sourceRevisionDigest: sha256:e4039a2e5064b36672841a4e0fc7a0e1636dc9e4bc0cb78652e1ae3e59adc660 + sourceBlobDigest: sha256:1d1592cd53dae647bff1e58e43cb64f19f9da714cfc6f6198c43659b89b05369 + codeSamplesNamespace: sync-for-commerce-source-code-samples + codeSamplesRevisionDigest: sha256:ff7247230bccbe9c59c157e7a3e9f5b5a76f1f7d296aa5c027d601ec09b60f59 sync-for-expenses-library: source: sync-for-expenses-source sourceNamespace: sync-for-expenses-source diff --git a/sync-for-commerce/.speakeasy/gen.lock b/sync-for-commerce/.speakeasy/gen.lock index 44ba7783..9b1e5f8e 100755 --- a/sync-for-commerce/.speakeasy/gen.lock +++ b/sync-for-commerce/.speakeasy/gen.lock @@ -1,12 +1,12 @@ lockVersion: 2.0.0 id: ceb26af7-1fbd-4c3d-943d-832f8df5d4a3 management: - docChecksum: 5b17c461a98ac32ecaa078bd4f1f644d + docChecksum: 4dd3691e8d9cbb167c6a1a7bffed41b8 docVersion: "1.1" - speakeasyVersion: 1.396.7 - generationVersion: 2.415.6 - releaseVersion: 0.2.0 - configChecksum: 79349a11f55bb5f43e7809c3e304628b + speakeasyVersion: 1.447.0 + generationVersion: 2.463.0 + releaseVersion: 1.0.0 + configChecksum: 6908b3177b93c0e00d852977795b3852 repoURL: https://github.com/codatio/client-sdk-java.git repoSubDirectory: sync-for-commerce published: true @@ -14,7 +14,7 @@ features: java: additionalDependencies: 0.1.0 constsAndDefaults: 0.1.1 - core: 3.29.7 + core: 3.32.2 deprecations: 2.81.1 examples: 2.81.3 globalSecurity: 2.82.7 @@ -25,6 +25,7 @@ features: nullables: 0.1.0 retries: 0.1.1 sdkHooks: 0.1.0 + serverEventsSentinels: 0.2.0 webhooks: 1.0.0 generatedFiles: - .gitattributes @@ -40,11 +41,15 @@ generatedFiles: - docs/models/components/CommerceConfiguration.md - docs/models/components/Companies.md - docs/models/components/Company.md + - docs/models/components/CompanyReference.md + - docs/models/components/CompanyReferenceLinks.md - docs/models/components/CompanySyncStatus.md - docs/models/components/Configuration.md - docs/models/components/ConfigurationMapSettings.md - docs/models/components/ConfigurationOption.md - docs/models/components/Connection.md + - docs/models/components/ConnectionWebhook.md + - docs/models/components/ConnectionWebhookPayload.md - docs/models/components/Connections.md - docs/models/components/CreateCompany.md - docs/models/components/DataConnectionError.md @@ -59,7 +64,6 @@ generatedFiles: - docs/models/components/FeatureType.md - docs/models/components/FeesConfiguration.md - docs/models/components/FeesSupplier.md - - docs/models/components/GroupReference.md - docs/models/components/Grouping.md - docs/models/components/GroupingLevels.md - docs/models/components/GroupingPeriod.md @@ -91,7 +95,6 @@ generatedFiles: - docs/models/components/SyncStatus.md - docs/models/components/SyncSummary.md - docs/models/components/SyncToLatestArgs.md - - docs/models/components/Tags.md - docs/models/components/TaxRateAmount.md - docs/models/components/TaxRateMapping.md - docs/models/components/UpdateConnection.md @@ -141,6 +144,7 @@ generatedFiles: - docs/models/operations/UpdateConnectionResponse.md - docs/models/operations/UpdateVisibleAccountsSyncFlowRequest.md - docs/models/operations/UpdateVisibleAccountsSyncFlowResponse.md + - docs/models/webhooks/ConnectionDeletedResponse.md - docs/models/webhooks/SyncConnectionDeletedResponse.md - docs/sdks/advancedcontrols/README.md - docs/sdks/codatsynccommerce/README.md @@ -170,11 +174,15 @@ generatedFiles: - src/main/java/io/codat/sync/commerce/models/components/CommerceConfiguration.java - src/main/java/io/codat/sync/commerce/models/components/Companies.java - src/main/java/io/codat/sync/commerce/models/components/Company.java + - src/main/java/io/codat/sync/commerce/models/components/CompanyReference.java + - src/main/java/io/codat/sync/commerce/models/components/CompanyReferenceLinks.java - src/main/java/io/codat/sync/commerce/models/components/CompanySyncStatus.java - src/main/java/io/codat/sync/commerce/models/components/Configuration.java - src/main/java/io/codat/sync/commerce/models/components/ConfigurationMapSettings.java - src/main/java/io/codat/sync/commerce/models/components/ConfigurationOption.java - src/main/java/io/codat/sync/commerce/models/components/Connection.java + - src/main/java/io/codat/sync/commerce/models/components/ConnectionWebhook.java + - src/main/java/io/codat/sync/commerce/models/components/ConnectionWebhookPayload.java - src/main/java/io/codat/sync/commerce/models/components/Connections.java - src/main/java/io/codat/sync/commerce/models/components/CreateCompany.java - src/main/java/io/codat/sync/commerce/models/components/DataConnectionError.java @@ -189,7 +197,6 @@ generatedFiles: - src/main/java/io/codat/sync/commerce/models/components/FeatureType.java - src/main/java/io/codat/sync/commerce/models/components/FeesConfiguration.java - src/main/java/io/codat/sync/commerce/models/components/FeesSupplier.java - - src/main/java/io/codat/sync/commerce/models/components/GroupReference.java - src/main/java/io/codat/sync/commerce/models/components/Grouping.java - src/main/java/io/codat/sync/commerce/models/components/GroupingLevels.java - src/main/java/io/codat/sync/commerce/models/components/GroupingPeriod.java @@ -221,7 +228,6 @@ generatedFiles: - src/main/java/io/codat/sync/commerce/models/components/SyncStatus.java - src/main/java/io/codat/sync/commerce/models/components/SyncSummary.java - src/main/java/io/codat/sync/commerce/models/components/SyncToLatestArgs.java - - src/main/java/io/codat/sync/commerce/models/components/Tags.java - src/main/java/io/codat/sync/commerce/models/components/TaxRateAmount.java - src/main/java/io/codat/sync/commerce/models/components/TaxRateMapping.java - src/main/java/io/codat/sync/commerce/models/components/UpdateConnection.java @@ -296,6 +302,7 @@ generatedFiles: - src/main/java/io/codat/sync/commerce/models/operations/UpdateVisibleAccountsSyncFlowRequest.java - src/main/java/io/codat/sync/commerce/models/operations/UpdateVisibleAccountsSyncFlowRequestBuilder.java - src/main/java/io/codat/sync/commerce/models/operations/UpdateVisibleAccountsSyncFlowResponse.java + - src/main/java/io/codat/sync/commerce/models/webhooks/ConnectionDeletedResponse.java - src/main/java/io/codat/sync/commerce/models/webhooks/SyncConnectionDeletedResponse.java - src/main/java/io/codat/sync/commerce/utils/BackoffStrategy.java - src/main/java/io/codat/sync/commerce/utils/BigDecimalString.java @@ -319,6 +326,7 @@ generatedFiles: - src/main/java/io/codat/sync/commerce/utils/OneOfDeserializer.java - src/main/java/io/codat/sync/commerce/utils/Options.java - src/main/java/io/codat/sync/commerce/utils/PathParamsMetadata.java + - src/main/java/io/codat/sync/commerce/utils/QueryParameter.java - src/main/java/io/codat/sync/commerce/utils/QueryParameters.java - src/main/java/io/codat/sync/commerce/utils/QueryParamsMetadata.java - src/main/java/io/codat/sync/commerce/utils/RequestBody.java @@ -333,6 +341,7 @@ generatedFiles: - src/main/java/io/codat/sync/commerce/utils/SpeakeasyMetadata.java - src/main/java/io/codat/sync/commerce/utils/TypedObject.java - src/main/java/io/codat/sync/commerce/utils/Types.java + - src/main/java/io/codat/sync/commerce/utils/Utf8UrlEncoder.java - src/main/java/io/codat/sync/commerce/utils/Utils.java examples: get-config-text-sync-flow: @@ -383,14 +392,14 @@ examples: create-company: "": requestBody: - application/json: {"description": "Requested early access to the new financing scheme.", "groups": [], "name": "string"} + application/json: {"description": "Requested early access to the new financing scheme.", "name": "string"} responses: "200": - application/json: {"created": "2022-01-01T12:00:00.000Z", "createdByUserName": "string", "dataConnections": [{"created": "2022-10-27T09:53:29Z", "dataConnectionErrors": [], "id": "ee2eb431-c0fa-4dc9-93fa-d29781c12bcd", "integrationId": "bf083d72-62c7-493e-aec9-81b4dbba7e2c", "integrationKey": "dfxm", "lastSync": "2022-10-27T10:22:43.6464237Z", "linkUrl": "https://link-api.codat.io/companies/86bd88cb-44ab-4dfb-b32f-87b19b14287f/connections/ee2eb431-c0fa-4dc9-93fa-d29781c12bcd/start", "platformName": "Basiq", "sourceId": "bdd831ce-eebd-4896-89a7-20e5ee8989ee", "sourceType": "Banking", "status": "Linked"}], "description": "Requested early access to the new financing scheme.", "id": "0498e921-9b53-4396-a412-4f2f5983b0a2", "lastSync": "2022-01-01T12:00:00.000Z", "name": "string", "redirect": "https://link.codat.io/company/27628208-459c-46a2-a705-5641ce25f739"} + application/json: {"created": "2022-01-01T12:00:00.000Z", "createdByUserName": "string", "dataConnections": [{"created": "2022-10-27T09:53:29Z", "id": "ee2eb431-c0fa-4dc9-93fa-d29781c12bcd", "integrationId": "bf083d72-62c7-493e-aec9-81b4dbba7e2c", "integrationKey": "dfxm", "lastSync": "2022-10-27T10:22:43.6464237Z", "linkUrl": "https://link-api.codat.io/companies/86bd88cb-44ab-4dfb-b32f-87b19b14287f/connections/ee2eb431-c0fa-4dc9-93fa-d29781c12bcd/start", "platformName": "Basiq", "sourceId": "bdd831ce-eebd-4896-89a7-20e5ee8989ee", "sourceType": "Banking", "status": "Linked"}], "description": "Requested early access to the new financing scheme.", "id": "0498e921-9b53-4396-a412-4f2f5983b0a2", "lastSync": "2022-01-01T12:00:00.000Z", "name": "string", "redirect": "https://link.codat.io/company/27628208-459c-46a2-a705-5641ce25f739", "tags": {"region": "us", "uid": "f6b0c253-16c7-4da1-a0c5-9c871e9c9d6c"}} "400": {} Malformed query: requestBody: - application/json: {"description": "Requested early access to the new financing scheme.", "groups": [], "name": "Bank of Dave"} + application/json: {"description": "Requested early access to the new financing scheme.", "name": "Bank of Dave"} responses: "400": application/json: {"canBeRetried": "Unknown", "correlationId": "bc997528a9d7abb9161ef45f05d38599", "detailedErrorCode": 0, "error": "Error processing request - not valid.", "service": "PublicApi", "statusCode": 400} @@ -496,7 +505,7 @@ examples: orderBy: "-modifiedDate" responses: "200": - application/json: {"_links": {"current": {"href": "string"}, "next": {"href": "string"}, "previous": {"href": "string"}, "self": {"href": "string"}}, "pageNumber": 0, "pageSize": 0, "results": [{"created": "2022-10-27T09:53:29Z", "dataConnectionErrors": [], "id": "ee2eb431-c0fa-4dc9-93fa-d29781c12bcd", "integrationId": "bf083d72-62c7-493e-aec9-81b4dbba7e2c", "integrationKey": "dfxm", "lastSync": "2022-10-27T10:22:43.6464237Z", "linkUrl": "https://link-api.codat.io/companies/86bd88cb-44ab-4dfb-b32f-87b19b14287f/connections/ee2eb431-c0fa-4dc9-93fa-d29781c12bcd/start", "platformName": "Basiq", "sourceId": "bdd831ce-eebd-4896-89a7-20e5ee8989ee", "sourceType": "Banking", "status": "Linked"}], "totalResults": 0} + application/json: {"_links": {"current": {"href": "string"}, "next": {"href": "string"}, "previous": {"href": "string"}, "self": {"href": "string"}}, "pageNumber": 0, "pageSize": 0, "results": [{"created": "2022-10-27T09:53:29Z", "id": "ee2eb431-c0fa-4dc9-93fa-d29781c12bcd", "integrationId": "bf083d72-62c7-493e-aec9-81b4dbba7e2c", "integrationKey": "dfxm", "lastSync": "2022-10-27T10:22:43.6464237Z", "linkUrl": "https://link-api.codat.io/companies/86bd88cb-44ab-4dfb-b32f-87b19b14287f/connections/ee2eb431-c0fa-4dc9-93fa-d29781c12bcd/start", "platformName": "Basiq", "sourceId": "bdd831ce-eebd-4896-89a7-20e5ee8989ee", "sourceType": "Banking", "status": "Linked"}], "totalResults": 0} Malformed query: parameters: path: @@ -640,3 +649,4 @@ examples: responses: "400": application/json: {"canBeRetried": "Unknown", "correlationId": "98457fb9956b7f9b4b2fd4f6e23bb5c8", "detailedErrorCode": 0, "error": "Error parsing query - Could not resolve property isCompleted on Dataset", "service": "PullApi", "statusCode": 400} +generatedTests: {} diff --git a/sync-for-commerce/.speakeasy/gen.yaml b/sync-for-commerce/.speakeasy/gen.yaml index a12e8288..7ee6625c 100644 --- a/sync-for-commerce/.speakeasy/gen.yaml +++ b/sync-for-commerce/.speakeasy/gen.yaml @@ -9,9 +9,10 @@ generation: requestResponseComponentNamesFeb2024: false auth: oAuth2ClientCredentialsEnabled: false + oAuth2PasswordEnabled: false telemetryEnabled: true java: - version: 0.2.0 + version: 1.0.0 additionalDependencies: [] additionalPlugins: [] artifactID: sync.commerce @@ -20,6 +21,7 @@ java: companyEmail: support@codat.io companyName: Codat companyURL: https://www.codat.io/ + defaultErrorName: SDKError description: Push merchants' data from your ecommerce or point-of-sale (POS) platform into your merchants' accounting platform. flattenGlobalSecurity: true githubURL: github.com/codatio/client-sdk-java/sync.commerce diff --git a/sync-for-commerce/README.md b/sync-for-commerce/README.md index 4a6dff9b..6842285f 100644 --- a/sync-for-commerce/README.md +++ b/sync-for-commerce/README.md @@ -53,7 +53,7 @@ The samples below show how a published SDK artifact is used: Gradle: ```groovy -implementation 'io.codat:sync.commerce:0.2.0' +implementation 'io.codat:sync.commerce:1.0.0' ``` Maven: @@ -61,7 +61,7 @@ Maven: io.codat sync.commerce - 0.2.0 + 1.0.0 ``` @@ -91,41 +91,30 @@ package hello.world; import io.codat.sync.commerce.CodatSyncCommerce; import io.codat.sync.commerce.models.components.Locale; -import io.codat.sync.commerce.models.errors.SDKError; +import io.codat.sync.commerce.models.errors.ErrorMessage; import io.codat.sync.commerce.models.operations.GetConfigTextSyncFlowRequest; import io.codat.sync.commerce.models.operations.GetConfigTextSyncFlowResponse; import java.lang.Exception; public class Application { - public static void main(String[] args) throws Exception { - try { - CodatSyncCommerce sdk = CodatSyncCommerce.builder() + public static void main(String[] args) throws ErrorMessage, Exception { + + CodatSyncCommerce sdk = CodatSyncCommerce.builder() .authHeader("Basic BASE_64_ENCODED(API_KEY)") - .build(); + .build(); - GetConfigTextSyncFlowRequest req = GetConfigTextSyncFlowRequest.builder() + GetConfigTextSyncFlowRequest req = GetConfigTextSyncFlowRequest.builder() .locale(Locale.EN_US) .build(); - GetConfigTextSyncFlowResponse res = sdk.syncFlowSettings().getConfigTextSyncFlow() + GetConfigTextSyncFlowResponse res = sdk.syncFlowSettings().getConfigTextSyncFlow() .request(req) .call(); - if (res.localizationInfo().isPresent()) { - // handle response - } - } catch (io.codat.sync.commerce.models.errors.ErrorMessage e) { - // handle exception - throw e; - } catch (SDKError e) { - // handle exception - throw e; - } catch (Exception e) { - // handle exception - throw e; + if (res.localizationInfo().isPresent()) { + // handle response } - } } ``` @@ -189,7 +178,7 @@ package hello.world; import io.codat.sync.commerce.CodatSyncCommerce; import io.codat.sync.commerce.models.components.Locale; -import io.codat.sync.commerce.models.errors.SDKError; +import io.codat.sync.commerce.models.errors.ErrorMessage; import io.codat.sync.commerce.models.operations.GetConfigTextSyncFlowRequest; import io.codat.sync.commerce.models.operations.GetConfigTextSyncFlowResponse; import io.codat.sync.commerce.utils.BackoffStrategy; @@ -199,17 +188,17 @@ import java.util.concurrent.TimeUnit; public class Application { - public static void main(String[] args) throws Exception { - try { - CodatSyncCommerce sdk = CodatSyncCommerce.builder() + public static void main(String[] args) throws ErrorMessage, Exception { + + CodatSyncCommerce sdk = CodatSyncCommerce.builder() .authHeader("Basic BASE_64_ENCODED(API_KEY)") - .build(); + .build(); - GetConfigTextSyncFlowRequest req = GetConfigTextSyncFlowRequest.builder() + GetConfigTextSyncFlowRequest req = GetConfigTextSyncFlowRequest.builder() .locale(Locale.EN_US) .build(); - GetConfigTextSyncFlowResponse res = sdk.syncFlowSettings().getConfigTextSyncFlow() + GetConfigTextSyncFlowResponse res = sdk.syncFlowSettings().getConfigTextSyncFlow() .request(req) .retryConfig(RetryConfig.builder() .backoff(BackoffStrategy.builder() @@ -223,20 +212,9 @@ public class Application { .build()) .call(); - if (res.localizationInfo().isPresent()) { - // handle response - } - } catch (io.codat.sync.commerce.models.errors.ErrorMessage e) { - // handle exception - throw e; - } catch (SDKError e) { - // handle exception - throw e; - } catch (Exception e) { - // handle exception - throw e; + if (res.localizationInfo().isPresent()) { + // handle response } - } } ``` @@ -247,7 +225,7 @@ package hello.world; import io.codat.sync.commerce.CodatSyncCommerce; import io.codat.sync.commerce.models.components.Locale; -import io.codat.sync.commerce.models.errors.SDKError; +import io.codat.sync.commerce.models.errors.ErrorMessage; import io.codat.sync.commerce.models.operations.GetConfigTextSyncFlowRequest; import io.codat.sync.commerce.models.operations.GetConfigTextSyncFlowResponse; import io.codat.sync.commerce.utils.BackoffStrategy; @@ -257,9 +235,9 @@ import java.util.concurrent.TimeUnit; public class Application { - public static void main(String[] args) throws Exception { - try { - CodatSyncCommerce sdk = CodatSyncCommerce.builder() + public static void main(String[] args) throws ErrorMessage, Exception { + + CodatSyncCommerce sdk = CodatSyncCommerce.builder() .retryConfig(RetryConfig.builder() .backoff(BackoffStrategy.builder() .initialInterval(1L, TimeUnit.MILLISECONDS) @@ -271,30 +249,19 @@ public class Application { .build()) .build()) .authHeader("Basic BASE_64_ENCODED(API_KEY)") - .build(); + .build(); - GetConfigTextSyncFlowRequest req = GetConfigTextSyncFlowRequest.builder() + GetConfigTextSyncFlowRequest req = GetConfigTextSyncFlowRequest.builder() .locale(Locale.EN_US) .build(); - GetConfigTextSyncFlowResponse res = sdk.syncFlowSettings().getConfigTextSyncFlow() + GetConfigTextSyncFlowResponse res = sdk.syncFlowSettings().getConfigTextSyncFlow() .request(req) .call(); - if (res.localizationInfo().isPresent()) { - // handle response - } - } catch (io.codat.sync.commerce.models.errors.ErrorMessage e) { - // handle exception - throw e; - } catch (SDKError e) { - // handle exception - throw e; - } catch (Exception e) { - // handle exception - throw e; + if (res.localizationInfo().isPresent()) { + // handle response } - } } ``` @@ -303,12 +270,14 @@ public class Application { ## Error Handling -Handling errors in this SDK should largely match your expectations. All operations return a response object or raise an error. If Error objects are specified in your OpenAPI Spec, the SDK will throw the appropriate Exception type. +Handling errors in this SDK should largely match your expectations. All operations return a response object or raise an exception. + +By default, an API error will throw a `models/errors/SDKError` exception. When custom error responses are specified for an operation, the SDK may also throw their associated exception. You can refer to respective *Errors* tables in SDK docs for more details on possible exception types for each operation. For example, the `getConfigTextSyncFlow` method throws the following exceptions: -| Error Object | Status Code | Content Type | -| -------------------------- | -------------------------- | -------------------------- | -| models/errors/ErrorMessage | 401,402,403,429,500,503 | application/json | -| models/errors/SDKError | 4xx-5xx | \*\/* | +| Error Type | Status Code | Content Type | +| -------------------------- | ---------------------------- | ---------------- | +| models/errors/ErrorMessage | 401, 402, 403, 429, 500, 503 | application/json | +| models/errors/SDKError | 4XX, 5XX | \*/\* | ### Example @@ -317,41 +286,30 @@ package hello.world; import io.codat.sync.commerce.CodatSyncCommerce; import io.codat.sync.commerce.models.components.Locale; -import io.codat.sync.commerce.models.errors.SDKError; +import io.codat.sync.commerce.models.errors.ErrorMessage; import io.codat.sync.commerce.models.operations.GetConfigTextSyncFlowRequest; import io.codat.sync.commerce.models.operations.GetConfigTextSyncFlowResponse; import java.lang.Exception; public class Application { - public static void main(String[] args) throws Exception { - try { - CodatSyncCommerce sdk = CodatSyncCommerce.builder() + public static void main(String[] args) throws ErrorMessage, Exception { + + CodatSyncCommerce sdk = CodatSyncCommerce.builder() .authHeader("Basic BASE_64_ENCODED(API_KEY)") - .build(); + .build(); - GetConfigTextSyncFlowRequest req = GetConfigTextSyncFlowRequest.builder() + GetConfigTextSyncFlowRequest req = GetConfigTextSyncFlowRequest.builder() .locale(Locale.EN_US) .build(); - GetConfigTextSyncFlowResponse res = sdk.syncFlowSettings().getConfigTextSyncFlow() + GetConfigTextSyncFlowResponse res = sdk.syncFlowSettings().getConfigTextSyncFlow() .request(req) .call(); - if (res.localizationInfo().isPresent()) { - // handle response - } - } catch (io.codat.sync.commerce.models.errors.ErrorMessage e) { - // handle exception - throw e; - } catch (SDKError e) { - // handle exception - throw e; - } catch (Exception e) { - // handle exception - throw e; + if (res.localizationInfo().isPresent()) { + // handle response } - } } ``` @@ -360,106 +318,39 @@ public class Application { ## Server Selection -### Select Server by Index - -You can override the default server globally by passing a server index to the `serverIndex` builder method 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: - -| # | Server | Variables | -| - | ------ | --------- | -| 0 | `https://api.codat.io` | None | - -#### Example - -```java -package hello.world; - -import io.codat.sync.commerce.CodatSyncCommerce; -import io.codat.sync.commerce.models.components.Locale; -import io.codat.sync.commerce.models.errors.SDKError; -import io.codat.sync.commerce.models.operations.GetConfigTextSyncFlowRequest; -import io.codat.sync.commerce.models.operations.GetConfigTextSyncFlowResponse; -import java.lang.Exception; - -public class Application { - - public static void main(String[] args) throws Exception { - try { - CodatSyncCommerce sdk = CodatSyncCommerce.builder() - .serverIndex(0) - .authHeader("Basic BASE_64_ENCODED(API_KEY)") - .build(); - - GetConfigTextSyncFlowRequest req = GetConfigTextSyncFlowRequest.builder() - .locale(Locale.EN_US) - .build(); - - GetConfigTextSyncFlowResponse res = sdk.syncFlowSettings().getConfigTextSyncFlow() - .request(req) - .call(); - - if (res.localizationInfo().isPresent()) { - // handle response - } - } catch (io.codat.sync.commerce.models.errors.ErrorMessage e) { - // handle exception - throw e; - } catch (SDKError e) { - // handle exception - throw e; - } catch (Exception e) { - // handle exception - throw e; - } - - } -} -``` - - ### Override Server URL Per-Client -The default server can also be overridden globally by passing a URL to the `serverURL` builder method when initializing the SDK client instance. For example: +The default server can also be overridden globally using the `.serverURL(String serverUrl)` builder method when initializing the SDK client instance. For example: ```java package hello.world; import io.codat.sync.commerce.CodatSyncCommerce; import io.codat.sync.commerce.models.components.Locale; -import io.codat.sync.commerce.models.errors.SDKError; +import io.codat.sync.commerce.models.errors.ErrorMessage; import io.codat.sync.commerce.models.operations.GetConfigTextSyncFlowRequest; import io.codat.sync.commerce.models.operations.GetConfigTextSyncFlowResponse; import java.lang.Exception; public class Application { - public static void main(String[] args) throws Exception { - try { - CodatSyncCommerce sdk = CodatSyncCommerce.builder() + public static void main(String[] args) throws ErrorMessage, Exception { + + CodatSyncCommerce sdk = CodatSyncCommerce.builder() .serverURL("https://api.codat.io") .authHeader("Basic BASE_64_ENCODED(API_KEY)") - .build(); + .build(); - GetConfigTextSyncFlowRequest req = GetConfigTextSyncFlowRequest.builder() + GetConfigTextSyncFlowRequest req = GetConfigTextSyncFlowRequest.builder() .locale(Locale.EN_US) .build(); - GetConfigTextSyncFlowResponse res = sdk.syncFlowSettings().getConfigTextSyncFlow() + GetConfigTextSyncFlowResponse res = sdk.syncFlowSettings().getConfigTextSyncFlow() .request(req) .call(); - if (res.localizationInfo().isPresent()) { - // handle response - } - } catch (io.codat.sync.commerce.models.errors.ErrorMessage e) { - // handle exception - throw e; - } catch (SDKError e) { - // handle exception - throw e; - } catch (Exception e) { - // handle exception - throw e; + if (res.localizationInfo().isPresent()) { + // handle response } - } } ``` @@ -472,9 +363,9 @@ public class Application { This SDK supports the following security scheme globally: -| Name | Type | Scheme | -| ------------ | ------------ | ------------ | -| `authHeader` | apiKey | API key | +| Name | Type | Scheme | +| ------------ | ------ | ------- | +| `authHeader` | apiKey | API key | To authenticate with the API the `authHeader` parameter must be set when initializing the SDK client instance. For example: ```java @@ -482,41 +373,30 @@ package hello.world; import io.codat.sync.commerce.CodatSyncCommerce; import io.codat.sync.commerce.models.components.Locale; -import io.codat.sync.commerce.models.errors.SDKError; +import io.codat.sync.commerce.models.errors.ErrorMessage; import io.codat.sync.commerce.models.operations.GetConfigTextSyncFlowRequest; import io.codat.sync.commerce.models.operations.GetConfigTextSyncFlowResponse; import java.lang.Exception; public class Application { - public static void main(String[] args) throws Exception { - try { - CodatSyncCommerce sdk = CodatSyncCommerce.builder() + public static void main(String[] args) throws ErrorMessage, Exception { + + CodatSyncCommerce sdk = CodatSyncCommerce.builder() .authHeader("Basic BASE_64_ENCODED(API_KEY)") - .build(); + .build(); - GetConfigTextSyncFlowRequest req = GetConfigTextSyncFlowRequest.builder() + GetConfigTextSyncFlowRequest req = GetConfigTextSyncFlowRequest.builder() .locale(Locale.EN_US) .build(); - GetConfigTextSyncFlowResponse res = sdk.syncFlowSettings().getConfigTextSyncFlow() + GetConfigTextSyncFlowResponse res = sdk.syncFlowSettings().getConfigTextSyncFlow() .request(req) .call(); - if (res.localizationInfo().isPresent()) { - // handle response - } - } catch (io.codat.sync.commerce.models.errors.ErrorMessage e) { - // handle exception - throw e; - } catch (SDKError e) { - // handle exception - throw e; - } catch (Exception e) { - // handle exception - throw e; + if (res.localizationInfo().isPresent()) { + // handle response } - } } ``` diff --git a/sync-for-commerce/RELEASES.md b/sync-for-commerce/RELEASES.md index ddf7bf21..f104fe97 100644 --- a/sync-for-commerce/RELEASES.md +++ b/sync-for-commerce/RELEASES.md @@ -18,4 +18,14 @@ Based on: ### Generated - [java v0.2.0] sync-for-commerce ### Releases -- [Maven Central v0.2.0] https://central.sonatype.com/artifact/io.codat.sync/commerce/0.2.0 - sync-for-commerce \ No newline at end of file +- [Maven Central v0.2.0] https://central.sonatype.com/artifact/io.codat.sync/commerce/0.2.0 - sync-for-commerce + +## 2024-11-26 16:30:43 +### Changes +Based on: +- OpenAPI Doc +- Speakeasy CLI 1.447.0 (2.463.0) https://github.com/speakeasy-api/speakeasy +### Generated +- [java v1.0.0] sync-for-commerce +### Releases +- [Maven Central v1.0.0] https://central.sonatype.com/artifact/io.codat.sync/commerce/1.0.0 - sync-for-commerce \ No newline at end of file diff --git a/sync-for-commerce/USAGE.md b/sync-for-commerce/USAGE.md index 5e1a957e..982f09b9 100644 --- a/sync-for-commerce/USAGE.md +++ b/sync-for-commerce/USAGE.md @@ -4,41 +4,30 @@ package hello.world; import io.codat.sync.commerce.CodatSyncCommerce; import io.codat.sync.commerce.models.components.Locale; -import io.codat.sync.commerce.models.errors.SDKError; +import io.codat.sync.commerce.models.errors.ErrorMessage; import io.codat.sync.commerce.models.operations.GetConfigTextSyncFlowRequest; import io.codat.sync.commerce.models.operations.GetConfigTextSyncFlowResponse; import java.lang.Exception; public class Application { - public static void main(String[] args) throws Exception { - try { - CodatSyncCommerce sdk = CodatSyncCommerce.builder() + public static void main(String[] args) throws ErrorMessage, Exception { + + CodatSyncCommerce sdk = CodatSyncCommerce.builder() .authHeader("Basic BASE_64_ENCODED(API_KEY)") - .build(); + .build(); - GetConfigTextSyncFlowRequest req = GetConfigTextSyncFlowRequest.builder() + GetConfigTextSyncFlowRequest req = GetConfigTextSyncFlowRequest.builder() .locale(Locale.EN_US) .build(); - GetConfigTextSyncFlowResponse res = sdk.syncFlowSettings().getConfigTextSyncFlow() + GetConfigTextSyncFlowResponse res = sdk.syncFlowSettings().getConfigTextSyncFlow() .request(req) .call(); - if (res.localizationInfo().isPresent()) { - // handle response - } - } catch (io.codat.sync.commerce.models.errors.ErrorMessage e) { - // handle exception - throw e; - } catch (SDKError e) { - // handle exception - throw e; - } catch (Exception e) { - // handle exception - throw e; + if (res.localizationInfo().isPresent()) { + // handle response } - } } ``` diff --git a/sync-for-commerce/build.gradle b/sync-for-commerce/build.gradle index a5f4e7cd..973c7c2d 100644 --- a/sync-for-commerce/build.gradle +++ b/sync-for-commerce/build.gradle @@ -63,7 +63,7 @@ tasks.withType(Javadoc) { } group = "io.codat" -version = "0.2.0" +version = "1.0.0" sourcesJar { archiveBaseName = "sync.commerce" @@ -101,7 +101,7 @@ publishing { maven(MavenPublication) { groupId = 'io.codat' artifactId = 'sync.commerce' - version = '0.2.0' + version = '1.0.0' from components.java @@ -145,10 +145,11 @@ if (!project.hasProperty('skip.signing')) { } dependencies { + api 'com.fasterxml.jackson.core:jackson-annotations:2.17.2' implementation 'com.fasterxml.jackson.core:jackson-databind:2.17.2' implementation 'com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.17.2' implementation 'com.fasterxml.jackson.datatype:jackson-datatype-jdk8:2.17.2' - implementation 'org.openapitools:jackson-databind-nullable:0.2.6' + api('org.openapitools:jackson-databind-nullable:0.2.6') {exclude group: 'com.fasterxml.jackson.core', module: 'jackson-databind'} implementation 'org.apache.httpcomponents:httpclient:4.5.14' implementation 'org.apache.httpcomponents:httpmime:4.5.14' implementation 'commons-io:commons-io:2.15.1' diff --git a/sync-for-commerce/docs/models/components/AccountConfiguration.md b/sync-for-commerce/docs/models/components/AccountConfiguration.md index b24c805c..693a4daf 100644 --- a/sync-for-commerce/docs/models/components/AccountConfiguration.md +++ b/sync-for-commerce/docs/models/components/AccountConfiguration.md @@ -5,10 +5,10 @@ G/L account object for configuration. ## Fields -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | -| `accountOptions` | List<[AccountConfigurationOption](../../models/components/AccountConfigurationOption.md)> | :heavy_minus_sign: | Object containing account options. | -| `descriptionText` | *JsonNullable* | :heavy_minus_sign: | Descriptive text for sales configuration section. | -| `labelText` | *JsonNullable* | :heavy_minus_sign: | Label text for sales configuration section. | -| `required` | *Optional* | :heavy_minus_sign: | Required section to be configured for sync. | -| `selectedAccountId` | *JsonNullable* | :heavy_minus_sign: | Selected account id from the list of available accounts. | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | +| `accountOptions` | List\<[AccountConfigurationOption](../../models/components/AccountConfigurationOption.md)> | :heavy_minus_sign: | Object containing account options. | +| `descriptionText` | *JsonNullable\* | :heavy_minus_sign: | Descriptive text for sales configuration section. | +| `labelText` | *JsonNullable\* | :heavy_minus_sign: | Label text for sales configuration section. | +| `required` | *Optional\* | :heavy_minus_sign: | Required section to be configured for sync. | +| `selectedAccountId` | *JsonNullable\* | :heavy_minus_sign: | Selected account id from the list of available accounts. | \ No newline at end of file diff --git a/sync-for-commerce/docs/models/components/AccountConfigurationOption.md b/sync-for-commerce/docs/models/components/AccountConfigurationOption.md index b7843f5f..ba84ba09 100644 --- a/sync-for-commerce/docs/models/components/AccountConfigurationOption.md +++ b/sync-for-commerce/docs/models/components/AccountConfigurationOption.md @@ -5,7 +5,7 @@ | Field | Type | Required | Description | Example | | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `classification` | *JsonNullable* | :heavy_minus_sign: | Classification of the type of G/L account. | Bank Nominal | -| `id` | *Optional* | :heavy_minus_sign: | Identifier for the account, unique for the company. | | -| `name` | *JsonNullable* | :heavy_minus_sign: | Name of the account. | | -| `nominalCode` | *JsonNullable* | :heavy_minus_sign: | 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. | | \ No newline at end of file +| `classification` | *JsonNullable\* | :heavy_minus_sign: | Classification of the type of G/L account. | Bank Nominal | +| `id` | *Optional\* | :heavy_minus_sign: | Identifier for the account, unique for the company. | | +| `name` | *JsonNullable\* | :heavy_minus_sign: | Name of the account. | | +| `nominalCode` | *JsonNullable\* | :heavy_minus_sign: | 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. | | \ No newline at end of file diff --git a/sync-for-commerce/docs/models/components/Branding.md b/sync-for-commerce/docs/models/components/Branding.md index 8cf784e8..ada9a738 100644 --- a/sync-for-commerce/docs/models/components/Branding.md +++ b/sync-for-commerce/docs/models/components/Branding.md @@ -5,6 +5,6 @@ | Field | Type | Required | Description | Example | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `button` | [Optional](../../models/components/BrandingButton.md) | :heavy_minus_sign: | Button branding references. | | -| `logo` | [Optional](../../models/components/BrandingLogo.md) | :heavy_minus_sign: | Logo branding references. | | -| `sourceId` | *Optional* | :heavy_minus_sign: | A source-specific ID used to distinguish between different sources originating from the same data connection. In general, a data connection is a single data source. However, for TrueLayer, `sourceId` is associated with a specific bank and has a many-to-one relationship with the `integrationId`. | 35b92968-9851-4095-ad60-395c95cbcba4 | \ No newline at end of file +| `button` | [Optional\](../../models/components/BrandingButton.md) | :heavy_minus_sign: | Button branding references. | | +| `logo` | [Optional\](../../models/components/BrandingLogo.md) | :heavy_minus_sign: | Logo branding references. | | +| `sourceId` | *Optional\* | :heavy_minus_sign: | A source-specific ID used to distinguish between different sources originating from the same data connection. In general, a data connection is a single data source. However, for TrueLayer, `sourceId` is associated with a specific bank and has a many-to-one relationship with the `integrationId`. | 35b92968-9851-4095-ad60-395c95cbcba4 | \ No newline at end of file diff --git a/sync-for-commerce/docs/models/components/BrandingButton.md b/sync-for-commerce/docs/models/components/BrandingButton.md index d2e16b9e..51c15bb2 100644 --- a/sync-for-commerce/docs/models/components/BrandingButton.md +++ b/sync-for-commerce/docs/models/components/BrandingButton.md @@ -5,7 +5,7 @@ Button branding references. ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | -| `default_` | [Optional](../../models/components/BrandingImage.md) | :heavy_minus_sign: | N/A | -| `hover` | [Optional](../../models/components/BrandingImage.md) | :heavy_minus_sign: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | +| `default_` | [Optional\](../../models/components/BrandingImage.md) | :heavy_minus_sign: | N/A | +| `hover` | [Optional\](../../models/components/BrandingImage.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/sync-for-commerce/docs/models/components/BrandingImage.md b/sync-for-commerce/docs/models/components/BrandingImage.md index 43d70ffa..f7dec343 100644 --- a/sync-for-commerce/docs/models/components/BrandingImage.md +++ b/sync-for-commerce/docs/models/components/BrandingImage.md @@ -3,6 +3,6 @@ ## Fields -| Field | Type | Required | Description | -| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | -| `image` | [Optional](../../models/components/ImageReference.md) | :heavy_minus_sign: | Image reference. | \ No newline at end of file +| Field | Type | Required | Description | +| ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | +| `image` | [Optional\](../../models/components/ImageReference.md) | :heavy_minus_sign: | Image reference. | \ No newline at end of file diff --git a/sync-for-commerce/docs/models/components/BrandingLogo.md b/sync-for-commerce/docs/models/components/BrandingLogo.md index 842938cd..71368d4b 100644 --- a/sync-for-commerce/docs/models/components/BrandingLogo.md +++ b/sync-for-commerce/docs/models/components/BrandingLogo.md @@ -5,7 +5,7 @@ Logo branding references. ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------- | -| `full` | [Optional](../../models/components/BrandingImage.md) | :heavy_minus_sign: | N/A | -| `square` | [Optional](../../models/components/BrandingImage.md) | :heavy_minus_sign: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | +| `full` | [Optional\](../../models/components/BrandingImage.md) | :heavy_minus_sign: | N/A | +| `square` | [Optional\](../../models/components/BrandingImage.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/sync-for-commerce/docs/models/components/CommerceConfiguration.md b/sync-for-commerce/docs/models/components/CommerceConfiguration.md index f5633492..9fc68930 100644 --- a/sync-for-commerce/docs/models/components/CommerceConfiguration.md +++ b/sync-for-commerce/docs/models/components/CommerceConfiguration.md @@ -3,11 +3,11 @@ ## Fields -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | -| `countryCode` | *Optional* | :heavy_minus_sign: | The country code outlining where the company is based. | -| `fees` | [Optional](../../models/components/FeesConfiguration.md) | :heavy_minus_sign: | N/A | -| `mapSettings` | [Optional](../../models/components/ConfigurationMapSettings.md) | :heavy_minus_sign: | N/A | -| `newPayments` | [Optional](../../models/components/NewPaymentsConfiguration.md) | :heavy_minus_sign: | N/A | -| `payments` | [Optional](../../models/components/PaymentsConfiguration.md) | :heavy_minus_sign: | N/A | -| `sales` | [Optional](../../models/components/SalesConfiguration.md) | :heavy_minus_sign: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | +| `countryCode` | *Optional\* | :heavy_minus_sign: | The country code outlining where the company is based. | +| `fees` | [Optional\](../../models/components/FeesConfiguration.md) | :heavy_minus_sign: | N/A | +| `mapSettings` | [Optional\](../../models/components/ConfigurationMapSettings.md) | :heavy_minus_sign: | N/A | +| `newPayments` | [Optional\](../../models/components/NewPaymentsConfiguration.md) | :heavy_minus_sign: | N/A | +| `payments` | [Optional\](../../models/components/PaymentsConfiguration.md) | :heavy_minus_sign: | N/A | +| `sales` | [Optional\](../../models/components/SalesConfiguration.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/sync-for-commerce/docs/models/components/Companies.md b/sync-for-commerce/docs/models/components/Companies.md index 3e6ef9b8..2abd4efd 100644 --- a/sync-for-commerce/docs/models/components/Companies.md +++ b/sync-for-commerce/docs/models/components/Companies.md @@ -8,5 +8,5 @@ | `links` | [Links](../../models/components/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/components/Company.md)> | :heavy_minus_sign: | N/A | | +| `results` | List\<[Company](../../models/components/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-commerce/docs/models/components/Company.md b/sync-for-commerce/docs/models/components/Company.md index 64761f7f..b5412d4c 100644 --- a/sync-for-commerce/docs/models/components/Company.md +++ b/sync-for-commerce/docs/models/components/Company.md @@ -11,12 +11,15 @@ When you create a company, you can specify a `name` and we will automatically ge | Field | Type | Required | Description | Example | | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `created` | *Optional* | :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 | -| `createdByUserName` | *JsonNullable* | :heavy_minus_sign: | Name of user that created the company in Codat. | | -| `dataConnections` | List<[Connection](../../models/components/Connection.md)> | :heavy_minus_sign: | N/A | | -| `description` | *Optional* | :heavy_minus_sign: | Additional information about the company. This can be used to store foreign IDs, references, etc. | Requested early access to the new financing scheme. | +| `created` | *Optional\* | :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 | +| `createdByUserName` | *JsonNullable\* | :heavy_minus_sign: | Name of user that created the company in Codat. | | +| `dataConnections` | List\<[Connection](../../models/components/Connection.md)> | :heavy_minus_sign: | N/A | | +| `description` | *Optional\* | :heavy_minus_sign: | Additional information about the company. This can be used to store foreign IDs, references, etc. | Requested early access to the new financing scheme. | | `id` | *String* | :heavy_check_mark: | Unique identifier for your SMB in Codat. | 8a210b68-6988-11ed-a1eb-0242ac120002 | -| `lastSync` | *Optional* | :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 | +| `lastSync` | *Optional\* | :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 | | `name` | *String* | :heavy_check_mark: | The name of the company | Codat Ltd. | +| `products` | List\<*String*> | :heavy_minus_sign: | An array of products that are currently enabled for the company. | | | `redirect` | *String* | :heavy_check_mark: | The `redirect` [Link URL](https://docs.codat.io/auth-flow/authorize-hosted-link) enabling the customer to start their auth flow journey for the company. | https://link.codat.io/company/27628208-459c-46a2-a705-5641ce25f739 | -| `tags` | [Optional](../../models/components/Tags.md) | :heavy_minus_sign: | A collection of user-defined key-value pairs that store custom metadata against the company. | | \ No newline at end of file +| `referenceParentCompany` | [Optional\](../../models/components/CompanyReference.md) | :heavy_minus_sign: | N/A | | +| `referenceSubsidiaryCompanies` | List\<[CompanyReference](../../models/components/CompanyReference.md)> | :heavy_minus_sign: | A list of subsidiary companies owned or controlled by this entity. Empty if the company has no children. | | +| `tags` | Map\ | :heavy_minus_sign: | A collection of user-defined key-value pairs that store custom metadata against the company. | | \ No newline at end of file diff --git a/sync-for-commerce/docs/models/components/CompanyReference.md b/sync-for-commerce/docs/models/components/CompanyReference.md new file mode 100644 index 00000000..36df806e --- /dev/null +++ b/sync-for-commerce/docs/models/components/CompanyReference.md @@ -0,0 +1,12 @@ +# CompanyReference + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | +| `description` | *Optional\* | :heavy_minus_sign: | Additional information about the company. This can be used to store foreign IDs, references, etc. | Requested early access to the new financing scheme. | +| `id` | *Optional\* | :heavy_minus_sign: | Unique identifier for your SMB in Codat. | 8a210b68-6988-11ed-a1eb-0242ac120002 | +| `links` | [Optional\](../../models/components/CompanyReferenceLinks.md) | :heavy_minus_sign: | A collection of links for the company. | | +| `name` | *Optional\* | :heavy_minus_sign: | The name of the company | Codat Ltd. | +| `tags` | Map\ | :heavy_minus_sign: | A collection of user-defined key-value pairs that store custom metadata against the company. | | \ No newline at end of file diff --git a/sync-for-commerce/docs/models/components/CompanyReferenceLinks.md b/sync-for-commerce/docs/models/components/CompanyReferenceLinks.md new file mode 100644 index 00000000..cf075bb9 --- /dev/null +++ b/sync-for-commerce/docs/models/components/CompanyReferenceLinks.md @@ -0,0 +1,10 @@ +# CompanyReferenceLinks + +A collection of links for the company. + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------- | --------------------------------------- | --------------------------------------- | --------------------------------------- | +| `portal` | *Optional\* | :heavy_minus_sign: | Link to the company page in the portal. | \ No newline at end of file diff --git a/sync-for-commerce/docs/models/components/CompanySyncStatus.md b/sync-for-commerce/docs/models/components/CompanySyncStatus.md index 820ff8fe..577bba83 100644 --- a/sync-for-commerce/docs/models/components/CompanySyncStatus.md +++ b/sync-for-commerce/docs/models/components/CompanySyncStatus.md @@ -5,11 +5,11 @@ | Field | Type | Required | Description | Example | | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `companyId` | *JsonNullable* | :heavy_minus_sign: | Unique identifier for your SMB in Codat. | d4d73051-ed31-42b6-99f6-d288cd940992 | -| `dataPushed` | *Optional* | :heavy_minus_sign: | Boolean of whether the sync resulted in data being pushed. | | -| `errorMessage` | *JsonNullable* | :heavy_minus_sign: | Error message of the sync. | | -| `syncExceptionMessage` | *JsonNullable* | :heavy_minus_sign: | Exception message of the sync. | | -| `syncId` | *JsonNullable* | :heavy_minus_sign: | Unique identifier of the sync. | a6a22aff-a43a-411d-a910-2dae73217cce | -| `syncStatus` | *JsonNullable* | :heavy_minus_sign: | Text status of the sync. | Complete | -| `syncStatusCode` | *Optional* | :heavy_minus_sign: | Status code of the sync. | 2000 | -| `syncUtc` | *Optional* | :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 | \ No newline at end of file +| `companyId` | *JsonNullable\* | :heavy_minus_sign: | Unique identifier for your SMB in Codat. | d4d73051-ed31-42b6-99f6-d288cd940992 | +| `dataPushed` | *Optional\* | :heavy_minus_sign: | Boolean of whether the sync resulted in data being pushed. | | +| `errorMessage` | *JsonNullable\* | :heavy_minus_sign: | Error message of the sync. | | +| `syncExceptionMessage` | *JsonNullable\* | :heavy_minus_sign: | Exception message of the sync. | | +| `syncId` | *JsonNullable\* | :heavy_minus_sign: | Unique identifier of the sync. | a6a22aff-a43a-411d-a910-2dae73217cce | +| `syncStatus` | *JsonNullable\* | :heavy_minus_sign: | Text status of the sync. | Complete | +| `syncStatusCode` | *Optional\* | :heavy_minus_sign: | Status code of the sync. | 2000 | +| `syncUtc` | *Optional\* | :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 | \ No newline at end of file diff --git a/sync-for-commerce/docs/models/components/Configuration.md b/sync-for-commerce/docs/models/components/Configuration.md index 32f640f9..8cf1af49 100644 --- a/sync-for-commerce/docs/models/components/Configuration.md +++ b/sync-for-commerce/docs/models/components/Configuration.md @@ -3,11 +3,11 @@ ## Fields -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | -| `accountingSoftwareCompanyName` | *Optional* | :heavy_minus_sign: | The company name defined in the accounting software. | -| `companyId` | *Optional* | :heavy_minus_sign: | Unique identifier for a company. | -| `configuration` | [Optional](../../models/components/CommerceConfiguration.md) | :heavy_minus_sign: | N/A | -| `configured` | *Optional* | :heavy_minus_sign: | True if Sync for Commerce has been configured for the company. | -| `enable` | *Optional* | :heavy_minus_sign: | True if Sync for Commerce is enabled for the company. | -| `schedule` | [Optional](../../models/components/SyncSchedule.md) | :heavy_minus_sign: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | +| `accountingSoftwareCompanyName` | *Optional\* | :heavy_minus_sign: | The company name defined in the accounting software. | +| `companyId` | *Optional\* | :heavy_minus_sign: | Unique identifier for a company. | +| `configuration` | [Optional\](../../models/components/CommerceConfiguration.md) | :heavy_minus_sign: | N/A | +| `configured` | *Optional\* | :heavy_minus_sign: | True if Sync for Commerce has been configured for the company. | +| `enable` | *Optional\* | :heavy_minus_sign: | True if Sync for Commerce is enabled for the company. | +| `schedule` | [Optional\](../../models/components/SyncSchedule.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/sync-for-commerce/docs/models/components/ConfigurationMapSettings.md b/sync-for-commerce/docs/models/components/ConfigurationMapSettings.md index 8e090d45..fa381460 100644 --- a/sync-for-commerce/docs/models/components/ConfigurationMapSettings.md +++ b/sync-for-commerce/docs/models/components/ConfigurationMapSettings.md @@ -5,4 +5,4 @@ | Field | Type | Required | Description | | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | -| `outputFormat` | [Optional](../../models/components/OutputFormat.md) | :heavy_minus_sign: | The format commerce transactions are stored in the accounting software. | \ No newline at end of file +| `outputFormat` | [Optional\](../../models/components/OutputFormat.md) | :heavy_minus_sign: | The format commerce transactions are stored in the accounting software. | \ No newline at end of file diff --git a/sync-for-commerce/docs/models/components/ConfigurationOption.md b/sync-for-commerce/docs/models/components/ConfigurationOption.md index 94eca101..d60271b1 100644 --- a/sync-for-commerce/docs/models/components/ConfigurationOption.md +++ b/sync-for-commerce/docs/models/components/ConfigurationOption.md @@ -5,5 +5,5 @@ | Field | Type | Required | Description | | --------------------------------- | --------------------------------- | --------------------------------- | --------------------------------- | -| `id` | *Optional* | :heavy_minus_sign: | Unique identifier for the option. | -| `name` | *JsonNullable* | :heavy_minus_sign: | Name value of the option. | \ No newline at end of file +| `id` | *Optional\* | :heavy_minus_sign: | Unique identifier for the option. | +| `name` | *JsonNullable\* | :heavy_minus_sign: | Name value of the option. | \ No newline at end of file diff --git a/sync-for-commerce/docs/models/components/Connection.md b/sync-for-commerce/docs/models/components/Connection.md index 5a377ef9..df9e608b 100644 --- a/sync-for-commerce/docs/models/components/Connection.md +++ b/sync-for-commerce/docs/models/components/Connection.md @@ -16,14 +16,13 @@ Before you can use a data connection to pull or push data, the company must gran | Field | Type | Required | Description | Example | | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `additionalProperties` | *Optional* | :heavy_minus_sign: | N/A | | -| `connectionInfo` | Map | :heavy_minus_sign: | N/A | | +| `connectionInfo` | Map\ | :heavy_minus_sign: | N/A | | | `created` | *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 | -| `dataConnectionErrors` | List<[DataConnectionError](../../models/components/DataConnectionError.md)> | :heavy_minus_sign: | N/A | | +| `dataConnectionErrors` | List\<[DataConnectionError](../../models/components/DataConnectionError.md)> | :heavy_minus_sign: | N/A | | | `id` | *String* | :heavy_check_mark: | Unique identifier for a company's data connection. | 2e9d2c44-f675-40ba-8049-353bfcb5e171 | | `integrationId` | *String* | :heavy_check_mark: | A Codat ID representing the integration. | fd321cb6-7963-4506-b873-e99593a45e30 | | `integrationKey` | *String* | :heavy_check_mark: | A unique four-character ID that identifies the platform of the company's data connection. This ensures continuity if the platform changes its name in the future. | | -| `lastSync` | *Optional* | :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 | +| `lastSync` | *Optional\* | :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 | | `linkUrl` | *String* | :heavy_check_mark: | The link URL your customers can use to authorize access to their business application. | https://link-api.codat.io/companies/86bd88cb-44ab-4dfb-b32f-87b19b14287f/connections/2e2eb431-c1fa-4dc9-93fa-d29781c12bcd/start | | `platformName` | *String* | :heavy_check_mark: | Name of integration connected to company. | | | `sourceId` | *String* | :heavy_check_mark: | A source-specific ID used to distinguish between different sources originating from the same data connection. In general, a data connection is a single data source. However, for TrueLayer, `sourceId` is associated with a specific bank and has a many-to-one relationship with the `integrationId`. | 35b92968-9851-4095-ad60-395c95cbcba4 | diff --git a/sync-for-commerce/docs/models/components/ConnectionWebhook.md b/sync-for-commerce/docs/models/components/ConnectionWebhook.md new file mode 100644 index 00000000..e2daac00 --- /dev/null +++ b/sync-for-commerce/docs/models/components/ConnectionWebhook.md @@ -0,0 +1,11 @@ +# ConnectionWebhook + + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `eventType` | *Optional\* | :heavy_minus_sign: | The type of event. | connection.created | +| `generatedDate` | *Optional\* | :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 | +| `id` | *Optional\* | :heavy_minus_sign: | Unique identifier of the event. | ba29118f-5406-4e59-b05c-ba307ca38d01 | +| `payload` | [Optional\](../../models/components/ConnectionWebhookPayload.md) | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/sync-for-commerce/docs/models/components/ConnectionWebhookPayload.md b/sync-for-commerce/docs/models/components/ConnectionWebhookPayload.md new file mode 100644 index 00000000..0a9cf608 --- /dev/null +++ b/sync-for-commerce/docs/models/components/ConnectionWebhookPayload.md @@ -0,0 +1,9 @@ +# ConnectionWebhookPayload + + +## Fields + +| Field | Type | Required | Description | Example | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `connection` | [Optional\](../../models/components/Connection.md) | :heavy_minus_sign: | A connection represents a [company's](https://docs.codat.io/sync-for-sync-for-commerce-api#/schemas/Company) connection to a data source and allows you to synchronize data (pull and/or push) with that source.

A company can have multiple data connections depending on the type of data source it is connecting to. For example, a single company can link to:

- [Accounting data](https://docs.codat.io/accounting-api/overview) - 1 active connection.
- [Banking data](https://docs.codat.io/banking-api/overview) - Multiple active connections.
- [Commerce data](https://docs.codat.io/commerce-api/overview) - Multiple active connections.
Any combination of accounting, banking, and commerce data connections is allowed.

Before you can use a data connection to pull or push data, the company must grant you access to their business data by [linking the connection](https://docs.codat.io/auth-flow/overview). | {
"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"
} | +| `referenceCompany` | [Optional\](../../models/components/CompanyReference.md) | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/sync-for-commerce/docs/models/components/Connections.md b/sync-for-commerce/docs/models/components/Connections.md index 142200ca..ea2d295a 100644 --- a/sync-for-commerce/docs/models/components/Connections.md +++ b/sync-for-commerce/docs/models/components/Connections.md @@ -8,5 +8,5 @@ | `links` | [Links](../../models/components/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/components/Connection.md)> | :heavy_minus_sign: | N/A | | +| `results` | List\<[Connection](../../models/components/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-commerce/docs/models/components/CreateCompany.md b/sync-for-commerce/docs/models/components/CreateCompany.md index 506ed269..b117c6cc 100644 --- a/sync-for-commerce/docs/models/components/CreateCompany.md +++ b/sync-for-commerce/docs/models/components/CreateCompany.md @@ -5,6 +5,6 @@ | Field | Type | Required | Description | Example | | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | -| `description` | *Optional* | :heavy_minus_sign: | Additional information about the company. This can be used to store foreign IDs, references, etc. | Requested early access to the new financing scheme. | -| `groups` | List<[GroupReference](../../models/components/GroupReference.md)> | :heavy_minus_sign: | Reference to the groups that the company is assigned to. | | -| `name` | *String* | :heavy_check_mark: | Name of company being connected. | Bank of Dave | \ No newline at end of file +| `description` | *Optional\* | :heavy_minus_sign: | Additional information about the company. This can be used to store foreign IDs, references, etc. | Requested early access to the new financing scheme. | +| `name` | *String* | :heavy_check_mark: | Name of company being connected. | Bank of Dave | +| `tags` | Map\ | :heavy_minus_sign: | A collection of user-defined key-value pairs that store custom metadata against the company. | | \ No newline at end of file diff --git a/sync-for-commerce/docs/models/components/DataConnectionError.md b/sync-for-commerce/docs/models/components/DataConnectionError.md index 30c434fc..47d52908 100644 --- a/sync-for-commerce/docs/models/components/DataConnectionError.md +++ b/sync-for-commerce/docs/models/components/DataConnectionError.md @@ -5,9 +5,9 @@ | Field | Type | Required | Description | Example | | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `errorMessage` | *Optional* | :heavy_minus_sign: | A message about a error returned by Codat. | | -| `erroredOnUtc` | *Optional* | :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 | -| `resolvedOnUtc` | *Optional* | :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 | -| `status` | [JsonNullable](../../models/components/ErrorStatus.md) | :heavy_minus_sign: | The current status of a transient error. Null statuses indicate that the error is not transient. | | -| `statusCode` | *Optional* | :heavy_minus_sign: | The HTTP status code returned by the source platform when the error occurred. | | -| `statusText` | *Optional* | :heavy_minus_sign: | A non-numeric status code/text returned by the source platform when the error occurred. | | \ No newline at end of file +| `errorMessage` | *Optional\* | :heavy_minus_sign: | A message about a error returned by Codat. | | +| `erroredOnUtc` | *Optional\* | :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 | +| `resolvedOnUtc` | *Optional\* | :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 | +| `status` | [JsonNullable\](../../models/components/ErrorStatus.md) | :heavy_minus_sign: | The current status of a transient error. Null statuses indicate that the error is not transient. | | +| `statusCode` | *Optional\* | :heavy_minus_sign: | The HTTP status code returned by the source platform when the error occurred. | | +| `statusText` | *Optional\* | :heavy_minus_sign: | A non-numeric status code/text returned by the source platform when the error occurred. | | \ No newline at end of file diff --git a/sync-for-commerce/docs/models/components/DataTypeFeature.md b/sync-for-commerce/docs/models/components/DataTypeFeature.md index 81dcc255..6682b2ad 100644 --- a/sync-for-commerce/docs/models/components/DataTypeFeature.md +++ b/sync-for-commerce/docs/models/components/DataTypeFeature.md @@ -5,7 +5,7 @@ Describes support for a given datatype and associated operations ## Fields -| Field | Type | Required | Description | Example | -| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | -| `dataType` | [Optional](../../models/components/DataTypes.md) | :heavy_minus_sign: | Available data types | invoices | -| `supportedFeatures` | List<[SupportedFeature](../../models/components/SupportedFeature.md)> | :heavy_check_mark: | N/A | | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | +| `dataType` | [Optional\](../../models/components/DataTypes.md) | :heavy_minus_sign: | Available data types | invoices | +| `supportedFeatures` | List\<[SupportedFeature](../../models/components/SupportedFeature.md)> | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/sync-for-commerce/docs/models/components/ErrorValidation.md b/sync-for-commerce/docs/models/components/ErrorValidation.md index 8665bc8c..2cfad261 100644 --- a/sync-for-commerce/docs/models/components/ErrorValidation.md +++ b/sync-for-commerce/docs/models/components/ErrorValidation.md @@ -5,7 +5,7 @@ A human-readable object describing validation decisions Codat has made. If an op ## Fields -| Field | Type | Required | Description | -| --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | -| `errors` | List<[ErrorValidationItem](../../models/components/ErrorValidationItem.md)> | :heavy_minus_sign: | N/A | -| `warnings` | List<[ErrorValidationItem](../../models/components/ErrorValidationItem.md)> | :heavy_minus_sign: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | +| `errors` | List\<[ErrorValidationItem](../../models/components/ErrorValidationItem.md)> | :heavy_minus_sign: | N/A | +| `warnings` | List\<[ErrorValidationItem](../../models/components/ErrorValidationItem.md)> | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/sync-for-commerce/docs/models/components/ErrorValidationItem.md b/sync-for-commerce/docs/models/components/ErrorValidationItem.md index 500a8de3..3c4a4160 100644 --- a/sync-for-commerce/docs/models/components/ErrorValidationItem.md +++ b/sync-for-commerce/docs/models/components/ErrorValidationItem.md @@ -5,6 +5,6 @@ | Field | Type | Required | Description | | -------------------------------------------- | -------------------------------------------- | -------------------------------------------- | -------------------------------------------- | -| `itemId` | *JsonNullable* | :heavy_minus_sign: | Unique identifier for a validation item. | -| `message` | *JsonNullable* | :heavy_minus_sign: | A message outlining validation item's issue. | -| `validatorName` | *JsonNullable* | :heavy_minus_sign: | Name of validator. | \ No newline at end of file +| `itemId` | *JsonNullable\* | :heavy_minus_sign: | Unique identifier for a validation item. | +| `message` | *JsonNullable\* | :heavy_minus_sign: | A message outlining validation item's issue. | +| `validatorName` | *JsonNullable\* | :heavy_minus_sign: | Name of validator. | \ No newline at end of file diff --git a/sync-for-commerce/docs/models/components/FeesConfiguration.md b/sync-for-commerce/docs/models/components/FeesConfiguration.md index debad8e0..355fb2d1 100644 --- a/sync-for-commerce/docs/models/components/FeesConfiguration.md +++ b/sync-for-commerce/docs/models/components/FeesConfiguration.md @@ -3,8 +3,8 @@ ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | -| `accounts` | Map | :heavy_minus_sign: | N/A | -| `feesSupplier` | [Optional](../../models/components/FeesSupplier.md) | :heavy_minus_sign: | N/A | -| `syncFees` | *Optional* | :heavy_minus_sign: | Boolean indicator to enable syncing fees. | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | +| `accounts` | Map\ | :heavy_minus_sign: | N/A | +| `feesSupplier` | [Optional\](../../models/components/FeesSupplier.md) | :heavy_minus_sign: | N/A | +| `syncFees` | *Optional\* | :heavy_minus_sign: | Boolean indicator to enable syncing fees. | \ No newline at end of file diff --git a/sync-for-commerce/docs/models/components/FeesSupplier.md b/sync-for-commerce/docs/models/components/FeesSupplier.md index fb8af5aa..a1689088 100644 --- a/sync-for-commerce/docs/models/components/FeesSupplier.md +++ b/sync-for-commerce/docs/models/components/FeesSupplier.md @@ -5,5 +5,5 @@ | Field | Type | Required | Description | | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -| `selectedSupplierId` | *JsonNullable* | :heavy_minus_sign: | Selected supplier id from the list of supplier records on the accounting software. | -| `supplierOptions` | List<[ConfigurationOption](../../models/components/ConfigurationOption.md)> | :heavy_minus_sign: | List of supplier options from the list of supplier records on the accounting software. | \ No newline at end of file +| `selectedSupplierId` | *JsonNullable\* | :heavy_minus_sign: | Selected supplier id from the list of supplier records on the accounting software. | +| `supplierOptions` | List\<[ConfigurationOption](../../models/components/ConfigurationOption.md)> | :heavy_minus_sign: | List of supplier options from the list of supplier records on the accounting software. | \ No newline at end of file diff --git a/sync-for-commerce/docs/models/components/GroupReference.md b/sync-for-commerce/docs/models/components/GroupReference.md deleted file mode 100644 index 638321db..00000000 --- a/sync-for-commerce/docs/models/components/GroupReference.md +++ /dev/null @@ -1,8 +0,0 @@ -# GroupReference - - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | -| `id` | *Optional* | :heavy_minus_sign: | Unique identifier for the group. | 60d2fa12-8a04-11ee-b9d1-0242ac120002 | \ No newline at end of file diff --git a/sync-for-commerce/docs/models/components/Grouping.md b/sync-for-commerce/docs/models/components/Grouping.md index 35d1d58d..fcaba2c2 100644 --- a/sync-for-commerce/docs/models/components/Grouping.md +++ b/sync-for-commerce/docs/models/components/Grouping.md @@ -3,7 +3,7 @@ ## Fields -| Field | Type | Required | Description | -| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | -| `groupingLevels` | [Optional](../../models/components/GroupingLevels.md) | :heavy_minus_sign: | N/A | -| `groupingPeriod` | [Optional](../../models/components/GroupingPeriod.md) | :heavy_minus_sign: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | +| `groupingLevels` | [Optional\](../../models/components/GroupingLevels.md) | :heavy_minus_sign: | N/A | +| `groupingPeriod` | [Optional\](../../models/components/GroupingPeriod.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/sync-for-commerce/docs/models/components/GroupingLevels.md b/sync-for-commerce/docs/models/components/GroupingLevels.md index 933b8709..71bcb422 100644 --- a/sync-for-commerce/docs/models/components/GroupingLevels.md +++ b/sync-for-commerce/docs/models/components/GroupingLevels.md @@ -3,7 +3,7 @@ ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | -| `invoiceLevel` | [Optional](../../models/components/InvoiceLevelSelection.md) | :heavy_minus_sign: | N/A | -| `invoiceLineLevel` | [Optional](../../models/components/InvoiceLineLevelSelection.md) | :heavy_minus_sign: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | +| `invoiceLevel` | [Optional\](../../models/components/InvoiceLevelSelection.md) | :heavy_minus_sign: | N/A | +| `invoiceLineLevel` | [Optional\](../../models/components/InvoiceLineLevelSelection.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/sync-for-commerce/docs/models/components/GroupingPeriod.md b/sync-for-commerce/docs/models/components/GroupingPeriod.md index d24b2aea..27461268 100644 --- a/sync-for-commerce/docs/models/components/GroupingPeriod.md +++ b/sync-for-commerce/docs/models/components/GroupingPeriod.md @@ -5,5 +5,5 @@ | Field | Type | Required | Description | | --------------------------------- | --------------------------------- | --------------------------------- | --------------------------------- | -| `groupingPeriodOptions` | List<*String*> | :heavy_minus_sign: | Array of grouping period options. | -| `selectedGroupingPeriod` | *JsonNullable* | :heavy_minus_sign: | Grouping period i.e. Daily sales. | \ No newline at end of file +| `groupingPeriodOptions` | List\<*String*> | :heavy_minus_sign: | Array of grouping period options. | +| `selectedGroupingPeriod` | *JsonNullable\* | :heavy_minus_sign: | Grouping period i.e. Daily sales. | \ No newline at end of file diff --git a/sync-for-commerce/docs/models/components/HalRef.md b/sync-for-commerce/docs/models/components/HalRef.md index e0c97c05..b65ff569 100644 --- a/sync-for-commerce/docs/models/components/HalRef.md +++ b/sync-for-commerce/docs/models/components/HalRef.md @@ -5,4 +5,4 @@ | Field | Type | Required | Description | | ------------------------ | ------------------------ | ------------------------ | ------------------------ | -| `href` | *Optional* | :heavy_minus_sign: | Uri hypertext reference. | \ No newline at end of file +| `href` | *Optional\* | :heavy_minus_sign: | Uri hypertext reference. | \ No newline at end of file diff --git a/sync-for-commerce/docs/models/components/ImageReference.md b/sync-for-commerce/docs/models/components/ImageReference.md index 69b13b70..6bd20356 100644 --- a/sync-for-commerce/docs/models/components/ImageReference.md +++ b/sync-for-commerce/docs/models/components/ImageReference.md @@ -7,5 +7,5 @@ Image reference. | Field | Type | Required | Description | | --------------------------------------------- | --------------------------------------------- | --------------------------------------------- | --------------------------------------------- | -| `alt` | *Optional* | :heavy_minus_sign: | Alternative text when image is not available. | -| `src` | *Optional* | :heavy_minus_sign: | Source URL for image. | \ No newline at end of file +| `alt` | *Optional\* | :heavy_minus_sign: | Alternative text when image is not available. | +| `src` | *Optional\* | :heavy_minus_sign: | Source URL for image. | \ No newline at end of file diff --git a/sync-for-commerce/docs/models/components/Integration.md b/sync-for-commerce/docs/models/components/Integration.md index 24e3adce..6ef56ea5 100644 --- a/sync-for-commerce/docs/models/components/Integration.md +++ b/sync-for-commerce/docs/models/components/Integration.md @@ -7,14 +7,14 @@ An integration that Codat supports | Field | Type | Required | Description | Example | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `dataProvidedBy` | *Optional* | :heavy_minus_sign: | The name of the data provider. | | -| `datatypeFeatures` | List<[DataTypeFeature](../../models/components/DataTypeFeature.md)> | :heavy_minus_sign: | N/A | | +| `dataProvidedBy` | *Optional\* | :heavy_minus_sign: | The name of the data provider. | | +| `datatypeFeatures` | List\<[DataTypeFeature](../../models/components/DataTypeFeature.md)> | :heavy_minus_sign: | N/A | | | `enabled` | *boolean* | :heavy_check_mark: | Whether this integration is enabled for your customers to use. | | -| `integrationId` | *Optional* | :heavy_minus_sign: | A Codat ID representing the integration. | fd321cb6-7963-4506-b873-e99593a45e30 | -| `isBeta` | *Optional* | :heavy_minus_sign: | `True` if the integration is currently in beta release. | | -| `isOfflineConnector` | *Optional* | :heavy_minus_sign: | `True` if the integration is to an application installed and run locally on an SMBs computer. | | +| `integrationId` | *Optional\* | :heavy_minus_sign: | A Codat ID representing the integration. | fd321cb6-7963-4506-b873-e99593a45e30 | +| `isBeta` | *Optional\* | :heavy_minus_sign: | `True` if the integration is currently in beta release. | | +| `isOfflineConnector` | *Optional\* | :heavy_minus_sign: | `True` if the integration is to an application installed and run locally on an SMBs computer. | | | `key` | *String* | :heavy_check_mark: | A unique 4-letter key to represent a platform in each integration. View [accounting](https://docs.codat.io/integrations/accounting/overview#platform-keys), [banking](https://docs.codat.io/integrations/banking/overview#platform-keys), and [commerce](https://docs.codat.io/integrations/commerce/overview#platform-keys) platform keys. | gbol | | `logoUrl` | *String* | :heavy_check_mark: | Static url for integration's logo. | | | `name` | *String* | :heavy_check_mark: | Name of integration. | Xero | -| `sourceId` | *Optional* | :heavy_minus_sign: | A source-specific ID used to distinguish between different sources originating from the same data connection. In general, a data connection is a single data source. However, for TrueLayer, `sourceId` is associated with a specific bank and has a many-to-one relationship with the `integrationId`. | 35b92968-9851-4095-ad60-395c95cbcba4 | -| `sourceType` | [Optional](../../models/components/SourceType.md) | :heavy_minus_sign: | The type of platform of the connection. | Accounting | \ No newline at end of file +| `sourceId` | *Optional\* | :heavy_minus_sign: | A source-specific ID used to distinguish between different sources originating from the same data connection. In general, a data connection is a single data source. However, for TrueLayer, `sourceId` is associated with a specific bank and has a many-to-one relationship with the `integrationId`. | 35b92968-9851-4095-ad60-395c95cbcba4 | +| `sourceType` | [Optional\](../../models/components/SourceType.md) | :heavy_minus_sign: | The type of platform of the connection. | Accounting | \ No newline at end of file diff --git a/sync-for-commerce/docs/models/components/Integrations.md b/sync-for-commerce/docs/models/components/Integrations.md index 70d9084b..1e9a218f 100644 --- a/sync-for-commerce/docs/models/components/Integrations.md +++ b/sync-for-commerce/docs/models/components/Integrations.md @@ -8,5 +8,5 @@ | `links` | [Links](../../models/components/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<[Integration](../../models/components/Integration.md)> | :heavy_minus_sign: | N/A | | +| `results` | List\<[Integration](../../models/components/Integration.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-commerce/docs/models/components/InvoiceLevelSelection.md b/sync-for-commerce/docs/models/components/InvoiceLevelSelection.md index 6bcd1c2e..f7178e52 100644 --- a/sync-for-commerce/docs/models/components/InvoiceLevelSelection.md +++ b/sync-for-commerce/docs/models/components/InvoiceLevelSelection.md @@ -5,5 +5,5 @@ | Field | Type | Required | Description | | ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | -| `groupByOptions` | List<*String*> | :heavy_minus_sign: | Options for grouping sales. | -| `selectedGroupByOptions` | List<*String*> | :heavy_minus_sign: | Selected array of grouping options. | \ No newline at end of file +| `groupByOptions` | List\<*String*> | :heavy_minus_sign: | Options for grouping sales. | +| `selectedGroupByOptions` | List\<*String*> | :heavy_minus_sign: | Selected array of grouping options. | \ No newline at end of file diff --git a/sync-for-commerce/docs/models/components/InvoiceLineLevelSelection.md b/sync-for-commerce/docs/models/components/InvoiceLineLevelSelection.md index 08688492..f9b64578 100644 --- a/sync-for-commerce/docs/models/components/InvoiceLineLevelSelection.md +++ b/sync-for-commerce/docs/models/components/InvoiceLineLevelSelection.md @@ -5,5 +5,5 @@ | Field | Type | Required | Description | | -------------------------------------- | -------------------------------------- | -------------------------------------- | -------------------------------------- | -| `groupByOptions` | List<*String*> | :heavy_minus_sign: | Options for grouping on invoice lines. | -| `selectedGroupByOptions` | List<*String*> | :heavy_minus_sign: | Invoice line level selection. | \ No newline at end of file +| `groupByOptions` | List\<*String*> | :heavy_minus_sign: | Options for grouping on invoice lines. | +| `selectedGroupByOptions` | List\<*String*> | :heavy_minus_sign: | Invoice line level selection. | \ No newline at end of file diff --git a/sync-for-commerce/docs/models/components/InvoiceStatus.md b/sync-for-commerce/docs/models/components/InvoiceStatus.md index 30bb77db..88d85fac 100644 --- a/sync-for-commerce/docs/models/components/InvoiceStatus.md +++ b/sync-for-commerce/docs/models/components/InvoiceStatus.md @@ -5,5 +5,5 @@ | Field | Type | Required | Description | Example | | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | -| `invoiceStatusOptions` | List<*String*> | :heavy_minus_sign: | Options for invoice statuses. | | -| `selectedInvoiceStatus` | *JsonNullable* | :heavy_minus_sign: | Selected option for invoice status for invoice to be synced. | Submitted | \ No newline at end of file +| `invoiceStatusOptions` | List\<*String*> | :heavy_minus_sign: | Options for invoice statuses. | | +| `selectedInvoiceStatus` | *JsonNullable\* | :heavy_minus_sign: | Selected option for invoice status for invoice to be synced. | Submitted | \ No newline at end of file diff --git a/sync-for-commerce/docs/models/components/Links.md b/sync-for-commerce/docs/models/components/Links.md index d53255ac..d829d756 100644 --- a/sync-for-commerce/docs/models/components/Links.md +++ b/sync-for-commerce/docs/models/components/Links.md @@ -3,9 +3,9 @@ ## Fields -| Field | Type | Required | Description | -| ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | -| `current` | [HalRef](../../models/components/HalRef.md) | :heavy_check_mark: | N/A | -| `next` | [Optional](../../models/components/HalRef.md) | :heavy_minus_sign: | N/A | -| `previous` | [Optional](../../models/components/HalRef.md) | :heavy_minus_sign: | N/A | -| `self` | [HalRef](../../models/components/HalRef.md) | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------ | ------------------------------------------------------ | ------------------------------------------------------ | ------------------------------------------------------ | +| `current` | [HalRef](../../models/components/HalRef.md) | :heavy_check_mark: | N/A | +| `next` | [Optional\](../../models/components/HalRef.md) | :heavy_minus_sign: | N/A | +| `previous` | [Optional\](../../models/components/HalRef.md) | :heavy_minus_sign: | N/A | +| `self` | [HalRef](../../models/components/HalRef.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/sync-for-commerce/docs/models/components/Localization.md b/sync-for-commerce/docs/models/components/Localization.md index 61e5eb96..35162ffe 100644 --- a/sync-for-commerce/docs/models/components/Localization.md +++ b/sync-for-commerce/docs/models/components/Localization.md @@ -3,7 +3,7 @@ ## Fields -| Field | Type | Required | Description | -| ---------------------- | ---------------------- | ---------------------- | ---------------------- | -| `required` | *Optional* | :heavy_minus_sign: | `True` if required. | -| `text` | *JsonNullable* | :heavy_minus_sign: | Value of the property. | \ No newline at end of file +| Field | Type | Required | Description | +| ----------------------- | ----------------------- | ----------------------- | ----------------------- | +| `required` | *Optional\* | :heavy_minus_sign: | `True` if required. | +| `text` | *JsonNullable\* | :heavy_minus_sign: | Value of the property. | \ No newline at end of file diff --git a/sync-for-commerce/docs/models/components/NewPaymentsConfiguration.md b/sync-for-commerce/docs/models/components/NewPaymentsConfiguration.md index 211e8aa4..ba56a4f9 100644 --- a/sync-for-commerce/docs/models/components/NewPaymentsConfiguration.md +++ b/sync-for-commerce/docs/models/components/NewPaymentsConfiguration.md @@ -3,7 +3,7 @@ ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | -| `accounts` | Map | :heavy_minus_sign: | N/A | -| `syncPayments` | *Optional* | :heavy_minus_sign: | Boolean indicator for syncing payments. | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | +| `accounts` | Map\ | :heavy_minus_sign: | N/A | +| `syncPayments` | *Optional\* | :heavy_minus_sign: | Boolean indicator for syncing payments. | \ No newline at end of file diff --git a/sync-for-commerce/docs/models/components/NewTaxRates.md b/sync-for-commerce/docs/models/components/NewTaxRates.md index 966e2108..31110165 100644 --- a/sync-for-commerce/docs/models/components/NewTaxRates.md +++ b/sync-for-commerce/docs/models/components/NewTaxRates.md @@ -3,10 +3,10 @@ ## Fields -| Field | Type | Required | Description | -| --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | -| `accountingTaxRateOptions` | List<[ConfigurationOption](../../models/components/ConfigurationOption.md)> | :heavy_minus_sign: | Array of accounting tax rate options. | -| `commerceTaxRateOptions` | List<[ConfigurationOption](../../models/components/ConfigurationOption.md)> | :heavy_minus_sign: | Array of tax component options. | -| `defaultZeroTaxRateOptions` | List<[ConfigurationOption](../../models/components/ConfigurationOption.md)> | :heavy_minus_sign: | Default zero tax rate selected for sync. | -| `selectedDefaultZeroTaxRateId` | *JsonNullable* | :heavy_minus_sign: | Default tax rate selected for sync. | -| `taxRateMappings` | List<[TaxRateMapping](../../models/components/TaxRateMapping.md)> | :heavy_minus_sign: | Array of tax component to rate mappings. | \ No newline at end of file +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | +| `accountingTaxRateOptions` | List\<[ConfigurationOption](../../models/components/ConfigurationOption.md)> | :heavy_minus_sign: | Array of accounting tax rate options. | +| `commerceTaxRateOptions` | List\<[ConfigurationOption](../../models/components/ConfigurationOption.md)> | :heavy_minus_sign: | Array of tax component options. | +| `defaultZeroTaxRateOptions` | List\<[ConfigurationOption](../../models/components/ConfigurationOption.md)> | :heavy_minus_sign: | Default zero tax rate selected for sync. | +| `selectedDefaultZeroTaxRateId` | *JsonNullable\* | :heavy_minus_sign: | Default tax rate selected for sync. | +| `taxRateMappings` | List\<[TaxRateMapping](../../models/components/TaxRateMapping.md)> | :heavy_minus_sign: | Array of tax component to rate mappings. | \ No newline at end of file diff --git a/sync-for-commerce/docs/models/components/PaymentsConfiguration.md b/sync-for-commerce/docs/models/components/PaymentsConfiguration.md index a071d99e..47ae3cf4 100644 --- a/sync-for-commerce/docs/models/components/PaymentsConfiguration.md +++ b/sync-for-commerce/docs/models/components/PaymentsConfiguration.md @@ -3,7 +3,7 @@ ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | -| `accounts` | Map | :heavy_minus_sign: | N/A | -| `syncPayments` | *Optional* | :heavy_minus_sign: | Boolean indicator for syncing sales. | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | +| `accounts` | Map\ | :heavy_minus_sign: | N/A | +| `syncPayments` | *Optional\* | :heavy_minus_sign: | Boolean indicator for syncing sales. | \ No newline at end of file diff --git a/sync-for-commerce/docs/models/components/SalesConfiguration.md b/sync-for-commerce/docs/models/components/SalesConfiguration.md index 270d94de..d2aa99d8 100644 --- a/sync-for-commerce/docs/models/components/SalesConfiguration.md +++ b/sync-for-commerce/docs/models/components/SalesConfiguration.md @@ -3,12 +3,12 @@ ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | -| `accounts` | Map | :heavy_minus_sign: | N/A | -| `grouping` | [Optional](../../models/components/Grouping.md) | :heavy_minus_sign: | N/A | -| `invoiceStatus` | [Optional](../../models/components/InvoiceStatus.md) | :heavy_minus_sign: | N/A | -| `newTaxRates` | [Optional](../../models/components/NewTaxRates.md) | :heavy_minus_sign: | N/A | -| `salesCustomer` | [Optional](../../models/components/SalesCustomer.md) | :heavy_minus_sign: | N/A | -| `syncSales` | *Optional* | :heavy_minus_sign: | Boolean indicator for syncing sales. | -| `taxRates` | Map | :heavy_minus_sign: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | +| `accounts` | Map\ | :heavy_minus_sign: | N/A | +| `grouping` | [Optional\](../../models/components/Grouping.md) | :heavy_minus_sign: | N/A | +| `invoiceStatus` | [Optional\](../../models/components/InvoiceStatus.md) | :heavy_minus_sign: | N/A | +| `newTaxRates` | [Optional\](../../models/components/NewTaxRates.md) | :heavy_minus_sign: | N/A | +| `salesCustomer` | [Optional\](../../models/components/SalesCustomer.md) | :heavy_minus_sign: | N/A | +| `syncSales` | *Optional\* | :heavy_minus_sign: | Boolean indicator for syncing sales. | +| `taxRates` | Map\ | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/sync-for-commerce/docs/models/components/SalesCustomer.md b/sync-for-commerce/docs/models/components/SalesCustomer.md index 5f462e4c..72274f31 100644 --- a/sync-for-commerce/docs/models/components/SalesCustomer.md +++ b/sync-for-commerce/docs/models/components/SalesCustomer.md @@ -5,5 +5,5 @@ | Field | Type | Required | Description | | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -| `customerOptions` | List<[ConfigurationOption](../../models/components/ConfigurationOption.md)> | :heavy_minus_sign: | List of customer options from the list of customer records on the accounting software. | -| `selectedCustomerId` | *JsonNullable* | :heavy_minus_sign: | Selected customer id from the list of customer records on the accounting software. | \ No newline at end of file +| `customerOptions` | List\<[ConfigurationOption](../../models/components/ConfigurationOption.md)> | :heavy_minus_sign: | List of customer options from the list of customer records on the accounting software. | +| `selectedCustomerId` | *JsonNullable\* | :heavy_minus_sign: | Selected customer id from the list of customer records on the accounting software. | \ No newline at end of file diff --git a/sync-for-commerce/docs/models/components/SyncConnectionDeletedWebhook.md b/sync-for-commerce/docs/models/components/SyncConnectionDeletedWebhook.md index 6e682f93..0fad121a 100644 --- a/sync-for-commerce/docs/models/components/SyncConnectionDeletedWebhook.md +++ b/sync-for-commerce/docs/models/components/SyncConnectionDeletedWebhook.md @@ -7,10 +7,10 @@ A Sync for Commerce connection is deleted. | Field | Type | Required | Description | Example | | -------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `alertId` | *Optional* | :heavy_minus_sign: | Unique identifier of the webhook event. | | -| `clientId` | *Optional* | :heavy_minus_sign: | Unique identifier for your client in Codat. | | -| `clientName` | *Optional* | :heavy_minus_sign: | Name of your client in Codat. | | -| `companyId` | *Optional* | :heavy_minus_sign: | Unique identifier for your SMB in Codat. | 8a210b68-6988-11ed-a1eb-0242ac120002 | -| `message` | *Optional* | :heavy_minus_sign: | A human-readable message about the webhook. | | -| ~~`ruleId`~~ | *Optional* | :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` | *Optional* | :heavy_minus_sign: | The type of rule. | | \ No newline at end of file +| `alertId` | *Optional\* | :heavy_minus_sign: | Unique identifier of the webhook event. | | +| `clientId` | *Optional\* | :heavy_minus_sign: | Unique identifier for your client in Codat. | | +| `clientName` | *Optional\* | :heavy_minus_sign: | Name of your client in Codat. | | +| `companyId` | *Optional\* | :heavy_minus_sign: | Unique identifier for your SMB in Codat. | 8a210b68-6988-11ed-a1eb-0242ac120002 | +| `message` | *Optional\* | :heavy_minus_sign: | A human-readable message about the webhook. | | +| ~~`ruleId`~~ | *Optional\* | :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` | *Optional\* | :heavy_minus_sign: | The type of rule. | | \ No newline at end of file diff --git a/sync-for-commerce/docs/models/components/SyncDateRangeUtc.md b/sync-for-commerce/docs/models/components/SyncDateRangeUtc.md index 08f88426..3b733c11 100644 --- a/sync-for-commerce/docs/models/components/SyncDateRangeUtc.md +++ b/sync-for-commerce/docs/models/components/SyncDateRangeUtc.md @@ -5,5 +5,5 @@ | Field | Type | Required | Description | Example | | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `finish` | *Optional* | :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 | -| `start` | *Optional* | :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 | \ No newline at end of file +| `finish` | *Optional\* | :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 | +| `start` | *Optional\* | :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 | \ No newline at end of file diff --git a/sync-for-commerce/docs/models/components/SyncFlowUrl.md b/sync-for-commerce/docs/models/components/SyncFlowUrl.md index 33630607..a27335c6 100644 --- a/sync-for-commerce/docs/models/components/SyncFlowUrl.md +++ b/sync-for-commerce/docs/models/components/SyncFlowUrl.md @@ -5,4 +5,4 @@ | Field | Type | Required | Description | Example | | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | -| `url` | *Optional* | :heavy_minus_sign: | Sync flow URL. | https://sync-flow-integration.codat.io/57b6fad9-e3ca-447b-89db-e4ffa21e6ef3/aiwb/mqjo/start?otp=836415 | \ No newline at end of file +| `url` | *Optional\* | :heavy_minus_sign: | Sync flow URL. | https://sync-flow-integration.codat.io/57b6fad9-e3ca-447b-89db-e4ffa21e6ef3/aiwb/mqjo/start?otp=836415 | \ No newline at end of file diff --git a/sync-for-commerce/docs/models/components/SyncSchedule.md b/sync-for-commerce/docs/models/components/SyncSchedule.md index 09332e9a..30d20e02 100644 --- a/sync-for-commerce/docs/models/components/SyncSchedule.md +++ b/sync-for-commerce/docs/models/components/SyncSchedule.md @@ -5,8 +5,8 @@ | Field | Type | Required | Description | Example | | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `frequencyOptions` | List<[SyncFrequency](../../models/components/SyncFrequency.md)> | :heavy_minus_sign: | N/A | | -| `selectedFrequency` | [Optional](../../models/components/SyncFrequency.md) | :heavy_minus_sign: | The frequency in which you want data to be synced. | | -| `startDate` | *Optional* | :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 | -| `syncHour` | *Optional* | :heavy_minus_sign: | The hour you want to trigger a sync. | | -| `timeZone` | *Optional* | :heavy_minus_sign: | The timezone for the company. | Europe/London | \ No newline at end of file +| `frequencyOptions` | List\<[SyncFrequency](../../models/components/SyncFrequency.md)> | :heavy_minus_sign: | N/A | | +| `selectedFrequency` | [Optional\](../../models/components/SyncFrequency.md) | :heavy_minus_sign: | The frequency in which you want data to be synced. | | +| `startDate` | *Optional\* | :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 | +| `syncHour` | *Optional\* | :heavy_minus_sign: | The hour you want to trigger a sync. | | +| `timeZone` | *Optional\* | :heavy_minus_sign: | The timezone for the company. | Europe/London | \ No newline at end of file diff --git a/sync-for-commerce/docs/models/components/SyncStatus.md b/sync-for-commerce/docs/models/components/SyncStatus.md index 6c327bff..a5a9a0b8 100644 --- a/sync-for-commerce/docs/models/components/SyncStatus.md +++ b/sync-for-commerce/docs/models/components/SyncStatus.md @@ -7,13 +7,13 @@ The status of syncing for a company and its connections. | Field | Type | Required | Description | Example | | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `commerceSyncId` | *Optional* | :heavy_minus_sign: | Unique identifier for the sync in Codat. | 8d0a044e-b683-4fc9-bd0d-bfb2ca5731b7 | -| `companyId` | *Optional* | :heavy_minus_sign: | N/A | | -| `dataConnections` | List<[Connection](../../models/components/Connection.md)> | :heavy_minus_sign: | Array of containing objects data connection information for the company. | | -| `dataPushed` | *Optional* | :heavy_minus_sign: | Boolean indicator for data being pushed during a sync operation. | true | -| `errorMessage` | *JsonNullable* | :heavy_minus_sign: | Friendly error message for the sync operation. | Customer 3b9bf2ed-a618-4af2-80f2-f2b57fddc748 is not in an Active state. (Archived) | -| `syncExceptionMessage` | *JsonNullable* | :heavy_minus_sign: | Exception message for the sync operation. | Customer 3b9bf2ed-a618-4af2-80f2-f2b57fddc748 is not in an Active state. (Archived) | -| `syncId` | *Optional* | :heavy_minus_sign: | Unique identifier for the sync in Codat. | 730dcf2e-3afc-4d83-bb90-9f4b95dddf68 | -| `syncStatus` | *JsonNullable* | :heavy_minus_sign: | Status of the sync of the company data. This is linked to status code. | ValidateError, Pending | -| `syncStatusCode` | *Optional* | :heavy_minus_sign: | Numerical status code sync of the company data. | 4000 | -| `syncUtc` | *Optional* | :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 | \ No newline at end of file +| `commerceSyncId` | *Optional\* | :heavy_minus_sign: | Unique identifier for the sync in Codat. | 8d0a044e-b683-4fc9-bd0d-bfb2ca5731b7 | +| `companyId` | *Optional\* | :heavy_minus_sign: | N/A | | +| `dataConnections` | List\<[Connection](../../models/components/Connection.md)> | :heavy_minus_sign: | Array of containing objects data connection information for the company. | | +| `dataPushed` | *Optional\* | :heavy_minus_sign: | Boolean indicator for data being pushed during a sync operation. | true | +| `errorMessage` | *JsonNullable\* | :heavy_minus_sign: | Friendly error message for the sync operation. | Customer 3b9bf2ed-a618-4af2-80f2-f2b57fddc748 is not in an Active state. (Archived) | +| `syncExceptionMessage` | *JsonNullable\* | :heavy_minus_sign: | Exception message for the sync operation. | Customer 3b9bf2ed-a618-4af2-80f2-f2b57fddc748 is not in an Active state. (Archived) | +| `syncId` | *Optional\* | :heavy_minus_sign: | Unique identifier for the sync in Codat. | 730dcf2e-3afc-4d83-bb90-9f4b95dddf68 | +| `syncStatus` | *JsonNullable\* | :heavy_minus_sign: | Status of the sync of the company data. This is linked to status code. | ValidateError, Pending | +| `syncStatusCode` | *Optional\* | :heavy_minus_sign: | Numerical status code sync of the company data. | 4000 | +| `syncUtc` | *Optional\* | :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 | \ No newline at end of file diff --git a/sync-for-commerce/docs/models/components/SyncSummary.md b/sync-for-commerce/docs/models/components/SyncSummary.md index 286a215a..8fc5fa61 100644 --- a/sync-for-commerce/docs/models/components/SyncSummary.md +++ b/sync-for-commerce/docs/models/components/SyncSummary.md @@ -5,13 +5,13 @@ | Field | Type | Required | Description | Example | | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `commerceSyncId` | *Optional* | :heavy_minus_sign: | Unique identifier for the sync in Codat. | 8d0a044e-b683-4fc9-bd0d-bfb2ca5731b7 | -| `companyId` | *Optional* | :heavy_minus_sign: | Unique identifier for your SMB in Codat. | f4637ec9-9fc0-4a02-8df0-c90d6dc86208 | -| `dataConnections` | List<[Connection](../../models/components/Connection.md)> | :heavy_minus_sign: | Array of containing objects data connection information for the company. | | -| `dataPushed` | *Optional* | :heavy_minus_sign: | Boolean indicator for data being pushed during a sync operation. | true | -| `errorMessage` | *JsonNullable* | :heavy_minus_sign: | Friendly error message for the sync operation. | Customer 3b9bf2ed-a618-4af2-80f2-f2b57fddc748 is not in an Active state. (Archived) | -| `syncDateRangeUtc` | [Optional](../../models/components/SyncDateRangeUtc.md) | :heavy_minus_sign: | N/A | | -| `syncExceptionMessage` | *JsonNullable* | :heavy_minus_sign: | Exception message for the sync operation. | Customer 3b9bf2ed-a618-4af2-80f2-f2b57fddc748 is not in an Active state. (Archived) | -| `syncStatus` | *JsonNullable* | :heavy_minus_sign: | Status of the sync of the company data. This is linked to status code. | ValidateError, Pending | -| `syncStatusCode` | *Optional* | :heavy_minus_sign: | Numerical status code sync of the company data. | 4000 | -| `syncUtc` | *Optional* | :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 | \ No newline at end of file +| `commerceSyncId` | *Optional\* | :heavy_minus_sign: | Unique identifier for the sync in Codat. | 8d0a044e-b683-4fc9-bd0d-bfb2ca5731b7 | +| `companyId` | *Optional\* | :heavy_minus_sign: | Unique identifier for your SMB in Codat. | f4637ec9-9fc0-4a02-8df0-c90d6dc86208 | +| `dataConnections` | List\<[Connection](../../models/components/Connection.md)> | :heavy_minus_sign: | Array of containing objects data connection information for the company. | | +| `dataPushed` | *Optional\* | :heavy_minus_sign: | Boolean indicator for data being pushed during a sync operation. | true | +| `errorMessage` | *JsonNullable\* | :heavy_minus_sign: | Friendly error message for the sync operation. | Customer 3b9bf2ed-a618-4af2-80f2-f2b57fddc748 is not in an Active state. (Archived) | +| `syncDateRangeUtc` | [Optional\](../../models/components/SyncDateRangeUtc.md) | :heavy_minus_sign: | N/A | | +| `syncExceptionMessage` | *JsonNullable\* | :heavy_minus_sign: | Exception message for the sync operation. | Customer 3b9bf2ed-a618-4af2-80f2-f2b57fddc748 is not in an Active state. (Archived) | +| `syncStatus` | *JsonNullable\* | :heavy_minus_sign: | Status of the sync of the company data. This is linked to status code. | ValidateError, Pending | +| `syncStatusCode` | *Optional\* | :heavy_minus_sign: | Numerical status code sync of the company data. | 4000 | +| `syncUtc` | *Optional\* | :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 | \ No newline at end of file diff --git a/sync-for-commerce/docs/models/components/SyncToLatestArgs.md b/sync-for-commerce/docs/models/components/SyncToLatestArgs.md index 9ff9c775..a024ff2e 100644 --- a/sync-for-commerce/docs/models/components/SyncToLatestArgs.md +++ b/sync-for-commerce/docs/models/components/SyncToLatestArgs.md @@ -5,4 +5,4 @@ | Field | Type | Required | Description | Example | | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `syncTo` | *Optional* | :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 | \ No newline at end of file +| `syncTo` | *Optional\* | :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 | \ No newline at end of file diff --git a/sync-for-commerce/docs/models/components/Tags.md b/sync-for-commerce/docs/models/components/Tags.md deleted file mode 100644 index 6de993aa..00000000 --- a/sync-for-commerce/docs/models/components/Tags.md +++ /dev/null @@ -1,9 +0,0 @@ -# Tags - -A collection of user-defined key-value pairs that store custom metadata against the company. - - -## Fields - -| Field | Type | Required | Description | -| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/sync-for-commerce/docs/models/components/TaxRateAmount.md b/sync-for-commerce/docs/models/components/TaxRateAmount.md index e4d3c63a..74fd1d5b 100644 --- a/sync-for-commerce/docs/models/components/TaxRateAmount.md +++ b/sync-for-commerce/docs/models/components/TaxRateAmount.md @@ -3,7 +3,7 @@ ## Fields -| Field | Type | Required | Description | -| --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | -| `selectedTaxRateId` | *JsonNullable* | :heavy_minus_sign: | Selected tax rate id from the list of tax rates on the accounting software. | -| `taxRateOptions` | List<[ConfigurationOption](../../models/components/ConfigurationOption.md)> | :heavy_minus_sign: | Array of tax rate options object. | \ No newline at end of file +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | +| `selectedTaxRateId` | *JsonNullable\* | :heavy_minus_sign: | Selected tax rate id from the list of tax rates on the accounting software. | +| `taxRateOptions` | List\<[ConfigurationOption](../../models/components/ConfigurationOption.md)> | :heavy_minus_sign: | Array of tax rate options object. | \ No newline at end of file diff --git a/sync-for-commerce/docs/models/components/TaxRateMapping.md b/sync-for-commerce/docs/models/components/TaxRateMapping.md index 566ca497..9d0eb0f8 100644 --- a/sync-for-commerce/docs/models/components/TaxRateMapping.md +++ b/sync-for-commerce/docs/models/components/TaxRateMapping.md @@ -5,5 +5,5 @@ | Field | Type | Required | Description | | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | -| `selectedAccountingTaxRateId` | *JsonNullable* | :heavy_minus_sign: | Selected tax rate id from the list of tax rates on the accounting software. | -| `selectedCommerceTaxRateIds` | List<*String*> | :heavy_minus_sign: | Selected tax component id from the list of tax components on the commerce software. | \ No newline at end of file +| `selectedAccountingTaxRateId` | *JsonNullable\* | :heavy_minus_sign: | Selected tax rate id from the list of tax rates on the accounting software. | +| `selectedCommerceTaxRateIds` | List\<*String*> | :heavy_minus_sign: | Selected tax component id from the list of tax components on the commerce software. | \ No newline at end of file diff --git a/sync-for-commerce/docs/models/components/UpdateConnection.md b/sync-for-commerce/docs/models/components/UpdateConnection.md index 0841fd29..61ddbe36 100644 --- a/sync-for-commerce/docs/models/components/UpdateConnection.md +++ b/sync-for-commerce/docs/models/components/UpdateConnection.md @@ -3,6 +3,6 @@ ## Fields -| Field | Type | Required | Description | -| --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | -| `status` | [Optional](../../models/components/DataConnectionStatus.md) | :heavy_minus_sign: | The current authorization status of the data connection. | \ No newline at end of file +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | +| `status` | [Optional\](../../models/components/DataConnectionStatus.md) | :heavy_minus_sign: | The current authorization status of the data connection. | \ No newline at end of file diff --git a/sync-for-commerce/docs/models/components/VisibleAccounts.md b/sync-for-commerce/docs/models/components/VisibleAccounts.md index dab85315..69042912 100644 --- a/sync-for-commerce/docs/models/components/VisibleAccounts.md +++ b/sync-for-commerce/docs/models/components/VisibleAccounts.md @@ -5,4 +5,4 @@ | Field | Type | Required | Description | | ------------------------------ | ------------------------------ | ------------------------------ | ------------------------------ | -| `visibleAccounts` | List<*String*> | :heavy_minus_sign: | Visible accounts on sync flow. | \ No newline at end of file +| `visibleAccounts` | List\<*String*> | :heavy_minus_sign: | Visible accounts on sync flow. | \ No newline at end of file diff --git a/sync-for-commerce/docs/models/errors/ErrorMessage.md b/sync-for-commerce/docs/models/errors/ErrorMessage.md index a7206c9f..9a4e3466 100644 --- a/sync-for-commerce/docs/models/errors/ErrorMessage.md +++ b/sync-for-commerce/docs/models/errors/ErrorMessage.md @@ -1,16 +1,16 @@ # ErrorMessage -Your `query` parameter was not correctly formed +Your API request was not properly authorized. ## Fields | Field | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `canBeRetried` | *Optional* | :heavy_minus_sign: | `True` if the error occurred transiently and can be retried. | -| `correlationId` | *Optional* | :heavy_minus_sign: | Unique identifier used to propagate to all downstream services and determine the source of the error. | -| `detailedErrorCode` | *Optional* | :heavy_minus_sign: | Machine readable error code used to automate processes based on the code returned. | -| `error` | *Optional* | :heavy_minus_sign: | A brief description of the error. | -| `service` | *Optional* | :heavy_minus_sign: | Codat's service the returned the error. | -| `statusCode` | *Optional* | :heavy_minus_sign: | The HTTP status code returned by the error. | -| `validation` | [JsonNullable](../../models/components/ErrorValidation.md) | :heavy_minus_sign: | A human-readable object describing validation decisions Codat has made. If an operation has failed because of validation errors, they will be detailed here. | \ No newline at end of file +| `canBeRetried` | *Optional\* | :heavy_minus_sign: | `True` if the error occurred transiently and can be retried. | +| `correlationId` | *Optional\* | :heavy_minus_sign: | Unique identifier used to propagate to all downstream services and determine the source of the error. | +| `detailedErrorCode` | *Optional\* | :heavy_minus_sign: | Machine readable error code used to automate processes based on the code returned. | +| `error` | *Optional\* | :heavy_minus_sign: | A brief description of the error. | +| `service` | *Optional\* | :heavy_minus_sign: | Codat's service the returned the error. | +| `statusCode` | *Optional\* | :heavy_minus_sign: | The HTTP status code returned by the error. | +| `validation` | [JsonNullable\](../../models/components/ErrorValidation.md) | :heavy_minus_sign: | A human-readable object describing validation decisions Codat has made. If an operation has failed because of validation errors, they will be detailed here. | \ No newline at end of file diff --git a/sync-for-commerce/docs/models/operations/CreateCompanyResponse.md b/sync-for-commerce/docs/models/operations/CreateCompanyResponse.md index b02d49a9..fa13291c 100644 --- a/sync-for-commerce/docs/models/operations/CreateCompanyResponse.md +++ b/sync-for-commerce/docs/models/operations/CreateCompanyResponse.md @@ -5,7 +5,7 @@ | Field | Type | Required | Description | Example | | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `company` | [Optional](../../models/components/Company.md) | :heavy_minus_sign: | Success | {
"id": "0498e921-9b53-4396-a412-4f2f5983b0a2",
"name": "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",
"tags": {
"region": "us",
"uid": "f6b0c253-16c7-4da1-a0c5-9c871e9c9d6c"
},
"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"
}
]
} | +| `company` | [Optional\](../../models/components/Company.md) | :heavy_minus_sign: | Success | {
"id": "0498e921-9b53-4396-a412-4f2f5983b0a2",
"name": "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",
"tags": {
"region": "us",
"uid": "f6b0c253-16c7-4da1-a0c5-9c871e9c9d6c"
},
"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"
}
]
} | | `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` | [HttpResponse](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | | \ No newline at end of file +| `rawResponse` | [HttpResponse\](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | | \ No newline at end of file diff --git a/sync-for-commerce/docs/models/operations/CreateConnectionRequest.md b/sync-for-commerce/docs/models/operations/CreateConnectionRequest.md index 9aafcbb8..9edc7d43 100644 --- a/sync-for-commerce/docs/models/operations/CreateConnectionRequest.md +++ b/sync-for-commerce/docs/models/operations/CreateConnectionRequest.md @@ -3,7 +3,7 @@ ## Fields -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | -| `requestBody` | [Optional](../../models/operations/CreateConnectionRequestBody.md) | :heavy_minus_sign: | N/A | | -| `companyId` | *String* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | +| `requestBody` | [Optional\](../../models/operations/CreateConnectionRequestBody.md) | :heavy_minus_sign: | N/A | | +| `companyId` | *String* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | \ No newline at end of file diff --git a/sync-for-commerce/docs/models/operations/CreateConnectionRequestBody.md b/sync-for-commerce/docs/models/operations/CreateConnectionRequestBody.md index f05cc6ab..da4f839d 100644 --- a/sync-for-commerce/docs/models/operations/CreateConnectionRequestBody.md +++ b/sync-for-commerce/docs/models/operations/CreateConnectionRequestBody.md @@ -5,4 +5,4 @@ | Field | Type | Required | Description | Example | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `platformKey` | *Optional* | :heavy_minus_sign: | A unique 4-letter key to represent a platform in each integration. View [accounting](https://docs.codat.io/integrations/accounting/overview#platform-keys), [banking](https://docs.codat.io/integrations/banking/overview#platform-keys), and [commerce](https://docs.codat.io/integrations/commerce/overview#platform-keys) platform keys. | gbol | \ No newline at end of file +| `platformKey` | *Optional\* | :heavy_minus_sign: | A unique 4-letter key to represent a platform in each integration. View [accounting](https://docs.codat.io/integrations/accounting/overview#platform-keys), [banking](https://docs.codat.io/integrations/banking/overview#platform-keys), and [commerce](https://docs.codat.io/integrations/commerce/overview#platform-keys) platform keys. | gbol | \ No newline at end of file diff --git a/sync-for-commerce/docs/models/operations/CreateConnectionResponse.md b/sync-for-commerce/docs/models/operations/CreateConnectionResponse.md index 88d793fb..b368d1db 100644 --- a/sync-for-commerce/docs/models/operations/CreateConnectionResponse.md +++ b/sync-for-commerce/docs/models/operations/CreateConnectionResponse.md @@ -5,7 +5,7 @@ | Field | Type | Required | Description | Example | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `connection` | [Optional](../../models/components/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"
} | +| `connection` | [Optional\](../../models/components/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` | [HttpResponse](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | | \ No newline at end of file +| `rawResponse` | [HttpResponse\](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | | \ No newline at end of file diff --git a/sync-for-commerce/docs/models/operations/GetConfigTextSyncFlowResponse.md b/sync-for-commerce/docs/models/operations/GetConfigTextSyncFlowResponse.md index cc46f963..5c8235c4 100644 --- a/sync-for-commerce/docs/models/operations/GetConfigTextSyncFlowResponse.md +++ b/sync-for-commerce/docs/models/operations/GetConfigTextSyncFlowResponse.md @@ -3,9 +3,9 @@ ## Fields -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | -| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | -| `localizationInfo` | Map | :heavy_minus_sign: | Success | -| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `rawResponse` | [HttpResponse](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | +| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | +| `localizationInfo` | Map\ | :heavy_minus_sign: | Success | +| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [HttpResponse\](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/sync-for-commerce/docs/models/operations/GetConfigurationResponse.md b/sync-for-commerce/docs/models/operations/GetConfigurationResponse.md index 77dd4a13..09162e33 100644 --- a/sync-for-commerce/docs/models/operations/GetConfigurationResponse.md +++ b/sync-for-commerce/docs/models/operations/GetConfigurationResponse.md @@ -3,9 +3,9 @@ ## Fields -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | -| `configuration` | [Optional](../../models/components/Configuration.md) | :heavy_minus_sign: | Success | -| `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` | [HttpResponse](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | +| `configuration` | [Optional\](../../models/components/Configuration.md) | :heavy_minus_sign: | Success | +| `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` | [HttpResponse\](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/sync-for-commerce/docs/models/operations/GetIntegrationBrandingResponse.md b/sync-for-commerce/docs/models/operations/GetIntegrationBrandingResponse.md index 1b04a962..bca81f07 100644 --- a/sync-for-commerce/docs/models/operations/GetIntegrationBrandingResponse.md +++ b/sync-for-commerce/docs/models/operations/GetIntegrationBrandingResponse.md @@ -5,7 +5,7 @@ | Field | Type | Required | Description | Example | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `branding` | [Optional](../../models/components/Branding.md) | :heavy_minus_sign: | Success | {
"logo": {
"full": {
"image": {
"src": "https://static.codat.io/public/officialLogos/Full/8A156A5A-39CB-4F9D-856E-76EF9B9A9607.png",
"alt": "xero full icon"
}
},
"square": {
"image": {
"src": "https://static.codat.io/public/officialLogos/Square/8A156A5A-39CB-4F9D-856E-76EF9B2W3607.png",
"alt": "xero square icon"
}
}
},
"button": {
"default": {
"image": {
"src": "https://static.codat.io/public/officialButtons/Full/8A156A5A-39CB-4F9D-856E-76EF9Q7A9607.png",
"alt": "xero default button icon"
}
},
"hover": {
"image": {
"src": "https://static.codat.io/public/officialLogos/Full/8A156A5A-39CB-4F9D-856E-76EF9B9A9607.png",
"alt": "xero hover button icon"
}
}
},
"sourceId": "35b92968-9851-4095-ad60-395c95cbcba4"
} | +| `branding` | [Optional\](../../models/components/Branding.md) | :heavy_minus_sign: | Success | {
"logo": {
"full": {
"image": {
"src": "https://static.codat.io/public/officialLogos/Full/8A156A5A-39CB-4F9D-856E-76EF9B9A9607.png",
"alt": "xero full icon"
}
},
"square": {
"image": {
"src": "https://static.codat.io/public/officialLogos/Square/8A156A5A-39CB-4F9D-856E-76EF9B2W3607.png",
"alt": "xero square icon"
}
}
},
"button": {
"default": {
"image": {
"src": "https://static.codat.io/public/officialButtons/Full/8A156A5A-39CB-4F9D-856E-76EF9Q7A9607.png",
"alt": "xero default button icon"
}
},
"hover": {
"image": {
"src": "https://static.codat.io/public/officialLogos/Full/8A156A5A-39CB-4F9D-856E-76EF9B9A9607.png",
"alt": "xero hover button icon"
}
}
},
"sourceId": "35b92968-9851-4095-ad60-395c95cbcba4"
} | | `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` | [HttpResponse](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | | \ No newline at end of file +| `rawResponse` | [HttpResponse\](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | | \ No newline at end of file diff --git a/sync-for-commerce/docs/models/operations/GetLastSuccessfulSyncResponse.md b/sync-for-commerce/docs/models/operations/GetLastSuccessfulSyncResponse.md index 5e84774d..82f874bf 100644 --- a/sync-for-commerce/docs/models/operations/GetLastSuccessfulSyncResponse.md +++ b/sync-for-commerce/docs/models/operations/GetLastSuccessfulSyncResponse.md @@ -3,9 +3,9 @@ ## Fields -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | -| `companySyncStatus` | [Optional](../../models/components/CompanySyncStatus.md) | :heavy_minus_sign: | Success | -| `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` | [HttpResponse](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | +| `companySyncStatus` | [Optional\](../../models/components/CompanySyncStatus.md) | :heavy_minus_sign: | Success | +| `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` | [HttpResponse\](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/sync-for-commerce/docs/models/operations/GetLatestSyncResponse.md b/sync-for-commerce/docs/models/operations/GetLatestSyncResponse.md index 7b62d85d..9aa82da5 100644 --- a/sync-for-commerce/docs/models/operations/GetLatestSyncResponse.md +++ b/sync-for-commerce/docs/models/operations/GetLatestSyncResponse.md @@ -3,9 +3,9 @@ ## Fields -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | -| `companySyncStatus` | [Optional](../../models/components/CompanySyncStatus.md) | :heavy_minus_sign: | Success | -| `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` | [HttpResponse](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | +| `companySyncStatus` | [Optional\](../../models/components/CompanySyncStatus.md) | :heavy_minus_sign: | Success | +| `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` | [HttpResponse\](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/sync-for-commerce/docs/models/operations/GetSyncByIdResponse.md b/sync-for-commerce/docs/models/operations/GetSyncByIdResponse.md index d34d5d11..8f16d88f 100644 --- a/sync-for-commerce/docs/models/operations/GetSyncByIdResponse.md +++ b/sync-for-commerce/docs/models/operations/GetSyncByIdResponse.md @@ -3,9 +3,9 @@ ## Fields -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | -| `companySyncStatus` | [Optional](../../models/components/CompanySyncStatus.md) | :heavy_minus_sign: | Success | -| `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` | [HttpResponse](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | +| `companySyncStatus` | [Optional\](../../models/components/CompanySyncStatus.md) | :heavy_minus_sign: | Success | +| `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` | [HttpResponse\](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/sync-for-commerce/docs/models/operations/GetSyncFlowUrlRequest.md b/sync-for-commerce/docs/models/operations/GetSyncFlowUrlRequest.md index c94ec811..388e5409 100644 --- a/sync-for-commerce/docs/models/operations/GetSyncFlowUrlRequest.md +++ b/sync-for-commerce/docs/models/operations/GetSyncFlowUrlRequest.md @@ -7,4 +7,4 @@ | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | | `accountingKey` | *String* | :heavy_check_mark: | Accounting platform key | | `commerceKey` | *String* | :heavy_check_mark: | Commerce platform key | -| `merchantIdentifier` | *Optional* | :heavy_minus_sign: | Identifier for your merchant, can be the merchant name or Codat company id. | \ No newline at end of file +| `merchantIdentifier` | *Optional\* | :heavy_minus_sign: | Identifier for your merchant, can be the merchant name or Codat company id. | \ No newline at end of file diff --git a/sync-for-commerce/docs/models/operations/GetSyncFlowUrlResponse.md b/sync-for-commerce/docs/models/operations/GetSyncFlowUrlResponse.md index 9b6bd619..299781de 100644 --- a/sync-for-commerce/docs/models/operations/GetSyncFlowUrlResponse.md +++ b/sync-for-commerce/docs/models/operations/GetSyncFlowUrlResponse.md @@ -3,9 +3,9 @@ ## Fields -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | -| `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` | [HttpResponse](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | -| `syncFlowUrl` | [Optional](../../models/components/SyncFlowUrl.md) | :heavy_minus_sign: | Success | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | +| `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` | [HttpResponse\](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `syncFlowUrl` | [Optional\](../../models/components/SyncFlowUrl.md) | :heavy_minus_sign: | Success | \ No newline at end of file diff --git a/sync-for-commerce/docs/models/operations/GetSyncStatusResponse.md b/sync-for-commerce/docs/models/operations/GetSyncStatusResponse.md index 8bf16be2..c1812fb3 100644 --- a/sync-for-commerce/docs/models/operations/GetSyncStatusResponse.md +++ b/sync-for-commerce/docs/models/operations/GetSyncStatusResponse.md @@ -3,9 +3,9 @@ ## Fields -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | -| `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` | [HttpResponse](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | -| `syncStatus` | [Optional](../../models/components/SyncStatus.md) | :heavy_minus_sign: | Success | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | +| `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` | [HttpResponse\](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `syncStatus` | [Optional\](../../models/components/SyncStatus.md) | :heavy_minus_sign: | Success | \ No newline at end of file diff --git a/sync-for-commerce/docs/models/operations/GetVisibleAccountsResponse.md b/sync-for-commerce/docs/models/operations/GetVisibleAccountsResponse.md index c7c2a861..27d8e3fb 100644 --- a/sync-for-commerce/docs/models/operations/GetVisibleAccountsResponse.md +++ b/sync-for-commerce/docs/models/operations/GetVisibleAccountsResponse.md @@ -3,9 +3,9 @@ ## Fields -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | -| `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` | [HttpResponse](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | -| `visibleAccounts` | [Optional](../../models/components/VisibleAccounts.md) | :heavy_minus_sign: | Success | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | +| `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` | [HttpResponse\](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `visibleAccounts` | [Optional\](../../models/components/VisibleAccounts.md) | :heavy_minus_sign: | Success | \ No newline at end of file diff --git a/sync-for-commerce/docs/models/operations/ListCompaniesRequest.md b/sync-for-commerce/docs/models/operations/ListCompaniesRequest.md index b5099c58..a1dd2014 100644 --- a/sync-for-commerce/docs/models/operations/ListCompaniesRequest.md +++ b/sync-for-commerce/docs/models/operations/ListCompaniesRequest.md @@ -5,7 +5,7 @@ | Field | Type | Required | Description | Example | | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | -| `orderBy` | *Optional* | :heavy_minus_sign: | Field to order results by. [Read more](https://docs.codat.io/using-the-api/ordering-results). | -modifiedDate | -| `page` | *Optional* | :heavy_minus_sign: | Page number. [Read more](https://docs.codat.io/using-the-api/paging). | 1 | -| `pageSize` | *Optional* | :heavy_minus_sign: | Number of records to return in a page. [Read more](https://docs.codat.io/using-the-api/paging). | 100 | -| `query` | *Optional* | :heavy_minus_sign: | Codat query string. [Read more](https://docs.codat.io/using-the-api/querying). | id=e3334455-1aed-4e71-ab43-6bccf12092ee | \ No newline at end of file +| `orderBy` | *Optional\* | :heavy_minus_sign: | Field to order results by. [Read more](https://docs.codat.io/using-the-api/ordering-results). | -modifiedDate | +| `page` | *Optional\* | :heavy_minus_sign: | Page number. [Read more](https://docs.codat.io/using-the-api/paging). | 1 | +| `pageSize` | *Optional\* | :heavy_minus_sign: | Number of records to return in a page. [Read more](https://docs.codat.io/using-the-api/paging). | 100 | +| `query` | *Optional\* | :heavy_minus_sign: | Codat query string. [Read more](https://docs.codat.io/using-the-api/querying). | id=e3334455-1aed-4e71-ab43-6bccf12092ee | \ No newline at end of file diff --git a/sync-for-commerce/docs/models/operations/ListCompaniesResponse.md b/sync-for-commerce/docs/models/operations/ListCompaniesResponse.md index 932816ea..b72e950f 100644 --- a/sync-for-commerce/docs/models/operations/ListCompaniesResponse.md +++ b/sync-for-commerce/docs/models/operations/ListCompaniesResponse.md @@ -5,7 +5,7 @@ | Field | Type | Required | Description | Example | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `companies` | [Optional](../../models/components/Companies.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"
}
}
} | +| `companies` | [Optional\](../../models/components/Companies.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` | [HttpResponse](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | | \ No newline at end of file +| `rawResponse` | [HttpResponse\](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | | \ No newline at end of file diff --git a/sync-for-commerce/docs/models/operations/ListConnectionsRequest.md b/sync-for-commerce/docs/models/operations/ListConnectionsRequest.md index a6f3e3d2..b2973f4e 100644 --- a/sync-for-commerce/docs/models/operations/ListConnectionsRequest.md +++ b/sync-for-commerce/docs/models/operations/ListConnectionsRequest.md @@ -6,7 +6,7 @@ | Field | Type | Required | Description | Example | | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | | `companyId` | *String* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | -| `orderBy` | *Optional* | :heavy_minus_sign: | Field to order results by. [Read more](https://docs.codat.io/using-the-api/ordering-results). | -modifiedDate | -| `page` | *Optional* | :heavy_minus_sign: | Page number. [Read more](https://docs.codat.io/using-the-api/paging). | 1 | -| `pageSize` | *Optional* | :heavy_minus_sign: | Number of records to return in a page. [Read more](https://docs.codat.io/using-the-api/paging). | 100 | -| `query` | *Optional* | :heavy_minus_sign: | Codat query string. [Read more](https://docs.codat.io/using-the-api/querying). | id=e3334455-1aed-4e71-ab43-6bccf12092ee | \ No newline at end of file +| `orderBy` | *Optional\* | :heavy_minus_sign: | Field to order results by. [Read more](https://docs.codat.io/using-the-api/ordering-results). | -modifiedDate | +| `page` | *Optional\* | :heavy_minus_sign: | Page number. [Read more](https://docs.codat.io/using-the-api/paging). | 1 | +| `pageSize` | *Optional\* | :heavy_minus_sign: | Number of records to return in a page. [Read more](https://docs.codat.io/using-the-api/paging). | 100 | +| `query` | *Optional\* | :heavy_minus_sign: | Codat query string. [Read more](https://docs.codat.io/using-the-api/querying). | id=e3334455-1aed-4e71-ab43-6bccf12092ee | \ No newline at end of file diff --git a/sync-for-commerce/docs/models/operations/ListConnectionsResponse.md b/sync-for-commerce/docs/models/operations/ListConnectionsResponse.md index f590878d..ceb3db80 100644 --- a/sync-for-commerce/docs/models/operations/ListConnectionsResponse.md +++ b/sync-for-commerce/docs/models/operations/ListConnectionsResponse.md @@ -5,7 +5,7 @@ | Field | Type | Required | Description | Example | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `connections` | [Optional](../../models/components/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"
}
}
} | +| `connections` | [Optional\](../../models/components/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` | [HttpResponse](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | | \ No newline at end of file +| `rawResponse` | [HttpResponse\](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | | \ No newline at end of file diff --git a/sync-for-commerce/docs/models/operations/ListIntegrationsRequest.md b/sync-for-commerce/docs/models/operations/ListIntegrationsRequest.md index 6a9702c2..3d0866da 100644 --- a/sync-for-commerce/docs/models/operations/ListIntegrationsRequest.md +++ b/sync-for-commerce/docs/models/operations/ListIntegrationsRequest.md @@ -5,7 +5,7 @@ | Field | Type | Required | Description | Example | | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | -| `orderBy` | *Optional* | :heavy_minus_sign: | Field to order results by. [Read more](https://docs.codat.io/using-the-api/ordering-results). | -modifiedDate | -| `page` | *Optional* | :heavy_minus_sign: | Page number. [Read more](https://docs.codat.io/using-the-api/paging). | 1 | -| `pageSize` | *Optional* | :heavy_minus_sign: | Number of records to return in a page. [Read more](https://docs.codat.io/using-the-api/paging). | 100 | -| `query` | *Optional* | :heavy_minus_sign: | Codat query string. [Read more](https://docs.codat.io/using-the-api/querying). | id=e3334455-1aed-4e71-ab43-6bccf12092ee | \ No newline at end of file +| `orderBy` | *Optional\* | :heavy_minus_sign: | Field to order results by. [Read more](https://docs.codat.io/using-the-api/ordering-results). | -modifiedDate | +| `page` | *Optional\* | :heavy_minus_sign: | Page number. [Read more](https://docs.codat.io/using-the-api/paging). | 1 | +| `pageSize` | *Optional\* | :heavy_minus_sign: | Number of records to return in a page. [Read more](https://docs.codat.io/using-the-api/paging). | 100 | +| `query` | *Optional\* | :heavy_minus_sign: | Codat query string. [Read more](https://docs.codat.io/using-the-api/querying). | id=e3334455-1aed-4e71-ab43-6bccf12092ee | \ No newline at end of file diff --git a/sync-for-commerce/docs/models/operations/ListIntegrationsResponse.md b/sync-for-commerce/docs/models/operations/ListIntegrationsResponse.md index 6f6150e2..572f5ca4 100644 --- a/sync-for-commerce/docs/models/operations/ListIntegrationsResponse.md +++ b/sync-for-commerce/docs/models/operations/ListIntegrationsResponse.md @@ -6,6 +6,6 @@ | Field | Type | Required | Description | Example | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | | -| `integrations` | [Optional](../../models/components/Integrations.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"
}
}
} | +| `integrations` | [Optional\](../../models/components/Integrations.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` | [HttpResponse](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | | \ No newline at end of file +| `rawResponse` | [HttpResponse\](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | | \ No newline at end of file diff --git a/sync-for-commerce/docs/models/operations/ListSyncsResponse.md b/sync-for-commerce/docs/models/operations/ListSyncsResponse.md index 52be2e4e..d7bb8d8d 100644 --- a/sync-for-commerce/docs/models/operations/ListSyncsResponse.md +++ b/sync-for-commerce/docs/models/operations/ListSyncsResponse.md @@ -3,9 +3,9 @@ ## Fields -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | -| `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` | [HttpResponse](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | -| `classes` | List<[CompanySyncStatus](../../models/components/CompanySyncStatus.md)> | :heavy_minus_sign: | Success | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | +| `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` | [HttpResponse\](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `classes` | List\<[CompanySyncStatus](../../models/components/CompanySyncStatus.md)> | :heavy_minus_sign: | Success | \ No newline at end of file diff --git a/sync-for-commerce/docs/models/operations/RequestSyncForDateRangeRequest.md b/sync-for-commerce/docs/models/operations/RequestSyncForDateRangeRequest.md index 61cde8cd..9b7240ad 100644 --- a/sync-for-commerce/docs/models/operations/RequestSyncForDateRangeRequest.md +++ b/sync-for-commerce/docs/models/operations/RequestSyncForDateRangeRequest.md @@ -3,7 +3,7 @@ ## Fields -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- | -| `syncRange` | [Optional](../../models/components/SyncRange.md) | :heavy_minus_sign: | N/A | | -| `companyId` | *String* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | +| `syncRange` | [Optional\](../../models/components/SyncRange.md) | :heavy_minus_sign: | N/A | | +| `companyId` | *String* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | \ No newline at end of file diff --git a/sync-for-commerce/docs/models/operations/RequestSyncForDateRangeResponse.md b/sync-for-commerce/docs/models/operations/RequestSyncForDateRangeResponse.md index d43397ab..80e6df63 100644 --- a/sync-for-commerce/docs/models/operations/RequestSyncForDateRangeResponse.md +++ b/sync-for-commerce/docs/models/operations/RequestSyncForDateRangeResponse.md @@ -3,9 +3,9 @@ ## Fields -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | -| `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` | [HttpResponse](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | -| `syncSummary` | [Optional](../../models/components/SyncSummary.md) | :heavy_minus_sign: | Success | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | +| `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` | [HttpResponse\](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `syncSummary` | [Optional\](../../models/components/SyncSummary.md) | :heavy_minus_sign: | Success | \ No newline at end of file diff --git a/sync-for-commerce/docs/models/operations/RequestSyncRequest.md b/sync-for-commerce/docs/models/operations/RequestSyncRequest.md index 66a28693..6de69ee2 100644 --- a/sync-for-commerce/docs/models/operations/RequestSyncRequest.md +++ b/sync-for-commerce/docs/models/operations/RequestSyncRequest.md @@ -3,7 +3,7 @@ ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | -| `syncToLatestArgs` | [Optional](../../models/components/SyncToLatestArgs.md) | :heavy_minus_sign: | N/A | | -| `companyId` | *String* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | \ No newline at end of file +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | +| `syncToLatestArgs` | [Optional\](../../models/components/SyncToLatestArgs.md) | :heavy_minus_sign: | N/A | | +| `companyId` | *String* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | \ No newline at end of file diff --git a/sync-for-commerce/docs/models/operations/RequestSyncResponse.md b/sync-for-commerce/docs/models/operations/RequestSyncResponse.md index 790b119f..120f2f95 100644 --- a/sync-for-commerce/docs/models/operations/RequestSyncResponse.md +++ b/sync-for-commerce/docs/models/operations/RequestSyncResponse.md @@ -3,9 +3,9 @@ ## Fields -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | -| `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` | [HttpResponse](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | -| `syncSummary` | [Optional](../../models/components/SyncSummary.md) | :heavy_minus_sign: | Success | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | +| `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` | [HttpResponse\](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `syncSummary` | [Optional\](../../models/components/SyncSummary.md) | :heavy_minus_sign: | Success | \ No newline at end of file diff --git a/sync-for-commerce/docs/models/operations/SetConfigurationResponse.md b/sync-for-commerce/docs/models/operations/SetConfigurationResponse.md index c1cd579a..04407f5a 100644 --- a/sync-for-commerce/docs/models/operations/SetConfigurationResponse.md +++ b/sync-for-commerce/docs/models/operations/SetConfigurationResponse.md @@ -3,9 +3,9 @@ ## Fields -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | -| `configuration` | [Optional](../../models/components/Configuration.md) | :heavy_minus_sign: | Success | -| `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` | [HttpResponse](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | +| `configuration` | [Optional\](../../models/components/Configuration.md) | :heavy_minus_sign: | Success | +| `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` | [HttpResponse\](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/sync-for-commerce/docs/models/operations/UpdateConfigTextSyncFlowRequest.md b/sync-for-commerce/docs/models/operations/UpdateConfigTextSyncFlowRequest.md index 220d4255..e5d9d771 100644 --- a/sync-for-commerce/docs/models/operations/UpdateConfigTextSyncFlowRequest.md +++ b/sync-for-commerce/docs/models/operations/UpdateConfigTextSyncFlowRequest.md @@ -3,7 +3,7 @@ ## Fields -| Field | Type | Required | Description | Example | -| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -| `requestBody` | Map | :heavy_minus_sign: | N/A | | -| `locale` | [Locale](../../models/components/Locale.md) | :heavy_check_mark: | Localization identifier for English (US) or French. | en-us | \ No newline at end of file +| Field | Type | Required | Description | Example | +| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | +| `requestBody` | Map\ | :heavy_minus_sign: | N/A | | +| `locale` | [Locale](../../models/components/Locale.md) | :heavy_check_mark: | Localization identifier for English (US) or French. | en-us | \ No newline at end of file diff --git a/sync-for-commerce/docs/models/operations/UpdateConfigTextSyncFlowResponse.md b/sync-for-commerce/docs/models/operations/UpdateConfigTextSyncFlowResponse.md index ad0b2ec4..309b814d 100644 --- a/sync-for-commerce/docs/models/operations/UpdateConfigTextSyncFlowResponse.md +++ b/sync-for-commerce/docs/models/operations/UpdateConfigTextSyncFlowResponse.md @@ -3,9 +3,9 @@ ## Fields -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | -| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | -| `localizationInfo` | Map | :heavy_minus_sign: | Success | -| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | -| `rawResponse` | [HttpResponse](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | +| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | +| `localizationInfo` | Map\ | :heavy_minus_sign: | Success | +| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [HttpResponse\](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/sync-for-commerce/docs/models/operations/UpdateConnectionAuthorizationRequest.md b/sync-for-commerce/docs/models/operations/UpdateConnectionAuthorizationRequest.md index 8381b2d6..9156eb71 100644 --- a/sync-for-commerce/docs/models/operations/UpdateConnectionAuthorizationRequest.md +++ b/sync-for-commerce/docs/models/operations/UpdateConnectionAuthorizationRequest.md @@ -5,6 +5,6 @@ | Field | Type | Required | Description | Example | | ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | -| `requestBody` | Map | :heavy_minus_sign: | N/A | | +| `requestBody` | Map\ | :heavy_minus_sign: | N/A | | | `companyId` | *String* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | | `connectionId` | *String* | :heavy_check_mark: | Unique identifier for a connection. | 2e9d2c44-f675-40ba-8049-353bfcb5e171 | \ No newline at end of file diff --git a/sync-for-commerce/docs/models/operations/UpdateConnectionAuthorizationResponse.md b/sync-for-commerce/docs/models/operations/UpdateConnectionAuthorizationResponse.md index 27beb9c5..e9230cdc 100644 --- a/sync-for-commerce/docs/models/operations/UpdateConnectionAuthorizationResponse.md +++ b/sync-for-commerce/docs/models/operations/UpdateConnectionAuthorizationResponse.md @@ -5,7 +5,7 @@ | Field | Type | Required | Description | Example | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `connection` | [Optional](../../models/components/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"
} | +| `connection` | [Optional\](../../models/components/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` | [HttpResponse](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | | \ No newline at end of file +| `rawResponse` | [HttpResponse\](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | | \ No newline at end of file diff --git a/sync-for-commerce/docs/models/operations/UpdateConnectionRequest.md b/sync-for-commerce/docs/models/operations/UpdateConnectionRequest.md index 7779d0e7..7c9eaaf7 100644 --- a/sync-for-commerce/docs/models/operations/UpdateConnectionRequest.md +++ b/sync-for-commerce/docs/models/operations/UpdateConnectionRequest.md @@ -3,8 +3,8 @@ ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | -| `updateConnection` | [Optional](../../models/components/UpdateConnection.md) | :heavy_minus_sign: | N/A | | -| `companyId` | *String* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | -| `connectionId` | *String* | :heavy_check_mark: | Unique identifier for a connection. | 2e9d2c44-f675-40ba-8049-353bfcb5e171 | \ No newline at end of file +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | +| `updateConnection` | [Optional\](../../models/components/UpdateConnection.md) | :heavy_minus_sign: | N/A | | +| `companyId` | *String* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | +| `connectionId` | *String* | :heavy_check_mark: | Unique identifier for a connection. | 2e9d2c44-f675-40ba-8049-353bfcb5e171 | \ No newline at end of file diff --git a/sync-for-commerce/docs/models/operations/UpdateConnectionResponse.md b/sync-for-commerce/docs/models/operations/UpdateConnectionResponse.md index 1bd15491..4707ecce 100644 --- a/sync-for-commerce/docs/models/operations/UpdateConnectionResponse.md +++ b/sync-for-commerce/docs/models/operations/UpdateConnectionResponse.md @@ -5,7 +5,7 @@ | Field | Type | Required | Description | Example | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `connection` | [Optional](../../models/components/Connection.md) | :heavy_minus_sign: | Success | {
"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"
} | +| `connection` | [Optional\](../../models/components/Connection.md) | :heavy_minus_sign: | Success | {
"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` | [HttpResponse](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | | \ No newline at end of file +| `rawResponse` | [HttpResponse\](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | | \ No newline at end of file diff --git a/sync-for-commerce/docs/models/operations/UpdateVisibleAccountsSyncFlowRequest.md b/sync-for-commerce/docs/models/operations/UpdateVisibleAccountsSyncFlowRequest.md index 102f9771..da461fc5 100644 --- a/sync-for-commerce/docs/models/operations/UpdateVisibleAccountsSyncFlowRequest.md +++ b/sync-for-commerce/docs/models/operations/UpdateVisibleAccountsSyncFlowRequest.md @@ -3,7 +3,7 @@ ## Fields -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | -| `visibleAccounts` | [Optional](../../models/components/VisibleAccounts.md) | :heavy_minus_sign: | N/A | | -| `platformKey` | *String* | :heavy_check_mark: | A unique 4-letter key to represent a platform in each integration. | gbol | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | +| `visibleAccounts` | [Optional\](../../models/components/VisibleAccounts.md) | :heavy_minus_sign: | N/A | | +| `platformKey` | *String* | :heavy_check_mark: | A unique 4-letter key to represent a platform in each integration. | gbol | \ No newline at end of file diff --git a/sync-for-commerce/docs/models/operations/UpdateVisibleAccountsSyncFlowResponse.md b/sync-for-commerce/docs/models/operations/UpdateVisibleAccountsSyncFlowResponse.md index c787aa73..f78c0e65 100644 --- a/sync-for-commerce/docs/models/operations/UpdateVisibleAccountsSyncFlowResponse.md +++ b/sync-for-commerce/docs/models/operations/UpdateVisibleAccountsSyncFlowResponse.md @@ -3,9 +3,9 @@ ## Fields -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | -| `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` | [HttpResponse](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | -| `visibleAccounts` | [Optional](../../models/components/VisibleAccounts.md) | :heavy_minus_sign: | Success | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | +| `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` | [HttpResponse\](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `visibleAccounts` | [Optional\](../../models/components/VisibleAccounts.md) | :heavy_minus_sign: | Success | \ No newline at end of file diff --git a/sync-for-commerce/docs/models/webhooks/ConnectionDeletedResponse.md b/sync-for-commerce/docs/models/webhooks/ConnectionDeletedResponse.md new file mode 100644 index 00000000..7f2bbc99 --- /dev/null +++ b/sync-for-commerce/docs/models/webhooks/ConnectionDeletedResponse.md @@ -0,0 +1,10 @@ +# ConnectionDeletedResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | +| `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` | [HttpResponse\](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/sync-for-commerce/docs/models/webhooks/SyncConnectionDeletedResponse.md b/sync-for-commerce/docs/models/webhooks/SyncConnectionDeletedResponse.md index f7f37cf4..284493e5 100644 --- a/sync-for-commerce/docs/models/webhooks/SyncConnectionDeletedResponse.md +++ b/sync-for-commerce/docs/models/webhooks/SyncConnectionDeletedResponse.md @@ -3,8 +3,8 @@ ## Fields -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | -| `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` | [HttpResponse](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | +| `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` | [HttpResponse\](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/sync-for-commerce/docs/sdks/advancedcontrols/README.md b/sync-for-commerce/docs/sdks/advancedcontrols/README.md index a112caa9..12d85462 100644 --- a/sync-for-commerce/docs/sdks/advancedcontrols/README.md +++ b/sync-for-commerce/docs/sdks/advancedcontrols/README.md @@ -23,47 +23,30 @@ package hello.world; import io.codat.sync.commerce.CodatSyncCommerce; import io.codat.sync.commerce.models.components.CreateCompany; -import io.codat.sync.commerce.models.components.GroupReference; -import io.codat.sync.commerce.models.errors.SDKError; +import io.codat.sync.commerce.models.errors.ErrorMessage; import io.codat.sync.commerce.models.operations.CreateCompanyResponse; import java.lang.Exception; -import java.util.List; public class Application { - public static void main(String[] args) throws Exception { - try { - CodatSyncCommerce sdk = CodatSyncCommerce.builder() + public static void main(String[] args) throws ErrorMessage, Exception { + + CodatSyncCommerce sdk = CodatSyncCommerce.builder() .authHeader("Basic BASE_64_ENCODED(API_KEY)") - .build(); + .build(); - CreateCompany req = CreateCompany.builder() + CreateCompany req = CreateCompany.builder() .name("Bank of Dave") .description("Requested early access to the new financing scheme.") - .groups(List.of( - GroupReference.builder() - .id("60d2fa12-8a04-11ee-b9d1-0242ac120002") - .build())) .build(); - CreateCompanyResponse res = sdk.advancedControls().createCompany() + CreateCompanyResponse res = sdk.advancedControls().createCompany() .request(req) .call(); - if (res.company().isPresent()) { - // handle response - } - } catch (io.codat.sync.commerce.models.errors.ErrorMessage e) { - // handle exception - throw e; - } catch (SDKError e) { - // handle exception - throw e; - } catch (Exception e) { - // handle exception - throw e; + if (res.company().isPresent()) { + // handle response } - } } ``` @@ -80,11 +63,10 @@ public class Application { ### Errors -| Error Object | Status Code | Content Type | -| --------------------------- | --------------------------- | --------------------------- | -| models/errors/ErrorMessage | 400,401,402,403,429,500,503 | application/json | -| models/errors/SDKError | 4xx-5xx | \*\/* | - +| Error Type | Status Code | Content Type | +| --------------------------------- | --------------------------------- | --------------------------------- | +| models/errors/ErrorMessage | 400, 401, 402, 403, 429, 500, 503 | application/json | +| models/errors/SDKError | 4XX, 5XX | \*/\* | ## getConfiguration @@ -96,41 +78,30 @@ Returns a company's commerce sync configuration'. package hello.world; import io.codat.sync.commerce.CodatSyncCommerce; -import io.codat.sync.commerce.models.errors.SDKError; +import io.codat.sync.commerce.models.errors.ErrorMessage; import io.codat.sync.commerce.models.operations.GetConfigurationRequest; import io.codat.sync.commerce.models.operations.GetConfigurationResponse; import java.lang.Exception; public class Application { - public static void main(String[] args) throws Exception { - try { - CodatSyncCommerce sdk = CodatSyncCommerce.builder() + public static void main(String[] args) throws ErrorMessage, Exception { + + CodatSyncCommerce sdk = CodatSyncCommerce.builder() .authHeader("Basic BASE_64_ENCODED(API_KEY)") - .build(); + .build(); - GetConfigurationRequest req = GetConfigurationRequest.builder() + GetConfigurationRequest req = GetConfigurationRequest.builder() .companyId("8a210b68-6988-11ed-a1eb-0242ac120002") .build(); - GetConfigurationResponse res = sdk.advancedControls().getConfiguration() + GetConfigurationResponse res = sdk.advancedControls().getConfiguration() .request(req) .call(); - if (res.configuration().isPresent()) { - // handle response - } - } catch (io.codat.sync.commerce.models.errors.ErrorMessage e) { - // handle exception - throw e; - } catch (SDKError e) { - // handle exception - throw e; - } catch (Exception e) { - // handle exception - throw e; + if (res.configuration().isPresent()) { + // handle response } - } } ``` @@ -147,11 +118,10 @@ public class Application { ### Errors -| Error Object | Status Code | Content Type | -| --------------------------- | --------------------------- | --------------------------- | -| models/errors/ErrorMessage | 401,402,403,404,429,500,503 | application/json | -| models/errors/SDKError | 4xx-5xx | \*\/* | - +| Error Type | Status Code | Content Type | +| --------------------------------- | --------------------------------- | --------------------------------- | +| models/errors/ErrorMessage | 401, 402, 403, 404, 429, 500, 503 | application/json | +| models/errors/SDKError | 4XX, 5XX | \*/\* | ## listCompanies @@ -163,44 +133,33 @@ Returns a list of companies. package hello.world; import io.codat.sync.commerce.CodatSyncCommerce; -import io.codat.sync.commerce.models.errors.SDKError; +import io.codat.sync.commerce.models.errors.ErrorMessage; import io.codat.sync.commerce.models.operations.ListCompaniesRequest; import io.codat.sync.commerce.models.operations.ListCompaniesResponse; import java.lang.Exception; public class Application { - public static void main(String[] args) throws Exception { - try { - CodatSyncCommerce sdk = CodatSyncCommerce.builder() + public static void main(String[] args) throws ErrorMessage, Exception { + + CodatSyncCommerce sdk = CodatSyncCommerce.builder() .authHeader("Basic BASE_64_ENCODED(API_KEY)") - .build(); + .build(); - ListCompaniesRequest req = ListCompaniesRequest.builder() + ListCompaniesRequest req = ListCompaniesRequest.builder() .orderBy("-modifiedDate") .page(1) .pageSize(100) .query("id=e3334455-1aed-4e71-ab43-6bccf12092ee") .build(); - ListCompaniesResponse res = sdk.advancedControls().listCompanies() + ListCompaniesResponse res = sdk.advancedControls().listCompanies() .request(req) .call(); - if (res.companies().isPresent()) { - // handle response - } - } catch (io.codat.sync.commerce.models.errors.ErrorMessage e) { - // handle exception - throw e; - } catch (SDKError e) { - // handle exception - throw e; - } catch (Exception e) { - // handle exception - throw e; + if (res.companies().isPresent()) { + // handle response } - } } ``` @@ -217,11 +176,10 @@ public class Application { ### Errors -| Error Object | Status Code | Content Type | -| ------------------------------- | ------------------------------- | ------------------------------- | -| models/errors/ErrorMessage | 400,401,402,403,404,429,500,503 | application/json | -| models/errors/SDKError | 4xx-5xx | \*\/* | - +| Error Type | Status Code | Content Type | +| -------------------------------------- | -------------------------------------- | -------------------------------------- | +| models/errors/ErrorMessage | 400, 401, 402, 403, 404, 429, 500, 503 | application/json | +| models/errors/SDKError | 4XX, 5XX | \*/\* | ## setConfiguration @@ -233,41 +191,30 @@ Sets a company's commerce sync configuration. package hello.world; import io.codat.sync.commerce.CodatSyncCommerce; -import io.codat.sync.commerce.models.errors.SDKError; +import io.codat.sync.commerce.models.errors.ErrorMessage; import io.codat.sync.commerce.models.operations.SetConfigurationRequest; import io.codat.sync.commerce.models.operations.SetConfigurationResponse; import java.lang.Exception; public class Application { - public static void main(String[] args) throws Exception { - try { - CodatSyncCommerce sdk = CodatSyncCommerce.builder() + public static void main(String[] args) throws ErrorMessage, Exception { + + CodatSyncCommerce sdk = CodatSyncCommerce.builder() .authHeader("Basic BASE_64_ENCODED(API_KEY)") - .build(); + .build(); - SetConfigurationRequest req = SetConfigurationRequest.builder() + SetConfigurationRequest req = SetConfigurationRequest.builder() .companyId("8a210b68-6988-11ed-a1eb-0242ac120002") .build(); - SetConfigurationResponse res = sdk.advancedControls().setConfiguration() + SetConfigurationResponse res = sdk.advancedControls().setConfiguration() .request(req) .call(); - if (res.configuration().isPresent()) { - // handle response - } - } catch (io.codat.sync.commerce.models.errors.ErrorMessage e) { - // handle exception - throw e; - } catch (SDKError e) { - // handle exception - throw e; - } catch (Exception e) { - // handle exception - throw e; + if (res.configuration().isPresent()) { + // handle response } - } } ``` @@ -284,7 +231,7 @@ public class Application { ### Errors -| Error Object | Status Code | Content Type | -| ----------------------------------- | ----------------------------------- | ----------------------------------- | -| models/errors/ErrorMessage | 400,401,402,403,404,409,429,500,503 | application/json | -| models/errors/SDKError | 4xx-5xx | \*\/* | +| Error Type | Status Code | Content Type | +| ------------------------------------------- | ------------------------------------------- | ------------------------------------------- | +| models/errors/ErrorMessage | 400, 401, 402, 403, 404, 409, 429, 500, 503 | application/json | +| models/errors/SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/sync-for-commerce/docs/sdks/codatsynccommerce/README.md b/sync-for-commerce/docs/sdks/codatsynccommerce/README.md index e8bb9ba0..dc0d5fcd 100644 --- a/sync-for-commerce/docs/sdks/codatsynccommerce/README.md +++ b/sync-for-commerce/docs/sdks/codatsynccommerce/README.md @@ -22,4 +22,6 @@ Not seeing the endpoints you're expecting? We've [reorganized our products](http | Sync flow settings | Control text and visibility settings for the Sync Flow. | | Integrations | Get a list of integrations supported by Sync for Commerce and their logos. | | Advanced controls | View and manage mapping configured for a company's commerce sync. | - \ No newline at end of file + + +### Available Operations diff --git a/sync-for-commerce/docs/sdks/connections/README.md b/sync-for-commerce/docs/sdks/connections/README.md index 9a9a59de..28eb3650 100644 --- a/sync-for-commerce/docs/sdks/connections/README.md +++ b/sync-for-commerce/docs/sdks/connections/README.md @@ -17,7 +17,7 @@ Create new and manage existing data connections for a company. Creates a connection for the company by providing a valid `platformKey`. -Use the [List Integrations](https://docs.codat.io/sync-for-sync-for-commerce-api#/operations/list-integrations) endpoint to access valid platform keys. +Use the [List Integrations](https://docs.codat.io/platform-api#/operations/list-integrations) endpoint to access valid platform keys. ### Example Usage @@ -25,7 +25,7 @@ Use the [List Integrations](https://docs.codat.io/sync-for-sync-for-commerce-api package hello.world; import io.codat.sync.commerce.CodatSyncCommerce; -import io.codat.sync.commerce.models.errors.SDKError; +import io.codat.sync.commerce.models.errors.ErrorMessage; import io.codat.sync.commerce.models.operations.CreateConnectionRequest; import io.codat.sync.commerce.models.operations.CreateConnectionRequestBody; import io.codat.sync.commerce.models.operations.CreateConnectionResponse; @@ -33,37 +33,26 @@ import java.lang.Exception; public class Application { - public static void main(String[] args) throws Exception { - try { - CodatSyncCommerce sdk = CodatSyncCommerce.builder() + public static void main(String[] args) throws ErrorMessage, Exception { + + CodatSyncCommerce sdk = CodatSyncCommerce.builder() .authHeader("Basic BASE_64_ENCODED(API_KEY)") - .build(); + .build(); - CreateConnectionRequest req = CreateConnectionRequest.builder() + CreateConnectionRequest req = CreateConnectionRequest.builder() .companyId("8a210b68-6988-11ed-a1eb-0242ac120002") .requestBody(CreateConnectionRequestBody.builder() .platformKey("gbol") .build()) .build(); - CreateConnectionResponse res = sdk.connections().create() + CreateConnectionResponse res = sdk.connections().create() .request(req) .call(); - if (res.connection().isPresent()) { - // handle response - } - } catch (io.codat.sync.commerce.models.errors.ErrorMessage e) { - // handle exception - throw e; - } catch (SDKError e) { - // handle exception - throw e; - } catch (Exception e) { - // handle exception - throw e; + if (res.connection().isPresent()) { + // handle response } - } } ``` @@ -80,11 +69,10 @@ public class Application { ### Errors -| Error Object | Status Code | Content Type | -| --------------------------- | --------------------------- | --------------------------- | -| models/errors/ErrorMessage | 401,402,403,404,429,500,503 | application/json | -| models/errors/SDKError | 4xx-5xx | \*\/* | - +| Error Type | Status Code | Content Type | +| --------------------------------- | --------------------------------- | --------------------------------- | +| models/errors/ErrorMessage | 401, 402, 403, 404, 429, 500, 503 | application/json | +| models/errors/SDKError | 4XX, 5XX | \*/\* | ## getSyncFlowUrl @@ -96,42 +84,31 @@ Create a new company and connections. Get a URL for Sync Flow, including a one t package hello.world; import io.codat.sync.commerce.CodatSyncCommerce; -import io.codat.sync.commerce.models.errors.SDKError; +import io.codat.sync.commerce.models.errors.ErrorMessage; import io.codat.sync.commerce.models.operations.GetSyncFlowUrlRequest; import io.codat.sync.commerce.models.operations.GetSyncFlowUrlResponse; import java.lang.Exception; public class Application { - public static void main(String[] args) throws Exception { - try { - CodatSyncCommerce sdk = CodatSyncCommerce.builder() + public static void main(String[] args) throws ErrorMessage, Exception { + + CodatSyncCommerce sdk = CodatSyncCommerce.builder() .authHeader("Basic BASE_64_ENCODED(API_KEY)") - .build(); + .build(); - GetSyncFlowUrlRequest req = GetSyncFlowUrlRequest.builder() + GetSyncFlowUrlRequest req = GetSyncFlowUrlRequest.builder() .accountingKey("") .commerceKey("") .build(); - GetSyncFlowUrlResponse res = sdk.connections().getSyncFlowUrl() + GetSyncFlowUrlResponse res = sdk.connections().getSyncFlowUrl() .request(req) .call(); - if (res.syncFlowUrl().isPresent()) { - // handle response - } - } catch (io.codat.sync.commerce.models.errors.ErrorMessage e) { - // handle exception - throw e; - } catch (SDKError e) { - // handle exception - throw e; - } catch (Exception e) { - // handle exception - throw e; + if (res.syncFlowUrl().isPresent()) { + // handle response } - } } ``` @@ -148,11 +125,10 @@ public class Application { ### Errors -| Error Object | Status Code | Content Type | -| ------------------------------- | ------------------------------- | ------------------------------- | -| models/errors/ErrorMessage | 400,401,402,403,404,429,500,503 | application/json | -| models/errors/SDKError | 4xx-5xx | \*\/* | - +| Error Type | Status Code | Content Type | +| -------------------------------------- | -------------------------------------- | -------------------------------------- | +| models/errors/ErrorMessage | 400, 401, 402, 403, 404, 429, 500, 503 | application/json | +| models/errors/SDKError | 4XX, 5XX | \*/\* | ## list @@ -164,20 +140,20 @@ public class Application { package hello.world; import io.codat.sync.commerce.CodatSyncCommerce; -import io.codat.sync.commerce.models.errors.SDKError; +import io.codat.sync.commerce.models.errors.ErrorMessage; import io.codat.sync.commerce.models.operations.ListConnectionsRequest; import io.codat.sync.commerce.models.operations.ListConnectionsResponse; import java.lang.Exception; public class Application { - public static void main(String[] args) throws Exception { - try { - CodatSyncCommerce sdk = CodatSyncCommerce.builder() + public static void main(String[] args) throws ErrorMessage, Exception { + + CodatSyncCommerce sdk = CodatSyncCommerce.builder() .authHeader("Basic BASE_64_ENCODED(API_KEY)") - .build(); + .build(); - ListConnectionsRequest req = ListConnectionsRequest.builder() + ListConnectionsRequest req = ListConnectionsRequest.builder() .companyId("8a210b68-6988-11ed-a1eb-0242ac120002") .orderBy("-modifiedDate") .page(1) @@ -185,24 +161,13 @@ public class Application { .query("id=e3334455-1aed-4e71-ab43-6bccf12092ee") .build(); - ListConnectionsResponse res = sdk.connections().list() + ListConnectionsResponse res = sdk.connections().list() .request(req) .call(); - if (res.connections().isPresent()) { - // handle response - } - } catch (io.codat.sync.commerce.models.errors.ErrorMessage e) { - // handle exception - throw e; - } catch (SDKError e) { - // handle exception - throw e; - } catch (Exception e) { - // handle exception - throw e; + if (res.connections().isPresent()) { + // handle response } - } } ``` @@ -219,11 +184,10 @@ public class Application { ### Errors -| Error Object | Status Code | Content Type | -| ------------------------------- | ------------------------------- | ------------------------------- | -| models/errors/ErrorMessage | 400,401,402,403,404,429,500,503 | application/json | -| models/errors/SDKError | 4xx-5xx | \*\/* | - +| Error Type | Status Code | Content Type | +| -------------------------------------- | -------------------------------------- | -------------------------------------- | +| models/errors/ErrorMessage | 400, 401, 402, 403, 404, 429, 500, 503 | application/json | +| models/errors/SDKError | 4XX, 5XX | \*/\* | ## updateAuthorization @@ -235,42 +199,31 @@ Update data connection's authorization. package hello.world; import io.codat.sync.commerce.CodatSyncCommerce; -import io.codat.sync.commerce.models.errors.SDKError; +import io.codat.sync.commerce.models.errors.ErrorMessage; import io.codat.sync.commerce.models.operations.UpdateConnectionAuthorizationRequest; import io.codat.sync.commerce.models.operations.UpdateConnectionAuthorizationResponse; import java.lang.Exception; public class Application { - public static void main(String[] args) throws Exception { - try { - CodatSyncCommerce sdk = CodatSyncCommerce.builder() + public static void main(String[] args) throws ErrorMessage, Exception { + + CodatSyncCommerce sdk = CodatSyncCommerce.builder() .authHeader("Basic BASE_64_ENCODED(API_KEY)") - .build(); + .build(); - UpdateConnectionAuthorizationRequest req = UpdateConnectionAuthorizationRequest.builder() + UpdateConnectionAuthorizationRequest req = UpdateConnectionAuthorizationRequest.builder() .companyId("8a210b68-6988-11ed-a1eb-0242ac120002") .connectionId("2e9d2c44-f675-40ba-8049-353bfcb5e171") .build(); - UpdateConnectionAuthorizationResponse res = sdk.connections().updateAuthorization() + UpdateConnectionAuthorizationResponse res = sdk.connections().updateAuthorization() .request(req) .call(); - if (res.connection().isPresent()) { - // handle response - } - } catch (io.codat.sync.commerce.models.errors.ErrorMessage e) { - // handle exception - throw e; - } catch (SDKError e) { - // handle exception - throw e; - } catch (Exception e) { - // handle exception - throw e; + if (res.connection().isPresent()) { + // handle response } - } } ``` @@ -287,11 +240,10 @@ public class Application { ### Errors -| Error Object | Status Code | Content Type | -| --------------------------- | --------------------------- | --------------------------- | -| models/errors/ErrorMessage | 401,402,403,404,429,500,503 | application/json | -| models/errors/SDKError | 4xx-5xx | \*\/* | - +| Error Type | Status Code | Content Type | +| --------------------------------- | --------------------------------- | --------------------------------- | +| models/errors/ErrorMessage | 401, 402, 403, 404, 429, 500, 503 | application/json | +| models/errors/SDKError | 4XX, 5XX | \*/\* | ## updateConnection @@ -303,42 +255,31 @@ Update a data connection package hello.world; import io.codat.sync.commerce.CodatSyncCommerce; -import io.codat.sync.commerce.models.errors.SDKError; +import io.codat.sync.commerce.models.errors.ErrorMessage; import io.codat.sync.commerce.models.operations.UpdateConnectionRequest; import io.codat.sync.commerce.models.operations.UpdateConnectionResponse; import java.lang.Exception; public class Application { - public static void main(String[] args) throws Exception { - try { - CodatSyncCommerce sdk = CodatSyncCommerce.builder() + public static void main(String[] args) throws ErrorMessage, Exception { + + CodatSyncCommerce sdk = CodatSyncCommerce.builder() .authHeader("Basic BASE_64_ENCODED(API_KEY)") - .build(); + .build(); - UpdateConnectionRequest req = UpdateConnectionRequest.builder() + UpdateConnectionRequest req = UpdateConnectionRequest.builder() .companyId("8a210b68-6988-11ed-a1eb-0242ac120002") .connectionId("2e9d2c44-f675-40ba-8049-353bfcb5e171") .build(); - UpdateConnectionResponse res = sdk.connections().updateConnection() + UpdateConnectionResponse res = sdk.connections().updateConnection() .request(req) .call(); - if (res.connection().isPresent()) { - // handle response - } - } catch (io.codat.sync.commerce.models.errors.ErrorMessage e) { - // handle exception - throw e; - } catch (SDKError e) { - // handle exception - throw e; - } catch (Exception e) { - // handle exception - throw e; + if (res.connection().isPresent()) { + // handle response } - } } ``` @@ -355,7 +296,7 @@ public class Application { ### Errors -| Error Object | Status Code | Content Type | -| --------------------------- | --------------------------- | --------------------------- | -| models/errors/ErrorMessage | 401,402,403,404,429,500,503 | application/json | -| models/errors/SDKError | 4xx-5xx | \*\/* | +| Error Type | Status Code | Content Type | +| --------------------------------- | --------------------------------- | --------------------------------- | +| models/errors/ErrorMessage | 401, 402, 403, 404, 429, 500, 503 | application/json | +| models/errors/SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/sync-for-commerce/docs/sdks/integrations/README.md b/sync-for-commerce/docs/sdks/integrations/README.md index 7ff6713e..3dbf78d6 100644 --- a/sync-for-commerce/docs/sdks/integrations/README.md +++ b/sync-for-commerce/docs/sdks/integrations/README.md @@ -20,41 +20,30 @@ Retrieve Integration branding assets. package hello.world; import io.codat.sync.commerce.CodatSyncCommerce; -import io.codat.sync.commerce.models.errors.SDKError; +import io.codat.sync.commerce.models.errors.ErrorMessage; import io.codat.sync.commerce.models.operations.GetIntegrationBrandingRequest; import io.codat.sync.commerce.models.operations.GetIntegrationBrandingResponse; import java.lang.Exception; public class Application { - public static void main(String[] args) throws Exception { - try { - CodatSyncCommerce sdk = CodatSyncCommerce.builder() + public static void main(String[] args) throws ErrorMessage, Exception { + + CodatSyncCommerce sdk = CodatSyncCommerce.builder() .authHeader("Basic BASE_64_ENCODED(API_KEY)") - .build(); + .build(); - GetIntegrationBrandingRequest req = GetIntegrationBrandingRequest.builder() + GetIntegrationBrandingRequest req = GetIntegrationBrandingRequest.builder() .platformKey("gbol") .build(); - GetIntegrationBrandingResponse res = sdk.integrations().getBranding() + GetIntegrationBrandingResponse res = sdk.integrations().getBranding() .request(req) .call(); - if (res.branding().isPresent()) { - // handle response - } - } catch (io.codat.sync.commerce.models.errors.ErrorMessage e) { - // handle exception - throw e; - } catch (SDKError e) { - // handle exception - throw e; - } catch (Exception e) { - // handle exception - throw e; + if (res.branding().isPresent()) { + // handle response } - } } ``` @@ -71,11 +60,10 @@ public class Application { ### Errors -| Error Object | Status Code | Content Type | -| --------------------------- | --------------------------- | --------------------------- | -| models/errors/ErrorMessage | 401,402,403,404,429,500,503 | application/json | -| models/errors/SDKError | 4xx-5xx | \*\/* | - +| Error Type | Status Code | Content Type | +| --------------------------------- | --------------------------------- | --------------------------------- | +| models/errors/ErrorMessage | 401, 402, 403, 404, 429, 500, 503 | application/json | +| models/errors/SDKError | 4XX, 5XX | \*/\* | ## list @@ -87,44 +75,33 @@ Retrieve a list of available integrations support by data type and state of rele package hello.world; import io.codat.sync.commerce.CodatSyncCommerce; -import io.codat.sync.commerce.models.errors.SDKError; +import io.codat.sync.commerce.models.errors.ErrorMessage; import io.codat.sync.commerce.models.operations.ListIntegrationsRequest; import io.codat.sync.commerce.models.operations.ListIntegrationsResponse; import java.lang.Exception; public class Application { - public static void main(String[] args) throws Exception { - try { - CodatSyncCommerce sdk = CodatSyncCommerce.builder() + public static void main(String[] args) throws ErrorMessage, Exception { + + CodatSyncCommerce sdk = CodatSyncCommerce.builder() .authHeader("Basic BASE_64_ENCODED(API_KEY)") - .build(); + .build(); - ListIntegrationsRequest req = ListIntegrationsRequest.builder() + ListIntegrationsRequest req = ListIntegrationsRequest.builder() .orderBy("-modifiedDate") .page(1) .pageSize(100) .query("id=e3334455-1aed-4e71-ab43-6bccf12092ee") .build(); - ListIntegrationsResponse res = sdk.integrations().list() + ListIntegrationsResponse res = sdk.integrations().list() .request(req) .call(); - if (res.integrations().isPresent()) { - // handle response - } - } catch (io.codat.sync.commerce.models.errors.ErrorMessage e) { - // handle exception - throw e; - } catch (SDKError e) { - // handle exception - throw e; - } catch (Exception e) { - // handle exception - throw e; + if (res.integrations().isPresent()) { + // handle response } - } } ``` @@ -141,7 +118,7 @@ public class Application { ### Errors -| Error Object | Status Code | Content Type | -| --------------------------- | --------------------------- | --------------------------- | -| models/errors/ErrorMessage | 400,401,402,403,429,500,503 | application/json | -| models/errors/SDKError | 4xx-5xx | \*\/* | +| Error Type | Status Code | Content Type | +| --------------------------------- | --------------------------------- | --------------------------------- | +| models/errors/ErrorMessage | 400, 401, 402, 403, 429, 500, 503 | application/json | +| models/errors/SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/sync-for-commerce/docs/sdks/sync/README.md b/sync-for-commerce/docs/sdks/sync/README.md index a3018966..a6786612 100644 --- a/sync-for-commerce/docs/sdks/sync/README.md +++ b/sync-for-commerce/docs/sdks/sync/README.md @@ -25,42 +25,31 @@ Get the sync status for a specified sync package hello.world; import io.codat.sync.commerce.CodatSyncCommerce; -import io.codat.sync.commerce.models.errors.SDKError; +import io.codat.sync.commerce.models.errors.ErrorMessage; import io.codat.sync.commerce.models.operations.GetSyncByIdRequest; import io.codat.sync.commerce.models.operations.GetSyncByIdResponse; import java.lang.Exception; public class Application { - public static void main(String[] args) throws Exception { - try { - CodatSyncCommerce sdk = CodatSyncCommerce.builder() + public static void main(String[] args) throws ErrorMessage, Exception { + + CodatSyncCommerce sdk = CodatSyncCommerce.builder() .authHeader("Basic BASE_64_ENCODED(API_KEY)") - .build(); + .build(); - GetSyncByIdRequest req = GetSyncByIdRequest.builder() + GetSyncByIdRequest req = GetSyncByIdRequest.builder() .companyId("8a210b68-6988-11ed-a1eb-0242ac120002") .syncId("6fb40d5e-b13e-11ed-afa1-0242ac120002") .build(); - GetSyncByIdResponse res = sdk.sync().get() + GetSyncByIdResponse res = sdk.sync().get() .request(req) .call(); - if (res.companySyncStatus().isPresent()) { - // handle response - } - } catch (io.codat.sync.commerce.models.errors.ErrorMessage e) { - // handle exception - throw e; - } catch (SDKError e) { - // handle exception - throw e; - } catch (Exception e) { - // handle exception - throw e; + if (res.companySyncStatus().isPresent()) { + // handle response } - } } ``` @@ -77,11 +66,10 @@ public class Application { ### Errors -| Error Object | Status Code | Content Type | -| --------------------------- | --------------------------- | --------------------------- | -| models/errors/ErrorMessage | 401,402,403,404,429,500,503 | application/json | -| models/errors/SDKError | 4xx-5xx | \*\/* | - +| Error Type | Status Code | Content Type | +| --------------------------------- | --------------------------------- | --------------------------------- | +| models/errors/ErrorMessage | 401, 402, 403, 404, 429, 500, 503 | application/json | +| models/errors/SDKError | 4XX, 5XX | \*/\* | ## getLastSuccessfulSync @@ -93,41 +81,30 @@ Gets the status of the last successful sync package hello.world; import io.codat.sync.commerce.CodatSyncCommerce; -import io.codat.sync.commerce.models.errors.SDKError; +import io.codat.sync.commerce.models.errors.ErrorMessage; import io.codat.sync.commerce.models.operations.GetLastSuccessfulSyncRequest; import io.codat.sync.commerce.models.operations.GetLastSuccessfulSyncResponse; import java.lang.Exception; public class Application { - public static void main(String[] args) throws Exception { - try { - CodatSyncCommerce sdk = CodatSyncCommerce.builder() + public static void main(String[] args) throws ErrorMessage, Exception { + + CodatSyncCommerce sdk = CodatSyncCommerce.builder() .authHeader("Basic BASE_64_ENCODED(API_KEY)") - .build(); + .build(); - GetLastSuccessfulSyncRequest req = GetLastSuccessfulSyncRequest.builder() + GetLastSuccessfulSyncRequest req = GetLastSuccessfulSyncRequest.builder() .companyId("8a210b68-6988-11ed-a1eb-0242ac120002") .build(); - GetLastSuccessfulSyncResponse res = sdk.sync().getLastSuccessfulSync() + GetLastSuccessfulSyncResponse res = sdk.sync().getLastSuccessfulSync() .request(req) .call(); - if (res.companySyncStatus().isPresent()) { - // handle response - } - } catch (io.codat.sync.commerce.models.errors.ErrorMessage e) { - // handle exception - throw e; - } catch (SDKError e) { - // handle exception - throw e; - } catch (Exception e) { - // handle exception - throw e; + if (res.companySyncStatus().isPresent()) { + // handle response } - } } ``` @@ -144,11 +121,10 @@ public class Application { ### Errors -| Error Object | Status Code | Content Type | -| --------------------------- | --------------------------- | --------------------------- | -| models/errors/ErrorMessage | 401,402,403,404,429,500,503 | application/json | -| models/errors/SDKError | 4xx-5xx | \*\/* | - +| Error Type | Status Code | Content Type | +| --------------------------------- | --------------------------------- | --------------------------------- | +| models/errors/ErrorMessage | 401, 402, 403, 404, 429, 500, 503 | application/json | +| models/errors/SDKError | 4XX, 5XX | \*/\* | ## getLatestSync @@ -160,41 +136,30 @@ Gets the latest sync status package hello.world; import io.codat.sync.commerce.CodatSyncCommerce; -import io.codat.sync.commerce.models.errors.SDKError; +import io.codat.sync.commerce.models.errors.ErrorMessage; import io.codat.sync.commerce.models.operations.GetLatestSyncRequest; import io.codat.sync.commerce.models.operations.GetLatestSyncResponse; import java.lang.Exception; public class Application { - public static void main(String[] args) throws Exception { - try { - CodatSyncCommerce sdk = CodatSyncCommerce.builder() + public static void main(String[] args) throws ErrorMessage, Exception { + + CodatSyncCommerce sdk = CodatSyncCommerce.builder() .authHeader("Basic BASE_64_ENCODED(API_KEY)") - .build(); + .build(); - GetLatestSyncRequest req = GetLatestSyncRequest.builder() + GetLatestSyncRequest req = GetLatestSyncRequest.builder() .companyId("8a210b68-6988-11ed-a1eb-0242ac120002") .build(); - GetLatestSyncResponse res = sdk.sync().getLatestSync() + GetLatestSyncResponse res = sdk.sync().getLatestSync() .request(req) .call(); - if (res.companySyncStatus().isPresent()) { - // handle response - } - } catch (io.codat.sync.commerce.models.errors.ErrorMessage e) { - // handle exception - throw e; - } catch (SDKError e) { - // handle exception - throw e; - } catch (Exception e) { - // handle exception - throw e; + if (res.companySyncStatus().isPresent()) { + // handle response } - } } ``` @@ -211,11 +176,10 @@ public class Application { ### Errors -| Error Object | Status Code | Content Type | -| --------------------------- | --------------------------- | --------------------------- | -| models/errors/ErrorMessage | 401,402,403,404,429,500,503 | application/json | -| models/errors/SDKError | 4xx-5xx | \*\/* | - +| Error Type | Status Code | Content Type | +| --------------------------------- | --------------------------------- | --------------------------------- | +| models/errors/ErrorMessage | 401, 402, 403, 404, 429, 500, 503 | application/json | +| models/errors/SDKError | 4XX, 5XX | \*/\* | ## getStatus @@ -227,41 +191,30 @@ Gets a list of sync statuses. package hello.world; import io.codat.sync.commerce.CodatSyncCommerce; -import io.codat.sync.commerce.models.errors.SDKError; +import io.codat.sync.commerce.models.errors.ErrorMessage; import io.codat.sync.commerce.models.operations.GetSyncStatusRequest; import io.codat.sync.commerce.models.operations.GetSyncStatusResponse; import java.lang.Exception; public class Application { - public static void main(String[] args) throws Exception { - try { - CodatSyncCommerce sdk = CodatSyncCommerce.builder() + public static void main(String[] args) throws ErrorMessage, Exception { + + CodatSyncCommerce sdk = CodatSyncCommerce.builder() .authHeader("Basic BASE_64_ENCODED(API_KEY)") - .build(); + .build(); - GetSyncStatusRequest req = GetSyncStatusRequest.builder() + GetSyncStatusRequest req = GetSyncStatusRequest.builder() .companyId("8a210b68-6988-11ed-a1eb-0242ac120002") .build(); - GetSyncStatusResponse res = sdk.sync().getStatus() + GetSyncStatusResponse res = sdk.sync().getStatus() .request(req) .call(); - if (res.syncStatus().isPresent()) { - // handle response - } - } catch (io.codat.sync.commerce.models.errors.ErrorMessage e) { - // handle exception - throw e; - } catch (SDKError e) { - // handle exception - throw e; - } catch (Exception e) { - // handle exception - throw e; + if (res.syncStatus().isPresent()) { + // handle response } - } } ``` @@ -278,11 +231,10 @@ public class Application { ### Errors -| Error Object | Status Code | Content Type | -| --------------------------- | --------------------------- | --------------------------- | -| models/errors/ErrorMessage | 401,402,403,404,429,500,503 | application/json | -| models/errors/SDKError | 4xx-5xx | \*\/* | - +| Error Type | Status Code | Content Type | +| --------------------------------- | --------------------------------- | --------------------------------- | +| models/errors/ErrorMessage | 401, 402, 403, 404, 429, 500, 503 | application/json | +| models/errors/SDKError | 4XX, 5XX | \*/\* | ## list @@ -294,41 +246,30 @@ Gets a list of sync statuses package hello.world; import io.codat.sync.commerce.CodatSyncCommerce; -import io.codat.sync.commerce.models.errors.SDKError; +import io.codat.sync.commerce.models.errors.ErrorMessage; import io.codat.sync.commerce.models.operations.ListSyncsRequest; import io.codat.sync.commerce.models.operations.ListSyncsResponse; import java.lang.Exception; public class Application { - public static void main(String[] args) throws Exception { - try { - CodatSyncCommerce sdk = CodatSyncCommerce.builder() + public static void main(String[] args) throws ErrorMessage, Exception { + + CodatSyncCommerce sdk = CodatSyncCommerce.builder() .authHeader("Basic BASE_64_ENCODED(API_KEY)") - .build(); + .build(); - ListSyncsRequest req = ListSyncsRequest.builder() + ListSyncsRequest req = ListSyncsRequest.builder() .companyId("8a210b68-6988-11ed-a1eb-0242ac120002") .build(); - ListSyncsResponse res = sdk.sync().list() + ListSyncsResponse res = sdk.sync().list() .request(req) .call(); - if (res.classes().isPresent()) { - // handle response - } - } catch (io.codat.sync.commerce.models.errors.ErrorMessage e) { - // handle exception - throw e; - } catch (SDKError e) { - // handle exception - throw e; - } catch (Exception e) { - // handle exception - throw e; + if (res.classes().isPresent()) { + // handle response } - } } ``` @@ -345,11 +286,10 @@ public class Application { ### Errors -| Error Object | Status Code | Content Type | -| --------------------------- | --------------------------- | --------------------------- | -| models/errors/ErrorMessage | 401,402,403,404,429,500,503 | application/json | -| models/errors/SDKError | 4xx-5xx | \*\/* | - +| Error Type | Status Code | Content Type | +| --------------------------------- | --------------------------------- | --------------------------------- | +| models/errors/ErrorMessage | 401, 402, 403, 404, 429, 500, 503 | application/json | +| models/errors/SDKError | 4XX, 5XX | \*/\* | ## request @@ -362,44 +302,33 @@ package hello.world; import io.codat.sync.commerce.CodatSyncCommerce; import io.codat.sync.commerce.models.components.SyncToLatestArgs; -import io.codat.sync.commerce.models.errors.SDKError; +import io.codat.sync.commerce.models.errors.ErrorMessage; import io.codat.sync.commerce.models.operations.RequestSyncRequest; import io.codat.sync.commerce.models.operations.RequestSyncResponse; import java.lang.Exception; public class Application { - public static void main(String[] args) throws Exception { - try { - CodatSyncCommerce sdk = CodatSyncCommerce.builder() + public static void main(String[] args) throws ErrorMessage, Exception { + + CodatSyncCommerce sdk = CodatSyncCommerce.builder() .authHeader("Basic BASE_64_ENCODED(API_KEY)") - .build(); + .build(); - RequestSyncRequest req = RequestSyncRequest.builder() + RequestSyncRequest req = RequestSyncRequest.builder() .companyId("8a210b68-6988-11ed-a1eb-0242ac120002") .syncToLatestArgs(SyncToLatestArgs.builder() .syncTo("2022-10-23T00:00:00Z") .build()) .build(); - RequestSyncResponse res = sdk.sync().request() + RequestSyncResponse res = sdk.sync().request() .request(req) .call(); - if (res.syncSummary().isPresent()) { - // handle response - } - } catch (io.codat.sync.commerce.models.errors.ErrorMessage e) { - // handle exception - throw e; - } catch (SDKError e) { - // handle exception - throw e; - } catch (Exception e) { - // handle exception - throw e; + if (res.syncSummary().isPresent()) { + // handle response } - } } ``` @@ -416,11 +345,10 @@ public class Application { ### Errors -| Error Object | Status Code | Content Type | -| ------------------------------- | ------------------------------- | ------------------------------- | -| models/errors/ErrorMessage | 400,401,402,403,404,429,500,503 | application/json | -| models/errors/SDKError | 4xx-5xx | \*\/* | - +| Error Type | Status Code | Content Type | +| -------------------------------------- | -------------------------------------- | -------------------------------------- | +| models/errors/ErrorMessage | 400, 401, 402, 403, 404, 429, 500, 503 | application/json | +| models/errors/SDKError | 4XX, 5XX | \*/\* | ## requestForDateRange @@ -434,20 +362,20 @@ package hello.world; import io.codat.sync.commerce.CodatSyncCommerce; import io.codat.sync.commerce.models.components.DateRange; import io.codat.sync.commerce.models.components.SyncRange; -import io.codat.sync.commerce.models.errors.SDKError; +import io.codat.sync.commerce.models.errors.ErrorMessage; import io.codat.sync.commerce.models.operations.RequestSyncForDateRangeRequest; import io.codat.sync.commerce.models.operations.RequestSyncForDateRangeResponse; import java.lang.Exception; public class Application { - public static void main(String[] args) throws Exception { - try { - CodatSyncCommerce sdk = CodatSyncCommerce.builder() + public static void main(String[] args) throws ErrorMessage, Exception { + + CodatSyncCommerce sdk = CodatSyncCommerce.builder() .authHeader("Basic BASE_64_ENCODED(API_KEY)") - .build(); + .build(); - RequestSyncForDateRangeRequest req = RequestSyncForDateRangeRequest.builder() + RequestSyncForDateRangeRequest req = RequestSyncForDateRangeRequest.builder() .companyId("8a210b68-6988-11ed-a1eb-0242ac120002") .syncRange(SyncRange.builder() .dateRange(DateRange.builder() @@ -457,24 +385,13 @@ public class Application { .build()) .build(); - RequestSyncForDateRangeResponse res = sdk.sync().requestForDateRange() + RequestSyncForDateRangeResponse res = sdk.sync().requestForDateRange() .request(req) .call(); - if (res.syncSummary().isPresent()) { - // handle response - } - } catch (io.codat.sync.commerce.models.errors.ErrorMessage e) { - // handle exception - throw e; - } catch (SDKError e) { - // handle exception - throw e; - } catch (Exception e) { - // handle exception - throw e; + if (res.syncSummary().isPresent()) { + // handle response } - } } ``` @@ -491,7 +408,7 @@ public class Application { ### Errors -| Error Object | Status Code | Content Type | -| ------------------------------- | ------------------------------- | ------------------------------- | -| models/errors/ErrorMessage | 400,401,402,403,404,429,500,503 | application/json | -| models/errors/SDKError | 4xx-5xx | \*\/* | +| Error Type | Status Code | Content Type | +| -------------------------------------- | -------------------------------------- | -------------------------------------- | +| models/errors/ErrorMessage | 400, 401, 402, 403, 404, 429, 500, 503 | application/json | +| models/errors/SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/sync-for-commerce/docs/sdks/syncflowsettings/README.md b/sync-for-commerce/docs/sdks/syncflowsettings/README.md index 9c10d75f..f7a0af21 100644 --- a/sync-for-commerce/docs/sdks/syncflowsettings/README.md +++ b/sync-for-commerce/docs/sdks/syncflowsettings/README.md @@ -23,41 +23,30 @@ package hello.world; import io.codat.sync.commerce.CodatSyncCommerce; import io.codat.sync.commerce.models.components.Locale; -import io.codat.sync.commerce.models.errors.SDKError; +import io.codat.sync.commerce.models.errors.ErrorMessage; import io.codat.sync.commerce.models.operations.GetConfigTextSyncFlowRequest; import io.codat.sync.commerce.models.operations.GetConfigTextSyncFlowResponse; import java.lang.Exception; public class Application { - public static void main(String[] args) throws Exception { - try { - CodatSyncCommerce sdk = CodatSyncCommerce.builder() + public static void main(String[] args) throws ErrorMessage, Exception { + + CodatSyncCommerce sdk = CodatSyncCommerce.builder() .authHeader("Basic BASE_64_ENCODED(API_KEY)") - .build(); + .build(); - GetConfigTextSyncFlowRequest req = GetConfigTextSyncFlowRequest.builder() + GetConfigTextSyncFlowRequest req = GetConfigTextSyncFlowRequest.builder() .locale(Locale.EN_US) .build(); - GetConfigTextSyncFlowResponse res = sdk.syncFlowSettings().getConfigTextSyncFlow() + GetConfigTextSyncFlowResponse res = sdk.syncFlowSettings().getConfigTextSyncFlow() .request(req) .call(); - if (res.localizationInfo().isPresent()) { - // handle response - } - } catch (io.codat.sync.commerce.models.errors.ErrorMessage e) { - // handle exception - throw e; - } catch (SDKError e) { - // handle exception - throw e; - } catch (Exception e) { - // handle exception - throw e; + if (res.localizationInfo().isPresent()) { + // handle response } - } } ``` @@ -74,11 +63,10 @@ public class Application { ### Errors -| Error Object | Status Code | Content Type | -| -------------------------- | -------------------------- | -------------------------- | -| models/errors/ErrorMessage | 401,402,403,429,500,503 | application/json | -| models/errors/SDKError | 4xx-5xx | \*\/* | - +| Error Type | Status Code | Content Type | +| ---------------------------- | ---------------------------- | ---------------------------- | +| models/errors/ErrorMessage | 401, 402, 403, 429, 500, 503 | application/json | +| models/errors/SDKError | 4XX, 5XX | \*/\* | ## getVisibleAccounts @@ -90,42 +78,31 @@ Return accounts which are visible on sync flow. package hello.world; import io.codat.sync.commerce.CodatSyncCommerce; -import io.codat.sync.commerce.models.errors.SDKError; +import io.codat.sync.commerce.models.errors.ErrorMessage; import io.codat.sync.commerce.models.operations.GetVisibleAccountsRequest; import io.codat.sync.commerce.models.operations.GetVisibleAccountsResponse; import java.lang.Exception; public class Application { - public static void main(String[] args) throws Exception { - try { - CodatSyncCommerce sdk = CodatSyncCommerce.builder() + public static void main(String[] args) throws ErrorMessage, Exception { + + CodatSyncCommerce sdk = CodatSyncCommerce.builder() .authHeader("Basic BASE_64_ENCODED(API_KEY)") - .build(); + .build(); - GetVisibleAccountsRequest req = GetVisibleAccountsRequest.builder() - .clientId("86fe9741-738d-4f2c-8e96-9c3f84156e91") + GetVisibleAccountsRequest req = GetVisibleAccountsRequest.builder() + .clientId("8f9478fc-e6cf-445e-b122-74136f8fd7ab") .platformKey("gbol") .build(); - GetVisibleAccountsResponse res = sdk.syncFlowSettings().getVisibleAccounts() + GetVisibleAccountsResponse res = sdk.syncFlowSettings().getVisibleAccounts() .request(req) .call(); - if (res.visibleAccounts().isPresent()) { - // handle response - } - } catch (io.codat.sync.commerce.models.errors.ErrorMessage e) { - // handle exception - throw e; - } catch (SDKError e) { - // handle exception - throw e; - } catch (Exception e) { - // handle exception - throw e; + if (res.visibleAccounts().isPresent()) { + // handle response } - } } ``` @@ -142,11 +119,10 @@ public class Application { ### Errors -| Error Object | Status Code | Content Type | -| --------------------------- | --------------------------- | --------------------------- | -| models/errors/ErrorMessage | 401,402,403,404,429,500,503 | application/json | -| models/errors/SDKError | 4xx-5xx | \*\/* | - +| Error Type | Status Code | Content Type | +| --------------------------------- | --------------------------------- | --------------------------------- | +| models/errors/ErrorMessage | 401, 402, 403, 404, 429, 500, 503 | application/json | +| models/errors/SDKError | 4XX, 5XX | \*/\* | ## updateConfigTextSyncFlow @@ -159,41 +135,30 @@ package hello.world; import io.codat.sync.commerce.CodatSyncCommerce; import io.codat.sync.commerce.models.components.Locale; -import io.codat.sync.commerce.models.errors.SDKError; +import io.codat.sync.commerce.models.errors.ErrorMessage; import io.codat.sync.commerce.models.operations.UpdateConfigTextSyncFlowRequest; import io.codat.sync.commerce.models.operations.UpdateConfigTextSyncFlowResponse; import java.lang.Exception; public class Application { - public static void main(String[] args) throws Exception { - try { - CodatSyncCommerce sdk = CodatSyncCommerce.builder() + public static void main(String[] args) throws ErrorMessage, Exception { + + CodatSyncCommerce sdk = CodatSyncCommerce.builder() .authHeader("Basic BASE_64_ENCODED(API_KEY)") - .build(); + .build(); - UpdateConfigTextSyncFlowRequest req = UpdateConfigTextSyncFlowRequest.builder() + UpdateConfigTextSyncFlowRequest req = UpdateConfigTextSyncFlowRequest.builder() .locale(Locale.EN_US) .build(); - UpdateConfigTextSyncFlowResponse res = sdk.syncFlowSettings().updateConfigTextSyncFlow() + UpdateConfigTextSyncFlowResponse res = sdk.syncFlowSettings().updateConfigTextSyncFlow() .request(req) .call(); - if (res.localizationInfo().isPresent()) { - // handle response - } - } catch (io.codat.sync.commerce.models.errors.ErrorMessage e) { - // handle exception - throw e; - } catch (SDKError e) { - // handle exception - throw e; - } catch (Exception e) { - // handle exception - throw e; + if (res.localizationInfo().isPresent()) { + // handle response } - } } ``` @@ -210,11 +175,10 @@ public class Application { ### Errors -| Error Object | Status Code | Content Type | -| --------------------------- | --------------------------- | --------------------------- | -| models/errors/ErrorMessage | 400,401,402,403,429,500,503 | application/json | -| models/errors/SDKError | 4xx-5xx | \*\/* | - +| Error Type | Status Code | Content Type | +| --------------------------------- | --------------------------------- | --------------------------------- | +| models/errors/ErrorMessage | 400, 401, 402, 403, 429, 500, 503 | application/json | +| models/errors/SDKError | 4XX, 5XX | \*/\* | ## updateVisibleAccountsSyncFlow @@ -226,41 +190,30 @@ Update which accounts are visible on sync flow. package hello.world; import io.codat.sync.commerce.CodatSyncCommerce; -import io.codat.sync.commerce.models.errors.SDKError; +import io.codat.sync.commerce.models.errors.ErrorMessage; import io.codat.sync.commerce.models.operations.UpdateVisibleAccountsSyncFlowRequest; import io.codat.sync.commerce.models.operations.UpdateVisibleAccountsSyncFlowResponse; import java.lang.Exception; public class Application { - public static void main(String[] args) throws Exception { - try { - CodatSyncCommerce sdk = CodatSyncCommerce.builder() + public static void main(String[] args) throws ErrorMessage, Exception { + + CodatSyncCommerce sdk = CodatSyncCommerce.builder() .authHeader("Basic BASE_64_ENCODED(API_KEY)") - .build(); + .build(); - UpdateVisibleAccountsSyncFlowRequest req = UpdateVisibleAccountsSyncFlowRequest.builder() + UpdateVisibleAccountsSyncFlowRequest req = UpdateVisibleAccountsSyncFlowRequest.builder() .platformKey("gbol") .build(); - UpdateVisibleAccountsSyncFlowResponse res = sdk.syncFlowSettings().updateVisibleAccountsSyncFlow() + UpdateVisibleAccountsSyncFlowResponse res = sdk.syncFlowSettings().updateVisibleAccountsSyncFlow() .request(req) .call(); - if (res.visibleAccounts().isPresent()) { - // handle response - } - } catch (io.codat.sync.commerce.models.errors.ErrorMessage e) { - // handle exception - throw e; - } catch (SDKError e) { - // handle exception - throw e; - } catch (Exception e) { - // handle exception - throw e; + if (res.visibleAccounts().isPresent()) { + // handle response } - } } ``` @@ -277,7 +230,7 @@ public class Application { ### Errors -| Error Object | Status Code | Content Type | -| ------------------------------- | ------------------------------- | ------------------------------- | -| models/errors/ErrorMessage | 400,401,402,403,404,429,500,503 | application/json | -| models/errors/SDKError | 4xx-5xx | \*\/* | +| Error Type | Status Code | Content Type | +| -------------------------------------- | -------------------------------------- | -------------------------------------- | +| models/errors/ErrorMessage | 400, 401, 402, 403, 404, 429, 500, 503 | application/json | +| models/errors/SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/sync-for-commerce/src/main/java/io/codat/sync/commerce/AdvancedControls.java b/sync-for-commerce/src/main/java/io/codat/sync/commerce/AdvancedControls.java index fff9e62b..c3429d64 100644 --- a/sync-for-commerce/src/main/java/io/codat/sync/commerce/AdvancedControls.java +++ b/sync-for-commerce/src/main/java/io/codat/sync/commerce/AdvancedControls.java @@ -96,7 +96,7 @@ public CreateCompanyResponse createCompany( Optional options) throws Exception { if (options.isPresent()) { - options.get().validate(Arrays.asList(io.codat.sync.commerce.utils.Options.Option.RETRY_CONFIG)); + options.get().validate(Arrays.asList(Options.Option.RETRY_CONFIG)); } String _baseUrl = this.sdkConfiguration.serverUrl; String _url = Utils.generateURL( @@ -116,7 +116,7 @@ public CreateCompanyResponse createCompany( _req.setBody(Optional.ofNullable(_serializedRequestBody)); _req.addHeader("Accept", "application/json") .addHeader("user-agent", - this.sdkConfiguration.userAgent); + SDKConfiguration.USER_AGENT); Utils.configureSecurity(_req, this.sdkConfiguration.securitySource.getSecurity()); @@ -273,7 +273,7 @@ public GetConfigurationResponse getConfiguration( Optional options) throws Exception { if (options.isPresent()) { - options.get().validate(Arrays.asList(io.codat.sync.commerce.utils.Options.Option.RETRY_CONFIG)); + options.get().validate(Arrays.asList(Options.Option.RETRY_CONFIG)); } String _baseUrl = this.sdkConfiguration.serverUrl; String _url = Utils.generateURL( @@ -285,7 +285,7 @@ public GetConfigurationResponse getConfiguration( HTTPRequest _req = new HTTPRequest(_url, "GET"); _req.addHeader("Accept", "application/json") .addHeader("user-agent", - this.sdkConfiguration.userAgent); + SDKConfiguration.USER_AGENT); Utils.configureSecurity(_req, this.sdkConfiguration.securitySource.getSecurity()); @@ -442,7 +442,7 @@ public ListCompaniesResponse listCompanies( Optional options) throws Exception { if (options.isPresent()) { - options.get().validate(Arrays.asList(io.codat.sync.commerce.utils.Options.Option.RETRY_CONFIG)); + options.get().validate(Arrays.asList(Options.Option.RETRY_CONFIG)); } String _baseUrl = this.sdkConfiguration.serverUrl; String _url = Utils.generateURL( @@ -452,7 +452,7 @@ public ListCompaniesResponse listCompanies( HTTPRequest _req = new HTTPRequest(_url, "GET"); _req.addHeader("Accept", "application/json") .addHeader("user-agent", - this.sdkConfiguration.userAgent); + SDKConfiguration.USER_AGENT); _req.addQueryParams(Utils.getQueryParams( ListCompaniesRequest.class, @@ -614,7 +614,7 @@ public SetConfigurationResponse setConfiguration( Optional options) throws Exception { if (options.isPresent()) { - options.get().validate(Arrays.asList(io.codat.sync.commerce.utils.Options.Option.RETRY_CONFIG)); + options.get().validate(Arrays.asList(Options.Option.RETRY_CONFIG)); } String _baseUrl = this.sdkConfiguration.serverUrl; String _url = Utils.generateURL( @@ -626,7 +626,7 @@ public SetConfigurationResponse setConfiguration( HTTPRequest _req = new HTTPRequest(_url, "POST"); _req.addHeader("Accept", "application/json") .addHeader("user-agent", - this.sdkConfiguration.userAgent); + SDKConfiguration.USER_AGENT); Utils.configureSecurity(_req, this.sdkConfiguration.securitySource.getSecurity()); diff --git a/sync-for-commerce/src/main/java/io/codat/sync/commerce/CodatSyncCommerce.java b/sync-for-commerce/src/main/java/io/codat/sync/commerce/CodatSyncCommerce.java index dc606e93..e4b6f00a 100644 --- a/sync-for-commerce/src/main/java/io/codat/sync/commerce/CodatSyncCommerce.java +++ b/sync-for-commerce/src/main/java/io/codat/sync/commerce/CodatSyncCommerce.java @@ -8,6 +8,7 @@ import io.codat.sync.commerce.utils.HTTPClient; import io.codat.sync.commerce.utils.RetryConfig; import io.codat.sync.commerce.utils.SpeakeasyHTTPClient; +import io.codat.sync.commerce.utils.Utils; import java.lang.String; import java.util.Map; import java.util.Optional; @@ -172,7 +173,7 @@ public Builder serverURL(String serverUrl) { * @return The builder instance. */ public Builder serverURL(String serverUrl, Map params) { - this.sdkConfiguration.serverUrl = io.codat.sync.commerce.utils.Utils.templateUrl(serverUrl, params); + this.sdkConfiguration.serverUrl = Utils.templateUrl(serverUrl, params); return this; } diff --git a/sync-for-commerce/src/main/java/io/codat/sync/commerce/Connections.java b/sync-for-commerce/src/main/java/io/codat/sync/commerce/Connections.java index 824f101b..e9c32f00 100644 --- a/sync-for-commerce/src/main/java/io/codat/sync/commerce/Connections.java +++ b/sync-for-commerce/src/main/java/io/codat/sync/commerce/Connections.java @@ -71,7 +71,7 @@ public class Connections implements * Create connection * Creates a connection for the company by providing a valid `platformKey`. * - * Use the [List Integrations](https://docs.codat.io/sync-for-sync-for-commerce-api#/operations/list-integrations) endpoint to access valid platform keys. + * Use the [List Integrations](https://docs.codat.io/platform-api#/operations/list-integrations) endpoint to access valid platform keys. * @return The call builder */ public CreateConnectionRequestBuilder create() { @@ -82,7 +82,7 @@ public CreateConnectionRequestBuilder create() { * Create connection * Creates a connection for the company by providing a valid `platformKey`. * - * Use the [List Integrations](https://docs.codat.io/sync-for-sync-for-commerce-api#/operations/list-integrations) endpoint to access valid platform keys. + * Use the [List Integrations](https://docs.codat.io/platform-api#/operations/list-integrations) endpoint to access valid platform keys. * @param request The request object containing all of the parameters for the API call. * @return The response from the API call * @throws Exception if the API call fails @@ -96,7 +96,7 @@ public CreateConnectionResponse create( * Create connection * Creates a connection for the company by providing a valid `platformKey`. * - * Use the [List Integrations](https://docs.codat.io/sync-for-sync-for-commerce-api#/operations/list-integrations) endpoint to access valid platform keys. + * Use the [List Integrations](https://docs.codat.io/platform-api#/operations/list-integrations) endpoint to access valid platform keys. * @param request The request object containing all of the parameters for the API call. * @param options additional options * @return The response from the API call @@ -107,7 +107,7 @@ public CreateConnectionResponse create( Optional options) throws Exception { if (options.isPresent()) { - options.get().validate(Arrays.asList(io.codat.sync.commerce.utils.Options.Option.RETRY_CONFIG)); + options.get().validate(Arrays.asList(Options.Option.RETRY_CONFIG)); } String _baseUrl = this.sdkConfiguration.serverUrl; String _url = Utils.generateURL( @@ -129,7 +129,7 @@ public CreateConnectionResponse create( _req.setBody(Optional.ofNullable(_serializedRequestBody)); _req.addHeader("Accept", "application/json") .addHeader("user-agent", - this.sdkConfiguration.userAgent); + SDKConfiguration.USER_AGENT); Utils.configureSecurity(_req, this.sdkConfiguration.securitySource.getSecurity()); @@ -286,7 +286,7 @@ public GetSyncFlowUrlResponse getSyncFlowUrl( Optional options) throws Exception { if (options.isPresent()) { - options.get().validate(Arrays.asList(io.codat.sync.commerce.utils.Options.Option.RETRY_CONFIG)); + options.get().validate(Arrays.asList(Options.Option.RETRY_CONFIG)); } String _baseUrl = this.sdkConfiguration.serverUrl; String _url = Utils.generateURL( @@ -298,7 +298,7 @@ public GetSyncFlowUrlResponse getSyncFlowUrl( HTTPRequest _req = new HTTPRequest(_url, "GET"); _req.addHeader("Accept", "application/json") .addHeader("user-agent", - this.sdkConfiguration.userAgent); + SDKConfiguration.USER_AGENT); _req.addQueryParams(Utils.getQueryParams( GetSyncFlowUrlRequest.class, @@ -460,7 +460,7 @@ public ListConnectionsResponse list( Optional options) throws Exception { if (options.isPresent()) { - options.get().validate(Arrays.asList(io.codat.sync.commerce.utils.Options.Option.RETRY_CONFIG)); + options.get().validate(Arrays.asList(Options.Option.RETRY_CONFIG)); } String _baseUrl = this.sdkConfiguration.serverUrl; String _url = Utils.generateURL( @@ -472,7 +472,7 @@ public ListConnectionsResponse list( HTTPRequest _req = new HTTPRequest(_url, "GET"); _req.addHeader("Accept", "application/json") .addHeader("user-agent", - this.sdkConfiguration.userAgent); + SDKConfiguration.USER_AGENT); _req.addQueryParams(Utils.getQueryParams( ListConnectionsRequest.class, @@ -634,7 +634,7 @@ public UpdateConnectionAuthorizationResponse updateAuthorization( Optional options) throws Exception { if (options.isPresent()) { - options.get().validate(Arrays.asList(io.codat.sync.commerce.utils.Options.Option.RETRY_CONFIG)); + options.get().validate(Arrays.asList(Options.Option.RETRY_CONFIG)); } String _baseUrl = this.sdkConfiguration.serverUrl; String _url = Utils.generateURL( @@ -656,7 +656,7 @@ public UpdateConnectionAuthorizationResponse updateAuthorization( _req.setBody(Optional.ofNullable(_serializedRequestBody)); _req.addHeader("Accept", "application/json") .addHeader("user-agent", - this.sdkConfiguration.userAgent); + SDKConfiguration.USER_AGENT); Utils.configureSecurity(_req, this.sdkConfiguration.securitySource.getSecurity()); @@ -813,7 +813,7 @@ public UpdateConnectionResponse updateConnection( Optional options) throws Exception { if (options.isPresent()) { - options.get().validate(Arrays.asList(io.codat.sync.commerce.utils.Options.Option.RETRY_CONFIG)); + options.get().validate(Arrays.asList(Options.Option.RETRY_CONFIG)); } String _baseUrl = this.sdkConfiguration.serverUrl; String _url = Utils.generateURL( @@ -835,7 +835,7 @@ public UpdateConnectionResponse updateConnection( _req.setBody(Optional.ofNullable(_serializedRequestBody)); _req.addHeader("Accept", "application/json") .addHeader("user-agent", - this.sdkConfiguration.userAgent); + SDKConfiguration.USER_AGENT); Utils.configureSecurity(_req, this.sdkConfiguration.securitySource.getSecurity()); diff --git a/sync-for-commerce/src/main/java/io/codat/sync/commerce/Integrations.java b/sync-for-commerce/src/main/java/io/codat/sync/commerce/Integrations.java index 2018b0ec..7c7a5c75 100644 --- a/sync-for-commerce/src/main/java/io/codat/sync/commerce/Integrations.java +++ b/sync-for-commerce/src/main/java/io/codat/sync/commerce/Integrations.java @@ -85,7 +85,7 @@ public GetIntegrationBrandingResponse getBranding( Optional options) throws Exception { if (options.isPresent()) { - options.get().validate(Arrays.asList(io.codat.sync.commerce.utils.Options.Option.RETRY_CONFIG)); + options.get().validate(Arrays.asList(Options.Option.RETRY_CONFIG)); } String _baseUrl = this.sdkConfiguration.serverUrl; String _url = Utils.generateURL( @@ -97,7 +97,7 @@ public GetIntegrationBrandingResponse getBranding( HTTPRequest _req = new HTTPRequest(_url, "GET"); _req.addHeader("Accept", "application/json") .addHeader("user-agent", - this.sdkConfiguration.userAgent); + SDKConfiguration.USER_AGENT); Utils.configureSecurity(_req, this.sdkConfiguration.securitySource.getSecurity()); @@ -254,7 +254,7 @@ public ListIntegrationsResponse list( Optional options) throws Exception { if (options.isPresent()) { - options.get().validate(Arrays.asList(io.codat.sync.commerce.utils.Options.Option.RETRY_CONFIG)); + options.get().validate(Arrays.asList(Options.Option.RETRY_CONFIG)); } String _baseUrl = this.sdkConfiguration.serverUrl; String _url = Utils.generateURL( @@ -264,7 +264,7 @@ public ListIntegrationsResponse list( HTTPRequest _req = new HTTPRequest(_url, "GET"); _req.addHeader("Accept", "application/json") .addHeader("user-agent", - this.sdkConfiguration.userAgent); + SDKConfiguration.USER_AGENT); _req.addQueryParams(Utils.getQueryParams( ListIntegrationsRequest.class, diff --git a/sync-for-commerce/src/main/java/io/codat/sync/commerce/SDKConfiguration.java b/sync-for-commerce/src/main/java/io/codat/sync/commerce/SDKConfiguration.java index 6c8d4a6e..f3c89864 100644 --- a/sync-for-commerce/src/main/java/io/codat/sync/commerce/SDKConfiguration.java +++ b/sync-for-commerce/src/main/java/io/codat/sync/commerce/SDKConfiguration.java @@ -21,11 +21,14 @@ public Optional securitySource() { public HTTPClient defaultClient; public String serverUrl; public int serverIdx = 0; - public String language = "java"; - public String openapiDocVersion = "1.1"; - public String sdkVersion = "0.2.0"; - public String genVersion = "2.415.6"; - public String userAgent = "speakeasy-sdk/java 0.2.0 2.415.6 1.1 io.codat.sync.commerce"; + private static final String LANGUAGE = "java"; + public static final String OPENAPI_DOC_VERSION = "1.1"; + public static final String SDK_VERSION = "1.0.0"; + public static final String GEN_VERSION = "2.463.0"; + private static final String BASE_PACKAGE = "io.codat.sync.commerce"; + public static final String USER_AGENT = + String.format("speakeasy-sdk/%s %s %s %s %s", + LANGUAGE, SDK_VERSION, GEN_VERSION, OPENAPI_DOC_VERSION, BASE_PACKAGE); private Hooks _hooks = createHooks(); diff --git a/sync-for-commerce/src/main/java/io/codat/sync/commerce/Sync.java b/sync-for-commerce/src/main/java/io/codat/sync/commerce/Sync.java index d5812c82..095e2f87 100644 --- a/sync-for-commerce/src/main/java/io/codat/sync/commerce/Sync.java +++ b/sync-for-commerce/src/main/java/io/codat/sync/commerce/Sync.java @@ -110,7 +110,7 @@ public GetSyncByIdResponse get( Optional options) throws Exception { if (options.isPresent()) { - options.get().validate(Arrays.asList(io.codat.sync.commerce.utils.Options.Option.RETRY_CONFIG)); + options.get().validate(Arrays.asList(Options.Option.RETRY_CONFIG)); } String _baseUrl = this.sdkConfiguration.serverUrl; String _url = Utils.generateURL( @@ -122,7 +122,7 @@ public GetSyncByIdResponse get( HTTPRequest _req = new HTTPRequest(_url, "GET"); _req.addHeader("Accept", "application/json") .addHeader("user-agent", - this.sdkConfiguration.userAgent); + SDKConfiguration.USER_AGENT); Utils.configureSecurity(_req, this.sdkConfiguration.securitySource.getSecurity()); @@ -279,7 +279,7 @@ public GetLastSuccessfulSyncResponse getLastSuccessfulSync( Optional options) throws Exception { if (options.isPresent()) { - options.get().validate(Arrays.asList(io.codat.sync.commerce.utils.Options.Option.RETRY_CONFIG)); + options.get().validate(Arrays.asList(Options.Option.RETRY_CONFIG)); } String _baseUrl = this.sdkConfiguration.serverUrl; String _url = Utils.generateURL( @@ -291,7 +291,7 @@ public GetLastSuccessfulSyncResponse getLastSuccessfulSync( HTTPRequest _req = new HTTPRequest(_url, "GET"); _req.addHeader("Accept", "application/json") .addHeader("user-agent", - this.sdkConfiguration.userAgent); + SDKConfiguration.USER_AGENT); Utils.configureSecurity(_req, this.sdkConfiguration.securitySource.getSecurity()); @@ -448,7 +448,7 @@ public GetLatestSyncResponse getLatestSync( Optional options) throws Exception { if (options.isPresent()) { - options.get().validate(Arrays.asList(io.codat.sync.commerce.utils.Options.Option.RETRY_CONFIG)); + options.get().validate(Arrays.asList(Options.Option.RETRY_CONFIG)); } String _baseUrl = this.sdkConfiguration.serverUrl; String _url = Utils.generateURL( @@ -460,7 +460,7 @@ public GetLatestSyncResponse getLatestSync( HTTPRequest _req = new HTTPRequest(_url, "GET"); _req.addHeader("Accept", "application/json") .addHeader("user-agent", - this.sdkConfiguration.userAgent); + SDKConfiguration.USER_AGENT); Utils.configureSecurity(_req, this.sdkConfiguration.securitySource.getSecurity()); @@ -617,7 +617,7 @@ public GetSyncStatusResponse getStatus( Optional options) throws Exception { if (options.isPresent()) { - options.get().validate(Arrays.asList(io.codat.sync.commerce.utils.Options.Option.RETRY_CONFIG)); + options.get().validate(Arrays.asList(Options.Option.RETRY_CONFIG)); } String _baseUrl = this.sdkConfiguration.serverUrl; String _url = Utils.generateURL( @@ -629,7 +629,7 @@ public GetSyncStatusResponse getStatus( HTTPRequest _req = new HTTPRequest(_url, "GET"); _req.addHeader("Accept", "application/json") .addHeader("user-agent", - this.sdkConfiguration.userAgent); + SDKConfiguration.USER_AGENT); Utils.configureSecurity(_req, this.sdkConfiguration.securitySource.getSecurity()); @@ -786,7 +786,7 @@ public ListSyncsResponse list( Optional options) throws Exception { if (options.isPresent()) { - options.get().validate(Arrays.asList(io.codat.sync.commerce.utils.Options.Option.RETRY_CONFIG)); + options.get().validate(Arrays.asList(Options.Option.RETRY_CONFIG)); } String _baseUrl = this.sdkConfiguration.serverUrl; String _url = Utils.generateURL( @@ -798,7 +798,7 @@ public ListSyncsResponse list( HTTPRequest _req = new HTTPRequest(_url, "GET"); _req.addHeader("Accept", "application/json") .addHeader("user-agent", - this.sdkConfiguration.userAgent); + SDKConfiguration.USER_AGENT); Utils.configureSecurity(_req, this.sdkConfiguration.securitySource.getSecurity()); @@ -955,7 +955,7 @@ public RequestSyncResponse request( Optional options) throws Exception { if (options.isPresent()) { - options.get().validate(Arrays.asList(io.codat.sync.commerce.utils.Options.Option.RETRY_CONFIG)); + options.get().validate(Arrays.asList(Options.Option.RETRY_CONFIG)); } String _baseUrl = this.sdkConfiguration.serverUrl; String _url = Utils.generateURL( @@ -977,7 +977,7 @@ public RequestSyncResponse request( _req.setBody(Optional.ofNullable(_serializedRequestBody)); _req.addHeader("Accept", "application/json") .addHeader("user-agent", - this.sdkConfiguration.userAgent); + SDKConfiguration.USER_AGENT); Utils.configureSecurity(_req, this.sdkConfiguration.securitySource.getSecurity()); @@ -1134,7 +1134,7 @@ public RequestSyncForDateRangeResponse requestForDateRange( Optional options) throws Exception { if (options.isPresent()) { - options.get().validate(Arrays.asList(io.codat.sync.commerce.utils.Options.Option.RETRY_CONFIG)); + options.get().validate(Arrays.asList(Options.Option.RETRY_CONFIG)); } String _baseUrl = this.sdkConfiguration.serverUrl; String _url = Utils.generateURL( @@ -1156,7 +1156,7 @@ public RequestSyncForDateRangeResponse requestForDateRange( _req.setBody(Optional.ofNullable(_serializedRequestBody)); _req.addHeader("Accept", "application/json") .addHeader("user-agent", - this.sdkConfiguration.userAgent); + SDKConfiguration.USER_AGENT); Utils.configureSecurity(_req, this.sdkConfiguration.securitySource.getSecurity()); diff --git a/sync-for-commerce/src/main/java/io/codat/sync/commerce/SyncFlowSettings.java b/sync-for-commerce/src/main/java/io/codat/sync/commerce/SyncFlowSettings.java index 8414678d..205cbd26 100644 --- a/sync-for-commerce/src/main/java/io/codat/sync/commerce/SyncFlowSettings.java +++ b/sync-for-commerce/src/main/java/io/codat/sync/commerce/SyncFlowSettings.java @@ -98,7 +98,7 @@ public GetConfigTextSyncFlowResponse getConfigTextSyncFlow( Optional options) throws Exception { if (options.isPresent()) { - options.get().validate(Arrays.asList(io.codat.sync.commerce.utils.Options.Option.RETRY_CONFIG)); + options.get().validate(Arrays.asList(Options.Option.RETRY_CONFIG)); } String _baseUrl = this.sdkConfiguration.serverUrl; String _url = Utils.generateURL( @@ -108,7 +108,7 @@ public GetConfigTextSyncFlowResponse getConfigTextSyncFlow( HTTPRequest _req = new HTTPRequest(_url, "GET"); _req.addHeader("Accept", "application/json") .addHeader("user-agent", - this.sdkConfiguration.userAgent); + SDKConfiguration.USER_AGENT); _req.addQueryParams(Utils.getQueryParams( GetConfigTextSyncFlowRequest.class, @@ -270,7 +270,7 @@ public GetVisibleAccountsResponse getVisibleAccounts( Optional options) throws Exception { if (options.isPresent()) { - options.get().validate(Arrays.asList(io.codat.sync.commerce.utils.Options.Option.RETRY_CONFIG)); + options.get().validate(Arrays.asList(Options.Option.RETRY_CONFIG)); } String _baseUrl = this.sdkConfiguration.serverUrl; String _url = Utils.generateURL( @@ -282,7 +282,7 @@ public GetVisibleAccountsResponse getVisibleAccounts( HTTPRequest _req = new HTTPRequest(_url, "GET"); _req.addHeader("Accept", "application/json") .addHeader("user-agent", - this.sdkConfiguration.userAgent); + SDKConfiguration.USER_AGENT); Utils.configureSecurity(_req, this.sdkConfiguration.securitySource.getSecurity()); @@ -439,7 +439,7 @@ public UpdateConfigTextSyncFlowResponse updateConfigTextSyncFlow( Optional options) throws Exception { if (options.isPresent()) { - options.get().validate(Arrays.asList(io.codat.sync.commerce.utils.Options.Option.RETRY_CONFIG)); + options.get().validate(Arrays.asList(Options.Option.RETRY_CONFIG)); } String _baseUrl = this.sdkConfiguration.serverUrl; String _url = Utils.generateURL( @@ -459,7 +459,7 @@ public UpdateConfigTextSyncFlowResponse updateConfigTextSyncFlow( _req.setBody(Optional.ofNullable(_serializedRequestBody)); _req.addHeader("Accept", "application/json") .addHeader("user-agent", - this.sdkConfiguration.userAgent); + SDKConfiguration.USER_AGENT); _req.addQueryParams(Utils.getQueryParams( UpdateConfigTextSyncFlowRequest.class, @@ -621,7 +621,7 @@ public UpdateVisibleAccountsSyncFlowResponse updateVisibleAccountsSyncFlow( Optional options) throws Exception { if (options.isPresent()) { - options.get().validate(Arrays.asList(io.codat.sync.commerce.utils.Options.Option.RETRY_CONFIG)); + options.get().validate(Arrays.asList(Options.Option.RETRY_CONFIG)); } String _baseUrl = this.sdkConfiguration.serverUrl; String _url = Utils.generateURL( @@ -643,7 +643,7 @@ public UpdateVisibleAccountsSyncFlowResponse updateVisibleAccountsSyncFlow( _req.setBody(Optional.ofNullable(_serializedRequestBody)); _req.addHeader("Accept", "application/json") .addHeader("user-agent", - this.sdkConfiguration.userAgent); + SDKConfiguration.USER_AGENT); Utils.configureSecurity(_req, this.sdkConfiguration.securitySource.getSecurity()); diff --git a/sync-for-commerce/src/main/java/io/codat/sync/commerce/models/components/Company.java b/sync-for-commerce/src/main/java/io/codat/sync/commerce/models/components/Company.java index ff8e5a44..4fbfabbd 100644 --- a/sync-for-commerce/src/main/java/io/codat/sync/commerce/models/components/Company.java +++ b/sync-for-commerce/src/main/java/io/codat/sync/commerce/models/components/Company.java @@ -15,6 +15,7 @@ import java.lang.String; import java.lang.SuppressWarnings; import java.util.List; +import java.util.Map; import java.util.Objects; import java.util.Optional; import org.openapitools.jackson.nullable.JsonNullable; @@ -109,18 +110,36 @@ public class Company { @JsonProperty("name") private String name; + /** + * An array of products that are currently enabled for the company. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("products") + private Optional> products; + /** * The `redirect` [Link URL](https://docs.codat.io/auth-flow/authorize-hosted-link) enabling the customer to start their auth flow journey for the company. */ @JsonProperty("redirect") private String redirect; + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("referenceParentCompany") + private Optional referenceParentCompany; + + /** + * A list of subsidiary companies owned or controlled by this entity. Empty if the company has no children. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("referenceSubsidiaryCompanies") + private Optional> referenceSubsidiaryCompanies; + /** * A collection of user-defined key-value pairs that store custom metadata against the company. */ @JsonInclude(Include.NON_ABSENT) @JsonProperty("tags") - private Optional tags; + private Optional> tags; @JsonCreator public Company( @@ -131,8 +150,11 @@ public Company( @JsonProperty("id") String id, @JsonProperty("lastSync") Optional lastSync, @JsonProperty("name") String name, + @JsonProperty("products") Optional> products, @JsonProperty("redirect") String redirect, - @JsonProperty("tags") Optional tags) { + @JsonProperty("referenceParentCompany") Optional referenceParentCompany, + @JsonProperty("referenceSubsidiaryCompanies") Optional> referenceSubsidiaryCompanies, + @JsonProperty("tags") Optional> tags) { Utils.checkNotNull(created, "created"); Utils.checkNotNull(createdByUserName, "createdByUserName"); Utils.checkNotNull(dataConnections, "dataConnections"); @@ -140,7 +162,10 @@ public Company( Utils.checkNotNull(id, "id"); Utils.checkNotNull(lastSync, "lastSync"); Utils.checkNotNull(name, "name"); + Utils.checkNotNull(products, "products"); Utils.checkNotNull(redirect, "redirect"); + Utils.checkNotNull(referenceParentCompany, "referenceParentCompany"); + Utils.checkNotNull(referenceSubsidiaryCompanies, "referenceSubsidiaryCompanies"); Utils.checkNotNull(tags, "tags"); this.created = created; this.createdByUserName = createdByUserName; @@ -149,7 +174,10 @@ public Company( this.id = id; this.lastSync = lastSync; this.name = name; + this.products = products; this.redirect = redirect; + this.referenceParentCompany = referenceParentCompany; + this.referenceSubsidiaryCompanies = referenceSubsidiaryCompanies; this.tags = tags; } @@ -157,7 +185,7 @@ public Company( String id, String name, String redirect) { - this(Optional.empty(), JsonNullable.undefined(), Optional.empty(), Optional.empty(), id, Optional.empty(), name, redirect, Optional.empty()); + this(Optional.empty(), JsonNullable.undefined(), Optional.empty(), Optional.empty(), id, Optional.empty(), name, Optional.empty(), redirect, Optional.empty(), Optional.empty(), Optional.empty()); } /** @@ -250,6 +278,15 @@ public String name() { return name; } + /** + * An array of products that are currently enabled for the company. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> products() { + return (Optional>) products; + } + /** * The `redirect` [Link URL](https://docs.codat.io/auth-flow/authorize-hosted-link) enabling the customer to start their auth flow journey for the company. */ @@ -258,13 +295,28 @@ public String redirect() { return redirect; } + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional referenceParentCompany() { + return (Optional) referenceParentCompany; + } + + /** + * A list of subsidiary companies owned or controlled by this entity. Empty if the company has no children. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> referenceSubsidiaryCompanies() { + return (Optional>) referenceSubsidiaryCompanies; + } + /** * A collection of user-defined key-value pairs that store custom metadata against the company. */ @SuppressWarnings("unchecked") @JsonIgnore - public Optional tags() { - return (Optional) tags; + public Optional> tags() { + return (Optional>) tags; } public final static Builder builder() { @@ -445,6 +497,24 @@ public Company withName(String name) { return this; } + /** + * An array of products that are currently enabled for the company. + */ + public Company withProducts(List products) { + Utils.checkNotNull(products, "products"); + this.products = Optional.ofNullable(products); + return this; + } + + /** + * An array of products that are currently enabled for the company. + */ + public Company withProducts(Optional> products) { + Utils.checkNotNull(products, "products"); + this.products = products; + return this; + } + /** * The `redirect` [Link URL](https://docs.codat.io/auth-flow/authorize-hosted-link) enabling the customer to start their auth flow journey for the company. */ @@ -454,10 +524,40 @@ public Company withRedirect(String redirect) { return this; } + public Company withReferenceParentCompany(CompanyReference referenceParentCompany) { + Utils.checkNotNull(referenceParentCompany, "referenceParentCompany"); + this.referenceParentCompany = Optional.ofNullable(referenceParentCompany); + return this; + } + + public Company withReferenceParentCompany(Optional referenceParentCompany) { + Utils.checkNotNull(referenceParentCompany, "referenceParentCompany"); + this.referenceParentCompany = referenceParentCompany; + return this; + } + + /** + * A list of subsidiary companies owned or controlled by this entity. Empty if the company has no children. + */ + public Company withReferenceSubsidiaryCompanies(List referenceSubsidiaryCompanies) { + Utils.checkNotNull(referenceSubsidiaryCompanies, "referenceSubsidiaryCompanies"); + this.referenceSubsidiaryCompanies = Optional.ofNullable(referenceSubsidiaryCompanies); + return this; + } + + /** + * A list of subsidiary companies owned or controlled by this entity. Empty if the company has no children. + */ + public Company withReferenceSubsidiaryCompanies(Optional> referenceSubsidiaryCompanies) { + Utils.checkNotNull(referenceSubsidiaryCompanies, "referenceSubsidiaryCompanies"); + this.referenceSubsidiaryCompanies = referenceSubsidiaryCompanies; + return this; + } + /** * A collection of user-defined key-value pairs that store custom metadata against the company. */ - public Company withTags(Tags tags) { + public Company withTags(Map tags) { Utils.checkNotNull(tags, "tags"); this.tags = Optional.ofNullable(tags); return this; @@ -466,7 +566,7 @@ public Company withTags(Tags tags) { /** * A collection of user-defined key-value pairs that store custom metadata against the company. */ - public Company withTags(Optional tags) { + public Company withTags(Optional> tags) { Utils.checkNotNull(tags, "tags"); this.tags = tags; return this; @@ -489,7 +589,10 @@ public boolean equals(java.lang.Object o) { Objects.deepEquals(this.id, other.id) && Objects.deepEquals(this.lastSync, other.lastSync) && Objects.deepEquals(this.name, other.name) && + Objects.deepEquals(this.products, other.products) && Objects.deepEquals(this.redirect, other.redirect) && + Objects.deepEquals(this.referenceParentCompany, other.referenceParentCompany) && + Objects.deepEquals(this.referenceSubsidiaryCompanies, other.referenceSubsidiaryCompanies) && Objects.deepEquals(this.tags, other.tags); } @@ -503,7 +606,10 @@ public int hashCode() { id, lastSync, name, + products, redirect, + referenceParentCompany, + referenceSubsidiaryCompanies, tags); } @@ -517,7 +623,10 @@ public String toString() { "id", id, "lastSync", lastSync, "name", name, + "products", products, "redirect", redirect, + "referenceParentCompany", referenceParentCompany, + "referenceSubsidiaryCompanies", referenceSubsidiaryCompanies, "tags", tags); } @@ -537,9 +646,15 @@ public final static class Builder { private String name; + private Optional> products = Optional.empty(); + private String redirect; - private Optional tags = Optional.empty(); + private Optional referenceParentCompany = Optional.empty(); + + private Optional> referenceSubsidiaryCompanies = Optional.empty(); + + private Optional> tags = Optional.empty(); private Builder() { // force use of static builder() method @@ -719,6 +834,24 @@ public Builder name(String name) { return this; } + /** + * An array of products that are currently enabled for the company. + */ + public Builder products(List products) { + Utils.checkNotNull(products, "products"); + this.products = Optional.ofNullable(products); + return this; + } + + /** + * An array of products that are currently enabled for the company. + */ + public Builder products(Optional> products) { + Utils.checkNotNull(products, "products"); + this.products = products; + return this; + } + /** * The `redirect` [Link URL](https://docs.codat.io/auth-flow/authorize-hosted-link) enabling the customer to start their auth flow journey for the company. */ @@ -728,10 +861,40 @@ public Builder redirect(String redirect) { return this; } + public Builder referenceParentCompany(CompanyReference referenceParentCompany) { + Utils.checkNotNull(referenceParentCompany, "referenceParentCompany"); + this.referenceParentCompany = Optional.ofNullable(referenceParentCompany); + return this; + } + + public Builder referenceParentCompany(Optional referenceParentCompany) { + Utils.checkNotNull(referenceParentCompany, "referenceParentCompany"); + this.referenceParentCompany = referenceParentCompany; + return this; + } + + /** + * A list of subsidiary companies owned or controlled by this entity. Empty if the company has no children. + */ + public Builder referenceSubsidiaryCompanies(List referenceSubsidiaryCompanies) { + Utils.checkNotNull(referenceSubsidiaryCompanies, "referenceSubsidiaryCompanies"); + this.referenceSubsidiaryCompanies = Optional.ofNullable(referenceSubsidiaryCompanies); + return this; + } + + /** + * A list of subsidiary companies owned or controlled by this entity. Empty if the company has no children. + */ + public Builder referenceSubsidiaryCompanies(Optional> referenceSubsidiaryCompanies) { + Utils.checkNotNull(referenceSubsidiaryCompanies, "referenceSubsidiaryCompanies"); + this.referenceSubsidiaryCompanies = referenceSubsidiaryCompanies; + return this; + } + /** * A collection of user-defined key-value pairs that store custom metadata against the company. */ - public Builder tags(Tags tags) { + public Builder tags(Map tags) { Utils.checkNotNull(tags, "tags"); this.tags = Optional.ofNullable(tags); return this; @@ -740,7 +903,7 @@ public Builder tags(Tags tags) { /** * A collection of user-defined key-value pairs that store custom metadata against the company. */ - public Builder tags(Optional tags) { + public Builder tags(Optional> tags) { Utils.checkNotNull(tags, "tags"); this.tags = tags; return this; @@ -755,7 +918,10 @@ public Company build() { id, lastSync, name, + products, redirect, + referenceParentCompany, + referenceSubsidiaryCompanies, tags); } } diff --git a/sync-for-commerce/src/main/java/io/codat/sync/commerce/models/components/CompanyReference.java b/sync-for-commerce/src/main/java/io/codat/sync/commerce/models/components/CompanyReference.java new file mode 100644 index 00000000..f587bc6a --- /dev/null +++ b/sync-for-commerce/src/main/java/io/codat/sync/commerce/models/components/CompanyReference.java @@ -0,0 +1,371 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package io.codat.sync.commerce.models.components; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import io.codat.sync.commerce.utils.Utils; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; + + +public class CompanyReference { + + /** + * Additional information about the company. This can be used to store foreign IDs, references, etc. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("description") + private Optional description; + + /** + * Unique identifier for your SMB in Codat. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("id") + private Optional id; + + /** + * A collection of links for the company. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("links") + private Optional links; + + /** + * The name of the company + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("name") + private Optional name; + + /** + * A collection of user-defined key-value pairs that store custom metadata against the company. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("tags") + private Optional> tags; + + @JsonCreator + public CompanyReference( + @JsonProperty("description") Optional description, + @JsonProperty("id") Optional id, + @JsonProperty("links") Optional links, + @JsonProperty("name") Optional name, + @JsonProperty("tags") Optional> tags) { + Utils.checkNotNull(description, "description"); + Utils.checkNotNull(id, "id"); + Utils.checkNotNull(links, "links"); + Utils.checkNotNull(name, "name"); + Utils.checkNotNull(tags, "tags"); + this.description = description; + this.id = id; + this.links = links; + this.name = name; + this.tags = tags; + } + + public CompanyReference() { + this(Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty()); + } + + /** + * Additional information about the company. This can be used to store foreign IDs, references, etc. + */ + @JsonIgnore + public Optional description() { + return description; + } + + /** + * Unique identifier for your SMB in Codat. + */ + @JsonIgnore + public Optional id() { + return id; + } + + /** + * A collection of links for the company. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional links() { + return (Optional) links; + } + + /** + * The name of the company + */ + @JsonIgnore + public Optional name() { + return name; + } + + /** + * A collection of user-defined key-value pairs that store custom metadata against the company. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> tags() { + return (Optional>) tags; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * Additional information about the company. This can be used to store foreign IDs, references, etc. + */ + public CompanyReference withDescription(String description) { + Utils.checkNotNull(description, "description"); + this.description = Optional.ofNullable(description); + return this; + } + + /** + * Additional information about the company. This can be used to store foreign IDs, references, etc. + */ + public CompanyReference withDescription(Optional description) { + Utils.checkNotNull(description, "description"); + this.description = description; + return this; + } + + /** + * Unique identifier for your SMB in Codat. + */ + public CompanyReference withId(String id) { + Utils.checkNotNull(id, "id"); + this.id = Optional.ofNullable(id); + return this; + } + + /** + * Unique identifier for your SMB in Codat. + */ + public CompanyReference withId(Optional id) { + Utils.checkNotNull(id, "id"); + this.id = id; + return this; + } + + /** + * A collection of links for the company. + */ + public CompanyReference withLinks(CompanyReferenceLinks links) { + Utils.checkNotNull(links, "links"); + this.links = Optional.ofNullable(links); + return this; + } + + /** + * A collection of links for the company. + */ + public CompanyReference withLinks(Optional links) { + Utils.checkNotNull(links, "links"); + this.links = links; + return this; + } + + /** + * The name of the company + */ + public CompanyReference withName(String name) { + Utils.checkNotNull(name, "name"); + this.name = Optional.ofNullable(name); + return this; + } + + /** + * The name of the company + */ + public CompanyReference withName(Optional name) { + Utils.checkNotNull(name, "name"); + this.name = name; + return this; + } + + /** + * A collection of user-defined key-value pairs that store custom metadata against the company. + */ + public CompanyReference withTags(Map tags) { + Utils.checkNotNull(tags, "tags"); + this.tags = Optional.ofNullable(tags); + return this; + } + + /** + * A collection of user-defined key-value pairs that store custom metadata against the company. + */ + public CompanyReference withTags(Optional> tags) { + Utils.checkNotNull(tags, "tags"); + this.tags = tags; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CompanyReference other = (CompanyReference) o; + return + Objects.deepEquals(this.description, other.description) && + Objects.deepEquals(this.id, other.id) && + Objects.deepEquals(this.links, other.links) && + Objects.deepEquals(this.name, other.name) && + Objects.deepEquals(this.tags, other.tags); + } + + @Override + public int hashCode() { + return Objects.hash( + description, + id, + links, + name, + tags); + } + + @Override + public String toString() { + return Utils.toString(CompanyReference.class, + "description", description, + "id", id, + "links", links, + "name", name, + "tags", tags); + } + + public final static class Builder { + + private Optional description = Optional.empty(); + + private Optional id = Optional.empty(); + + private Optional links = Optional.empty(); + + private Optional name = Optional.empty(); + + private Optional> tags = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + /** + * Additional information about the company. This can be used to store foreign IDs, references, etc. + */ + public Builder description(String description) { + Utils.checkNotNull(description, "description"); + this.description = Optional.ofNullable(description); + return this; + } + + /** + * Additional information about the company. This can be used to store foreign IDs, references, etc. + */ + public Builder description(Optional description) { + Utils.checkNotNull(description, "description"); + this.description = description; + return this; + } + + /** + * Unique identifier for your SMB in Codat. + */ + public Builder id(String id) { + Utils.checkNotNull(id, "id"); + this.id = Optional.ofNullable(id); + return this; + } + + /** + * Unique identifier for your SMB in Codat. + */ + public Builder id(Optional id) { + Utils.checkNotNull(id, "id"); + this.id = id; + return this; + } + + /** + * A collection of links for the company. + */ + public Builder links(CompanyReferenceLinks links) { + Utils.checkNotNull(links, "links"); + this.links = Optional.ofNullable(links); + return this; + } + + /** + * A collection of links for the company. + */ + public Builder links(Optional links) { + Utils.checkNotNull(links, "links"); + this.links = links; + return this; + } + + /** + * The name of the company + */ + public Builder name(String name) { + Utils.checkNotNull(name, "name"); + this.name = Optional.ofNullable(name); + return this; + } + + /** + * The name of the company + */ + public Builder name(Optional name) { + Utils.checkNotNull(name, "name"); + this.name = name; + return this; + } + + /** + * A collection of user-defined key-value pairs that store custom metadata against the company. + */ + public Builder tags(Map tags) { + Utils.checkNotNull(tags, "tags"); + this.tags = Optional.ofNullable(tags); + return this; + } + + /** + * A collection of user-defined key-value pairs that store custom metadata against the company. + */ + public Builder tags(Optional> tags) { + Utils.checkNotNull(tags, "tags"); + this.tags = tags; + return this; + } + + public CompanyReference build() { + return new CompanyReference( + description, + id, + links, + name, + tags); + } + } +} + diff --git a/sync-for-commerce/src/main/java/io/codat/sync/commerce/models/components/CompanyReferenceLinks.java b/sync-for-commerce/src/main/java/io/codat/sync/commerce/models/components/CompanyReferenceLinks.java new file mode 100644 index 00000000..1b670d5e --- /dev/null +++ b/sync-for-commerce/src/main/java/io/codat/sync/commerce/models/components/CompanyReferenceLinks.java @@ -0,0 +1,130 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package io.codat.sync.commerce.models.components; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import io.codat.sync.commerce.utils.Utils; +import java.lang.Override; +import java.lang.String; +import java.util.Objects; +import java.util.Optional; + +/** + * CompanyReferenceLinks - A collection of links for the company. + */ + +public class CompanyReferenceLinks { + + /** + * Link to the company page in the portal. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("portal") + private Optional portal; + + @JsonCreator + public CompanyReferenceLinks( + @JsonProperty("portal") Optional portal) { + Utils.checkNotNull(portal, "portal"); + this.portal = portal; + } + + public CompanyReferenceLinks() { + this(Optional.empty()); + } + + /** + * Link to the company page in the portal. + */ + @JsonIgnore + public Optional portal() { + return portal; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * Link to the company page in the portal. + */ + public CompanyReferenceLinks withPortal(String portal) { + Utils.checkNotNull(portal, "portal"); + this.portal = Optional.ofNullable(portal); + return this; + } + + /** + * Link to the company page in the portal. + */ + public CompanyReferenceLinks withPortal(Optional portal) { + Utils.checkNotNull(portal, "portal"); + this.portal = portal; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CompanyReferenceLinks other = (CompanyReferenceLinks) o; + return + Objects.deepEquals(this.portal, other.portal); + } + + @Override + public int hashCode() { + return Objects.hash( + portal); + } + + @Override + public String toString() { + return Utils.toString(CompanyReferenceLinks.class, + "portal", portal); + } + + public final static class Builder { + + private Optional portal = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + /** + * Link to the company page in the portal. + */ + public Builder portal(String portal) { + Utils.checkNotNull(portal, "portal"); + this.portal = Optional.ofNullable(portal); + return this; + } + + /** + * Link to the company page in the portal. + */ + public Builder portal(Optional portal) { + Utils.checkNotNull(portal, "portal"); + this.portal = portal; + return this; + } + + public CompanyReferenceLinks build() { + return new CompanyReferenceLinks( + portal); + } + } +} + diff --git a/sync-for-commerce/src/main/java/io/codat/sync/commerce/models/components/Connection.java b/sync-for-commerce/src/main/java/io/codat/sync/commerce/models/components/Connection.java index e305f3ee..8d5deec2 100644 --- a/sync-for-commerce/src/main/java/io/codat/sync/commerce/models/components/Connection.java +++ b/sync-for-commerce/src/main/java/io/codat/sync/commerce/models/components/Connection.java @@ -11,7 +11,6 @@ import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import io.codat.sync.commerce.utils.Utils; -import java.lang.Object; import java.lang.Override; import java.lang.String; import java.lang.SuppressWarnings; @@ -19,6 +18,7 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; +import org.openapitools.jackson.nullable.JsonNullable; /** * Connection - A connection represents a [company's](https://docs.codat.io/sync-for-sync-for-commerce-api#/schemas/Company) connection to a data source and allows you to synchronize data (pull and/or push) with that source. @@ -35,13 +35,9 @@ public class Connection { - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("additionalProperties") - private Optional additionalProperties; - @JsonInclude(Include.NON_ABSENT) @JsonProperty("connectionInfo") - private Optional> connectionInfo; + private JsonNullable> connectionInfo; /** * 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: @@ -69,7 +65,7 @@ public class Connection { @JsonInclude(Include.NON_ABSENT) @JsonProperty("dataConnectionErrors") - private Optional> dataConnectionErrors; + private JsonNullable> dataConnectionErrors; /** * Unique identifier for a company's data connection. @@ -146,10 +142,9 @@ public class Connection { @JsonCreator public Connection( - @JsonProperty("additionalProperties") Optional additionalProperties, - @JsonProperty("connectionInfo") Optional> connectionInfo, + @JsonProperty("connectionInfo") JsonNullable> connectionInfo, @JsonProperty("created") String created, - @JsonProperty("dataConnectionErrors") Optional> dataConnectionErrors, + @JsonProperty("dataConnectionErrors") JsonNullable> dataConnectionErrors, @JsonProperty("id") String id, @JsonProperty("integrationId") String integrationId, @JsonProperty("integrationKey") String integrationKey, @@ -159,7 +154,6 @@ public Connection( @JsonProperty("sourceId") String sourceId, @JsonProperty("sourceType") SourceType sourceType, @JsonProperty("status") DataConnectionStatus status) { - Utils.checkNotNull(additionalProperties, "additionalProperties"); Utils.checkNotNull(connectionInfo, "connectionInfo"); Utils.checkNotNull(created, "created"); Utils.checkNotNull(dataConnectionErrors, "dataConnectionErrors"); @@ -172,7 +166,6 @@ public Connection( Utils.checkNotNull(sourceId, "sourceId"); Utils.checkNotNull(sourceType, "sourceType"); Utils.checkNotNull(status, "status"); - this.additionalProperties = additionalProperties; this.connectionInfo = connectionInfo; this.created = created; this.dataConnectionErrors = dataConnectionErrors; @@ -197,19 +190,13 @@ public Connection( String sourceId, SourceType sourceType, DataConnectionStatus status) { - this(Optional.empty(), Optional.empty(), created, Optional.empty(), id, integrationId, integrationKey, Optional.empty(), linkUrl, platformName, sourceId, sourceType, status); - } - - @SuppressWarnings("unchecked") - @JsonIgnore - public Optional additionalProperties() { - return (Optional) additionalProperties; + this(JsonNullable.undefined(), created, JsonNullable.undefined(), id, integrationId, integrationKey, Optional.empty(), linkUrl, platformName, sourceId, sourceType, status); } @SuppressWarnings("unchecked") @JsonIgnore - public Optional> connectionInfo() { - return (Optional>) connectionInfo; + public JsonNullable> connectionInfo() { + return (JsonNullable>) connectionInfo; } /** @@ -240,8 +227,8 @@ public String created() { @SuppressWarnings("unchecked") @JsonIgnore - public Optional> dataConnectionErrors() { - return (Optional>) dataConnectionErrors; + public JsonNullable> dataConnectionErrors() { + return (JsonNullable>) dataConnectionErrors; } /** @@ -338,25 +325,13 @@ public final static Builder builder() { return new Builder(); } - public Connection withAdditionalProperties(Object additionalProperties) { - Utils.checkNotNull(additionalProperties, "additionalProperties"); - this.additionalProperties = Optional.ofNullable(additionalProperties); - return this; - } - - public Connection withAdditionalProperties(Optional additionalProperties) { - Utils.checkNotNull(additionalProperties, "additionalProperties"); - this.additionalProperties = additionalProperties; - return this; - } - public Connection withConnectionInfo(Map connectionInfo) { Utils.checkNotNull(connectionInfo, "connectionInfo"); - this.connectionInfo = Optional.ofNullable(connectionInfo); + this.connectionInfo = JsonNullable.of(connectionInfo); return this; } - public Connection withConnectionInfo(Optional> connectionInfo) { + public Connection withConnectionInfo(JsonNullable> connectionInfo) { Utils.checkNotNull(connectionInfo, "connectionInfo"); this.connectionInfo = connectionInfo; return this; @@ -391,11 +366,11 @@ public Connection withCreated(String created) { public Connection withDataConnectionErrors(List dataConnectionErrors) { Utils.checkNotNull(dataConnectionErrors, "dataConnectionErrors"); - this.dataConnectionErrors = Optional.ofNullable(dataConnectionErrors); + this.dataConnectionErrors = JsonNullable.of(dataConnectionErrors); return this; } - public Connection withDataConnectionErrors(Optional> dataConnectionErrors) { + public Connection withDataConnectionErrors(JsonNullable> dataConnectionErrors) { Utils.checkNotNull(dataConnectionErrors, "dataConnectionErrors"); this.dataConnectionErrors = dataConnectionErrors; return this; @@ -537,7 +512,6 @@ public boolean equals(java.lang.Object o) { } Connection other = (Connection) o; return - Objects.deepEquals(this.additionalProperties, other.additionalProperties) && Objects.deepEquals(this.connectionInfo, other.connectionInfo) && Objects.deepEquals(this.created, other.created) && Objects.deepEquals(this.dataConnectionErrors, other.dataConnectionErrors) && @@ -555,7 +529,6 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { return Objects.hash( - additionalProperties, connectionInfo, created, dataConnectionErrors, @@ -573,7 +546,6 @@ public int hashCode() { @Override public String toString() { return Utils.toString(Connection.class, - "additionalProperties", additionalProperties, "connectionInfo", connectionInfo, "created", created, "dataConnectionErrors", dataConnectionErrors, @@ -590,13 +562,11 @@ public String toString() { public final static class Builder { - private Optional additionalProperties = Optional.empty(); - - private Optional> connectionInfo = Optional.empty(); + private JsonNullable> connectionInfo = JsonNullable.undefined(); private String created; - private Optional> dataConnectionErrors = Optional.empty(); + private JsonNullable> dataConnectionErrors = JsonNullable.undefined(); private String id; @@ -620,25 +590,13 @@ private Builder() { // force use of static builder() method } - public Builder additionalProperties(Object additionalProperties) { - Utils.checkNotNull(additionalProperties, "additionalProperties"); - this.additionalProperties = Optional.ofNullable(additionalProperties); - return this; - } - - public Builder additionalProperties(Optional additionalProperties) { - Utils.checkNotNull(additionalProperties, "additionalProperties"); - this.additionalProperties = additionalProperties; - return this; - } - public Builder connectionInfo(Map connectionInfo) { Utils.checkNotNull(connectionInfo, "connectionInfo"); - this.connectionInfo = Optional.ofNullable(connectionInfo); + this.connectionInfo = JsonNullable.of(connectionInfo); return this; } - public Builder connectionInfo(Optional> connectionInfo) { + public Builder connectionInfo(JsonNullable> connectionInfo) { Utils.checkNotNull(connectionInfo, "connectionInfo"); this.connectionInfo = connectionInfo; return this; @@ -673,11 +631,11 @@ public Builder created(String created) { public Builder dataConnectionErrors(List dataConnectionErrors) { Utils.checkNotNull(dataConnectionErrors, "dataConnectionErrors"); - this.dataConnectionErrors = Optional.ofNullable(dataConnectionErrors); + this.dataConnectionErrors = JsonNullable.of(dataConnectionErrors); return this; } - public Builder dataConnectionErrors(Optional> dataConnectionErrors) { + public Builder dataConnectionErrors(JsonNullable> dataConnectionErrors) { Utils.checkNotNull(dataConnectionErrors, "dataConnectionErrors"); this.dataConnectionErrors = dataConnectionErrors; return this; @@ -811,7 +769,6 @@ public Builder status(DataConnectionStatus status) { public Connection build() { return new Connection( - additionalProperties, connectionInfo, created, dataConnectionErrors, diff --git a/sync-for-commerce/src/main/java/io/codat/sync/commerce/models/components/ConnectionWebhook.java b/sync-for-commerce/src/main/java/io/codat/sync/commerce/models/components/ConnectionWebhook.java new file mode 100644 index 00000000..4eda6c71 --- /dev/null +++ b/sync-for-commerce/src/main/java/io/codat/sync/commerce/models/components/ConnectionWebhook.java @@ -0,0 +1,399 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package io.codat.sync.commerce.models.components; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import io.codat.sync.commerce.utils.Utils; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.Objects; +import java.util.Optional; + + +public class ConnectionWebhook { + + /** + * The type of event. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("eventType") + private Optional eventType; + + /** + * 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: + * + * ``` + * 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. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("generatedDate") + private Optional generatedDate; + + /** + * Unique identifier of the event. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("id") + private Optional id; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("payload") + private Optional payload; + + @JsonCreator + public ConnectionWebhook( + @JsonProperty("eventType") Optional eventType, + @JsonProperty("generatedDate") Optional generatedDate, + @JsonProperty("id") Optional id, + @JsonProperty("payload") Optional payload) { + Utils.checkNotNull(eventType, "eventType"); + Utils.checkNotNull(generatedDate, "generatedDate"); + Utils.checkNotNull(id, "id"); + Utils.checkNotNull(payload, "payload"); + this.eventType = eventType; + this.generatedDate = generatedDate; + this.id = id; + this.payload = payload; + } + + public ConnectionWebhook() { + this(Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty()); + } + + /** + * The type of event. + */ + @JsonIgnore + public Optional eventType() { + return eventType; + } + + /** + * 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: + * + * ``` + * 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. + */ + @JsonIgnore + public Optional generatedDate() { + return generatedDate; + } + + /** + * Unique identifier of the event. + */ + @JsonIgnore + public Optional id() { + return id; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional payload() { + return (Optional) payload; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * The type of event. + */ + public ConnectionWebhook withEventType(String eventType) { + Utils.checkNotNull(eventType, "eventType"); + this.eventType = Optional.ofNullable(eventType); + return this; + } + + /** + * The type of event. + */ + public ConnectionWebhook withEventType(Optional eventType) { + Utils.checkNotNull(eventType, "eventType"); + this.eventType = eventType; + return this; + } + + /** + * 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: + * + * ``` + * 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. + */ + public ConnectionWebhook withGeneratedDate(String generatedDate) { + Utils.checkNotNull(generatedDate, "generatedDate"); + this.generatedDate = Optional.ofNullable(generatedDate); + return this; + } + + /** + * 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: + * + * ``` + * 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. + */ + public ConnectionWebhook withGeneratedDate(Optional generatedDate) { + Utils.checkNotNull(generatedDate, "generatedDate"); + this.generatedDate = generatedDate; + return this; + } + + /** + * Unique identifier of the event. + */ + public ConnectionWebhook withId(String id) { + Utils.checkNotNull(id, "id"); + this.id = Optional.ofNullable(id); + return this; + } + + /** + * Unique identifier of the event. + */ + public ConnectionWebhook withId(Optional id) { + Utils.checkNotNull(id, "id"); + this.id = id; + return this; + } + + public ConnectionWebhook withPayload(ConnectionWebhookPayload payload) { + Utils.checkNotNull(payload, "payload"); + this.payload = Optional.ofNullable(payload); + return this; + } + + public ConnectionWebhook withPayload(Optional payload) { + Utils.checkNotNull(payload, "payload"); + this.payload = payload; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ConnectionWebhook other = (ConnectionWebhook) o; + return + Objects.deepEquals(this.eventType, other.eventType) && + Objects.deepEquals(this.generatedDate, other.generatedDate) && + Objects.deepEquals(this.id, other.id) && + Objects.deepEquals(this.payload, other.payload); + } + + @Override + public int hashCode() { + return Objects.hash( + eventType, + generatedDate, + id, + payload); + } + + @Override + public String toString() { + return Utils.toString(ConnectionWebhook.class, + "eventType", eventType, + "generatedDate", generatedDate, + "id", id, + "payload", payload); + } + + public final static class Builder { + + private Optional eventType = Optional.empty(); + + private Optional generatedDate = Optional.empty(); + + private Optional id = Optional.empty(); + + private Optional payload = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + /** + * The type of event. + */ + public Builder eventType(String eventType) { + Utils.checkNotNull(eventType, "eventType"); + this.eventType = Optional.ofNullable(eventType); + return this; + } + + /** + * The type of event. + */ + public Builder eventType(Optional eventType) { + Utils.checkNotNull(eventType, "eventType"); + this.eventType = eventType; + return this; + } + + /** + * 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: + * + * ``` + * 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. + */ + public Builder generatedDate(String generatedDate) { + Utils.checkNotNull(generatedDate, "generatedDate"); + this.generatedDate = Optional.ofNullable(generatedDate); + return this; + } + + /** + * 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: + * + * ``` + * 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. + */ + public Builder generatedDate(Optional generatedDate) { + Utils.checkNotNull(generatedDate, "generatedDate"); + this.generatedDate = generatedDate; + return this; + } + + /** + * Unique identifier of the event. + */ + public Builder id(String id) { + Utils.checkNotNull(id, "id"); + this.id = Optional.ofNullable(id); + return this; + } + + /** + * Unique identifier of the event. + */ + public Builder id(Optional id) { + Utils.checkNotNull(id, "id"); + this.id = id; + return this; + } + + public Builder payload(ConnectionWebhookPayload payload) { + Utils.checkNotNull(payload, "payload"); + this.payload = Optional.ofNullable(payload); + return this; + } + + public Builder payload(Optional payload) { + Utils.checkNotNull(payload, "payload"); + this.payload = payload; + return this; + } + + public ConnectionWebhook build() { + return new ConnectionWebhook( + eventType, + generatedDate, + id, + payload); + } + } +} + diff --git a/sync-for-commerce/src/main/java/io/codat/sync/commerce/models/components/ConnectionWebhookPayload.java b/sync-for-commerce/src/main/java/io/codat/sync/commerce/models/components/ConnectionWebhookPayload.java new file mode 100644 index 00000000..93cd581f --- /dev/null +++ b/sync-for-commerce/src/main/java/io/codat/sync/commerce/models/components/ConnectionWebhookPayload.java @@ -0,0 +1,226 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package io.codat.sync.commerce.models.components; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import io.codat.sync.commerce.utils.Utils; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.Objects; +import java.util.Optional; + + +public class ConnectionWebhookPayload { + + /** + * A connection represents a [company's](https://docs.codat.io/sync-for-sync-for-commerce-api#/schemas/Company) connection to a data source and allows you to synchronize data (pull and/or push) with that source. + * + * A company can have multiple data connections depending on the type of data source it is connecting to. For example, a single company can link to: + * + * - [Accounting data](https://docs.codat.io/accounting-api/overview) - 1 active connection. + * - [Banking data](https://docs.codat.io/banking-api/overview) - Multiple active connections. + * - [Commerce data](https://docs.codat.io/commerce-api/overview) - Multiple active connections. + * Any combination of accounting, banking, and commerce data connections is allowed. + * + * Before you can use a data connection to pull or push data, the company must grant you access to their business data by [linking the connection](https://docs.codat.io/auth-flow/overview). + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("connection") + private Optional connection; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("referenceCompany") + private Optional referenceCompany; + + @JsonCreator + public ConnectionWebhookPayload( + @JsonProperty("connection") Optional connection, + @JsonProperty("referenceCompany") Optional referenceCompany) { + Utils.checkNotNull(connection, "connection"); + Utils.checkNotNull(referenceCompany, "referenceCompany"); + this.connection = connection; + this.referenceCompany = referenceCompany; + } + + public ConnectionWebhookPayload() { + this(Optional.empty(), Optional.empty()); + } + + /** + * A connection represents a [company's](https://docs.codat.io/sync-for-sync-for-commerce-api#/schemas/Company) connection to a data source and allows you to synchronize data (pull and/or push) with that source. + * + * A company can have multiple data connections depending on the type of data source it is connecting to. For example, a single company can link to: + * + * - [Accounting data](https://docs.codat.io/accounting-api/overview) - 1 active connection. + * - [Banking data](https://docs.codat.io/banking-api/overview) - Multiple active connections. + * - [Commerce data](https://docs.codat.io/commerce-api/overview) - Multiple active connections. + * Any combination of accounting, banking, and commerce data connections is allowed. + * + * Before you can use a data connection to pull or push data, the company must grant you access to their business data by [linking the connection](https://docs.codat.io/auth-flow/overview). + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional connection() { + return (Optional) connection; + } + + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional referenceCompany() { + return (Optional) referenceCompany; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * A connection represents a [company's](https://docs.codat.io/sync-for-sync-for-commerce-api#/schemas/Company) connection to a data source and allows you to synchronize data (pull and/or push) with that source. + * + * A company can have multiple data connections depending on the type of data source it is connecting to. For example, a single company can link to: + * + * - [Accounting data](https://docs.codat.io/accounting-api/overview) - 1 active connection. + * - [Banking data](https://docs.codat.io/banking-api/overview) - Multiple active connections. + * - [Commerce data](https://docs.codat.io/commerce-api/overview) - Multiple active connections. + * Any combination of accounting, banking, and commerce data connections is allowed. + * + * Before you can use a data connection to pull or push data, the company must grant you access to their business data by [linking the connection](https://docs.codat.io/auth-flow/overview). + */ + public ConnectionWebhookPayload withConnection(Connection connection) { + Utils.checkNotNull(connection, "connection"); + this.connection = Optional.ofNullable(connection); + return this; + } + + /** + * A connection represents a [company's](https://docs.codat.io/sync-for-sync-for-commerce-api#/schemas/Company) connection to a data source and allows you to synchronize data (pull and/or push) with that source. + * + * A company can have multiple data connections depending on the type of data source it is connecting to. For example, a single company can link to: + * + * - [Accounting data](https://docs.codat.io/accounting-api/overview) - 1 active connection. + * - [Banking data](https://docs.codat.io/banking-api/overview) - Multiple active connections. + * - [Commerce data](https://docs.codat.io/commerce-api/overview) - Multiple active connections. + * Any combination of accounting, banking, and commerce data connections is allowed. + * + * Before you can use a data connection to pull or push data, the company must grant you access to their business data by [linking the connection](https://docs.codat.io/auth-flow/overview). + */ + public ConnectionWebhookPayload withConnection(Optional connection) { + Utils.checkNotNull(connection, "connection"); + this.connection = connection; + return this; + } + + public ConnectionWebhookPayload withReferenceCompany(CompanyReference referenceCompany) { + Utils.checkNotNull(referenceCompany, "referenceCompany"); + this.referenceCompany = Optional.ofNullable(referenceCompany); + return this; + } + + public ConnectionWebhookPayload withReferenceCompany(Optional referenceCompany) { + Utils.checkNotNull(referenceCompany, "referenceCompany"); + this.referenceCompany = referenceCompany; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ConnectionWebhookPayload other = (ConnectionWebhookPayload) o; + return + Objects.deepEquals(this.connection, other.connection) && + Objects.deepEquals(this.referenceCompany, other.referenceCompany); + } + + @Override + public int hashCode() { + return Objects.hash( + connection, + referenceCompany); + } + + @Override + public String toString() { + return Utils.toString(ConnectionWebhookPayload.class, + "connection", connection, + "referenceCompany", referenceCompany); + } + + public final static class Builder { + + private Optional connection = Optional.empty(); + + private Optional referenceCompany = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + /** + * A connection represents a [company's](https://docs.codat.io/sync-for-sync-for-commerce-api#/schemas/Company) connection to a data source and allows you to synchronize data (pull and/or push) with that source. + * + * A company can have multiple data connections depending on the type of data source it is connecting to. For example, a single company can link to: + * + * - [Accounting data](https://docs.codat.io/accounting-api/overview) - 1 active connection. + * - [Banking data](https://docs.codat.io/banking-api/overview) - Multiple active connections. + * - [Commerce data](https://docs.codat.io/commerce-api/overview) - Multiple active connections. + * Any combination of accounting, banking, and commerce data connections is allowed. + * + * Before you can use a data connection to pull or push data, the company must grant you access to their business data by [linking the connection](https://docs.codat.io/auth-flow/overview). + */ + public Builder connection(Connection connection) { + Utils.checkNotNull(connection, "connection"); + this.connection = Optional.ofNullable(connection); + return this; + } + + /** + * A connection represents a [company's](https://docs.codat.io/sync-for-sync-for-commerce-api#/schemas/Company) connection to a data source and allows you to synchronize data (pull and/or push) with that source. + * + * A company can have multiple data connections depending on the type of data source it is connecting to. For example, a single company can link to: + * + * - [Accounting data](https://docs.codat.io/accounting-api/overview) - 1 active connection. + * - [Banking data](https://docs.codat.io/banking-api/overview) - Multiple active connections. + * - [Commerce data](https://docs.codat.io/commerce-api/overview) - Multiple active connections. + * Any combination of accounting, banking, and commerce data connections is allowed. + * + * Before you can use a data connection to pull or push data, the company must grant you access to their business data by [linking the connection](https://docs.codat.io/auth-flow/overview). + */ + public Builder connection(Optional connection) { + Utils.checkNotNull(connection, "connection"); + this.connection = connection; + return this; + } + + public Builder referenceCompany(CompanyReference referenceCompany) { + Utils.checkNotNull(referenceCompany, "referenceCompany"); + this.referenceCompany = Optional.ofNullable(referenceCompany); + return this; + } + + public Builder referenceCompany(Optional referenceCompany) { + Utils.checkNotNull(referenceCompany, "referenceCompany"); + this.referenceCompany = referenceCompany; + return this; + } + + public ConnectionWebhookPayload build() { + return new ConnectionWebhookPayload( + connection, + referenceCompany); + } + } +} + diff --git a/sync-for-commerce/src/main/java/io/codat/sync/commerce/models/components/CreateCompany.java b/sync-for-commerce/src/main/java/io/codat/sync/commerce/models/components/CreateCompany.java index fd1291c8..f3351aec 100644 --- a/sync-for-commerce/src/main/java/io/codat/sync/commerce/models/components/CreateCompany.java +++ b/sync-for-commerce/src/main/java/io/codat/sync/commerce/models/components/CreateCompany.java @@ -14,7 +14,7 @@ import java.lang.Override; import java.lang.String; import java.lang.SuppressWarnings; -import java.util.List; +import java.util.Map; import java.util.Objects; import java.util.Optional; @@ -28,35 +28,35 @@ public class CreateCompany { @JsonProperty("description") private Optional description; - /** - * Reference to the groups that the company is assigned to. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("groups") - private Optional> groups; - /** * Name of company being connected. */ @JsonProperty("name") private String name; + /** + * A collection of user-defined key-value pairs that store custom metadata against the company. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("tags") + private Optional> tags; + @JsonCreator public CreateCompany( @JsonProperty("description") Optional description, - @JsonProperty("groups") Optional> groups, - @JsonProperty("name") String name) { + @JsonProperty("name") String name, + @JsonProperty("tags") Optional> tags) { Utils.checkNotNull(description, "description"); - Utils.checkNotNull(groups, "groups"); Utils.checkNotNull(name, "name"); + Utils.checkNotNull(tags, "tags"); this.description = description; - this.groups = groups; this.name = name; + this.tags = tags; } public CreateCompany( String name) { - this(Optional.empty(), Optional.empty(), name); + this(Optional.empty(), name, Optional.empty()); } /** @@ -68,20 +68,20 @@ public Optional description() { } /** - * Reference to the groups that the company is assigned to. + * Name of company being connected. */ - @SuppressWarnings("unchecked") @JsonIgnore - public Optional> groups() { - return (Optional>) groups; + public String name() { + return name; } /** - * Name of company being connected. + * A collection of user-defined key-value pairs that store custom metadata against the company. */ + @SuppressWarnings("unchecked") @JsonIgnore - public String name() { - return name; + public Optional> tags() { + return (Optional>) tags; } public final static Builder builder() { @@ -107,29 +107,29 @@ public CreateCompany withDescription(Optional description) { } /** - * Reference to the groups that the company is assigned to. + * Name of company being connected. */ - public CreateCompany withGroups(List groups) { - Utils.checkNotNull(groups, "groups"); - this.groups = Optional.ofNullable(groups); + public CreateCompany withName(String name) { + Utils.checkNotNull(name, "name"); + this.name = name; return this; } /** - * Reference to the groups that the company is assigned to. + * A collection of user-defined key-value pairs that store custom metadata against the company. */ - public CreateCompany withGroups(Optional> groups) { - Utils.checkNotNull(groups, "groups"); - this.groups = groups; + public CreateCompany withTags(Map tags) { + Utils.checkNotNull(tags, "tags"); + this.tags = Optional.ofNullable(tags); return this; } /** - * Name of company being connected. + * A collection of user-defined key-value pairs that store custom metadata against the company. */ - public CreateCompany withName(String name) { - Utils.checkNotNull(name, "name"); - this.name = name; + public CreateCompany withTags(Optional> tags) { + Utils.checkNotNull(tags, "tags"); + this.tags = tags; return this; } @@ -144,33 +144,33 @@ public boolean equals(java.lang.Object o) { CreateCompany other = (CreateCompany) o; return Objects.deepEquals(this.description, other.description) && - Objects.deepEquals(this.groups, other.groups) && - Objects.deepEquals(this.name, other.name); + Objects.deepEquals(this.name, other.name) && + Objects.deepEquals(this.tags, other.tags); } @Override public int hashCode() { return Objects.hash( description, - groups, - name); + name, + tags); } @Override public String toString() { return Utils.toString(CreateCompany.class, "description", description, - "groups", groups, - "name", name); + "name", name, + "tags", tags); } public final static class Builder { private Optional description = Optional.empty(); - private Optional> groups = Optional.empty(); + private String name; - private String name; + private Optional> tags = Optional.empty(); private Builder() { // force use of static builder() method @@ -195,37 +195,37 @@ public Builder description(Optional description) { } /** - * Reference to the groups that the company is assigned to. + * Name of company being connected. */ - public Builder groups(List groups) { - Utils.checkNotNull(groups, "groups"); - this.groups = Optional.ofNullable(groups); + public Builder name(String name) { + Utils.checkNotNull(name, "name"); + this.name = name; return this; } /** - * Reference to the groups that the company is assigned to. + * A collection of user-defined key-value pairs that store custom metadata against the company. */ - public Builder groups(Optional> groups) { - Utils.checkNotNull(groups, "groups"); - this.groups = groups; + public Builder tags(Map tags) { + Utils.checkNotNull(tags, "tags"); + this.tags = Optional.ofNullable(tags); return this; } /** - * Name of company being connected. + * A collection of user-defined key-value pairs that store custom metadata against the company. */ - public Builder name(String name) { - Utils.checkNotNull(name, "name"); - this.name = name; + public Builder tags(Optional> tags) { + Utils.checkNotNull(tags, "tags"); + this.tags = tags; return this; } public CreateCompany build() { return new CreateCompany( description, - groups, - name); + name, + tags); } } } diff --git a/sync-for-commerce/src/main/java/io/codat/sync/commerce/models/components/GroupReference.java b/sync-for-commerce/src/main/java/io/codat/sync/commerce/models/components/GroupReference.java deleted file mode 100644 index 014b160f..00000000 --- a/sync-for-commerce/src/main/java/io/codat/sync/commerce/models/components/GroupReference.java +++ /dev/null @@ -1,127 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -package io.codat.sync.commerce.models.components; - - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import io.codat.sync.commerce.utils.Utils; -import java.lang.Override; -import java.lang.String; -import java.util.Objects; -import java.util.Optional; - - -public class GroupReference { - - /** - * Unique identifier for the group. - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("id") - private Optional id; - - @JsonCreator - public GroupReference( - @JsonProperty("id") Optional id) { - Utils.checkNotNull(id, "id"); - this.id = id; - } - - public GroupReference() { - this(Optional.empty()); - } - - /** - * Unique identifier for the group. - */ - @JsonIgnore - public Optional id() { - return id; - } - - public final static Builder builder() { - return new Builder(); - } - - /** - * Unique identifier for the group. - */ - public GroupReference withId(String id) { - Utils.checkNotNull(id, "id"); - this.id = Optional.ofNullable(id); - return this; - } - - /** - * Unique identifier for the group. - */ - public GroupReference withId(Optional id) { - Utils.checkNotNull(id, "id"); - this.id = id; - return this; - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - GroupReference other = (GroupReference) o; - return - Objects.deepEquals(this.id, other.id); - } - - @Override - public int hashCode() { - return Objects.hash( - id); - } - - @Override - public String toString() { - return Utils.toString(GroupReference.class, - "id", id); - } - - public final static class Builder { - - private Optional id = Optional.empty(); - - private Builder() { - // force use of static builder() method - } - - /** - * Unique identifier for the group. - */ - public Builder id(String id) { - Utils.checkNotNull(id, "id"); - this.id = Optional.ofNullable(id); - return this; - } - - /** - * Unique identifier for the group. - */ - public Builder id(Optional id) { - Utils.checkNotNull(id, "id"); - this.id = id; - return this; - } - - public GroupReference build() { - return new GroupReference( - id); - } - } -} - diff --git a/sync-for-commerce/src/main/java/io/codat/sync/commerce/models/components/Tags.java b/sync-for-commerce/src/main/java/io/codat/sync/commerce/models/components/Tags.java deleted file mode 100644 index 0535f82b..00000000 --- a/sync-for-commerce/src/main/java/io/codat/sync/commerce/models/components/Tags.java +++ /dev/null @@ -1,64 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -package io.codat.sync.commerce.models.components; - - -import com.fasterxml.jackson.annotation.JsonCreator; -import io.codat.sync.commerce.utils.Utils; -import java.lang.Override; -import java.lang.String; -import java.util.Objects; - -/** - * Tags - A collection of user-defined key-value pairs that store custom metadata against the company. - */ - -public class Tags { - - @JsonCreator - public Tags() { - - - } - - public final static Builder builder() { - return new Builder(); - } - - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - return true; - } - - @Override - public int hashCode() { - return Objects.hash( - ); - } - - @Override - public String toString() { - return Utils.toString(Tags.class); - } - - public final static class Builder { - - private Builder() { - // force use of static builder() method - } - - public Tags build() { - return new Tags( - ); - } - } -} - diff --git a/sync-for-commerce/src/main/java/io/codat/sync/commerce/models/errors/ErrorMessage.java b/sync-for-commerce/src/main/java/io/codat/sync/commerce/models/errors/ErrorMessage.java index 88ec1542..3eddb9a9 100644 --- a/sync-for-commerce/src/main/java/io/codat/sync/commerce/models/errors/ErrorMessage.java +++ b/sync-for-commerce/src/main/java/io/codat/sync/commerce/models/errors/ErrorMessage.java @@ -19,8 +19,9 @@ import org.openapitools.jackson.nullable.JsonNullable; /** - * ErrorMessage - Your `query` parameter was not correctly formed + * ErrorMessage - Your API request was not properly authorized. */ +@SuppressWarnings("serial") public class ErrorMessage extends RuntimeException { /** diff --git a/sync-for-commerce/src/main/java/io/codat/sync/commerce/models/operations/CreateCompanyRequestBuilder.java b/sync-for-commerce/src/main/java/io/codat/sync/commerce/models/operations/CreateCompanyRequestBuilder.java index 77c73d4f..6e5b6c2b 100644 --- a/sync-for-commerce/src/main/java/io/codat/sync/commerce/models/operations/CreateCompanyRequestBuilder.java +++ b/sync-for-commerce/src/main/java/io/codat/sync/commerce/models/operations/CreateCompanyRequestBuilder.java @@ -20,25 +20,25 @@ public CreateCompanyRequestBuilder(SDKMethodInterfaces.MethodCallCreateCompany s this.sdk = sdk; } - public CreateCompanyRequestBuilder request(io.codat.sync.commerce.models.components.CreateCompany request) { + public CreateCompanyRequestBuilder request(CreateCompany request) { Utils.checkNotNull(request, "request"); this.request = Optional.of(request); return this; } - public CreateCompanyRequestBuilder request(java.util.Optional request) { + public CreateCompanyRequestBuilder request(Optional request) { Utils.checkNotNull(request, "request"); this.request = request; return this; } - public CreateCompanyRequestBuilder retryConfig(io.codat.sync.commerce.utils.RetryConfig retryConfig) { + public CreateCompanyRequestBuilder retryConfig(RetryConfig retryConfig) { Utils.checkNotNull(retryConfig, "retryConfig"); this.retryConfig = Optional.of(retryConfig); return this; } - public CreateCompanyRequestBuilder retryConfig(java.util.Optional retryConfig) { + public CreateCompanyRequestBuilder retryConfig(Optional retryConfig) { Utils.checkNotNull(retryConfig, "retryConfig"); this.retryConfig = retryConfig; return this; diff --git a/sync-for-commerce/src/main/java/io/codat/sync/commerce/models/operations/CreateConnectionRequestBuilder.java b/sync-for-commerce/src/main/java/io/codat/sync/commerce/models/operations/CreateConnectionRequestBuilder.java index 90351241..1a9f902c 100644 --- a/sync-for-commerce/src/main/java/io/codat/sync/commerce/models/operations/CreateConnectionRequestBuilder.java +++ b/sync-for-commerce/src/main/java/io/codat/sync/commerce/models/operations/CreateConnectionRequestBuilder.java @@ -19,19 +19,19 @@ public CreateConnectionRequestBuilder(SDKMethodInterfaces.MethodCallCreateConnec this.sdk = sdk; } - public CreateConnectionRequestBuilder request(io.codat.sync.commerce.models.operations.CreateConnectionRequest request) { + public CreateConnectionRequestBuilder request(CreateConnectionRequest request) { Utils.checkNotNull(request, "request"); this.request = request; return this; } - public CreateConnectionRequestBuilder retryConfig(io.codat.sync.commerce.utils.RetryConfig retryConfig) { + public CreateConnectionRequestBuilder retryConfig(RetryConfig retryConfig) { Utils.checkNotNull(retryConfig, "retryConfig"); this.retryConfig = Optional.of(retryConfig); return this; } - public CreateConnectionRequestBuilder retryConfig(java.util.Optional retryConfig) { + public CreateConnectionRequestBuilder retryConfig(Optional retryConfig) { Utils.checkNotNull(retryConfig, "retryConfig"); this.retryConfig = retryConfig; return this; diff --git a/sync-for-commerce/src/main/java/io/codat/sync/commerce/models/operations/GetConfigTextSyncFlowRequestBuilder.java b/sync-for-commerce/src/main/java/io/codat/sync/commerce/models/operations/GetConfigTextSyncFlowRequestBuilder.java index be11da59..7df9e9ff 100644 --- a/sync-for-commerce/src/main/java/io/codat/sync/commerce/models/operations/GetConfigTextSyncFlowRequestBuilder.java +++ b/sync-for-commerce/src/main/java/io/codat/sync/commerce/models/operations/GetConfigTextSyncFlowRequestBuilder.java @@ -19,19 +19,19 @@ public GetConfigTextSyncFlowRequestBuilder(SDKMethodInterfaces.MethodCallGetConf this.sdk = sdk; } - public GetConfigTextSyncFlowRequestBuilder request(io.codat.sync.commerce.models.operations.GetConfigTextSyncFlowRequest request) { + public GetConfigTextSyncFlowRequestBuilder request(GetConfigTextSyncFlowRequest request) { Utils.checkNotNull(request, "request"); this.request = request; return this; } - public GetConfigTextSyncFlowRequestBuilder retryConfig(io.codat.sync.commerce.utils.RetryConfig retryConfig) { + public GetConfigTextSyncFlowRequestBuilder retryConfig(RetryConfig retryConfig) { Utils.checkNotNull(retryConfig, "retryConfig"); this.retryConfig = Optional.of(retryConfig); return this; } - public GetConfigTextSyncFlowRequestBuilder retryConfig(java.util.Optional retryConfig) { + public GetConfigTextSyncFlowRequestBuilder retryConfig(Optional retryConfig) { Utils.checkNotNull(retryConfig, "retryConfig"); this.retryConfig = retryConfig; return this; diff --git a/sync-for-commerce/src/main/java/io/codat/sync/commerce/models/operations/GetConfigurationRequestBuilder.java b/sync-for-commerce/src/main/java/io/codat/sync/commerce/models/operations/GetConfigurationRequestBuilder.java index 34e91045..89108bcb 100644 --- a/sync-for-commerce/src/main/java/io/codat/sync/commerce/models/operations/GetConfigurationRequestBuilder.java +++ b/sync-for-commerce/src/main/java/io/codat/sync/commerce/models/operations/GetConfigurationRequestBuilder.java @@ -19,19 +19,19 @@ public GetConfigurationRequestBuilder(SDKMethodInterfaces.MethodCallGetConfigura this.sdk = sdk; } - public GetConfigurationRequestBuilder request(io.codat.sync.commerce.models.operations.GetConfigurationRequest request) { + public GetConfigurationRequestBuilder request(GetConfigurationRequest request) { Utils.checkNotNull(request, "request"); this.request = request; return this; } - public GetConfigurationRequestBuilder retryConfig(io.codat.sync.commerce.utils.RetryConfig retryConfig) { + public GetConfigurationRequestBuilder retryConfig(RetryConfig retryConfig) { Utils.checkNotNull(retryConfig, "retryConfig"); this.retryConfig = Optional.of(retryConfig); return this; } - public GetConfigurationRequestBuilder retryConfig(java.util.Optional retryConfig) { + public GetConfigurationRequestBuilder retryConfig(Optional retryConfig) { Utils.checkNotNull(retryConfig, "retryConfig"); this.retryConfig = retryConfig; return this; diff --git a/sync-for-commerce/src/main/java/io/codat/sync/commerce/models/operations/GetIntegrationBrandingRequestBuilder.java b/sync-for-commerce/src/main/java/io/codat/sync/commerce/models/operations/GetIntegrationBrandingRequestBuilder.java index 6dca65ad..7ff11fa0 100644 --- a/sync-for-commerce/src/main/java/io/codat/sync/commerce/models/operations/GetIntegrationBrandingRequestBuilder.java +++ b/sync-for-commerce/src/main/java/io/codat/sync/commerce/models/operations/GetIntegrationBrandingRequestBuilder.java @@ -19,19 +19,19 @@ public GetIntegrationBrandingRequestBuilder(SDKMethodInterfaces.MethodCallGetInt this.sdk = sdk; } - public GetIntegrationBrandingRequestBuilder request(io.codat.sync.commerce.models.operations.GetIntegrationBrandingRequest request) { + public GetIntegrationBrandingRequestBuilder request(GetIntegrationBrandingRequest request) { Utils.checkNotNull(request, "request"); this.request = request; return this; } - public GetIntegrationBrandingRequestBuilder retryConfig(io.codat.sync.commerce.utils.RetryConfig retryConfig) { + public GetIntegrationBrandingRequestBuilder retryConfig(RetryConfig retryConfig) { Utils.checkNotNull(retryConfig, "retryConfig"); this.retryConfig = Optional.of(retryConfig); return this; } - public GetIntegrationBrandingRequestBuilder retryConfig(java.util.Optional retryConfig) { + public GetIntegrationBrandingRequestBuilder retryConfig(Optional retryConfig) { Utils.checkNotNull(retryConfig, "retryConfig"); this.retryConfig = retryConfig; return this; diff --git a/sync-for-commerce/src/main/java/io/codat/sync/commerce/models/operations/GetLastSuccessfulSyncRequestBuilder.java b/sync-for-commerce/src/main/java/io/codat/sync/commerce/models/operations/GetLastSuccessfulSyncRequestBuilder.java index db08c278..7f37d67a 100644 --- a/sync-for-commerce/src/main/java/io/codat/sync/commerce/models/operations/GetLastSuccessfulSyncRequestBuilder.java +++ b/sync-for-commerce/src/main/java/io/codat/sync/commerce/models/operations/GetLastSuccessfulSyncRequestBuilder.java @@ -19,19 +19,19 @@ public GetLastSuccessfulSyncRequestBuilder(SDKMethodInterfaces.MethodCallGetLast this.sdk = sdk; } - public GetLastSuccessfulSyncRequestBuilder request(io.codat.sync.commerce.models.operations.GetLastSuccessfulSyncRequest request) { + public GetLastSuccessfulSyncRequestBuilder request(GetLastSuccessfulSyncRequest request) { Utils.checkNotNull(request, "request"); this.request = request; return this; } - public GetLastSuccessfulSyncRequestBuilder retryConfig(io.codat.sync.commerce.utils.RetryConfig retryConfig) { + public GetLastSuccessfulSyncRequestBuilder retryConfig(RetryConfig retryConfig) { Utils.checkNotNull(retryConfig, "retryConfig"); this.retryConfig = Optional.of(retryConfig); return this; } - public GetLastSuccessfulSyncRequestBuilder retryConfig(java.util.Optional retryConfig) { + public GetLastSuccessfulSyncRequestBuilder retryConfig(Optional retryConfig) { Utils.checkNotNull(retryConfig, "retryConfig"); this.retryConfig = retryConfig; return this; diff --git a/sync-for-commerce/src/main/java/io/codat/sync/commerce/models/operations/GetLatestSyncRequestBuilder.java b/sync-for-commerce/src/main/java/io/codat/sync/commerce/models/operations/GetLatestSyncRequestBuilder.java index 737677c8..4373233b 100644 --- a/sync-for-commerce/src/main/java/io/codat/sync/commerce/models/operations/GetLatestSyncRequestBuilder.java +++ b/sync-for-commerce/src/main/java/io/codat/sync/commerce/models/operations/GetLatestSyncRequestBuilder.java @@ -19,19 +19,19 @@ public GetLatestSyncRequestBuilder(SDKMethodInterfaces.MethodCallGetLatestSync s this.sdk = sdk; } - public GetLatestSyncRequestBuilder request(io.codat.sync.commerce.models.operations.GetLatestSyncRequest request) { + public GetLatestSyncRequestBuilder request(GetLatestSyncRequest request) { Utils.checkNotNull(request, "request"); this.request = request; return this; } - public GetLatestSyncRequestBuilder retryConfig(io.codat.sync.commerce.utils.RetryConfig retryConfig) { + public GetLatestSyncRequestBuilder retryConfig(RetryConfig retryConfig) { Utils.checkNotNull(retryConfig, "retryConfig"); this.retryConfig = Optional.of(retryConfig); return this; } - public GetLatestSyncRequestBuilder retryConfig(java.util.Optional retryConfig) { + public GetLatestSyncRequestBuilder retryConfig(Optional retryConfig) { Utils.checkNotNull(retryConfig, "retryConfig"); this.retryConfig = retryConfig; return this; diff --git a/sync-for-commerce/src/main/java/io/codat/sync/commerce/models/operations/GetSyncByIdRequestBuilder.java b/sync-for-commerce/src/main/java/io/codat/sync/commerce/models/operations/GetSyncByIdRequestBuilder.java index 4faf3152..1dfe51bf 100644 --- a/sync-for-commerce/src/main/java/io/codat/sync/commerce/models/operations/GetSyncByIdRequestBuilder.java +++ b/sync-for-commerce/src/main/java/io/codat/sync/commerce/models/operations/GetSyncByIdRequestBuilder.java @@ -19,19 +19,19 @@ public GetSyncByIdRequestBuilder(SDKMethodInterfaces.MethodCallGetSyncById sdk) this.sdk = sdk; } - public GetSyncByIdRequestBuilder request(io.codat.sync.commerce.models.operations.GetSyncByIdRequest request) { + public GetSyncByIdRequestBuilder request(GetSyncByIdRequest request) { Utils.checkNotNull(request, "request"); this.request = request; return this; } - public GetSyncByIdRequestBuilder retryConfig(io.codat.sync.commerce.utils.RetryConfig retryConfig) { + public GetSyncByIdRequestBuilder retryConfig(RetryConfig retryConfig) { Utils.checkNotNull(retryConfig, "retryConfig"); this.retryConfig = Optional.of(retryConfig); return this; } - public GetSyncByIdRequestBuilder retryConfig(java.util.Optional retryConfig) { + public GetSyncByIdRequestBuilder retryConfig(Optional retryConfig) { Utils.checkNotNull(retryConfig, "retryConfig"); this.retryConfig = retryConfig; return this; diff --git a/sync-for-commerce/src/main/java/io/codat/sync/commerce/models/operations/GetSyncFlowUrlRequestBuilder.java b/sync-for-commerce/src/main/java/io/codat/sync/commerce/models/operations/GetSyncFlowUrlRequestBuilder.java index be248e94..b40dc77f 100644 --- a/sync-for-commerce/src/main/java/io/codat/sync/commerce/models/operations/GetSyncFlowUrlRequestBuilder.java +++ b/sync-for-commerce/src/main/java/io/codat/sync/commerce/models/operations/GetSyncFlowUrlRequestBuilder.java @@ -19,19 +19,19 @@ public GetSyncFlowUrlRequestBuilder(SDKMethodInterfaces.MethodCallGetSyncFlowUrl this.sdk = sdk; } - public GetSyncFlowUrlRequestBuilder request(io.codat.sync.commerce.models.operations.GetSyncFlowUrlRequest request) { + public GetSyncFlowUrlRequestBuilder request(GetSyncFlowUrlRequest request) { Utils.checkNotNull(request, "request"); this.request = request; return this; } - public GetSyncFlowUrlRequestBuilder retryConfig(io.codat.sync.commerce.utils.RetryConfig retryConfig) { + public GetSyncFlowUrlRequestBuilder retryConfig(RetryConfig retryConfig) { Utils.checkNotNull(retryConfig, "retryConfig"); this.retryConfig = Optional.of(retryConfig); return this; } - public GetSyncFlowUrlRequestBuilder retryConfig(java.util.Optional retryConfig) { + public GetSyncFlowUrlRequestBuilder retryConfig(Optional retryConfig) { Utils.checkNotNull(retryConfig, "retryConfig"); this.retryConfig = retryConfig; return this; diff --git a/sync-for-commerce/src/main/java/io/codat/sync/commerce/models/operations/GetSyncStatusRequestBuilder.java b/sync-for-commerce/src/main/java/io/codat/sync/commerce/models/operations/GetSyncStatusRequestBuilder.java index 1176423d..7551cddb 100644 --- a/sync-for-commerce/src/main/java/io/codat/sync/commerce/models/operations/GetSyncStatusRequestBuilder.java +++ b/sync-for-commerce/src/main/java/io/codat/sync/commerce/models/operations/GetSyncStatusRequestBuilder.java @@ -19,19 +19,19 @@ public GetSyncStatusRequestBuilder(SDKMethodInterfaces.MethodCallGetSyncStatus s this.sdk = sdk; } - public GetSyncStatusRequestBuilder request(io.codat.sync.commerce.models.operations.GetSyncStatusRequest request) { + public GetSyncStatusRequestBuilder request(GetSyncStatusRequest request) { Utils.checkNotNull(request, "request"); this.request = request; return this; } - public GetSyncStatusRequestBuilder retryConfig(io.codat.sync.commerce.utils.RetryConfig retryConfig) { + public GetSyncStatusRequestBuilder retryConfig(RetryConfig retryConfig) { Utils.checkNotNull(retryConfig, "retryConfig"); this.retryConfig = Optional.of(retryConfig); return this; } - public GetSyncStatusRequestBuilder retryConfig(java.util.Optional retryConfig) { + public GetSyncStatusRequestBuilder retryConfig(Optional retryConfig) { Utils.checkNotNull(retryConfig, "retryConfig"); this.retryConfig = retryConfig; return this; diff --git a/sync-for-commerce/src/main/java/io/codat/sync/commerce/models/operations/GetVisibleAccountsRequestBuilder.java b/sync-for-commerce/src/main/java/io/codat/sync/commerce/models/operations/GetVisibleAccountsRequestBuilder.java index 4d0dbea9..ca4f0498 100644 --- a/sync-for-commerce/src/main/java/io/codat/sync/commerce/models/operations/GetVisibleAccountsRequestBuilder.java +++ b/sync-for-commerce/src/main/java/io/codat/sync/commerce/models/operations/GetVisibleAccountsRequestBuilder.java @@ -19,19 +19,19 @@ public GetVisibleAccountsRequestBuilder(SDKMethodInterfaces.MethodCallGetVisible this.sdk = sdk; } - public GetVisibleAccountsRequestBuilder request(io.codat.sync.commerce.models.operations.GetVisibleAccountsRequest request) { + public GetVisibleAccountsRequestBuilder request(GetVisibleAccountsRequest request) { Utils.checkNotNull(request, "request"); this.request = request; return this; } - public GetVisibleAccountsRequestBuilder retryConfig(io.codat.sync.commerce.utils.RetryConfig retryConfig) { + public GetVisibleAccountsRequestBuilder retryConfig(RetryConfig retryConfig) { Utils.checkNotNull(retryConfig, "retryConfig"); this.retryConfig = Optional.of(retryConfig); return this; } - public GetVisibleAccountsRequestBuilder retryConfig(java.util.Optional retryConfig) { + public GetVisibleAccountsRequestBuilder retryConfig(Optional retryConfig) { Utils.checkNotNull(retryConfig, "retryConfig"); this.retryConfig = retryConfig; return this; diff --git a/sync-for-commerce/src/main/java/io/codat/sync/commerce/models/operations/ListCompaniesRequestBuilder.java b/sync-for-commerce/src/main/java/io/codat/sync/commerce/models/operations/ListCompaniesRequestBuilder.java index 0c0f8f6d..c0c730fb 100644 --- a/sync-for-commerce/src/main/java/io/codat/sync/commerce/models/operations/ListCompaniesRequestBuilder.java +++ b/sync-for-commerce/src/main/java/io/codat/sync/commerce/models/operations/ListCompaniesRequestBuilder.java @@ -19,19 +19,19 @@ public ListCompaniesRequestBuilder(SDKMethodInterfaces.MethodCallListCompanies s this.sdk = sdk; } - public ListCompaniesRequestBuilder request(io.codat.sync.commerce.models.operations.ListCompaniesRequest request) { + public ListCompaniesRequestBuilder request(ListCompaniesRequest request) { Utils.checkNotNull(request, "request"); this.request = request; return this; } - public ListCompaniesRequestBuilder retryConfig(io.codat.sync.commerce.utils.RetryConfig retryConfig) { + public ListCompaniesRequestBuilder retryConfig(RetryConfig retryConfig) { Utils.checkNotNull(retryConfig, "retryConfig"); this.retryConfig = Optional.of(retryConfig); return this; } - public ListCompaniesRequestBuilder retryConfig(java.util.Optional retryConfig) { + public ListCompaniesRequestBuilder retryConfig(Optional retryConfig) { Utils.checkNotNull(retryConfig, "retryConfig"); this.retryConfig = retryConfig; return this; diff --git a/sync-for-commerce/src/main/java/io/codat/sync/commerce/models/operations/ListConnectionsRequestBuilder.java b/sync-for-commerce/src/main/java/io/codat/sync/commerce/models/operations/ListConnectionsRequestBuilder.java index 875b3280..bccc94d3 100644 --- a/sync-for-commerce/src/main/java/io/codat/sync/commerce/models/operations/ListConnectionsRequestBuilder.java +++ b/sync-for-commerce/src/main/java/io/codat/sync/commerce/models/operations/ListConnectionsRequestBuilder.java @@ -19,19 +19,19 @@ public ListConnectionsRequestBuilder(SDKMethodInterfaces.MethodCallListConnectio this.sdk = sdk; } - public ListConnectionsRequestBuilder request(io.codat.sync.commerce.models.operations.ListConnectionsRequest request) { + public ListConnectionsRequestBuilder request(ListConnectionsRequest request) { Utils.checkNotNull(request, "request"); this.request = request; return this; } - public ListConnectionsRequestBuilder retryConfig(io.codat.sync.commerce.utils.RetryConfig retryConfig) { + public ListConnectionsRequestBuilder retryConfig(RetryConfig retryConfig) { Utils.checkNotNull(retryConfig, "retryConfig"); this.retryConfig = Optional.of(retryConfig); return this; } - public ListConnectionsRequestBuilder retryConfig(java.util.Optional retryConfig) { + public ListConnectionsRequestBuilder retryConfig(Optional retryConfig) { Utils.checkNotNull(retryConfig, "retryConfig"); this.retryConfig = retryConfig; return this; diff --git a/sync-for-commerce/src/main/java/io/codat/sync/commerce/models/operations/ListIntegrationsRequestBuilder.java b/sync-for-commerce/src/main/java/io/codat/sync/commerce/models/operations/ListIntegrationsRequestBuilder.java index ba7c1013..2f1bfd28 100644 --- a/sync-for-commerce/src/main/java/io/codat/sync/commerce/models/operations/ListIntegrationsRequestBuilder.java +++ b/sync-for-commerce/src/main/java/io/codat/sync/commerce/models/operations/ListIntegrationsRequestBuilder.java @@ -19,19 +19,19 @@ public ListIntegrationsRequestBuilder(SDKMethodInterfaces.MethodCallListIntegrat this.sdk = sdk; } - public ListIntegrationsRequestBuilder request(io.codat.sync.commerce.models.operations.ListIntegrationsRequest request) { + public ListIntegrationsRequestBuilder request(ListIntegrationsRequest request) { Utils.checkNotNull(request, "request"); this.request = request; return this; } - public ListIntegrationsRequestBuilder retryConfig(io.codat.sync.commerce.utils.RetryConfig retryConfig) { + public ListIntegrationsRequestBuilder retryConfig(RetryConfig retryConfig) { Utils.checkNotNull(retryConfig, "retryConfig"); this.retryConfig = Optional.of(retryConfig); return this; } - public ListIntegrationsRequestBuilder retryConfig(java.util.Optional retryConfig) { + public ListIntegrationsRequestBuilder retryConfig(Optional retryConfig) { Utils.checkNotNull(retryConfig, "retryConfig"); this.retryConfig = retryConfig; return this; diff --git a/sync-for-commerce/src/main/java/io/codat/sync/commerce/models/operations/ListSyncsRequestBuilder.java b/sync-for-commerce/src/main/java/io/codat/sync/commerce/models/operations/ListSyncsRequestBuilder.java index 185716b5..131eea5c 100644 --- a/sync-for-commerce/src/main/java/io/codat/sync/commerce/models/operations/ListSyncsRequestBuilder.java +++ b/sync-for-commerce/src/main/java/io/codat/sync/commerce/models/operations/ListSyncsRequestBuilder.java @@ -19,19 +19,19 @@ public ListSyncsRequestBuilder(SDKMethodInterfaces.MethodCallListSyncs sdk) { this.sdk = sdk; } - public ListSyncsRequestBuilder request(io.codat.sync.commerce.models.operations.ListSyncsRequest request) { + public ListSyncsRequestBuilder request(ListSyncsRequest request) { Utils.checkNotNull(request, "request"); this.request = request; return this; } - public ListSyncsRequestBuilder retryConfig(io.codat.sync.commerce.utils.RetryConfig retryConfig) { + public ListSyncsRequestBuilder retryConfig(RetryConfig retryConfig) { Utils.checkNotNull(retryConfig, "retryConfig"); this.retryConfig = Optional.of(retryConfig); return this; } - public ListSyncsRequestBuilder retryConfig(java.util.Optional retryConfig) { + public ListSyncsRequestBuilder retryConfig(Optional retryConfig) { Utils.checkNotNull(retryConfig, "retryConfig"); this.retryConfig = retryConfig; return this; diff --git a/sync-for-commerce/src/main/java/io/codat/sync/commerce/models/operations/RequestSyncForDateRangeRequestBuilder.java b/sync-for-commerce/src/main/java/io/codat/sync/commerce/models/operations/RequestSyncForDateRangeRequestBuilder.java index 865997b6..38a8a55a 100644 --- a/sync-for-commerce/src/main/java/io/codat/sync/commerce/models/operations/RequestSyncForDateRangeRequestBuilder.java +++ b/sync-for-commerce/src/main/java/io/codat/sync/commerce/models/operations/RequestSyncForDateRangeRequestBuilder.java @@ -19,19 +19,19 @@ public RequestSyncForDateRangeRequestBuilder(SDKMethodInterfaces.MethodCallReque this.sdk = sdk; } - public RequestSyncForDateRangeRequestBuilder request(io.codat.sync.commerce.models.operations.RequestSyncForDateRangeRequest request) { + public RequestSyncForDateRangeRequestBuilder request(RequestSyncForDateRangeRequest request) { Utils.checkNotNull(request, "request"); this.request = request; return this; } - public RequestSyncForDateRangeRequestBuilder retryConfig(io.codat.sync.commerce.utils.RetryConfig retryConfig) { + public RequestSyncForDateRangeRequestBuilder retryConfig(RetryConfig retryConfig) { Utils.checkNotNull(retryConfig, "retryConfig"); this.retryConfig = Optional.of(retryConfig); return this; } - public RequestSyncForDateRangeRequestBuilder retryConfig(java.util.Optional retryConfig) { + public RequestSyncForDateRangeRequestBuilder retryConfig(Optional retryConfig) { Utils.checkNotNull(retryConfig, "retryConfig"); this.retryConfig = retryConfig; return this; diff --git a/sync-for-commerce/src/main/java/io/codat/sync/commerce/models/operations/RequestSyncRequestBuilder.java b/sync-for-commerce/src/main/java/io/codat/sync/commerce/models/operations/RequestSyncRequestBuilder.java index d279d7f4..9de8bf35 100644 --- a/sync-for-commerce/src/main/java/io/codat/sync/commerce/models/operations/RequestSyncRequestBuilder.java +++ b/sync-for-commerce/src/main/java/io/codat/sync/commerce/models/operations/RequestSyncRequestBuilder.java @@ -19,19 +19,19 @@ public RequestSyncRequestBuilder(SDKMethodInterfaces.MethodCallRequestSync sdk) this.sdk = sdk; } - public RequestSyncRequestBuilder request(io.codat.sync.commerce.models.operations.RequestSyncRequest request) { + public RequestSyncRequestBuilder request(RequestSyncRequest request) { Utils.checkNotNull(request, "request"); this.request = request; return this; } - public RequestSyncRequestBuilder retryConfig(io.codat.sync.commerce.utils.RetryConfig retryConfig) { + public RequestSyncRequestBuilder retryConfig(RetryConfig retryConfig) { Utils.checkNotNull(retryConfig, "retryConfig"); this.retryConfig = Optional.of(retryConfig); return this; } - public RequestSyncRequestBuilder retryConfig(java.util.Optional retryConfig) { + public RequestSyncRequestBuilder retryConfig(Optional retryConfig) { Utils.checkNotNull(retryConfig, "retryConfig"); this.retryConfig = retryConfig; return this; diff --git a/sync-for-commerce/src/main/java/io/codat/sync/commerce/models/operations/SDKMethodInterfaces.java b/sync-for-commerce/src/main/java/io/codat/sync/commerce/models/operations/SDKMethodInterfaces.java index be4aa3a1..6760017e 100644 --- a/sync-for-commerce/src/main/java/io/codat/sync/commerce/models/operations/SDKMethodInterfaces.java +++ b/sync-for-commerce/src/main/java/io/codat/sync/commerce/models/operations/SDKMethodInterfaces.java @@ -6,160 +6,161 @@ import io.codat.sync.commerce.models.components.CreateCompany; import io.codat.sync.commerce.utils.Options; +import java.lang.Exception; import java.util.Optional; public class SDKMethodInterfaces { public interface MethodCallGetConfigTextSyncFlow { - io.codat.sync.commerce.models.operations.GetConfigTextSyncFlowResponse getConfigTextSyncFlow( + GetConfigTextSyncFlowResponse getConfigTextSyncFlow( GetConfigTextSyncFlowRequest request, Optional options) throws Exception; } public interface MethodCallGetVisibleAccounts { - io.codat.sync.commerce.models.operations.GetVisibleAccountsResponse getVisibleAccounts( + GetVisibleAccountsResponse getVisibleAccounts( GetVisibleAccountsRequest request, Optional options) throws Exception; } public interface MethodCallUpdateConfigTextSyncFlow { - io.codat.sync.commerce.models.operations.UpdateConfigTextSyncFlowResponse updateConfigTextSyncFlow( + UpdateConfigTextSyncFlowResponse updateConfigTextSyncFlow( UpdateConfigTextSyncFlowRequest request, Optional options) throws Exception; } public interface MethodCallUpdateVisibleAccountsSyncFlow { - io.codat.sync.commerce.models.operations.UpdateVisibleAccountsSyncFlowResponse updateVisibleAccountsSyncFlow( + UpdateVisibleAccountsSyncFlowResponse updateVisibleAccountsSyncFlow( UpdateVisibleAccountsSyncFlowRequest request, Optional options) throws Exception; } public interface MethodCallCreateCompany { - io.codat.sync.commerce.models.operations.CreateCompanyResponse createCompany( + CreateCompanyResponse createCompany( Optional request, Optional options) throws Exception; } public interface MethodCallGetConfiguration { - io.codat.sync.commerce.models.operations.GetConfigurationResponse getConfiguration( + GetConfigurationResponse getConfiguration( GetConfigurationRequest request, Optional options) throws Exception; } public interface MethodCallListCompanies { - io.codat.sync.commerce.models.operations.ListCompaniesResponse listCompanies( + ListCompaniesResponse listCompanies( ListCompaniesRequest request, Optional options) throws Exception; } public interface MethodCallSetConfiguration { - io.codat.sync.commerce.models.operations.SetConfigurationResponse setConfiguration( + SetConfigurationResponse setConfiguration( SetConfigurationRequest request, Optional options) throws Exception; } public interface MethodCallCreateConnection { - io.codat.sync.commerce.models.operations.CreateConnectionResponse create( + CreateConnectionResponse create( CreateConnectionRequest request, Optional options) throws Exception; } public interface MethodCallGetSyncFlowUrl { - io.codat.sync.commerce.models.operations.GetSyncFlowUrlResponse getSyncFlowUrl( + GetSyncFlowUrlResponse getSyncFlowUrl( GetSyncFlowUrlRequest request, Optional options) throws Exception; } public interface MethodCallListConnections { - io.codat.sync.commerce.models.operations.ListConnectionsResponse list( + ListConnectionsResponse list( ListConnectionsRequest request, Optional options) throws Exception; } public interface MethodCallUpdateConnectionAuthorization { - io.codat.sync.commerce.models.operations.UpdateConnectionAuthorizationResponse updateAuthorization( + UpdateConnectionAuthorizationResponse updateAuthorization( UpdateConnectionAuthorizationRequest request, Optional options) throws Exception; } public interface MethodCallUpdateConnection { - io.codat.sync.commerce.models.operations.UpdateConnectionResponse updateConnection( + UpdateConnectionResponse updateConnection( UpdateConnectionRequest request, Optional options) throws Exception; } public interface MethodCallGetSyncById { - io.codat.sync.commerce.models.operations.GetSyncByIdResponse get( + GetSyncByIdResponse get( GetSyncByIdRequest request, Optional options) throws Exception; } public interface MethodCallGetLastSuccessfulSync { - io.codat.sync.commerce.models.operations.GetLastSuccessfulSyncResponse getLastSuccessfulSync( + GetLastSuccessfulSyncResponse getLastSuccessfulSync( GetLastSuccessfulSyncRequest request, Optional options) throws Exception; } public interface MethodCallGetLatestSync { - io.codat.sync.commerce.models.operations.GetLatestSyncResponse getLatestSync( + GetLatestSyncResponse getLatestSync( GetLatestSyncRequest request, Optional options) throws Exception; } public interface MethodCallGetSyncStatus { - io.codat.sync.commerce.models.operations.GetSyncStatusResponse getStatus( + GetSyncStatusResponse getStatus( GetSyncStatusRequest request, Optional options) throws Exception; } public interface MethodCallListSyncs { - io.codat.sync.commerce.models.operations.ListSyncsResponse list( + ListSyncsResponse list( ListSyncsRequest request, Optional options) throws Exception; } public interface MethodCallRequestSync { - io.codat.sync.commerce.models.operations.RequestSyncResponse request( + RequestSyncResponse request( RequestSyncRequest request, Optional options) throws Exception; } public interface MethodCallRequestSyncForDateRange { - io.codat.sync.commerce.models.operations.RequestSyncForDateRangeResponse requestForDateRange( + RequestSyncForDateRangeResponse requestForDateRange( RequestSyncForDateRangeRequest request, Optional options) throws Exception; } public interface MethodCallGetIntegrationBranding { - io.codat.sync.commerce.models.operations.GetIntegrationBrandingResponse getBranding( + GetIntegrationBrandingResponse getBranding( GetIntegrationBrandingRequest request, Optional options) throws Exception; } public interface MethodCallListIntegrations { - io.codat.sync.commerce.models.operations.ListIntegrationsResponse list( + ListIntegrationsResponse list( ListIntegrationsRequest request, Optional options) throws Exception; } diff --git a/sync-for-commerce/src/main/java/io/codat/sync/commerce/models/operations/SetConfigurationRequestBuilder.java b/sync-for-commerce/src/main/java/io/codat/sync/commerce/models/operations/SetConfigurationRequestBuilder.java index 502def14..fbdea90c 100644 --- a/sync-for-commerce/src/main/java/io/codat/sync/commerce/models/operations/SetConfigurationRequestBuilder.java +++ b/sync-for-commerce/src/main/java/io/codat/sync/commerce/models/operations/SetConfigurationRequestBuilder.java @@ -19,19 +19,19 @@ public SetConfigurationRequestBuilder(SDKMethodInterfaces.MethodCallSetConfigura this.sdk = sdk; } - public SetConfigurationRequestBuilder request(io.codat.sync.commerce.models.operations.SetConfigurationRequest request) { + public SetConfigurationRequestBuilder request(SetConfigurationRequest request) { Utils.checkNotNull(request, "request"); this.request = request; return this; } - public SetConfigurationRequestBuilder retryConfig(io.codat.sync.commerce.utils.RetryConfig retryConfig) { + public SetConfigurationRequestBuilder retryConfig(RetryConfig retryConfig) { Utils.checkNotNull(retryConfig, "retryConfig"); this.retryConfig = Optional.of(retryConfig); return this; } - public SetConfigurationRequestBuilder retryConfig(java.util.Optional retryConfig) { + public SetConfigurationRequestBuilder retryConfig(Optional retryConfig) { Utils.checkNotNull(retryConfig, "retryConfig"); this.retryConfig = retryConfig; return this; diff --git a/sync-for-commerce/src/main/java/io/codat/sync/commerce/models/operations/UpdateConfigTextSyncFlowRequestBuilder.java b/sync-for-commerce/src/main/java/io/codat/sync/commerce/models/operations/UpdateConfigTextSyncFlowRequestBuilder.java index 575ea54a..fb4f78de 100644 --- a/sync-for-commerce/src/main/java/io/codat/sync/commerce/models/operations/UpdateConfigTextSyncFlowRequestBuilder.java +++ b/sync-for-commerce/src/main/java/io/codat/sync/commerce/models/operations/UpdateConfigTextSyncFlowRequestBuilder.java @@ -19,19 +19,19 @@ public UpdateConfigTextSyncFlowRequestBuilder(SDKMethodInterfaces.MethodCallUpda this.sdk = sdk; } - public UpdateConfigTextSyncFlowRequestBuilder request(io.codat.sync.commerce.models.operations.UpdateConfigTextSyncFlowRequest request) { + public UpdateConfigTextSyncFlowRequestBuilder request(UpdateConfigTextSyncFlowRequest request) { Utils.checkNotNull(request, "request"); this.request = request; return this; } - public UpdateConfigTextSyncFlowRequestBuilder retryConfig(io.codat.sync.commerce.utils.RetryConfig retryConfig) { + public UpdateConfigTextSyncFlowRequestBuilder retryConfig(RetryConfig retryConfig) { Utils.checkNotNull(retryConfig, "retryConfig"); this.retryConfig = Optional.of(retryConfig); return this; } - public UpdateConfigTextSyncFlowRequestBuilder retryConfig(java.util.Optional retryConfig) { + public UpdateConfigTextSyncFlowRequestBuilder retryConfig(Optional retryConfig) { Utils.checkNotNull(retryConfig, "retryConfig"); this.retryConfig = retryConfig; return this; diff --git a/sync-for-commerce/src/main/java/io/codat/sync/commerce/models/operations/UpdateConnectionAuthorizationRequestBuilder.java b/sync-for-commerce/src/main/java/io/codat/sync/commerce/models/operations/UpdateConnectionAuthorizationRequestBuilder.java index 2fd85591..7d01db84 100644 --- a/sync-for-commerce/src/main/java/io/codat/sync/commerce/models/operations/UpdateConnectionAuthorizationRequestBuilder.java +++ b/sync-for-commerce/src/main/java/io/codat/sync/commerce/models/operations/UpdateConnectionAuthorizationRequestBuilder.java @@ -19,19 +19,19 @@ public UpdateConnectionAuthorizationRequestBuilder(SDKMethodInterfaces.MethodCal this.sdk = sdk; } - public UpdateConnectionAuthorizationRequestBuilder request(io.codat.sync.commerce.models.operations.UpdateConnectionAuthorizationRequest request) { + public UpdateConnectionAuthorizationRequestBuilder request(UpdateConnectionAuthorizationRequest request) { Utils.checkNotNull(request, "request"); this.request = request; return this; } - public UpdateConnectionAuthorizationRequestBuilder retryConfig(io.codat.sync.commerce.utils.RetryConfig retryConfig) { + public UpdateConnectionAuthorizationRequestBuilder retryConfig(RetryConfig retryConfig) { Utils.checkNotNull(retryConfig, "retryConfig"); this.retryConfig = Optional.of(retryConfig); return this; } - public UpdateConnectionAuthorizationRequestBuilder retryConfig(java.util.Optional retryConfig) { + public UpdateConnectionAuthorizationRequestBuilder retryConfig(Optional retryConfig) { Utils.checkNotNull(retryConfig, "retryConfig"); this.retryConfig = retryConfig; return this; diff --git a/sync-for-commerce/src/main/java/io/codat/sync/commerce/models/operations/UpdateConnectionRequestBuilder.java b/sync-for-commerce/src/main/java/io/codat/sync/commerce/models/operations/UpdateConnectionRequestBuilder.java index 3cff3472..90796dcb 100644 --- a/sync-for-commerce/src/main/java/io/codat/sync/commerce/models/operations/UpdateConnectionRequestBuilder.java +++ b/sync-for-commerce/src/main/java/io/codat/sync/commerce/models/operations/UpdateConnectionRequestBuilder.java @@ -19,19 +19,19 @@ public UpdateConnectionRequestBuilder(SDKMethodInterfaces.MethodCallUpdateConnec this.sdk = sdk; } - public UpdateConnectionRequestBuilder request(io.codat.sync.commerce.models.operations.UpdateConnectionRequest request) { + public UpdateConnectionRequestBuilder request(UpdateConnectionRequest request) { Utils.checkNotNull(request, "request"); this.request = request; return this; } - public UpdateConnectionRequestBuilder retryConfig(io.codat.sync.commerce.utils.RetryConfig retryConfig) { + public UpdateConnectionRequestBuilder retryConfig(RetryConfig retryConfig) { Utils.checkNotNull(retryConfig, "retryConfig"); this.retryConfig = Optional.of(retryConfig); return this; } - public UpdateConnectionRequestBuilder retryConfig(java.util.Optional retryConfig) { + public UpdateConnectionRequestBuilder retryConfig(Optional retryConfig) { Utils.checkNotNull(retryConfig, "retryConfig"); this.retryConfig = retryConfig; return this; diff --git a/sync-for-commerce/src/main/java/io/codat/sync/commerce/models/operations/UpdateVisibleAccountsSyncFlowRequestBuilder.java b/sync-for-commerce/src/main/java/io/codat/sync/commerce/models/operations/UpdateVisibleAccountsSyncFlowRequestBuilder.java index b2bcf655..7808bdde 100644 --- a/sync-for-commerce/src/main/java/io/codat/sync/commerce/models/operations/UpdateVisibleAccountsSyncFlowRequestBuilder.java +++ b/sync-for-commerce/src/main/java/io/codat/sync/commerce/models/operations/UpdateVisibleAccountsSyncFlowRequestBuilder.java @@ -19,19 +19,19 @@ public UpdateVisibleAccountsSyncFlowRequestBuilder(SDKMethodInterfaces.MethodCal this.sdk = sdk; } - public UpdateVisibleAccountsSyncFlowRequestBuilder request(io.codat.sync.commerce.models.operations.UpdateVisibleAccountsSyncFlowRequest request) { + public UpdateVisibleAccountsSyncFlowRequestBuilder request(UpdateVisibleAccountsSyncFlowRequest request) { Utils.checkNotNull(request, "request"); this.request = request; return this; } - public UpdateVisibleAccountsSyncFlowRequestBuilder retryConfig(io.codat.sync.commerce.utils.RetryConfig retryConfig) { + public UpdateVisibleAccountsSyncFlowRequestBuilder retryConfig(RetryConfig retryConfig) { Utils.checkNotNull(retryConfig, "retryConfig"); this.retryConfig = Optional.of(retryConfig); return this; } - public UpdateVisibleAccountsSyncFlowRequestBuilder retryConfig(java.util.Optional retryConfig) { + public UpdateVisibleAccountsSyncFlowRequestBuilder retryConfig(Optional retryConfig) { Utils.checkNotNull(retryConfig, "retryConfig"); this.retryConfig = retryConfig; return this; diff --git a/sync-for-commerce/src/main/java/io/codat/sync/commerce/models/webhooks/ConnectionDeletedResponse.java b/sync-for-commerce/src/main/java/io/codat/sync/commerce/models/webhooks/ConnectionDeletedResponse.java new file mode 100644 index 00000000..20b524a9 --- /dev/null +++ b/sync-for-commerce/src/main/java/io/codat/sync/commerce/models/webhooks/ConnectionDeletedResponse.java @@ -0,0 +1,183 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package io.codat.sync.commerce.models.webhooks; + + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import io.codat.sync.commerce.utils.Response; +import io.codat.sync.commerce.utils.Utils; +import java.io.InputStream; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.net.http.HttpResponse; +import java.util.Objects; + + +public class ConnectionDeletedResponse implements Response { + + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + @JsonCreator + public ConnectionDeletedResponse( + String contentType, + int statusCode, + HttpResponse rawResponse) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + } + + /** + * HTTP response content type for this operation + */ + @JsonIgnore + public String contentType() { + return contentType; + } + + /** + * HTTP response status code for this operation + */ + @JsonIgnore + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @JsonIgnore + public HttpResponse rawResponse() { + return rawResponse; + } + + public final static Builder builder() { + return new Builder(); + } + + /** + * HTTP response content type for this operation + */ + public ConnectionDeletedResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public ConnectionDeletedResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public ConnectionDeletedResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ConnectionDeletedResponse other = (ConnectionDeletedResponse) o; + return + Objects.deepEquals(this.contentType, other.contentType) && + Objects.deepEquals(this.statusCode, other.statusCode) && + Objects.deepEquals(this.rawResponse, other.rawResponse); + } + + @Override + public int hashCode() { + return Objects.hash( + contentType, + statusCode, + rawResponse); + } + + @Override + public String toString() { + return Utils.toString(ConnectionDeletedResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse); + } + + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Builder() { + // force use of static builder() method + } + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + public ConnectionDeletedResponse build() { + return new ConnectionDeletedResponse( + contentType, + statusCode, + rawResponse); + } + } +} + diff --git a/sync-for-commerce/src/main/java/io/codat/sync/commerce/utils/EventStream.java b/sync-for-commerce/src/main/java/io/codat/sync/commerce/utils/EventStream.java index 5f68f050..35ee24c4 100644 --- a/sync-for-commerce/src/main/java/io/codat/sync/commerce/utils/EventStream.java +++ b/sync-for-commerce/src/main/java/io/codat/sync/commerce/utils/EventStream.java @@ -33,12 +33,14 @@ public final class EventStream implements AutoCloseable { private final EventStreamReader reader; private final TypeReference typeReference; private final ObjectMapper mapper; + private final Optional terminalMessage; // Internal use only - public EventStream(InputStream in, TypeReference typeReference, ObjectMapper mapper) { + public EventStream(InputStream in, TypeReference typeReference, ObjectMapper mapper, Optional terminalMessage) { this.reader = new EventStreamReader(in); this.typeReference = typeReference; this.mapper = mapper; + this.terminalMessage = terminalMessage; } /** @@ -50,6 +52,7 @@ public EventStream(InputStream in, TypeReference typeReference, ObjectMapper */ public Optional next() throws IOException { return reader.readMessage() // + .filter(x -> !terminalMessage.isPresent() || !terminalMessage.get().equals(x.data())) // .map(x -> Utils.asType(x, mapper, typeReference)); } @@ -124,3 +127,4 @@ public void close() throws Exception { } } + diff --git a/sync-for-commerce/src/main/java/io/codat/sync/commerce/utils/HTTPRequest.java b/sync-for-commerce/src/main/java/io/codat/sync/commerce/utils/HTTPRequest.java index d868e1d3..af1c897d 100644 --- a/sync-for-commerce/src/main/java/io/codat/sync/commerce/utils/HTTPRequest.java +++ b/sync-for-commerce/src/main/java/io/codat/sync/commerce/utils/HTTPRequest.java @@ -4,6 +4,7 @@ package io.codat.sync.commerce.utils; +import java.net.URI; import java.net.URISyntaxException; import java.net.http.HttpRequest; import java.net.http.HttpRequest.BodyPublisher; @@ -15,15 +16,15 @@ import java.util.Map; import java.util.Optional; -import org.apache.http.NameValuePair; -import org.apache.http.client.utils.URIBuilder; -import org.apache.http.message.BasicNameValuePair; - public class HTTPRequest { + private static final String FRAGMENT_SEGMENT_START = "#"; + private static final String QUERY_NAME_VALUE_DELIMITER = "="; + private static final String QUERY_PARAMETER_DELIMITER = "&"; + private static final String QUERY_SEGMENT_START = "?"; private final String baseURL; private final String method; - private final List queryParams = new ArrayList<>(); + private final List queryParams = new ArrayList<>(); private final Map> headers = new HashMap<>(); private Optional body = Optional.empty(); // mutable @@ -54,21 +55,21 @@ public HTTPRequest addHeaders(Map> map) { return this; } - public HTTPRequest addQueryParam(String name, String value) { - addQueryParam(new BasicNameValuePair(name, value)); + public HTTPRequest addQueryParam(QueryParameter param) { + this.queryParams.add(param); return this; } - - public HTTPRequest addQueryParam(NameValuePair param) { - this.queryParams.add(param); + + public HTTPRequest addQueryParam(String key, String value, boolean allowReserved) { + this.queryParams.add(QueryParameter.of(key, value, allowReserved)); return this; } - public HTTPRequest addQueryParams(Collection params) { + public HTTPRequest addQueryParams(Collection params) { params.forEach(p -> addQueryParam(p)); return this; } - + public HttpRequest build() { HttpRequest.Builder requestBuilder = HttpRequest.newBuilder(); @@ -81,14 +82,49 @@ public HttpRequest build() { } requestBuilder.method(method, bodyPublisher); try { - URIBuilder b = new URIBuilder(this.baseURL); - queryParams.forEach(pair -> b.addParameter(pair.getName(), pair.getValue())); - requestBuilder.uri(b.build()); + requestBuilder.uri(new URI(buildUrl(baseURL, queryParams))); } catch (URISyntaxException e) { throw new RuntimeException(e); } headers.forEach((k, list) -> list.forEach(v -> requestBuilder.header(k, v))); return requestBuilder.build(); } - + + // VisibleForTesting + public static String buildUrl(String baseURL, Collection queryParams) { + if (queryParams.isEmpty()) { + return baseURL; + } else { + final String base; + final String fragment; + int i = baseURL.indexOf(FRAGMENT_SEGMENT_START); + if (i == -1) { + base = baseURL; + fragment = ""; + } else { + base = baseURL.substring(0, i); + fragment = baseURL.substring(i); + } + StringBuilder b = new StringBuilder(base); + if (!base.contains(QUERY_SEGMENT_START)) { + b.append(QUERY_SEGMENT_START); + } else { + b.append(QUERY_PARAMETER_DELIMITER); + } + boolean first = true; + for (QueryParameter p : queryParams) { + if (!first) { + b.append(QUERY_PARAMETER_DELIMITER); + } + first = false; + // don't allow reserved characters to be unencoded in key (??) + b.append(Utf8UrlEncoder.DEFAULT.encode(p.name())); + b.append(QUERY_NAME_VALUE_DELIMITER); + b.append(Utf8UrlEncoder.allowReserved(p.allowReserved()).encode(p.value())); + } + b.append(fragment); + return b.toString(); + } + } + } \ No newline at end of file diff --git a/sync-for-commerce/src/main/java/io/codat/sync/commerce/utils/OneOfDeserializer.java b/sync-for-commerce/src/main/java/io/codat/sync/commerce/utils/OneOfDeserializer.java index a53f4428..444e0ff8 100644 --- a/sync-for-commerce/src/main/java/io/codat/sync/commerce/utils/OneOfDeserializer.java +++ b/sync-for-commerce/src/main/java/io/codat/sync/commerce/utils/OneOfDeserializer.java @@ -35,7 +35,7 @@ public class OneOfDeserializer extends StdDeserializer { private static final long serialVersionUID = -1; - private final List typeReferences; // oneOf subschemas + private final transient List typeReferences; // oneOf subschemas private final Class cls; private final boolean strict; private final ObjectMapper mapper; diff --git a/sync-for-commerce/src/main/java/io/codat/sync/commerce/utils/Options.java b/sync-for-commerce/src/main/java/io/codat/sync/commerce/utils/Options.java index a4930b6b..7f35e477 100644 --- a/sync-for-commerce/src/main/java/io/codat/sync/commerce/utils/Options.java +++ b/sync-for-commerce/src/main/java/io/codat/sync/commerce/utils/Options.java @@ -13,14 +13,14 @@ public enum Option { RETRY_CONFIG; } - private Optional retryConfig = Optional.empty(); + private Optional retryConfig = Optional.empty(); - private Options(Optional retryConfig) { + private Options(Optional retryConfig) { Utils.checkNotNull(retryConfig, "retryConfig"); this.retryConfig = retryConfig; } - public Optional retryConfig() { + public Optional retryConfig() { return retryConfig; } @@ -36,17 +36,17 @@ public final static Builder builder() { public final static class Builder { - private Optional retryConfig = Optional.empty(); + private Optional retryConfig = Optional.empty(); private Builder() {} - public Builder retryConfig(io.codat.sync.commerce.utils.RetryConfig retryConfig) throws IllegalArgumentException { + public Builder retryConfig(RetryConfig retryConfig) throws IllegalArgumentException { Utils.checkNotNull(retryConfig, "retryConfig"); this.retryConfig = Optional.of(retryConfig); return this; } - public Builder retryConfig(Optional retryConfig) throws IllegalArgumentException { + public Builder retryConfig(Optional retryConfig) throws IllegalArgumentException { Utils.checkNotNull(retryConfig, "retryConfig"); this.retryConfig = retryConfig; return this; diff --git a/sync-for-commerce/src/main/java/io/codat/sync/commerce/utils/PathParamsMetadata.java b/sync-for-commerce/src/main/java/io/codat/sync/commerce/utils/PathParamsMetadata.java index 1cbaf750..f9da0308 100644 --- a/sync-for-commerce/src/main/java/io/codat/sync/commerce/utils/PathParamsMetadata.java +++ b/sync-for-commerce/src/main/java/io/codat/sync/commerce/utils/PathParamsMetadata.java @@ -8,15 +8,17 @@ class PathParamsMetadata { + // these fields set via reflection + String style = "simple"; boolean explode; String name; String serialization; + boolean allowReserved; private PathParamsMetadata() { } - // pathParam:style=simple,explode=false,name=apiID static PathParamsMetadata parse(Field field) throws IllegalArgumentException, IllegalAccessException { return Metadata.parse("pathParam", new PathParamsMetadata(), field); } diff --git a/sync-for-commerce/src/main/java/io/codat/sync/commerce/utils/QueryParameter.java b/sync-for-commerce/src/main/java/io/codat/sync/commerce/utils/QueryParameter.java new file mode 100644 index 00000000..aff0e5ac --- /dev/null +++ b/sync-for-commerce/src/main/java/io/codat/sync/commerce/utils/QueryParameter.java @@ -0,0 +1,62 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package io.codat.sync.commerce.utils; + +import java.util.Objects; + +// internal class, not for public use +// TODO move to internal package +public final class QueryParameter { + + private final String name; + private final String value; + private final boolean allowReserved; + + private QueryParameter(String name, String value, boolean allowReserved) { + this.name = name; + this.value = value; + this.allowReserved = allowReserved; + } + + public static QueryParameter of(String name, String value, boolean allowReserved) { + return new QueryParameter(name, value, allowReserved); + } + + public String name() { + return name; + } + + public String value() { + return value; + } + + public boolean allowReserved() { + return allowReserved; + } + + @Override + public String toString() { + return "QueryParameter [name=" + name + ", value=" + value + ", allowReserved=" + allowReserved + "]"; + } + + @Override + public int hashCode() { + return Objects.hash(allowReserved, name, value); + } + + @Override + public boolean equals(Object obj) { + if (this == obj) + return true; + if (obj == null) + return false; + if (getClass() != obj.getClass()) + return false; + QueryParameter other = (QueryParameter) obj; + return allowReserved == other.allowReserved && Objects.equals(name, other.name) + && Objects.equals(value, other.value); + } + +} diff --git a/sync-for-commerce/src/main/java/io/codat/sync/commerce/utils/QueryParameters.java b/sync-for-commerce/src/main/java/io/codat/sync/commerce/utils/QueryParameters.java index d6ae43ba..90f4d393 100644 --- a/sync-for-commerce/src/main/java/io/codat/sync/commerce/utils/QueryParameters.java +++ b/sync-for-commerce/src/main/java/io/codat/sync/commerce/utils/QueryParameters.java @@ -11,16 +11,13 @@ import java.util.Map; import java.util.stream.Collectors; -import org.apache.http.NameValuePair; -import org.apache.http.message.BasicNameValuePair; - import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.ObjectMapper; public class QueryParameters { - public static List parseQueryParams(Class type, T queryParams, + public static List parseQueryParams(Class type, T queryParams, Map>> globals) throws Exception { - List allParams = new ArrayList<>(); + List allParams = new ArrayList<>(); Field[] fields = type.getDeclaredFields(); @@ -45,22 +42,24 @@ public static List parseQueryParams(Class t } if (queryParamsMetadata.serialization != null && !queryParamsMetadata.serialization.isBlank()) { - List params = parseSerializedParams(queryParamsMetadata, value); + List params = parseSerializedParams(queryParamsMetadata, value); allParams.addAll(params); } else { switch (queryParamsMetadata.style) { case "form": - List formParams = parseDelimitedParams(queryParamsMetadata, value, ","); + List formParams = parseDelimitedParams(queryParamsMetadata, value, ","); allParams.addAll(formParams); break; case "deepObject": - List deepObjectParams = parseDeepObjectParams(queryParamsMetadata, value); + List deepObjectParams = parseDeepObjectParams(queryParamsMetadata, value); allParams.addAll(deepObjectParams); break; case "pipeDelimited": - List pipeDelimitedParams = parseDelimitedParams(queryParamsMetadata, value, "|"); + List pipeDelimitedParams = parseDelimitedParams(queryParamsMetadata, value, "|"); allParams.addAll(pipeDelimitedParams); break; + default: + break; } } } @@ -68,25 +67,24 @@ public static List parseQueryParams(Class t return allParams; } - private static List parseSerializedParams(QueryParamsMetadata queryParamsMetadata, Object value) + private static List parseSerializedParams(QueryParamsMetadata queryParamsMetadata, Object value) throws JsonProcessingException { - List params = new ArrayList<>(); - + List params = new ArrayList<>(); switch (queryParamsMetadata.serialization) { case "json": ObjectMapper mapper = JSON.getMapper(); String json = mapper.writeValueAsString(value); - - params.add(new BasicNameValuePair(queryParamsMetadata.name, json)); + params.add(QueryParameter.of(queryParamsMetadata.name, json, queryParamsMetadata.allowReserved)); + break; + default: break; } - return params; } - private static List parseDelimitedParams(QueryParamsMetadata queryParamsMetadata, Object value, String delimiter) + private static List parseDelimitedParams(QueryParamsMetadata queryParamsMetadata, Object value, String delimiter) throws IllegalArgumentException, IllegalAccessException { - List params = new ArrayList<>(); + List params = new ArrayList<>(); switch (Types.getType(value.getClass())) { case ARRAY: { @@ -106,7 +104,7 @@ private static List parseDelimitedParams(QueryParamsMetadata quer values.add(String.join(delimiter, items)); } - params.addAll(values.stream().map(v -> new BasicNameValuePair(queryParamsMetadata.name, v)) + params.addAll(values.stream().map(v -> QueryParameter.of(queryParamsMetadata.name, v, queryParamsMetadata.allowReserved)) .collect(Collectors.toList())); break; } @@ -120,20 +118,20 @@ private static List parseDelimitedParams(QueryParamsMetadata quer String val = Utils.valToString(entry.getValue()); if (queryParamsMetadata.explode) { - params.add(new BasicNameValuePair(key, val)); + params.add(QueryParameter.of(key, val, queryParamsMetadata.allowReserved)); } else { items.add(String.format("%s%s%s", key, delimiter, val)); } } if (items.size() > 0) { - params.add(new BasicNameValuePair(queryParamsMetadata.name, String.join(delimiter, items))); + params.add(QueryParameter.of(queryParamsMetadata.name, String.join(delimiter, items), queryParamsMetadata.allowReserved)); } break; } case OBJECT: { if (!Utils.allowIntrospection(value.getClass())) { - params.add(new BasicNameValuePair(queryParamsMetadata.name, Utils.valToString(value))); + params.add(QueryParameter.of(queryParamsMetadata.name, Utils.valToString(value), queryParamsMetadata.allowReserved)); break; } Field[] fields = value.getClass().getDeclaredFields(); @@ -154,29 +152,29 @@ private static List parseDelimitedParams(QueryParamsMetadata quer } if (queryParamsMetadata.explode) { - params.add(new BasicNameValuePair(metadata.name, Utils.valToString(val))); + params.add(QueryParameter.of(metadata.name, Utils.valToString(val), metadata.allowReserved)); } else { items.add(String.format("%s%s%s", metadata.name, delimiter, Utils.valToString(val))); } } if (items.size() > 0) { - params.add(new BasicNameValuePair(queryParamsMetadata.name, String.join(delimiter, items))); + params.add(QueryParameter.of(queryParamsMetadata.name, String.join(delimiter, items), queryParamsMetadata.allowReserved)); } break; } default: - params.add(new BasicNameValuePair(queryParamsMetadata.name, Utils.valToString(value))); + params.add(QueryParameter.of(queryParamsMetadata.name, Utils.valToString(value), queryParamsMetadata.allowReserved)); break; } return params; } - private static List parseDeepObjectParams(QueryParamsMetadata queryParamsMetadata, Object value) + private static List parseDeepObjectParams(QueryParamsMetadata queryParamsMetadata, Object value) throws Exception { - List params = new ArrayList<>(); + List params = new ArrayList<>(); switch (Types.getType(value.getClass())) { case MAP: { @@ -188,12 +186,12 @@ private static List parseDeepObjectParams(QueryParamsMetadata que if (val instanceof List || val.getClass().isArray()) { for (Object v : Utils.toList(val)) { - params.add(new BasicNameValuePair(String.format("%s[%s]", queryParamsMetadata.name, key), - Utils.valToString(v))); + params.add(QueryParameter.of(String.format("%s[%s]", queryParamsMetadata.name, key), + Utils.valToString(v), queryParamsMetadata.allowReserved)); } } else { - params.add(new BasicNameValuePair(String.format("%s[%s]", queryParamsMetadata.name, key), - Utils.valToString(val))); + params.add(QueryParameter.of(String.format("%s[%s]", queryParamsMetadata.name, key), + Utils.valToString(val), queryParamsMetadata.allowReserved)); } } @@ -220,14 +218,14 @@ private static List parseDeepObjectParams(QueryParamsMetadata que if (val instanceof List || val.getClass().isArray()) { for (Object v : Utils.toList(val)) { - params.add(new BasicNameValuePair( + params.add(QueryParameter.of( String.format("%s[%s]", queryParamsMetadata.name, metadata.name), - Utils.valToString(v))); + Utils.valToString(v), metadata.allowReserved)); } } else { params.add( - new BasicNameValuePair(String.format("%s[%s]", queryParamsMetadata.name, metadata.name), - Utils.valToString(val))); + QueryParameter.of(String.format("%s[%s]", queryParamsMetadata.name, metadata.name), + Utils.valToString(val), metadata.allowReserved)); } } diff --git a/sync-for-commerce/src/main/java/io/codat/sync/commerce/utils/QueryParamsMetadata.java b/sync-for-commerce/src/main/java/io/codat/sync/commerce/utils/QueryParamsMetadata.java index ccd8bc17..a3c1ca6b 100644 --- a/sync-for-commerce/src/main/java/io/codat/sync/commerce/utils/QueryParamsMetadata.java +++ b/sync-for-commerce/src/main/java/io/codat/sync/commerce/utils/QueryParamsMetadata.java @@ -8,12 +8,14 @@ class QueryParamsMetadata { + // these parameters set via reflection + String style = "form"; boolean explode = true; String name; String serialization; + boolean allowReserved; - // queryParam:style=simple,explode=false,name=apiID static QueryParamsMetadata parse(Field field) throws IllegalArgumentException, IllegalAccessException { return Metadata.parse("queryParam", new QueryParamsMetadata(), field); } diff --git a/sync-for-commerce/src/main/java/io/codat/sync/commerce/utils/Security.java b/sync-for-commerce/src/main/java/io/codat/sync/commerce/utils/Security.java index a52870c1..18adcabd 100644 --- a/sync-for-commerce/src/main/java/io/codat/sync/commerce/utils/Security.java +++ b/sync-for-commerce/src/main/java/io/codat/sync/commerce/utils/Security.java @@ -5,6 +5,7 @@ package io.codat.sync.commerce.utils; import java.lang.reflect.Field; +import java.nio.charset.StandardCharsets; import java.util.Base64; public final class Security { @@ -107,7 +108,7 @@ private static void parseSecuritySchemeValue(HTTPRequest request, SecurityMetada break; case "query": request.addQueryParam( - securityMetadata.name, Utils.valToString(value)); + securityMetadata.name, Utils.valToString(value), false); break; case "cookie": request.addHeader("Cookie", @@ -122,7 +123,9 @@ private static void parseSecuritySchemeValue(HTTPRequest request, SecurityMetada request.addHeader(securityMetadata.name, Utils.prefixBearer(Utils.valToString(value))); break; case "oauth2": - request.addHeader(securityMetadata.name, Utils.prefixBearer(Utils.valToString(value))); + if (!"client_credentials".equals(schemeMetadata.subtype)) { + request.addHeader(securityMetadata.name, Utils.prefixBearer(Utils.valToString(value))); + } break; case "http": switch (schemeMetadata.subtype) { @@ -171,6 +174,9 @@ private static void parseBasicAuthScheme(HTTPRequest requestBuilder, Object sche } requestBuilder.addHeader("Authorization", - "Basic " + Base64.getEncoder().encodeToString(String.format("%s:%s", username, password).getBytes())); + "Basic " + + Base64.getEncoder() + .encodeToString(String.format("%s:%s", username, password) + .getBytes(StandardCharsets.UTF_8))); } } \ No newline at end of file diff --git a/sync-for-commerce/src/main/java/io/codat/sync/commerce/utils/TypedObject.java b/sync-for-commerce/src/main/java/io/codat/sync/commerce/utils/TypedObject.java index f593177e..a7699ceb 100644 --- a/sync-for-commerce/src/main/java/io/codat/sync/commerce/utils/TypedObject.java +++ b/sync-for-commerce/src/main/java/io/codat/sync/commerce/utils/TypedObject.java @@ -37,7 +37,12 @@ public TypeReference typeReference() { public JsonShape shape() { return shape; } - + + @Override + public String toString() { + return String.valueOf(value); + } + public static TypedObject of(T value, JsonShape shape, TypeReference typeReference) { return new TypedObject(value, shape, typeReference); } diff --git a/sync-for-commerce/src/main/java/io/codat/sync/commerce/utils/Utf8UrlEncoder.java b/sync-for-commerce/src/main/java/io/codat/sync/commerce/utils/Utf8UrlEncoder.java new file mode 100644 index 00000000..576fd9f0 --- /dev/null +++ b/sync-for-commerce/src/main/java/io/codat/sync/commerce/utils/Utf8UrlEncoder.java @@ -0,0 +1,117 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +package io.codat.sync.commerce.utils; + +import java.io.CharArrayWriter; +import java.nio.charset.Charset; +import java.nio.charset.StandardCharsets; +import java.util.BitSet; +import java.util.Objects; + +// Internal use only +// TODO move to an internal package +public final class Utf8UrlEncoder { + + private static final BitSet DO_NOT_ENCODE_CHARS = createDoNotEncodeChars(); + private static final int CASE_DIFF = ('a' - 'A'); + + private final BitSet safeChars; + + public static final Utf8UrlEncoder ALLOW_RESERVED = new Utf8UrlEncoder(":/?#[]@!$&'()*+,;="); + public static final Utf8UrlEncoder DEFAULT = new Utf8UrlEncoder(""); + + public static Utf8UrlEncoder allowReserved(boolean allowReserved) { + return allowReserved ? ALLOW_RESERVED : DEFAULT; + } + + private Utf8UrlEncoder(String safeCharacters) { + Objects.requireNonNull(safeCharacters, "safeCharacters"); + int max = -1; + for (int i = 0; i < safeCharacters.length(); i++) { + char ch = safeCharacters.charAt(i); + max = Math.max(ch, max); + } + BitSet safeChars = new BitSet(max + 1); + for (int i = 0; i < safeCharacters.length(); i++) { + char ch = safeCharacters.charAt(i); + safeChars.set(ch); + } + this.safeChars = safeChars; + } + + public String encode(String s) { + return encode(s, StandardCharsets.UTF_8); + } + + private String encode(String s, Charset charset) { + boolean changed = false; + StringBuilder out = new StringBuilder(s.length()); + CharArrayWriter writer = new CharArrayWriter(); + + for (int i = 0; i < s.length();) { + int c = (int) s.charAt(i); + if (DO_NOT_ENCODE_CHARS.get(c) || safeChars.get(c)) { + out.append((char) c); + i++; + } else { + // convert to external encoding before hex conversion + do { + writer.write(c); + if (c >= 0xD800 && c <= 0xDBFF) { + if ((i + 1) < s.length()) { + int d = (int) s.charAt(i + 1); + if (d >= 0xDC00 && d <= 0xDFFF) { + writer.write(d); + i++; + } + } + } + i++; + } while (i < s.length() && !DO_NOT_ENCODE_CHARS.get((c = (int) s.charAt(i)))); + + writer.flush(); + String str = new String(writer.toCharArray()); + byte[] ba = str.getBytes(charset); + for (int j = 0; j < ba.length; j++) { + out.append('%'); + char ch = Character.forDigit((ba[j] >> 4) & 0xF, 16); + // converting to use uppercase letter as part of + // the hex value if ch is a letter. + if (Character.isLetter(ch)) { + ch -= CASE_DIFF; + } + out.append(ch); + ch = Character.forDigit(ba[j] & 0xF, 16); + if (Character.isLetter(ch)) { + ch -= CASE_DIFF; + } + out.append(ch); + } + writer.reset(); + changed = true; + } + } + + return (changed ? out.toString() : s); + } + + private static BitSet createDoNotEncodeChars() { + BitSet b = new BitSet(256); + for (int i = 'a'; i <= 'z'; i++) { + b.set(i); + } + for (int i = 'A'; i <= 'Z'; i++) { + b.set(i); + } + for (int i = '0'; i <= '9'; i++) { + b.set(i); + } + b.set('-'); + b.set('_'); + b.set('.'); + b.set('*'); + return b; + } +} diff --git a/sync-for-commerce/src/main/java/io/codat/sync/commerce/utils/Utils.java b/sync-for-commerce/src/main/java/io/codat/sync/commerce/utils/Utils.java index 11c6c6f8..3e0443dc 100644 --- a/sync-for-commerce/src/main/java/io/codat/sync/commerce/utils/Utils.java +++ b/sync-for-commerce/src/main/java/io/codat/sync/commerce/utils/Utils.java @@ -4,9 +4,11 @@ package io.codat.sync.commerce.utils; -import java.io.InputStream; import java.io.ByteArrayInputStream; +import java.io.File; import java.io.IOException; +import java.io.InputStream; +import java.io.UncheckedIOException; import java.lang.reflect.Field; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; @@ -19,21 +21,26 @@ import java.net.http.HttpRequest; import java.net.http.HttpResponse; import java.nio.charset.StandardCharsets; +import java.nio.file.Files; +import java.nio.file.Paths; +import java.nio.file.StandardOpenOption; import java.time.LocalDate; import java.time.OffsetDateTime; import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; -import java.util.concurrent.Callable; -import java.util.function.BiPredicate; import java.util.HashMap; import java.util.Iterator; +import java.util.LinkedHashMap; import java.util.List; import java.util.Locale; import java.util.Map; import java.util.Map.Entry; import java.util.NoSuchElementException; import java.util.Optional; +import java.util.UUID; +import java.util.concurrent.Callable; +import java.util.function.BiPredicate; import java.util.regex.Matcher; import java.util.regex.Pattern; import java.util.stream.Collectors; @@ -44,7 +51,6 @@ import org.apache.commons.io.IOUtils; import org.apache.http.NameValuePair; - import org.openapitools.jackson.nullable.JsonNullable; import com.fasterxml.jackson.core.JsonProcessingException; @@ -137,7 +143,9 @@ public static String generateURL(Class type, String baseURL, String path, pathParams.put(pathParamsMetadata.name, String.join(",", - array.stream().map(v -> Utils.valToString(v)) + array.stream() + .map(v -> valToString(v)) + .map(v -> pathEncode(v, pathParamsMetadata.allowReserved)) .collect(Collectors.toList()))); break; case MAP: @@ -149,17 +157,17 @@ public static String generateURL(Class type, String baseURL, String path, pathParams.put(pathParamsMetadata.name, String.join(",", map.entrySet().stream().map(e -> { if (pathParamsMetadata.explode) { - return String.format("%s=%s", Utils.valToString(e.getKey()), - Utils.valToString(e.getValue())); + return String.format("%s=%s", pathEncode(valToString(e.getKey()), false), + pathEncode(valToString(e.getValue()), false)); } else { - return String.format("%s,%s", Utils.valToString(e.getKey()), - Utils.valToString(e.getValue())); + return String.format("%s,%s", pathEncode(valToString(e.getKey()), false), + pathEncode(valToString(e.getValue()), false)); } }).collect(Collectors.toList()))); break; case OBJECT: if (!allowIntrospection(value.getClass())) { - pathParams.put(pathParamsMetadata.name, Utils.valToString(value)); + pathParams.put(pathParamsMetadata.name, pathEncode(valToString(value), pathParamsMetadata.allowReserved)); break; } List values = new ArrayList<>(); @@ -180,17 +188,17 @@ public static String generateURL(Class type, String baseURL, String path, if (pathParamsMetadata.explode) { values.add(String.format("%s=%s", valuePathParamsMetadata.name, - Utils.valToString(val))); + pathEncode(valToString(val), valuePathParamsMetadata.allowReserved))); } else { values.add(String.format("%s,%s", valuePathParamsMetadata.name, - Utils.valToString(val))); + pathEncode(valToString(val), valuePathParamsMetadata.allowReserved))); } } pathParams.put(pathParamsMetadata.name, String.join(",", values)); break; default: - pathParams.put(pathParamsMetadata.name, Utils.valToString(value)); + pathParams.put(pathParamsMetadata.name, pathEncode(valToString(value), pathParamsMetadata.allowReserved)); break; } } @@ -199,6 +207,10 @@ public static String generateURL(Class type, String baseURL, String path, return baseURL + templateUrl(path, pathParams); } + + private static String pathEncode(String s, boolean allowReserved) { + return Utf8UrlEncoder.allowReserved(allowReserved).encode(s); + } public static boolean contentTypeMatches(String contentType, String pattern) { if (contentType == null || contentType.isBlank()) { @@ -249,7 +261,7 @@ public static SerializedBody serializeRequestBody(Object request, String request return RequestBody.serialize(request, requestField, serializationMethod, nullable); } - public static List getQueryParams(Class type, Optional params, + public static List getQueryParams(Class type, Optional params, Map>> globals) throws Exception { if (params.isEmpty()) { return Collections.emptyList(); @@ -258,7 +270,7 @@ public static List getQueryParams(Class typ } } - public static List getQueryParams(Class type, JsonNullable params, + public static List getQueryParams(Class type, JsonNullable params, Map>> globals) throws Exception { if (!params.isPresent() || params.get() == null) { return Collections.emptyList(); @@ -267,7 +279,7 @@ public static List getQueryParams(Class typ } } - public static List getQueryParams(Class type, T params, + public static List getQueryParams(Class type, T params, Map>> globals) throws Exception { return QueryParameters.parseQueryParams(type, params, globals); } @@ -275,6 +287,8 @@ public static List getQueryParams(Class typ public static HTTPRequest configureSecurity(HTTPRequest request, Object security) throws Exception { return Security.configureSecurity(request, security); } + + private static final String DOLLAR_MARKER = "D9qPtyhOYzkHGu3c"; public static String templateUrl(String url, Map params) { StringBuilder sb = new StringBuilder(); @@ -287,12 +301,16 @@ public static String templateUrl(String url, Map params) { String key = match.substring(1, match.length() - 1); String value = params.get(key); if (value != null) { - m.appendReplacement(sb, value); + // note that we replace $ characters in values with a marker + // and then replace the markers at the end with the $ characters + // because the presence of dollar signs can stuff up the next + // regex find + m.appendReplacement(sb, value.replace("$", DOLLAR_MARKER)); } } m.appendTail(sb); - return sb.toString(); + return sb.toString().replace(DOLLAR_MARKER, "$"); } public static Map> getHeadersFromMetadata(Object headers, Map>> globals) throws Exception { @@ -344,10 +362,10 @@ public static Map> getHeadersFromMetadata(Object headers, M if (headerMetadata.explode) { items.add( String.format("%s=%s", valueHeaderMetadata.name, - Utils.valToString(valueFieldValue))); + valToString(valueFieldValue))); } else { items.add(valueHeaderMetadata.name); - items.add(Utils.valToString(valueFieldValue)); + items.add(valToString(valueFieldValue)); } } @@ -370,11 +388,11 @@ public static Map> getHeadersFromMetadata(Object headers, M for (Map.Entry entry : map.entrySet()) { if (headerMetadata.explode) { - items.add(String.format("%s=%s", Utils.valToString(entry.getKey()), - Utils.valToString(entry.getValue()))); + items.add(String.format("%s=%s", valToString(entry.getKey()), + valToString(entry.getValue()))); } else { - items.add(Utils.valToString(entry.getKey())); - items.add(Utils.valToString(entry.getValue())); + items.add(valToString(entry.getKey())); + items.add(valToString(entry.getValue())); } } @@ -397,7 +415,7 @@ public static Map> getHeadersFromMetadata(Object headers, M List items = new ArrayList<>(); for (Object item : array) { - items.add(Utils.valToString(item)); + items.add(valToString(item)); } if (!result.containsKey(headerMetadata.name)) { @@ -415,7 +433,7 @@ public static Map> getHeadersFromMetadata(Object headers, M } List values = result.get(headerMetadata.name); - values.add(Utils.valToString(value)); + values.add(valToString(value)); break; } } @@ -425,17 +443,16 @@ public static Map> getHeadersFromMetadata(Object headers, M } public static String valToString(Object value) { - switch (Types.getType(value.getClass())) { - case ENUM: - try { - Field field = value.getClass().getDeclaredField("value"); - field.setAccessible(true); - return String.valueOf(field.get(value)); - } catch (Exception e) { - return "ERROR_UNKNOWN_VALUE"; - } - default: - return String.valueOf(resolveOptionals(value)); + if (value.getClass().isEnum()) { + try { + Field field = value.getClass().getDeclaredField("value"); + field.setAccessible(true); + return String.valueOf(field.get(value)); + } catch (IllegalArgumentException | IllegalAccessException | NoSuchFieldException | SecurityException e) { + return "ERROR_UNKNOWN_VALUE"; + } + } else { + return String.valueOf(resolveOptionals(value)); } } @@ -464,16 +481,15 @@ public static Object populateGlobal(Object value, String fieldName, String param private static Map parseSerializedParams(PathParamsMetadata pathParamsMetadata, Object value) throws JsonProcessingException { Map params = new HashMap<>(); - switch (pathParamsMetadata.serialization) { case "json": ObjectMapper mapper = JSON.getMapper(); String json = mapper.writeValueAsString(value); - - params.put(pathParamsMetadata.name, URLEncoder.encode(json, StandardCharsets.UTF_8)); + params.put(pathParamsMetadata.name, pathEncode(json, pathParamsMetadata.allowReserved)); + break; + default: break; } - return params; } @@ -961,7 +977,7 @@ public static final class HttpResponseCached implements HttpResponse response) throws IOException { this.response = response; - this.bytes = Utils.toByteArrayAndClose(response.body()); + this.bytes = toByteArrayAndClose(response.body()); } public String bodyAsUtf8() { @@ -1050,4 +1066,130 @@ public static String discriminatorToString(Object o) { return (String) o; } } + + public static void recordTest(String id) { + try { + new File("build").mkdir(); + Files.writeString(Paths.get("build/test-javav2-record.txt"), id + "\n", StandardOpenOption.CREATE, + StandardOpenOption.APPEND); + } catch (IOException e) { + throw new UncheckedIOException(e); + } + } + + /** + * Returns an equivalent url with query parameters sorted by name. Sort is + * stable in that parameters with the same name will not be reordered. + * + * @param url input + * @return url with query parameters sorted by name + */ + public static String sortQueryParameters(String url) { + if (url == null || url.isBlank()) { + return ""; + } + String[] parts = url.split("\\?"); + if (parts.length == 1) { + return url; + } + String query = parts[1]; + String[] params = query.split("&"); + sortByDelimitedKey(params, "="); + return parts[0] + "?" + Arrays.stream(params).collect(Collectors.joining("&")); + } + + public static Object sortSerializedMaps(Object input, String regex, String delim) { + if (input == null) { + return input; + } else if (input instanceof String) { + return sortMapString((String) input, regex, delim); + } else if (input.getClass().isArray()) { + Object[] a = (Object[]) input; + String[] b = new String[a.length]; + for (int i = 0; i < a.length; i++) { + if (!(a[i] instanceof String)) { + throw new IllegalArgumentException("expected array item type of String, found " + a[i]); + } + b[i] = sortMapString((String) a[i], regex, delim); + } + return b; + } else if (input instanceof Map) { + @SuppressWarnings("unchecked") + Map a = (Map) input; + Map b = new LinkedHashMap<>(); + for (Entry entry: a.entrySet()) { + if (!(entry.getKey() instanceof String)) { + throw new IllegalArgumentException("expected map key type of String, found " + entry.getKey()); + } + if (!(entry.getValue() instanceof String)) { + throw new IllegalArgumentException("expected map value type of String, found " + entry.getValue()); + } + b.put((String) entry.getKey(), sortMapString((String) entry.getValue(), regex, delim)); + } + return b; + } else { + throw new IllegalArgumentException("unexpected type: " + input.getClass()); + } + } + + private static String sortMapString(String input, String regex, String delim) { + return Pattern.compile(regex).matcher(input).replaceAll(m -> { + String escapedDelim = Pattern.quote(delim); + String result = m.group(); + for (int i = 1; i <= m.groupCount(); i++) { + final String match = m.group(i); + String[] pairs; + if (match.contains("=")) { + pairs = match.split(escapedDelim); + sortByDelimitedKey(pairs, "="); + } else { + String[] values = match.split(escapedDelim); + if (values.length == 1) { + pairs = values; + } else { + pairs = new String[values.length / 2]; + for (int j = 0; j < values.length; j += 2) { + pairs[j / 2] = values[j] + delim + values[j + 1]; + } + } + sortByDelimitedKey(pairs, delim); + } + String joined = Arrays.stream(pairs).collect(Collectors.joining(delim)); + result = result.replace(m.group(i), joined); + } + return result; + }); + } + + private static void sortByDelimitedKey(String[] array, String delim) { + Arrays.sort(array, (a, b) -> { + String escapedDelim = Pattern.quote(delim); + String aKey = a.split(escapedDelim)[0]; + String bKey = b.split(escapedDelim)[0]; + return aKey.compareTo(bKey); + }); + } + + public static boolean isPresentAndNotNull(Optional x) { + return x.isPresent(); + } + + public static boolean isPresentAndNotNull(JsonNullable x) { + return x.isPresent() && x.get() != null; + } + + public static void setSseSentinel(Object o, String value) { + if (o == null || value.isBlank()) { + return; + } else { + try { + Field field = o.getClass().getDeclaredField("_eventSentinel"); + field.setAccessible(true); + field.set(o, Optional.of(value)); + } catch (NoSuchFieldException | SecurityException | IllegalArgumentException | IllegalAccessException e) { + // ignore + } + } + } + }