diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index 4f56c3fa..2b8efe16 100644 --- a/.speakeasy/gen.lock +++ b/.speakeasy/gen.lock @@ -1,12 +1,12 @@ lockVersion: 2.0.0 id: fca0ac3a-5f4e-452c-bbc7-2311afa8da40 management: - docChecksum: ef5888e0e7ebc9d485e3cff4f84a7ef6 + docChecksum: 001d1bac02fbcd5740dcdb0621d601a6 docVersion: 10.16.5 - speakeasyVersion: 1.543.1 - generationVersion: 2.598.21 - releaseVersion: 0.14.1 - configChecksum: 21970d7463647e253f74bbf29670cafe + speakeasyVersion: 1.545.0 + generationVersion: 2.599.0 + releaseVersion: 0.15.0 + configChecksum: e25780610d07b4ca0de0be971c1ad26a repoURL: https://github.com/apideck-libraries/sdk-python.git installationURL: https://github.com/apideck-libraries/sdk-python.git published: true @@ -15,7 +15,7 @@ features: acceptHeaders: 3.0.0 additionalDependencies: 1.0.0 constsAndDefaults: 1.0.5 - core: 5.17.1 + core: 5.18.0 deepObjectParams: 0.1.0 defaultEnabledRetries: 0.2.0 deprecations: 3.0.2 @@ -29,7 +29,7 @@ features: globalSecurity: 3.0.3 globalSecurityCallbacks: 1.0.0 globalSecurityFlattening: 1.0.0 - globalServerURLs: 3.1.0 + globalServerURLs: 3.1.1 globals: 3.0.0 groups: 3.0.0 inputOutputModels: 3.0.0 @@ -76,6 +76,36 @@ generatedFiles: - docs/models/accountingbalancesheetoneglobals.md - docs/models/accountingbalancesheetonerequest.md - docs/models/accountingbalancesheetoneresponse.md + - docs/models/accountingbankfeedaccountsaddglobals.md + - docs/models/accountingbankfeedaccountsaddrequest.md + - docs/models/accountingbankfeedaccountsaddresponse.md + - docs/models/accountingbankfeedaccountsallglobals.md + - docs/models/accountingbankfeedaccountsallrequest.md + - docs/models/accountingbankfeedaccountsallresponse.md + - docs/models/accountingbankfeedaccountsdeleteglobals.md + - docs/models/accountingbankfeedaccountsdeleterequest.md + - docs/models/accountingbankfeedaccountsdeleteresponse.md + - docs/models/accountingbankfeedaccountsoneglobals.md + - docs/models/accountingbankfeedaccountsonerequest.md + - docs/models/accountingbankfeedaccountsoneresponse.md + - docs/models/accountingbankfeedaccountsupdateglobals.md + - docs/models/accountingbankfeedaccountsupdaterequest.md + - docs/models/accountingbankfeedaccountsupdateresponse.md + - docs/models/accountingbankfeedstatementsaddglobals.md + - docs/models/accountingbankfeedstatementsaddrequest.md + - docs/models/accountingbankfeedstatementsaddresponse.md + - docs/models/accountingbankfeedstatementsallglobals.md + - docs/models/accountingbankfeedstatementsallrequest.md + - docs/models/accountingbankfeedstatementsallresponse.md + - docs/models/accountingbankfeedstatementsdeleteglobals.md + - docs/models/accountingbankfeedstatementsdeleterequest.md + - docs/models/accountingbankfeedstatementsdeleteresponse.md + - docs/models/accountingbankfeedstatementsoneglobals.md + - docs/models/accountingbankfeedstatementsonerequest.md + - docs/models/accountingbankfeedstatementsoneresponse.md + - docs/models/accountingbankfeedstatementsupdateglobals.md + - docs/models/accountingbankfeedstatementsupdaterequest.md + - docs/models/accountingbankfeedstatementsupdateresponse.md - docs/models/accountingbillpaymentsaddglobals.md - docs/models/accountingbillpaymentsaddrequest.md - docs/models/accountingbillpaymentsaddresponse.md @@ -432,6 +462,12 @@ generatedFiles: - docs/models/balancesheetliabilitiesaccount.md - docs/models/balancesheetuncategorizeditemsaccount.md - docs/models/bankaccount.md + - docs/models/bankaccounttype.md + - docs/models/bankfeedaccount.md + - docs/models/bankfeedaccountinput.md + - docs/models/bankfeedstatement.md + - docs/models/bankfeedstatementinput.md + - docs/models/bankfeedstatementtransactiontype.md - docs/models/benefit.md - docs/models/bill.md - docs/models/billinput.md @@ -537,6 +573,8 @@ generatedFiles: - docs/models/createapplicantresponse.md - docs/models/createapplicationresponse.md - docs/models/createattachmentresponse.md + - docs/models/createbankfeedaccountresponse.md + - docs/models/createbankfeedstatementresponse.md - docs/models/createbillpaymentresponse.md - docs/models/createbillresponse.md - docs/models/createcallbackstate.md @@ -590,6 +628,7 @@ generatedFiles: - docs/models/creditnotessortby.md - docs/models/creditnotestatus.md - docs/models/creditnotetype.md + - docs/models/creditordebit.md - docs/models/crmactivitiesaddglobals.md - docs/models/crmactivitiesaddrequest.md - docs/models/crmactivitiesaddresponse.md @@ -734,6 +773,8 @@ generatedFiles: - docs/models/deleteapplicantresponse.md - docs/models/deleteapplicationresponse.md - docs/models/deleteattachmentresponse.md + - docs/models/deletebankfeedaccountresponse.md + - docs/models/deletebankfeedstatementresponse.md - docs/models/deletebillpaymentresponse.md - docs/models/deletebillresponse.md - docs/models/deletecommentresponse.md @@ -855,6 +896,7 @@ generatedFiles: - docs/models/expensesmodel.md - docs/models/expensetype.md - docs/models/extendpaths.md + - docs/models/feedstatus.md - docs/models/filesfilter.md - docs/models/filessearch.md - docs/models/filessort.md @@ -988,6 +1030,10 @@ generatedFiles: - docs/models/getattachmentresponse.md - docs/models/getattachmentsresponse.md - docs/models/getbalancesheetresponse.md + - docs/models/getbankfeedaccountresponse.md + - docs/models/getbankfeedaccountsresponse.md + - docs/models/getbankfeedstatementresponse.md + - docs/models/getbankfeedstatementsresponse.md - docs/models/getbillpaymentresponse.md - docs/models/getbillpaymentsresponse.md - docs/models/getbillresponse.md @@ -1405,6 +1451,7 @@ generatedFiles: - docs/models/sortdirection.md - docs/models/stage.md - docs/models/stages.md + - docs/models/statementstatus.md - docs/models/status.md - docs/models/subaccounts.md - docs/models/subscriptionlevel.md @@ -1445,6 +1492,7 @@ generatedFiles: - docs/models/trackingcategorystatus.md - docs/models/trackingcategorysubsidiaries.md - docs/models/trackingitem.md + - docs/models/transactions.md - docs/models/transactiontype.md - docs/models/type.md - docs/models/unauthorizedresponse.md @@ -1465,6 +1513,8 @@ generatedFiles: - docs/models/updateactivityresponse.md - docs/models/updateapplicantresponse.md - docs/models/updateapplicationresponse.md + - docs/models/updatebankfeedaccountresponse.md + - docs/models/updatebankfeedstatementresponse.md - docs/models/updatebillpaymentresponse.md - docs/models/updatebillresponse.md - docs/models/updatecommentresponse.md @@ -1630,6 +1680,8 @@ generatedFiles: - docs/sdks/ats/README.md - docs/sdks/attachments/README.md - docs/sdks/balancesheetsdk/README.md + - docs/sdks/bankfeedaccounts/README.md + - docs/sdks/bankfeedstatements/README.md - docs/sdks/billpayments/README.md - docs/sdks/bills/README.md - docs/sdks/collections/README.md @@ -1728,6 +1780,8 @@ generatedFiles: - src/apideck_unify/ats.py - src/apideck_unify/attachments.py - src/apideck_unify/balancesheet_sdk.py + - src/apideck_unify/bankfeedaccounts.py + - src/apideck_unify/bankfeedstatements.py - src/apideck_unify/basesdk.py - src/apideck_unify/billpayments.py - src/apideck_unify/bills.py @@ -1787,6 +1841,16 @@ generatedFiles: - src/apideck_unify/models/accounting_attachmentsoneop.py - src/apideck_unify/models/accounting_attachmentsuploadop.py - src/apideck_unify/models/accounting_balancesheetoneop.py + - src/apideck_unify/models/accounting_bankfeedaccountsaddop.py + - src/apideck_unify/models/accounting_bankfeedaccountsallop.py + - src/apideck_unify/models/accounting_bankfeedaccountsdeleteop.py + - src/apideck_unify/models/accounting_bankfeedaccountsoneop.py + - src/apideck_unify/models/accounting_bankfeedaccountsupdateop.py + - src/apideck_unify/models/accounting_bankfeedstatementsaddop.py + - src/apideck_unify/models/accounting_bankfeedstatementsallop.py + - src/apideck_unify/models/accounting_bankfeedstatementsdeleteop.py + - src/apideck_unify/models/accounting_bankfeedstatementsoneop.py + - src/apideck_unify/models/accounting_bankfeedstatementsupdateop.py - src/apideck_unify/models/accounting_billpaymentsaddop.py - src/apideck_unify/models/accounting_billpaymentsallop.py - src/apideck_unify/models/accounting_billpaymentsdeleteop.py @@ -1920,6 +1984,8 @@ generatedFiles: - src/apideck_unify/models/balancesheet.py - src/apideck_unify/models/balancesheetfilter.py - src/apideck_unify/models/bankaccount.py + - src/apideck_unify/models/bankfeedaccount.py + - src/apideck_unify/models/bankfeedstatement.py - src/apideck_unify/models/benefit.py - src/apideck_unify/models/bill.py - src/apideck_unify/models/billlineitem.py @@ -1972,6 +2038,8 @@ generatedFiles: - src/apideck_unify/models/createapplicantresponse.py - src/apideck_unify/models/createapplicationresponse.py - src/apideck_unify/models/createattachmentresponse.py + - src/apideck_unify/models/createbankfeedaccountresponse.py + - src/apideck_unify/models/createbankfeedstatementresponse.py - src/apideck_unify/models/createbillpaymentresponse.py - src/apideck_unify/models/createbillresponse.py - src/apideck_unify/models/createcallbackstate.py @@ -2018,6 +2086,7 @@ generatedFiles: - src/apideck_unify/models/creditnote.py - src/apideck_unify/models/creditnotesfilter.py - src/apideck_unify/models/creditnotessort.py + - src/apideck_unify/models/creditordebit.py - src/apideck_unify/models/crm_activitiesaddop.py - src/apideck_unify/models/crm_activitiesallop.py - src/apideck_unify/models/crm_activitiesdeleteop.py @@ -2074,6 +2143,8 @@ generatedFiles: - src/apideck_unify/models/deleteapplicantresponse.py - src/apideck_unify/models/deleteapplicationresponse.py - src/apideck_unify/models/deleteattachmentresponse.py + - src/apideck_unify/models/deletebankfeedaccountresponse.py + - src/apideck_unify/models/deletebankfeedstatementresponse.py - src/apideck_unify/models/deletebillpaymentresponse.py - src/apideck_unify/models/deletebillresponse.py - src/apideck_unify/models/deletecommentresponse.py @@ -2211,6 +2282,10 @@ generatedFiles: - src/apideck_unify/models/getattachmentresponse.py - src/apideck_unify/models/getattachmentsresponse.py - src/apideck_unify/models/getbalancesheetresponse.py + - src/apideck_unify/models/getbankfeedaccountresponse.py + - src/apideck_unify/models/getbankfeedaccountsresponse.py + - src/apideck_unify/models/getbankfeedstatementresponse.py + - src/apideck_unify/models/getbankfeedstatementsresponse.py - src/apideck_unify/models/getbillpaymentresponse.py - src/apideck_unify/models/getbillpaymentsresponse.py - src/apideck_unify/models/getbillresponse.py @@ -2486,6 +2561,8 @@ generatedFiles: - src/apideck_unify/models/updateactivityresponse.py - src/apideck_unify/models/updateapplicantresponse.py - src/apideck_unify/models/updateapplicationresponse.py + - src/apideck_unify/models/updatebankfeedaccountresponse.py + - src/apideck_unify/models/updatebankfeedstatementresponse.py - src/apideck_unify/models/updatebillpaymentresponse.py - src/apideck_unify/models/updatebillresponse.py - src/apideck_unify/models/updatecommentresponse.py @@ -9721,5 +9798,273 @@ examples: application/json: {"status_code": 422, "error": "Unprocessable Entity", "type_name": "InvalidStateError", "message": "Invalid State", "detail": {"error": "Unprocessable", "message": "Unprocessable request, please verify your request headers and body."}, "ref": "https://developers.apideck.com/errors#invalidstateerror"} default: application/json: {"status_code": 400, "error": "Bad Request", "type_name": "RequestHeadersValidationError", "message": "Invalid Params", "detail": "Missing Header: x-apideck-consumer-id", "ref": "https://developers.apideck.com/errors#unauthorizederror"} + accounting.bankFeedAccountsAll: + "": + parameters: + query: + raw: false + limit: 20 + pass_through: {"search": "San Francisco"} + fields: "id,updated_at" + header: + x-apideck-consumer-id: "test-consumer" + x-apideck-app-id: "dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX" + x-apideck-service-id: "salesforce" + responses: + "200": + application/json: {"status_code": 200, "status": "OK", "service": "quickbooks", "resource": "bank-feed-accounts", "operation": "all", "data": [{"id": "12345", "bank_account_type": "bank", "source_account_id": "src_456", "target_account_id": "tgt_789", "target_account_name": "Main Company Checking", "target_account_number": "NL91ABNA0417164300", "currency": "USD", "feed_status": "pending", "country": "US", "custom_fields": [{"id": "2389328923893298", "name": "employee_level", "description": "Employee Level", "value": []}, {"id": "2389328923893298", "name": "employee_level", "description": "Employee Level", "value": 10}], "created_at": "2020-09-30T07:43:32.000Z", "updated_at": "2020-09-30T07:43:32.000Z", "updated_by": "12345", "created_by": "12345"}, {"id": "12345", "bank_account_type": "bank", "source_account_id": "src_456", "target_account_id": "tgt_789", "target_account_name": "Main Company Checking", "target_account_number": "NL91ABNA0417164300", "currency": "USD", "feed_status": "pending", "country": "US", "custom_fields": [{"id": "2389328923893298", "name": "employee_level", "description": "Employee Level", "value": {}}], "created_at": "2020-09-30T07:43:32.000Z", "updated_at": "2020-09-30T07:43:32.000Z", "updated_by": "12345", "created_by": "12345"}, {"id": "12345", "bank_account_type": "bank", "source_account_id": "src_456", "target_account_id": "tgt_789", "target_account_name": "Main Company Checking", "target_account_number": "NL91ABNA0417164300", "currency": "USD", "feed_status": "pending", "country": "US", "custom_fields": [{"id": "2389328923893298", "name": "employee_level", "description": "Employee Level", "value": "Uses Salesforce and Marketo"}, {"id": "2389328923893298", "name": "employee_level", "description": "Employee Level", "value": []}], "created_at": "2020-09-30T07:43:32.000Z", "updated_at": "2020-09-30T07:43:32.000Z", "updated_by": "12345", "created_by": "12345"}], "meta": {"items_on_page": 50, "cursors": {"previous": "em9oby1jcm06OnBhZ2U6OjE=", "current": "em9oby1jcm06OnBhZ2U6OjI=", "next": "em9oby1jcm06OnBhZ2U6OjM="}}, "links": {"previous": "https://unify.apideck.com/crm/companies?cursor=em9oby1jcm06OnBhZ2U6OjE%3D", "current": "https://unify.apideck.com/crm/companies", "next": "https://unify.apideck.com/crm/companies?cursor=em9oby1jcm06OnBhZ2U6OjM"}} + "400": + application/json: {"status_code": 400, "error": "Bad Request", "type_name": "RequestValidationError", "message": "Invalid Params", "detail": "Missing property foobar", "ref": "https://developers.apideck.com/errors#requestvalidationerror"} + "401": + application/json: {"status_code": 401, "error": "Unauthorized", "type_name": "UnauthorizedError", "message": "Unauthorized Request", "detail": {"statusCode": 401, "error": "Unauthorized", "message": "Missing authentication"}, "ref": "https://developers.apideck.com/errors#unauthorizederror"} + "402": + application/json: {"status_code": 402, "error": "Payment Required", "type_name": "RequestLimitError", "message": "Request Limit Reached", "detail": "You have reached your limit of 2000", "ref": "https://developers.apideck.com/errors#requestlimiterror"} + "404": + application/json: {"status_code": 404, "error": "Not Found", "type_name": "EntityNotFoundError", "message": "Unknown Widget", "detail": {"not_found": {"entity": "widget", "id": "123"}}, "ref": "https://developers.apideck.com/errors#entitynotfounderror"} + "422": + application/json: {"status_code": 422, "error": "Unprocessable Entity", "type_name": "InvalidStateError", "message": "Invalid State", "detail": {"error": "Unprocessable", "message": "Unprocessable request, please verify your request headers and body."}, "ref": "https://developers.apideck.com/errors#invalidstateerror"} + default: + application/json: {"status_code": 400, "error": "Bad Request", "type_name": "RequestHeadersValidationError", "message": "Invalid Params", "detail": "Missing Header: x-apideck-consumer-id", "ref": "https://developers.apideck.com/errors#unauthorizederror"} + accounting.bankFeedAccountsAdd: + "": + parameters: + query: + raw: false + header: + x-apideck-consumer-id: "test-consumer" + x-apideck-app-id: "dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX" + x-apideck-service-id: "salesforce" + requestBody: + application/json: {"bank_account_type": "bank", "source_account_id": "src_456", "target_account_id": "tgt_789", "target_account_name": "Main Company Checking", "target_account_number": "NL91ABNA0417164300", "currency": "USD", "feed_status": "pending", "country": "US", "custom_fields": [{"id": "2389328923893298", "name": "employee_level", "description": "Employee Level", "value": {}}, {"id": "2389328923893298", "name": "employee_level", "description": "Employee Level", "value": true}]} + responses: + "201": + application/json: {"status_code": 200, "status": "OK", "service": "xero", "resource": "bills", "operation": "add", "data": {"id": "12345"}} + "400": + application/json: {"status_code": 400, "error": "Bad Request", "type_name": "RequestValidationError", "message": "Invalid Params", "detail": "Missing property foobar", "ref": "https://developers.apideck.com/errors#requestvalidationerror"} + "401": + application/json: {"status_code": 401, "error": "Unauthorized", "type_name": "UnauthorizedError", "message": "Unauthorized Request", "detail": "Missing authentication", "ref": "https://developers.apideck.com/errors#unauthorizederror"} + "402": + application/json: {"status_code": 402, "error": "Payment Required", "type_name": "RequestLimitError", "message": "Request Limit Reached", "detail": "You have reached your limit of 2000", "ref": "https://developers.apideck.com/errors#requestlimiterror"} + "404": + application/json: {"status_code": 404, "error": "Not Found", "type_name": "EntityNotFoundError", "message": "Unknown Widget", "detail": {"not_found": {"entity": "widget", "id": "123"}}, "ref": "https://developers.apideck.com/errors#entitynotfounderror"} + "422": + application/json: {"status_code": 422, "error": "Unprocessable Entity", "type_name": "InvalidStateError", "message": "Invalid State", "detail": {"error": "Unprocessable", "message": "Unprocessable request, please verify your request headers and body."}, "ref": "https://developers.apideck.com/errors#invalidstateerror"} + default: + application/json: {"status_code": 400, "error": "Bad Request", "type_name": "RequestHeadersValidationError", "message": "Invalid Params", "detail": "Missing Header: x-apideck-consumer-id", "ref": "https://developers.apideck.com/errors#unauthorizederror"} + accounting.bankFeedAccountsOne: + "": + parameters: + path: + id: "" + query: + raw: false + fields: "id,updated_at" + header: + x-apideck-consumer-id: "test-consumer" + x-apideck-app-id: "dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX" + x-apideck-service-id: "salesforce" + responses: + "200": + application/json: {"status_code": 200, "status": "OK", "service": "quickbooks", "resource": "bank-feed-accounts", "operation": "one", "data": {"id": "12345", "bank_account_type": "bank", "source_account_id": "src_456", "target_account_id": "tgt_789", "target_account_name": "Main Company Checking", "target_account_number": "NL91ABNA0417164300", "currency": "USD", "feed_status": "pending", "country": "US", "custom_fields": [{"id": "2389328923893298", "name": "employee_level", "description": "Employee Level", "value": {}}, {"id": "2389328923893298", "name": "employee_level", "description": "Employee Level", "value": {}}, {"id": "2389328923893298", "name": "employee_level", "description": "Employee Level", "value": {}}], "created_at": "2020-09-30T07:43:32.000Z", "updated_at": "2020-09-30T07:43:32.000Z", "updated_by": "12345", "created_by": "12345"}} + "400": + application/json: {"status_code": 400, "error": "Bad Request", "type_name": "RequestValidationError", "message": "Invalid Params", "detail": {"missing": [{"foobar": "required"}]}, "ref": "https://developers.apideck.com/errors#requestvalidationerror"} + "401": + application/json: {"status_code": 401, "error": "Unauthorized", "type_name": "UnauthorizedError", "message": "Unauthorized Request", "detail": "Missing authentication", "ref": "https://developers.apideck.com/errors#unauthorizederror"} + "402": + application/json: {"status_code": 402, "error": "Payment Required", "type_name": "RequestLimitError", "message": "Request Limit Reached", "detail": "You have reached your limit of 2000", "ref": "https://developers.apideck.com/errors#requestlimiterror"} + "404": + application/json: {"status_code": 404, "error": "Not Found", "type_name": "EntityNotFoundError", "message": "Unknown Widget", "detail": "Could not find widget with id: '123'", "ref": "https://developers.apideck.com/errors#entitynotfounderror"} + "422": + application/json: {"status_code": 422, "error": "Unprocessable Entity", "type_name": "InvalidStateError", "message": "Invalid State", "detail": "Unprocessable request, please verify your request headers and body.", "ref": "https://developers.apideck.com/errors#invalidstateerror"} + default: + application/json: {"status_code": 400, "error": "Bad Request", "type_name": "RequestHeadersValidationError", "message": "Invalid Params", "detail": "Missing Header: x-apideck-consumer-id", "ref": "https://developers.apideck.com/errors#unauthorizederror"} + accounting.bankFeedAccountsUpdate: + "": + parameters: + path: + id: "" + query: + raw: false + header: + x-apideck-consumer-id: "test-consumer" + x-apideck-app-id: "dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX" + x-apideck-service-id: "salesforce" + requestBody: + application/json: {"bank_account_type": "bank", "source_account_id": "src_456", "target_account_id": "tgt_789", "target_account_name": "Main Company Checking", "target_account_number": "NL91ABNA0417164300", "currency": "USD", "feed_status": "pending", "country": "US", "custom_fields": [{"id": "2389328923893298", "name": "employee_level", "description": "Employee Level", "value": {}}, {"id": "2389328923893298", "name": "employee_level", "description": "Employee Level", "value": true}, {"id": "2389328923893298", "name": "employee_level", "description": "Employee Level", "value": [{}, {}]}]} + responses: + "200": + application/json: {"status_code": 200, "status": "OK", "service": "quickbooks", "resource": "bank-feed-accounts", "operation": "update", "data": {"id": "12345"}} + "400": + application/json: {"status_code": 400, "error": "Bad Request", "type_name": "RequestValidationError", "message": "Invalid Params", "detail": "Missing property foobar", "ref": "https://developers.apideck.com/errors#requestvalidationerror"} + "401": + application/json: {"status_code": 401, "error": "Unauthorized", "type_name": "UnauthorizedError", "message": "Unauthorized Request", "detail": {"statusCode": 401, "error": "Unauthorized", "message": "Missing authentication"}, "ref": "https://developers.apideck.com/errors#unauthorizederror"} + "402": + application/json: {"status_code": 402, "error": "Payment Required", "type_name": "RequestLimitError", "message": "Request Limit Reached", "detail": "You have reached your limit of 2000", "ref": "https://developers.apideck.com/errors#requestlimiterror"} + "404": + application/json: {"status_code": 404, "error": "Not Found", "type_name": "EntityNotFoundError", "message": "Unknown Widget", "detail": "Could not find widget with id: '123'", "ref": "https://developers.apideck.com/errors#entitynotfounderror"} + "422": + application/json: {"status_code": 422, "error": "Unprocessable Entity", "type_name": "InvalidStateError", "message": "Invalid State", "detail": {"error": "Unprocessable", "message": "Unprocessable request, please verify your request headers and body."}, "ref": "https://developers.apideck.com/errors#invalidstateerror"} + default: + application/json: {"status_code": 400, "error": "Bad Request", "type_name": "RequestHeadersValidationError", "message": "Invalid Params", "detail": "Missing Header: x-apideck-consumer-id", "ref": "https://developers.apideck.com/errors#unauthorizederror"} + accounting.bankFeedAccountsDelete: + "": + parameters: + path: + id: "" + query: + raw: false + header: + x-apideck-consumer-id: "test-consumer" + x-apideck-app-id: "dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX" + x-apideck-service-id: "salesforce" + responses: + "200": + application/json: {"status_code": 200, "status": "OK", "service": "quickbooks", "resource": "bank-feed-accounts", "operation": "delete", "data": {"id": "12345"}} + "400": + application/json: {"status_code": 400, "error": "Bad Request", "type_name": "RequestValidationError", "message": "Invalid Params", "detail": {"missing": [{"foobar": "required"}]}, "ref": "https://developers.apideck.com/errors#requestvalidationerror"} + "401": + application/json: {"status_code": 401, "error": "Unauthorized", "type_name": "UnauthorizedError", "message": "Unauthorized Request", "detail": {"statusCode": 401, "error": "Unauthorized", "message": "Missing authentication"}, "ref": "https://developers.apideck.com/errors#unauthorizederror"} + "402": + application/json: {"status_code": 402, "error": "Payment Required", "type_name": "RequestLimitError", "message": "Request Limit Reached", "detail": "You have reached your limit of 2000", "ref": "https://developers.apideck.com/errors#requestlimiterror"} + "404": + application/json: {"status_code": 404, "error": "Not Found", "type_name": "EntityNotFoundError", "message": "Unknown Widget", "detail": "Could not find widget with id: '123'", "ref": "https://developers.apideck.com/errors#entitynotfounderror"} + "422": + application/json: {"status_code": 422, "error": "Unprocessable Entity", "type_name": "InvalidStateError", "message": "Invalid State", "detail": {"error": "Unprocessable", "message": "Unprocessable request, please verify your request headers and body."}, "ref": "https://developers.apideck.com/errors#invalidstateerror"} + default: + application/json: {"status_code": 400, "error": "Bad Request", "type_name": "RequestHeadersValidationError", "message": "Invalid Params", "detail": {"missing": [{"x-apideck-consumer-id": "required"}]}, "ref": "https://developers.apideck.com/errors#unauthorizederror"} + accounting.bankFeedStatementsAll: + "": + parameters: + query: + raw: false + limit: 20 + pass_through: {"search": "San Francisco"} + fields: "id,updated_at" + header: + x-apideck-consumer-id: "test-consumer" + x-apideck-app-id: "dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX" + x-apideck-service-id: "salesforce" + responses: + "200": + application/json: {"status_code": 200, "status": "OK", "service": "quickbooks", "resource": "bank-feed-statements", "operation": "all", "data": [{"id": "12345", "bank_feed_account_id": "acc_456", "status": "pending", "start_date": "2021-05-01T12:00:00.000Z", "end_date": "2025-01-31T12:00:00.000Z", "start_balance": 10500.25, "start_balance_credit_or_debit": "debit", "end_balance": 9800.5, "end_balance_credit_or_debit": "debit", "transactions": [{"posted_date": "2025-01-15T12:00:00.000Z", "description": "Payment received from ACME Corp", "amount": 250, "credit_or_debit": "debit", "source_transaction_id": "txn_987", "counterparty": "ACME Corp", "reference": "INV-2025-01", "transaction_type": "payment"}, {"posted_date": "2025-01-15T12:00:00.000Z", "description": "Payment received from ACME Corp", "amount": 250, "credit_or_debit": "debit", "source_transaction_id": "txn_987", "counterparty": "ACME Corp", "reference": "INV-2025-01", "transaction_type": "payment"}], "created_at": "2020-09-30T07:43:32.000Z", "created_by": "12345", "updated_at": "2020-09-30T07:43:32.000Z", "updated_by": "12345"}, {"id": "12345", "bank_feed_account_id": "acc_456", "status": "pending", "start_date": "2021-05-01T12:00:00.000Z", "end_date": "2025-01-31T12:00:00.000Z", "start_balance": 10500.25, "start_balance_credit_or_debit": "debit", "end_balance": 9800.5, "end_balance_credit_or_debit": "debit", "transactions": [{"posted_date": "2025-01-15T12:00:00.000Z", "description": "Payment received from ACME Corp", "amount": 250, "credit_or_debit": "debit", "source_transaction_id": "txn_987", "counterparty": "ACME Corp", "reference": "INV-2025-01", "transaction_type": "payment"}, {"posted_date": "2025-01-15T12:00:00.000Z", "description": "Payment received from ACME Corp", "amount": 250, "credit_or_debit": "debit", "source_transaction_id": "txn_987", "counterparty": "ACME Corp", "reference": "INV-2025-01", "transaction_type": "payment"}, {"posted_date": "2025-01-15T12:00:00.000Z", "description": "Payment received from ACME Corp", "amount": 250, "credit_or_debit": "debit", "source_transaction_id": "txn_987", "counterparty": "ACME Corp", "reference": "INV-2025-01", "transaction_type": "payment"}], "created_at": "2020-09-30T07:43:32.000Z", "created_by": "12345", "updated_at": "2020-09-30T07:43:32.000Z", "updated_by": "12345"}, {"id": "12345", "bank_feed_account_id": "acc_456", "status": "pending", "start_date": "2021-05-01T12:00:00.000Z", "end_date": "2025-01-31T12:00:00.000Z", "start_balance": 10500.25, "start_balance_credit_or_debit": "debit", "end_balance": 9800.5, "end_balance_credit_or_debit": "debit", "transactions": [{"posted_date": "2025-01-15T12:00:00.000Z", "description": "Payment received from ACME Corp", "amount": 250, "credit_or_debit": "debit", "source_transaction_id": "txn_987", "counterparty": "ACME Corp", "reference": "INV-2025-01", "transaction_type": "payment"}], "created_at": "2020-09-30T07:43:32.000Z", "created_by": "12345", "updated_at": "2020-09-30T07:43:32.000Z", "updated_by": "12345"}], "meta": {"items_on_page": 50, "cursors": {"previous": "em9oby1jcm06OnBhZ2U6OjE=", "current": "em9oby1jcm06OnBhZ2U6OjI=", "next": "em9oby1jcm06OnBhZ2U6OjM="}}, "links": {"previous": "https://unify.apideck.com/crm/companies?cursor=em9oby1jcm06OnBhZ2U6OjE%3D", "current": "https://unify.apideck.com/crm/companies", "next": "https://unify.apideck.com/crm/companies?cursor=em9oby1jcm06OnBhZ2U6OjM"}} + "400": + application/json: {"status_code": 400, "error": "Bad Request", "type_name": "RequestValidationError", "message": "Invalid Params", "detail": "Missing property foobar", "ref": "https://developers.apideck.com/errors#requestvalidationerror"} + "401": + application/json: {"status_code": 401, "error": "Unauthorized", "type_name": "UnauthorizedError", "message": "Unauthorized Request", "detail": "Missing authentication", "ref": "https://developers.apideck.com/errors#unauthorizederror"} + "402": + application/json: {"status_code": 402, "error": "Payment Required", "type_name": "RequestLimitError", "message": "Request Limit Reached", "detail": "You have reached your limit of 2000", "ref": "https://developers.apideck.com/errors#requestlimiterror"} + "404": + application/json: {"status_code": 404, "error": "Not Found", "type_name": "EntityNotFoundError", "message": "Unknown Widget", "detail": {"not_found": {"entity": "widget", "id": "123"}}, "ref": "https://developers.apideck.com/errors#entitynotfounderror"} + "422": + application/json: {"status_code": 422, "error": "Unprocessable Entity", "type_name": "InvalidStateError", "message": "Invalid State", "detail": {"error": "Unprocessable", "message": "Unprocessable request, please verify your request headers and body."}, "ref": "https://developers.apideck.com/errors#invalidstateerror"} + default: + application/json: {"status_code": 400, "error": "Bad Request", "type_name": "RequestHeadersValidationError", "message": "Invalid Params", "detail": "Missing Header: x-apideck-consumer-id", "ref": "https://developers.apideck.com/errors#unauthorizederror"} + accounting.bankFeedStatementsAdd: + "": + parameters: + query: + raw: false + header: + x-apideck-consumer-id: "test-consumer" + x-apideck-app-id: "dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX" + x-apideck-service-id: "salesforce" + requestBody: + application/json: {"bank_feed_account_id": "acc_456", "status": "pending", "start_date": "2021-05-01T12:00:00.000Z", "end_date": "2025-01-31T12:00:00.000Z", "start_balance": 10500.25, "start_balance_credit_or_debit": "debit", "end_balance": 9800.5, "end_balance_credit_or_debit": "debit", "transactions": [{"posted_date": "2025-01-15T12:00:00.000Z", "description": "Payment received from ACME Corp", "amount": 250, "credit_or_debit": "debit", "source_transaction_id": "txn_987", "counterparty": "ACME Corp", "reference": "INV-2025-01", "transaction_type": "payment"}, {"posted_date": "2025-01-15T12:00:00.000Z", "description": "Payment received from ACME Corp", "amount": 250, "credit_or_debit": "debit", "source_transaction_id": "txn_987", "counterparty": "ACME Corp", "reference": "INV-2025-01", "transaction_type": "payment"}]} + responses: + "201": + application/json: {"status_code": 200, "status": "OK", "service": "xero", "resource": "bills", "operation": "add", "data": {"id": "12345"}} + "400": + application/json: {"status_code": 400, "error": "Bad Request", "type_name": "RequestValidationError", "message": "Invalid Params", "detail": {"missing": [{"foobar": "required"}]}, "ref": "https://developers.apideck.com/errors#requestvalidationerror"} + "401": + application/json: {"status_code": 401, "error": "Unauthorized", "type_name": "UnauthorizedError", "message": "Unauthorized Request", "detail": "Missing authentication", "ref": "https://developers.apideck.com/errors#unauthorizederror"} + "402": + application/json: {"status_code": 402, "error": "Payment Required", "type_name": "RequestLimitError", "message": "Request Limit Reached", "detail": "You have reached your limit of 2000", "ref": "https://developers.apideck.com/errors#requestlimiterror"} + "404": + application/json: {"status_code": 404, "error": "Not Found", "type_name": "EntityNotFoundError", "message": "Unknown Widget", "detail": "Could not find widget with id: '123'", "ref": "https://developers.apideck.com/errors#entitynotfounderror"} + "422": + application/json: {"status_code": 422, "error": "Unprocessable Entity", "type_name": "InvalidStateError", "message": "Invalid State", "detail": "Unprocessable request, please verify your request headers and body.", "ref": "https://developers.apideck.com/errors#invalidstateerror"} + default: + application/json: {"status_code": 400, "error": "Bad Request", "type_name": "RequestHeadersValidationError", "message": "Invalid Params", "detail": {"missing": [{"x-apideck-consumer-id": "required"}]}, "ref": "https://developers.apideck.com/errors#unauthorizederror"} + accounting.bankFeedStatementsOne: + "": + parameters: + path: + id: "" + query: + raw: false + fields: "id,updated_at" + header: + x-apideck-consumer-id: "test-consumer" + x-apideck-app-id: "dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX" + x-apideck-service-id: "salesforce" + responses: + "200": + application/json: {"status_code": 200, "status": "OK", "service": "quickbooks", "resource": "bank-feed-statements", "operation": "one", "data": {"id": "12345", "bank_feed_account_id": "acc_456", "status": "pending", "start_date": "2021-05-01T12:00:00.000Z", "end_date": "2025-01-31T12:00:00.000Z", "start_balance": 10500.25, "start_balance_credit_or_debit": "debit", "end_balance": 9800.5, "end_balance_credit_or_debit": "debit", "transactions": [{"posted_date": "2025-01-15T12:00:00.000Z", "description": "Payment received from ACME Corp", "amount": 250, "credit_or_debit": "debit", "source_transaction_id": "txn_987", "counterparty": "ACME Corp", "reference": "INV-2025-01", "transaction_type": "payment"}, {"posted_date": "2025-01-15T12:00:00.000Z", "description": "Payment received from ACME Corp", "amount": 250, "credit_or_debit": "debit", "source_transaction_id": "txn_987", "counterparty": "ACME Corp", "reference": "INV-2025-01", "transaction_type": "payment"}, {"posted_date": "2025-01-15T12:00:00.000Z", "description": "Payment received from ACME Corp", "amount": 250, "credit_or_debit": "debit", "source_transaction_id": "txn_987", "counterparty": "ACME Corp", "reference": "INV-2025-01", "transaction_type": "payment"}], "created_at": "2020-09-30T07:43:32.000Z", "created_by": "12345", "updated_at": "2020-09-30T07:43:32.000Z", "updated_by": "12345"}} + "400": + application/json: {"status_code": 400, "error": "Bad Request", "type_name": "RequestValidationError", "message": "Invalid Params", "detail": {"missing": [{"foobar": "required"}]}, "ref": "https://developers.apideck.com/errors#requestvalidationerror"} + "401": + application/json: {"status_code": 401, "error": "Unauthorized", "type_name": "UnauthorizedError", "message": "Unauthorized Request", "detail": {"statusCode": 401, "error": "Unauthorized", "message": "Missing authentication"}, "ref": "https://developers.apideck.com/errors#unauthorizederror"} + "402": + application/json: {"status_code": 402, "error": "Payment Required", "type_name": "RequestLimitError", "message": "Request Limit Reached", "detail": "You have reached your limit of 2000", "ref": "https://developers.apideck.com/errors#requestlimiterror"} + "404": + application/json: {"status_code": 404, "error": "Not Found", "type_name": "EntityNotFoundError", "message": "Unknown Widget", "detail": {"not_found": {"entity": "widget", "id": "123"}}, "ref": "https://developers.apideck.com/errors#entitynotfounderror"} + "422": + application/json: {"status_code": 422, "error": "Unprocessable Entity", "type_name": "InvalidStateError", "message": "Invalid State", "detail": {"error": "Unprocessable", "message": "Unprocessable request, please verify your request headers and body."}, "ref": "https://developers.apideck.com/errors#invalidstateerror"} + default: + application/json: {"status_code": 400, "error": "Bad Request", "type_name": "RequestHeadersValidationError", "message": "Invalid Params", "detail": "Missing Header: x-apideck-consumer-id", "ref": "https://developers.apideck.com/errors#unauthorizederror"} + accounting.bankFeedStatementsUpdate: + "": + parameters: + path: + id: "" + query: + raw: false + header: + x-apideck-consumer-id: "test-consumer" + x-apideck-app-id: "dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX" + x-apideck-service-id: "salesforce" + requestBody: + application/json: {"bank_feed_account_id": "acc_456", "status": "pending", "start_date": "2021-05-01T12:00:00.000Z", "end_date": "2025-01-31T12:00:00.000Z", "start_balance": 10500.25, "start_balance_credit_or_debit": "debit", "end_balance": 9800.5, "end_balance_credit_or_debit": "debit", "transactions": [{"posted_date": "2025-01-15T12:00:00.000Z", "description": "Payment received from ACME Corp", "amount": 250, "credit_or_debit": "debit", "source_transaction_id": "txn_987", "counterparty": "ACME Corp", "reference": "INV-2025-01", "transaction_type": "payment"}, {"posted_date": "2025-01-15T12:00:00.000Z", "description": "Payment received from ACME Corp", "amount": 250, "credit_or_debit": "debit", "source_transaction_id": "txn_987", "counterparty": "ACME Corp", "reference": "INV-2025-01", "transaction_type": "payment"}, {"posted_date": "2025-01-15T12:00:00.000Z", "description": "Payment received from ACME Corp", "amount": 250, "credit_or_debit": "debit", "source_transaction_id": "txn_987", "counterparty": "ACME Corp", "reference": "INV-2025-01", "transaction_type": "payment"}]} + responses: + "200": + application/json: {"status_code": 200, "status": "OK", "service": "quickbooks", "resource": "bank-feed-statements", "operation": "update", "data": {"id": "12345"}} + "400": + application/json: {"status_code": 400, "error": "Bad Request", "type_name": "RequestValidationError", "message": "Invalid Params", "detail": {"missing": [{"foobar": "required"}]}, "ref": "https://developers.apideck.com/errors#requestvalidationerror"} + "401": + application/json: {"status_code": 401, "error": "Unauthorized", "type_name": "UnauthorizedError", "message": "Unauthorized Request", "detail": "Missing authentication", "ref": "https://developers.apideck.com/errors#unauthorizederror"} + "402": + application/json: {"status_code": 402, "error": "Payment Required", "type_name": "RequestLimitError", "message": "Request Limit Reached", "detail": "You have reached your limit of 2000", "ref": "https://developers.apideck.com/errors#requestlimiterror"} + "404": + application/json: {"status_code": 404, "error": "Not Found", "type_name": "EntityNotFoundError", "message": "Unknown Widget", "detail": {"not_found": {"entity": "widget", "id": "123"}}, "ref": "https://developers.apideck.com/errors#entitynotfounderror"} + "422": + application/json: {"status_code": 422, "error": "Unprocessable Entity", "type_name": "InvalidStateError", "message": "Invalid State", "detail": {"error": "Unprocessable", "message": "Unprocessable request, please verify your request headers and body."}, "ref": "https://developers.apideck.com/errors#invalidstateerror"} + default: + application/json: {"status_code": 400, "error": "Bad Request", "type_name": "RequestHeadersValidationError", "message": "Invalid Params", "detail": "Missing Header: x-apideck-consumer-id", "ref": "https://developers.apideck.com/errors#unauthorizederror"} + accounting.bankFeedStatementsDelete: + "": + parameters: + path: + id: "" + query: + raw: false + header: + x-apideck-consumer-id: "test-consumer" + x-apideck-app-id: "dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX" + x-apideck-service-id: "salesforce" + responses: + "200": + application/json: {"status_code": 200, "status": "OK", "service": "quickbooks", "resource": "bank-feed-statements", "operation": "delete", "data": {"id": "12345"}} + "400": + application/json: {"status_code": 400, "error": "Bad Request", "type_name": "RequestValidationError", "message": "Invalid Params", "detail": {"missing": [{"foobar": "required"}]}, "ref": "https://developers.apideck.com/errors#requestvalidationerror"} + "401": + application/json: {"status_code": 401, "error": "Unauthorized", "type_name": "UnauthorizedError", "message": "Unauthorized Request", "detail": {"statusCode": 401, "error": "Unauthorized", "message": "Missing authentication"}, "ref": "https://developers.apideck.com/errors#unauthorizederror"} + "402": + application/json: {"status_code": 402, "error": "Payment Required", "type_name": "RequestLimitError", "message": "Request Limit Reached", "detail": "You have reached your limit of 2000", "ref": "https://developers.apideck.com/errors#requestlimiterror"} + "404": + application/json: {"status_code": 404, "error": "Not Found", "type_name": "EntityNotFoundError", "message": "Unknown Widget", "detail": "Could not find widget with id: '123'", "ref": "https://developers.apideck.com/errors#entitynotfounderror"} + "422": + application/json: {"status_code": 422, "error": "Unprocessable Entity", "type_name": "InvalidStateError", "message": "Invalid State", "detail": {"error": "Unprocessable", "message": "Unprocessable request, please verify your request headers and body."}, "ref": "https://developers.apideck.com/errors#invalidstateerror"} + default: + application/json: {"status_code": 400, "error": "Bad Request", "type_name": "RequestHeadersValidationError", "message": "Invalid Params", "detail": {"missing": [{"x-apideck-consumer-id": "required"}]}, "ref": "https://developers.apideck.com/errors#unauthorizederror"} examplesVersion: 1.0.1 generatedTests: {} diff --git a/.speakeasy/gen.yaml b/.speakeasy/gen.yaml index 11ab2cb7..e19b6fdd 100644 --- a/.speakeasy/gen.yaml +++ b/.speakeasy/gen.yaml @@ -19,7 +19,7 @@ generation: oAuth2ClientCredentialsEnabled: true oAuth2PasswordEnabled: true python: - version: 0.14.1 + version: 0.15.0 additionalDependencies: dev: {} main: {} diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock index 19258ec9..7ea6103f 100644 --- a/.speakeasy/workflow.lock +++ b/.speakeasy/workflow.lock @@ -1,21 +1,21 @@ -speakeasyVersion: 1.543.1 +speakeasyVersion: 1.545.0 sources: Apideck: sourceNamespace: apideck - sourceRevisionDigest: sha256:f468ad536e8a33e68600665c8afdb009888f37079ec6d206ac07d0b4028cc1a1 - sourceBlobDigest: sha256:8755fe54b3c4fecba092fd2799273e8a9d876cd2104ad3dfb92a467d242410f4 + sourceRevisionDigest: sha256:9d29327a215c002ab498103c45f4dbd16e5c5ed9e35b9d600dfe4bda62224137 + sourceBlobDigest: sha256:0f081d5c1d874e9d1ca5f72be3d9947fd8e19bf3ab4331ec9366551e26b7760d tags: - latest - - speakeasy-sdk-regen-1746796133 + - speakeasy-sdk-regen-1747065454 - 10.16.5 targets: apideck: source: Apideck sourceNamespace: apideck - sourceRevisionDigest: sha256:f468ad536e8a33e68600665c8afdb009888f37079ec6d206ac07d0b4028cc1a1 - sourceBlobDigest: sha256:8755fe54b3c4fecba092fd2799273e8a9d876cd2104ad3dfb92a467d242410f4 + sourceRevisionDigest: sha256:9d29327a215c002ab498103c45f4dbd16e5c5ed9e35b9d600dfe4bda62224137 + sourceBlobDigest: sha256:0f081d5c1d874e9d1ca5f72be3d9947fd8e19bf3ab4331ec9366551e26b7760d codeSamplesNamespace: apideck-python-code-samples - codeSamplesRevisionDigest: sha256:a5d04ddc583eaac5633dd8125002894c4f1e57eb9b717ebd26f6ecfeb715581a + codeSamplesRevisionDigest: sha256:caa728509431efa10aa33f8e19ac83080949cd635eef44bb81736e6a40e6833d workflow: workflowVersion: 1.0.0 speakeasyVersion: latest diff --git a/README.md b/README.md index 02aa8a94..a2db8f80 100644 --- a/README.md +++ b/README.md @@ -248,6 +248,22 @@ with Apideck( * [get](docs/sdks/balancesheetsdk/README.md#get) - Get BalanceSheet +#### [accounting.bank_feed_accounts](docs/sdks/bankfeedaccounts/README.md) + +* [list](docs/sdks/bankfeedaccounts/README.md#list) - List Bank Feed Accounts +* [create](docs/sdks/bankfeedaccounts/README.md#create) - Create Bank Feed Account +* [get](docs/sdks/bankfeedaccounts/README.md#get) - Get Bank Feed Account +* [update](docs/sdks/bankfeedaccounts/README.md#update) - Update Bank Feed Account +* [delete](docs/sdks/bankfeedaccounts/README.md#delete) - Delete Bank Feed Account + +#### [accounting.bank_feed_statements](docs/sdks/bankfeedstatements/README.md) + +* [list](docs/sdks/bankfeedstatements/README.md#list) - List Bank Feed Statements +* [create](docs/sdks/bankfeedstatements/README.md#create) - Create Bank Feed Statement +* [get](docs/sdks/bankfeedstatements/README.md#get) - Get Bank Feed Statement +* [update](docs/sdks/bankfeedstatements/README.md#update) - Update Bank Feed Statement +* [delete](docs/sdks/bankfeedstatements/README.md#delete) - Delete Bank Feed Statement + #### [accounting.bill_payments](docs/sdks/billpayments/README.md) * [list](docs/sdks/billpayments/README.md#list) - List Bill Payments diff --git a/RELEASES.md b/RELEASES.md index c4c0535f..b759aa5b 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -228,4 +228,14 @@ Based on: ### Generated - [python v0.14.1] . ### Releases -- [PyPI v0.14.1] https://pypi.org/project/apideck-unify/0.14.1 - . \ No newline at end of file +- [PyPI v0.14.1] https://pypi.org/project/apideck-unify/0.14.1 - . + +## 2025-05-15 00:17:31 +### Changes +Based on: +- OpenAPI Doc +- Speakeasy CLI 1.545.0 (2.599.0) https://github.com/speakeasy-api/speakeasy +### Generated +- [python v0.15.0] . +### Releases +- [PyPI v0.15.0] https://pypi.org/project/apideck-unify/0.15.0 - . \ No newline at end of file diff --git a/docs/models/accountingbankfeedaccountsaddglobals.md b/docs/models/accountingbankfeedaccountsaddglobals.md new file mode 100644 index 00000000..63c0d3ea --- /dev/null +++ b/docs/models/accountingbankfeedaccountsaddglobals.md @@ -0,0 +1,9 @@ +# AccountingBankFeedAccountsAddGlobals + + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | +| `consumer_id` | *Optional[str]* | :heavy_minus_sign: | ID of the consumer which you want to get or push data from | test-consumer | +| `app_id` | *Optional[str]* | :heavy_minus_sign: | The ID of your Unify application | dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX | \ No newline at end of file diff --git a/docs/models/accountingbankfeedaccountsaddrequest.md b/docs/models/accountingbankfeedaccountsaddrequest.md new file mode 100644 index 00000000..32b100c0 --- /dev/null +++ b/docs/models/accountingbankfeedaccountsaddrequest.md @@ -0,0 +1,12 @@ +# AccountingBankFeedAccountsAddRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| --------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- | +| `raw` | *Optional[bool]* | :heavy_minus_sign: | Include raw response. Mostly used for debugging purposes | | +| `consumer_id` | *Optional[str]* | :heavy_minus_sign: | ID of the consumer which you want to get or push data from | test-consumer | +| `app_id` | *Optional[str]* | :heavy_minus_sign: | The ID of your Unify application | dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX | +| `service_id` | *Optional[str]* | :heavy_minus_sign: | Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API. | salesforce | +| `bank_feed_account` | [models.BankFeedAccountInput](../models/bankfeedaccountinput.md) | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/docs/models/accountingbankfeedaccountsaddresponse.md b/docs/models/accountingbankfeedaccountsaddresponse.md new file mode 100644 index 00000000..2da8a16b --- /dev/null +++ b/docs/models/accountingbankfeedaccountsaddresponse.md @@ -0,0 +1,10 @@ +# AccountingBankFeedAccountsAddResponse + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | +| `http_meta` | [models.HTTPMetadata](../models/httpmetadata.md) | :heavy_check_mark: | N/A | +| `create_bank_feed_account_response` | [Optional[models.CreateBankFeedAccountResponse]](../models/createbankfeedaccountresponse.md) | :heavy_minus_sign: | Bank Feed Accounts | +| `unexpected_error_response` | [Optional[models.UnexpectedErrorResponse]](../models/unexpectederrorresponse.md) | :heavy_minus_sign: | Unexpected error | \ No newline at end of file diff --git a/docs/models/accountingbankfeedaccountsallglobals.md b/docs/models/accountingbankfeedaccountsallglobals.md new file mode 100644 index 00000000..c3240ae3 --- /dev/null +++ b/docs/models/accountingbankfeedaccountsallglobals.md @@ -0,0 +1,9 @@ +# AccountingBankFeedAccountsAllGlobals + + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | +| `consumer_id` | *Optional[str]* | :heavy_minus_sign: | ID of the consumer which you want to get or push data from | test-consumer | +| `app_id` | *Optional[str]* | :heavy_minus_sign: | The ID of your Unify application | dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX | \ No newline at end of file diff --git a/docs/models/accountingbankfeedaccountsallrequest.md b/docs/models/accountingbankfeedaccountsallrequest.md new file mode 100644 index 00000000..cbc78df2 --- /dev/null +++ b/docs/models/accountingbankfeedaccountsallrequest.md @@ -0,0 +1,15 @@ +# AccountingBankFeedAccountsAllRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `raw` | *Optional[bool]* | :heavy_minus_sign: | Include raw response. Mostly used for debugging purposes | | +| `consumer_id` | *Optional[str]* | :heavy_minus_sign: | ID of the consumer which you want to get or push data from | test-consumer | +| `app_id` | *Optional[str]* | :heavy_minus_sign: | The ID of your Unify application | dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX | +| `service_id` | *Optional[str]* | :heavy_minus_sign: | Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API. | salesforce | +| `cursor` | *OptionalNullable[str]* | :heavy_minus_sign: | Cursor to start from. You can find cursors for next/previous pages in the meta.cursors property of the response. | | +| `limit` | *Optional[int]* | :heavy_minus_sign: | Number of results to return. Minimum 1, Maximum 200, Default 20 | | +| `pass_through` | Dict[str, *Any*] | :heavy_minus_sign: | Optional unmapped key/values that will be passed through to downstream as query parameters. Ie: ?pass_through[search]=leads becomes ?search=leads | {
"search": "San Francisco"
} | +| `fields` | *OptionalNullable[str]* | :heavy_minus_sign: | The 'fields' parameter allows API users to specify the fields they want to include in the API response. If this parameter is not present, the API will return all available fields. If this parameter is present, only the fields specified in the comma-separated string will be included in the response. Nested properties can also be requested by using a dot notation.

Example: `fields=name,email,addresses.city`

In the example above, the response will only include the fields "name", "email" and "addresses.city". If any other fields are available, they will be excluded. | id,updated_at | \ No newline at end of file diff --git a/docs/models/accountingbankfeedaccountsallresponse.md b/docs/models/accountingbankfeedaccountsallresponse.md new file mode 100644 index 00000000..294bc343 --- /dev/null +++ b/docs/models/accountingbankfeedaccountsallresponse.md @@ -0,0 +1,10 @@ +# AccountingBankFeedAccountsAllResponse + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | +| `http_meta` | [models.HTTPMetadata](../models/httpmetadata.md) | :heavy_check_mark: | N/A | +| `get_bank_feed_accounts_response` | [Optional[models.GetBankFeedAccountsResponse]](../models/getbankfeedaccountsresponse.md) | :heavy_minus_sign: | Bank Feed Accounts | +| `unexpected_error_response` | [Optional[models.UnexpectedErrorResponse]](../models/unexpectederrorresponse.md) | :heavy_minus_sign: | Unexpected error | \ No newline at end of file diff --git a/docs/models/accountingbankfeedaccountsdeleteglobals.md b/docs/models/accountingbankfeedaccountsdeleteglobals.md new file mode 100644 index 00000000..cfd8c831 --- /dev/null +++ b/docs/models/accountingbankfeedaccountsdeleteglobals.md @@ -0,0 +1,9 @@ +# AccountingBankFeedAccountsDeleteGlobals + + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | +| `consumer_id` | *Optional[str]* | :heavy_minus_sign: | ID of the consumer which you want to get or push data from | test-consumer | +| `app_id` | *Optional[str]* | :heavy_minus_sign: | The ID of your Unify application | dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX | \ No newline at end of file diff --git a/docs/models/accountingbankfeedaccountsdeleterequest.md b/docs/models/accountingbankfeedaccountsdeleterequest.md new file mode 100644 index 00000000..c7f9eaf8 --- /dev/null +++ b/docs/models/accountingbankfeedaccountsdeleterequest.md @@ -0,0 +1,12 @@ +# AccountingBankFeedAccountsDeleteRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| --------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *str* | :heavy_check_mark: | ID of the record you are acting upon. | | +| `consumer_id` | *Optional[str]* | :heavy_minus_sign: | ID of the consumer which you want to get or push data from | test-consumer | +| `app_id` | *Optional[str]* | :heavy_minus_sign: | The ID of your Unify application | dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX | +| `service_id` | *Optional[str]* | :heavy_minus_sign: | Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API. | salesforce | +| `raw` | *Optional[bool]* | :heavy_minus_sign: | Include raw response. Mostly used for debugging purposes | | \ No newline at end of file diff --git a/docs/models/accountingbankfeedaccountsdeleteresponse.md b/docs/models/accountingbankfeedaccountsdeleteresponse.md new file mode 100644 index 00000000..cefdbacb --- /dev/null +++ b/docs/models/accountingbankfeedaccountsdeleteresponse.md @@ -0,0 +1,10 @@ +# AccountingBankFeedAccountsDeleteResponse + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | +| `http_meta` | [models.HTTPMetadata](../models/httpmetadata.md) | :heavy_check_mark: | N/A | +| `delete_bank_feed_account_response` | [Optional[models.DeleteBankFeedAccountResponse]](../models/deletebankfeedaccountresponse.md) | :heavy_minus_sign: | Bank Feed Accounts | +| `unexpected_error_response` | [Optional[models.UnexpectedErrorResponse]](../models/unexpectederrorresponse.md) | :heavy_minus_sign: | Unexpected error | \ No newline at end of file diff --git a/docs/models/accountingbankfeedaccountsoneglobals.md b/docs/models/accountingbankfeedaccountsoneglobals.md new file mode 100644 index 00000000..e13ec370 --- /dev/null +++ b/docs/models/accountingbankfeedaccountsoneglobals.md @@ -0,0 +1,9 @@ +# AccountingBankFeedAccountsOneGlobals + + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | +| `consumer_id` | *Optional[str]* | :heavy_minus_sign: | ID of the consumer which you want to get or push data from | test-consumer | +| `app_id` | *Optional[str]* | :heavy_minus_sign: | The ID of your Unify application | dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX | \ No newline at end of file diff --git a/docs/models/accountingbankfeedaccountsonerequest.md b/docs/models/accountingbankfeedaccountsonerequest.md new file mode 100644 index 00000000..9610787e --- /dev/null +++ b/docs/models/accountingbankfeedaccountsonerequest.md @@ -0,0 +1,13 @@ +# AccountingBankFeedAccountsOneRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *str* | :heavy_check_mark: | ID of the record you are acting upon. | | +| `consumer_id` | *Optional[str]* | :heavy_minus_sign: | ID of the consumer which you want to get or push data from | test-consumer | +| `app_id` | *Optional[str]* | :heavy_minus_sign: | The ID of your Unify application | dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX | +| `service_id` | *Optional[str]* | :heavy_minus_sign: | Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API. | salesforce | +| `raw` | *Optional[bool]* | :heavy_minus_sign: | Include raw response. Mostly used for debugging purposes | | +| `fields` | *OptionalNullable[str]* | :heavy_minus_sign: | The 'fields' parameter allows API users to specify the fields they want to include in the API response. If this parameter is not present, the API will return all available fields. If this parameter is present, only the fields specified in the comma-separated string will be included in the response. Nested properties can also be requested by using a dot notation.

Example: `fields=name,email,addresses.city`

In the example above, the response will only include the fields "name", "email" and "addresses.city". If any other fields are available, they will be excluded. | id,updated_at | \ No newline at end of file diff --git a/docs/models/accountingbankfeedaccountsoneresponse.md b/docs/models/accountingbankfeedaccountsoneresponse.md new file mode 100644 index 00000000..5f3c511e --- /dev/null +++ b/docs/models/accountingbankfeedaccountsoneresponse.md @@ -0,0 +1,10 @@ +# AccountingBankFeedAccountsOneResponse + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | +| `http_meta` | [models.HTTPMetadata](../models/httpmetadata.md) | :heavy_check_mark: | N/A | +| `get_bank_feed_account_response` | [Optional[models.GetBankFeedAccountResponse]](../models/getbankfeedaccountresponse.md) | :heavy_minus_sign: | Bank Feed Accounts | +| `unexpected_error_response` | [Optional[models.UnexpectedErrorResponse]](../models/unexpectederrorresponse.md) | :heavy_minus_sign: | Unexpected error | \ No newline at end of file diff --git a/docs/models/accountingbankfeedaccountsupdateglobals.md b/docs/models/accountingbankfeedaccountsupdateglobals.md new file mode 100644 index 00000000..3b4d9cde --- /dev/null +++ b/docs/models/accountingbankfeedaccountsupdateglobals.md @@ -0,0 +1,9 @@ +# AccountingBankFeedAccountsUpdateGlobals + + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | +| `consumer_id` | *Optional[str]* | :heavy_minus_sign: | ID of the consumer which you want to get or push data from | test-consumer | +| `app_id` | *Optional[str]* | :heavy_minus_sign: | The ID of your Unify application | dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX | \ No newline at end of file diff --git a/docs/models/accountingbankfeedaccountsupdaterequest.md b/docs/models/accountingbankfeedaccountsupdaterequest.md new file mode 100644 index 00000000..d9370b2f --- /dev/null +++ b/docs/models/accountingbankfeedaccountsupdaterequest.md @@ -0,0 +1,13 @@ +# AccountingBankFeedAccountsUpdateRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| --------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *str* | :heavy_check_mark: | ID of the record you are acting upon. | | +| `consumer_id` | *Optional[str]* | :heavy_minus_sign: | ID of the consumer which you want to get or push data from | test-consumer | +| `app_id` | *Optional[str]* | :heavy_minus_sign: | The ID of your Unify application | dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX | +| `service_id` | *Optional[str]* | :heavy_minus_sign: | Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API. | salesforce | +| `raw` | *Optional[bool]* | :heavy_minus_sign: | Include raw response. Mostly used for debugging purposes | | +| `bank_feed_account` | [models.BankFeedAccountInput](../models/bankfeedaccountinput.md) | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/docs/models/accountingbankfeedaccountsupdateresponse.md b/docs/models/accountingbankfeedaccountsupdateresponse.md new file mode 100644 index 00000000..dd5e2347 --- /dev/null +++ b/docs/models/accountingbankfeedaccountsupdateresponse.md @@ -0,0 +1,10 @@ +# AccountingBankFeedAccountsUpdateResponse + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | +| `http_meta` | [models.HTTPMetadata](../models/httpmetadata.md) | :heavy_check_mark: | N/A | +| `update_bank_feed_account_response` | [Optional[models.UpdateBankFeedAccountResponse]](../models/updatebankfeedaccountresponse.md) | :heavy_minus_sign: | Bank Feed Accounts | +| `unexpected_error_response` | [Optional[models.UnexpectedErrorResponse]](../models/unexpectederrorresponse.md) | :heavy_minus_sign: | Unexpected error | \ No newline at end of file diff --git a/docs/models/accountingbankfeedstatementsaddglobals.md b/docs/models/accountingbankfeedstatementsaddglobals.md new file mode 100644 index 00000000..e793ec38 --- /dev/null +++ b/docs/models/accountingbankfeedstatementsaddglobals.md @@ -0,0 +1,9 @@ +# AccountingBankFeedStatementsAddGlobals + + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | +| `consumer_id` | *Optional[str]* | :heavy_minus_sign: | ID of the consumer which you want to get or push data from | test-consumer | +| `app_id` | *Optional[str]* | :heavy_minus_sign: | The ID of your Unify application | dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX | \ No newline at end of file diff --git a/docs/models/accountingbankfeedstatementsaddrequest.md b/docs/models/accountingbankfeedstatementsaddrequest.md new file mode 100644 index 00000000..da740cee --- /dev/null +++ b/docs/models/accountingbankfeedstatementsaddrequest.md @@ -0,0 +1,12 @@ +# AccountingBankFeedStatementsAddRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| --------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- | +| `raw` | *Optional[bool]* | :heavy_minus_sign: | Include raw response. Mostly used for debugging purposes | | +| `consumer_id` | *Optional[str]* | :heavy_minus_sign: | ID of the consumer which you want to get or push data from | test-consumer | +| `app_id` | *Optional[str]* | :heavy_minus_sign: | The ID of your Unify application | dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX | +| `service_id` | *Optional[str]* | :heavy_minus_sign: | Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API. | salesforce | +| `bank_feed_statement` | [models.BankFeedStatementInput](../models/bankfeedstatementinput.md) | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/docs/models/accountingbankfeedstatementsaddresponse.md b/docs/models/accountingbankfeedstatementsaddresponse.md new file mode 100644 index 00000000..b8b07adc --- /dev/null +++ b/docs/models/accountingbankfeedstatementsaddresponse.md @@ -0,0 +1,10 @@ +# AccountingBankFeedStatementsAddResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | +| `http_meta` | [models.HTTPMetadata](../models/httpmetadata.md) | :heavy_check_mark: | N/A | +| `create_bank_feed_statement_response` | [Optional[models.CreateBankFeedStatementResponse]](../models/createbankfeedstatementresponse.md) | :heavy_minus_sign: | Bank Feed Statements | +| `unexpected_error_response` | [Optional[models.UnexpectedErrorResponse]](../models/unexpectederrorresponse.md) | :heavy_minus_sign: | Unexpected error | \ No newline at end of file diff --git a/docs/models/accountingbankfeedstatementsallglobals.md b/docs/models/accountingbankfeedstatementsallglobals.md new file mode 100644 index 00000000..1b96496f --- /dev/null +++ b/docs/models/accountingbankfeedstatementsallglobals.md @@ -0,0 +1,9 @@ +# AccountingBankFeedStatementsAllGlobals + + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | +| `consumer_id` | *Optional[str]* | :heavy_minus_sign: | ID of the consumer which you want to get or push data from | test-consumer | +| `app_id` | *Optional[str]* | :heavy_minus_sign: | The ID of your Unify application | dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX | \ No newline at end of file diff --git a/docs/models/accountingbankfeedstatementsallrequest.md b/docs/models/accountingbankfeedstatementsallrequest.md new file mode 100644 index 00000000..f3047316 --- /dev/null +++ b/docs/models/accountingbankfeedstatementsallrequest.md @@ -0,0 +1,15 @@ +# AccountingBankFeedStatementsAllRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `raw` | *Optional[bool]* | :heavy_minus_sign: | Include raw response. Mostly used for debugging purposes | | +| `consumer_id` | *Optional[str]* | :heavy_minus_sign: | ID of the consumer which you want to get or push data from | test-consumer | +| `app_id` | *Optional[str]* | :heavy_minus_sign: | The ID of your Unify application | dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX | +| `service_id` | *Optional[str]* | :heavy_minus_sign: | Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API. | salesforce | +| `cursor` | *OptionalNullable[str]* | :heavy_minus_sign: | Cursor to start from. You can find cursors for next/previous pages in the meta.cursors property of the response. | | +| `limit` | *Optional[int]* | :heavy_minus_sign: | Number of results to return. Minimum 1, Maximum 200, Default 20 | | +| `pass_through` | Dict[str, *Any*] | :heavy_minus_sign: | Optional unmapped key/values that will be passed through to downstream as query parameters. Ie: ?pass_through[search]=leads becomes ?search=leads | {
"search": "San Francisco"
} | +| `fields` | *OptionalNullable[str]* | :heavy_minus_sign: | The 'fields' parameter allows API users to specify the fields they want to include in the API response. If this parameter is not present, the API will return all available fields. If this parameter is present, only the fields specified in the comma-separated string will be included in the response. Nested properties can also be requested by using a dot notation.

Example: `fields=name,email,addresses.city`

In the example above, the response will only include the fields "name", "email" and "addresses.city". If any other fields are available, they will be excluded. | id,updated_at | \ No newline at end of file diff --git a/docs/models/accountingbankfeedstatementsallresponse.md b/docs/models/accountingbankfeedstatementsallresponse.md new file mode 100644 index 00000000..d10c5e14 --- /dev/null +++ b/docs/models/accountingbankfeedstatementsallresponse.md @@ -0,0 +1,10 @@ +# AccountingBankFeedStatementsAllResponse + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | +| `http_meta` | [models.HTTPMetadata](../models/httpmetadata.md) | :heavy_check_mark: | N/A | +| `get_bank_feed_statements_response` | [Optional[models.GetBankFeedStatementsResponse]](../models/getbankfeedstatementsresponse.md) | :heavy_minus_sign: | Bank Feed Statements | +| `unexpected_error_response` | [Optional[models.UnexpectedErrorResponse]](../models/unexpectederrorresponse.md) | :heavy_minus_sign: | Unexpected error | \ No newline at end of file diff --git a/docs/models/accountingbankfeedstatementsdeleteglobals.md b/docs/models/accountingbankfeedstatementsdeleteglobals.md new file mode 100644 index 00000000..e99c6d2b --- /dev/null +++ b/docs/models/accountingbankfeedstatementsdeleteglobals.md @@ -0,0 +1,9 @@ +# AccountingBankFeedStatementsDeleteGlobals + + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | +| `consumer_id` | *Optional[str]* | :heavy_minus_sign: | ID of the consumer which you want to get or push data from | test-consumer | +| `app_id` | *Optional[str]* | :heavy_minus_sign: | The ID of your Unify application | dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX | \ No newline at end of file diff --git a/docs/models/accountingbankfeedstatementsdeleterequest.md b/docs/models/accountingbankfeedstatementsdeleterequest.md new file mode 100644 index 00000000..3b7475c1 --- /dev/null +++ b/docs/models/accountingbankfeedstatementsdeleterequest.md @@ -0,0 +1,12 @@ +# AccountingBankFeedStatementsDeleteRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| --------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *str* | :heavy_check_mark: | ID of the record you are acting upon. | | +| `consumer_id` | *Optional[str]* | :heavy_minus_sign: | ID of the consumer which you want to get or push data from | test-consumer | +| `app_id` | *Optional[str]* | :heavy_minus_sign: | The ID of your Unify application | dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX | +| `service_id` | *Optional[str]* | :heavy_minus_sign: | Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API. | salesforce | +| `raw` | *Optional[bool]* | :heavy_minus_sign: | Include raw response. Mostly used for debugging purposes | | \ No newline at end of file diff --git a/docs/models/accountingbankfeedstatementsdeleteresponse.md b/docs/models/accountingbankfeedstatementsdeleteresponse.md new file mode 100644 index 00000000..2197f70e --- /dev/null +++ b/docs/models/accountingbankfeedstatementsdeleteresponse.md @@ -0,0 +1,10 @@ +# AccountingBankFeedStatementsDeleteResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | +| `http_meta` | [models.HTTPMetadata](../models/httpmetadata.md) | :heavy_check_mark: | N/A | +| `delete_bank_feed_statement_response` | [Optional[models.DeleteBankFeedStatementResponse]](../models/deletebankfeedstatementresponse.md) | :heavy_minus_sign: | Bank Feed Statements | +| `unexpected_error_response` | [Optional[models.UnexpectedErrorResponse]](../models/unexpectederrorresponse.md) | :heavy_minus_sign: | Unexpected error | \ No newline at end of file diff --git a/docs/models/accountingbankfeedstatementsoneglobals.md b/docs/models/accountingbankfeedstatementsoneglobals.md new file mode 100644 index 00000000..d4e0b1f7 --- /dev/null +++ b/docs/models/accountingbankfeedstatementsoneglobals.md @@ -0,0 +1,9 @@ +# AccountingBankFeedStatementsOneGlobals + + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | +| `consumer_id` | *Optional[str]* | :heavy_minus_sign: | ID of the consumer which you want to get or push data from | test-consumer | +| `app_id` | *Optional[str]* | :heavy_minus_sign: | The ID of your Unify application | dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX | \ No newline at end of file diff --git a/docs/models/accountingbankfeedstatementsonerequest.md b/docs/models/accountingbankfeedstatementsonerequest.md new file mode 100644 index 00000000..aef6b5f1 --- /dev/null +++ b/docs/models/accountingbankfeedstatementsonerequest.md @@ -0,0 +1,13 @@ +# AccountingBankFeedStatementsOneRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *str* | :heavy_check_mark: | ID of the record you are acting upon. | | +| `consumer_id` | *Optional[str]* | :heavy_minus_sign: | ID of the consumer which you want to get or push data from | test-consumer | +| `app_id` | *Optional[str]* | :heavy_minus_sign: | The ID of your Unify application | dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX | +| `service_id` | *Optional[str]* | :heavy_minus_sign: | Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API. | salesforce | +| `raw` | *Optional[bool]* | :heavy_minus_sign: | Include raw response. Mostly used for debugging purposes | | +| `fields` | *OptionalNullable[str]* | :heavy_minus_sign: | The 'fields' parameter allows API users to specify the fields they want to include in the API response. If this parameter is not present, the API will return all available fields. If this parameter is present, only the fields specified in the comma-separated string will be included in the response. Nested properties can also be requested by using a dot notation.

Example: `fields=name,email,addresses.city`

In the example above, the response will only include the fields "name", "email" and "addresses.city". If any other fields are available, they will be excluded. | id,updated_at | \ No newline at end of file diff --git a/docs/models/accountingbankfeedstatementsoneresponse.md b/docs/models/accountingbankfeedstatementsoneresponse.md new file mode 100644 index 00000000..be5c0ee5 --- /dev/null +++ b/docs/models/accountingbankfeedstatementsoneresponse.md @@ -0,0 +1,10 @@ +# AccountingBankFeedStatementsOneResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | +| `http_meta` | [models.HTTPMetadata](../models/httpmetadata.md) | :heavy_check_mark: | N/A | +| `get_bank_feed_statement_response` | [Optional[models.GetBankFeedStatementResponse]](../models/getbankfeedstatementresponse.md) | :heavy_minus_sign: | Bank Feed Statements | +| `unexpected_error_response` | [Optional[models.UnexpectedErrorResponse]](../models/unexpectederrorresponse.md) | :heavy_minus_sign: | Unexpected error | \ No newline at end of file diff --git a/docs/models/accountingbankfeedstatementsupdateglobals.md b/docs/models/accountingbankfeedstatementsupdateglobals.md new file mode 100644 index 00000000..1b58807b --- /dev/null +++ b/docs/models/accountingbankfeedstatementsupdateglobals.md @@ -0,0 +1,9 @@ +# AccountingBankFeedStatementsUpdateGlobals + + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | +| `consumer_id` | *Optional[str]* | :heavy_minus_sign: | ID of the consumer which you want to get or push data from | test-consumer | +| `app_id` | *Optional[str]* | :heavy_minus_sign: | The ID of your Unify application | dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX | \ No newline at end of file diff --git a/docs/models/accountingbankfeedstatementsupdaterequest.md b/docs/models/accountingbankfeedstatementsupdaterequest.md new file mode 100644 index 00000000..fb06ae09 --- /dev/null +++ b/docs/models/accountingbankfeedstatementsupdaterequest.md @@ -0,0 +1,13 @@ +# AccountingBankFeedStatementsUpdateRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| --------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *str* | :heavy_check_mark: | ID of the record you are acting upon. | | +| `consumer_id` | *Optional[str]* | :heavy_minus_sign: | ID of the consumer which you want to get or push data from | test-consumer | +| `app_id` | *Optional[str]* | :heavy_minus_sign: | The ID of your Unify application | dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX | +| `service_id` | *Optional[str]* | :heavy_minus_sign: | Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API. | salesforce | +| `raw` | *Optional[bool]* | :heavy_minus_sign: | Include raw response. Mostly used for debugging purposes | | +| `bank_feed_statement` | [models.BankFeedStatementInput](../models/bankfeedstatementinput.md) | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/docs/models/accountingbankfeedstatementsupdateresponse.md b/docs/models/accountingbankfeedstatementsupdateresponse.md new file mode 100644 index 00000000..b480d3aa --- /dev/null +++ b/docs/models/accountingbankfeedstatementsupdateresponse.md @@ -0,0 +1,10 @@ +# AccountingBankFeedStatementsUpdateResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | +| `http_meta` | [models.HTTPMetadata](../models/httpmetadata.md) | :heavy_check_mark: | N/A | +| `update_bank_feed_statement_response` | [Optional[models.UpdateBankFeedStatementResponse]](../models/updatebankfeedstatementresponse.md) | :heavy_minus_sign: | Bank Feed Statements | +| `unexpected_error_response` | [Optional[models.UnexpectedErrorResponse]](../models/unexpectederrorresponse.md) | :heavy_minus_sign: | Unexpected error | \ No newline at end of file diff --git a/docs/models/bankaccounttype.md b/docs/models/bankaccounttype.md new file mode 100644 index 00000000..dca718d0 --- /dev/null +++ b/docs/models/bankaccounttype.md @@ -0,0 +1,11 @@ +# BankAccountType + +Type of the bank account. + + +## Values + +| Name | Value | +| ------------- | ------------- | +| `BANK` | bank | +| `CREDIT_CARD` | credit_card | \ No newline at end of file diff --git a/docs/models/bankfeedaccount.md b/docs/models/bankfeedaccount.md new file mode 100644 index 00000000..954510c7 --- /dev/null +++ b/docs/models/bankfeedaccount.md @@ -0,0 +1,22 @@ +# BankFeedAccount + + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *str* | :heavy_check_mark: | A unique identifier for an object. | 12345 | +| `bank_account_type` | [Optional[models.BankAccountType]](../models/bankaccounttype.md) | :heavy_minus_sign: | Type of the bank account. | bank | +| `source_account_id` | *Optional[str]* | :heavy_minus_sign: | The source account's unique identifier. | src_456 | +| `target_account_id` | *Optional[str]* | :heavy_minus_sign: | The target account's unique identifier in the accounting connector. | tgt_789 | +| `target_account_name` | *Optional[str]* | :heavy_minus_sign: | Name associated with the target account. | Main Company Checking | +| `target_account_number` | *Optional[str]* | :heavy_minus_sign: | Account number of the destination bank account. | NL91ABNA0417164300 | +| `currency` | [OptionalNullable[models.Currency]](../models/currency.md) | :heavy_minus_sign: | Indicates the associated currency for an amount of money. Values correspond to [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217). | USD | +| `feed_status` | [Optional[models.FeedStatus]](../models/feedstatus.md) | :heavy_minus_sign: | Current status of the bank feed. | pending | +| `country` | *OptionalNullable[str]* | :heavy_minus_sign: | Country code according to ISO 3166-1 alpha-2. | US | +| `custom_fields` | List[[models.CustomField](../models/customfield.md)] | :heavy_minus_sign: | N/A | | +| `custom_mappings` | [OptionalNullable[models.CustomMappings]](../models/custommappings.md) | :heavy_minus_sign: | When custom mappings are configured on the resource, the result is included here. | | +| `created_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_minus_sign: | The date and time when the object was created. | 2020-09-30T07:43:32.000Z | +| `updated_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_minus_sign: | The date and time when the object was last updated. | 2020-09-30T07:43:32.000Z | +| `updated_by` | *OptionalNullable[str]* | :heavy_minus_sign: | The user who last updated the object. | 12345 | +| `created_by` | *OptionalNullable[str]* | :heavy_minus_sign: | The user who created the object. | 12345 | \ No newline at end of file diff --git a/docs/models/bankfeedaccountinput.md b/docs/models/bankfeedaccountinput.md new file mode 100644 index 00000000..0fb0e076 --- /dev/null +++ b/docs/models/bankfeedaccountinput.md @@ -0,0 +1,16 @@ +# BankFeedAccountInput + + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | +| `bank_account_type` | [Optional[models.BankAccountType]](../models/bankaccounttype.md) | :heavy_minus_sign: | Type of the bank account. | bank | +| `source_account_id` | *Optional[str]* | :heavy_minus_sign: | The source account's unique identifier. | src_456 | +| `target_account_id` | *Optional[str]* | :heavy_minus_sign: | The target account's unique identifier in the accounting connector. | tgt_789 | +| `target_account_name` | *Optional[str]* | :heavy_minus_sign: | Name associated with the target account. | Main Company Checking | +| `target_account_number` | *Optional[str]* | :heavy_minus_sign: | Account number of the destination bank account. | NL91ABNA0417164300 | +| `currency` | [OptionalNullable[models.Currency]](../models/currency.md) | :heavy_minus_sign: | Indicates the associated currency for an amount of money. Values correspond to [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217). | USD | +| `feed_status` | [Optional[models.FeedStatus]](../models/feedstatus.md) | :heavy_minus_sign: | Current status of the bank feed. | pending | +| `country` | *OptionalNullable[str]* | :heavy_minus_sign: | Country code according to ISO 3166-1 alpha-2. | US | +| `custom_fields` | List[[models.CustomField](../models/customfield.md)] | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/models/bankfeedstatement.md b/docs/models/bankfeedstatement.md new file mode 100644 index 00000000..a139764f --- /dev/null +++ b/docs/models/bankfeedstatement.md @@ -0,0 +1,21 @@ +# BankFeedStatement + + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | +| `id` | *str* | :heavy_check_mark: | A unique identifier for an object. | 12345 | +| `bank_feed_account_id` | *Optional[str]* | :heavy_minus_sign: | The ID of the bank feed account this statement belongs to. | acc_456 | +| `status` | [Optional[models.StatementStatus]](../models/statementstatus.md) | :heavy_minus_sign: | The current status of the bank feed statement. | pending | +| `start_date` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_minus_sign: | Start date of the bank feed statement. | 2021-05-01T12:00:00.000Z | +| `end_date` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_minus_sign: | End date of the bank feed statement. | 2025-01-31T12:00:00.000Z | +| `start_balance` | *Optional[float]* | :heavy_minus_sign: | Balance amount at the start of the period. | 10500.25 | +| `start_balance_credit_or_debit` | [Optional[models.CreditOrDebit]](../models/creditordebit.md) | :heavy_minus_sign: | Whether the amount is a credit or debit. | debit | +| `end_balance` | *Optional[float]* | :heavy_minus_sign: | Balance amount at the end of the period. | 9800.5 | +| `end_balance_credit_or_debit` | [Optional[models.CreditOrDebit]](../models/creditordebit.md) | :heavy_minus_sign: | Whether the amount is a credit or debit. | debit | +| `transactions` | List[[models.Transactions](../models/transactions.md)] | :heavy_minus_sign: | List of transactions in the bank feed statement. | | +| `created_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_minus_sign: | The date and time when the object was created. | 2020-09-30T07:43:32.000Z | +| `created_by` | *OptionalNullable[str]* | :heavy_minus_sign: | The user who created the object. | 12345 | +| `updated_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_minus_sign: | The date and time when the object was last updated. | 2020-09-30T07:43:32.000Z | +| `updated_by` | *OptionalNullable[str]* | :heavy_minus_sign: | The user who last updated the object. | 12345 | \ No newline at end of file diff --git a/docs/models/bankfeedstatementinput.md b/docs/models/bankfeedstatementinput.md new file mode 100644 index 00000000..4234fe6c --- /dev/null +++ b/docs/models/bankfeedstatementinput.md @@ -0,0 +1,16 @@ +# BankFeedStatementInput + + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | +| `bank_feed_account_id` | *Optional[str]* | :heavy_minus_sign: | The ID of the bank feed account this statement belongs to. | acc_456 | +| `status` | [Optional[models.StatementStatus]](../models/statementstatus.md) | :heavy_minus_sign: | The current status of the bank feed statement. | pending | +| `start_date` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_minus_sign: | Start date of the bank feed statement. | 2021-05-01T12:00:00.000Z | +| `end_date` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_minus_sign: | End date of the bank feed statement. | 2025-01-31T12:00:00.000Z | +| `start_balance` | *Optional[float]* | :heavy_minus_sign: | Balance amount at the start of the period. | 10500.25 | +| `start_balance_credit_or_debit` | [Optional[models.CreditOrDebit]](../models/creditordebit.md) | :heavy_minus_sign: | Whether the amount is a credit or debit. | debit | +| `end_balance` | *Optional[float]* | :heavy_minus_sign: | Balance amount at the end of the period. | 9800.5 | +| `end_balance_credit_or_debit` | [Optional[models.CreditOrDebit]](../models/creditordebit.md) | :heavy_minus_sign: | Whether the amount is a credit or debit. | debit | +| `transactions` | List[[models.Transactions](../models/transactions.md)] | :heavy_minus_sign: | List of transactions in the bank feed statement. | | \ No newline at end of file diff --git a/docs/models/bankfeedstatementtransactiontype.md b/docs/models/bankfeedstatementtransactiontype.md new file mode 100644 index 00000000..7072dbb9 --- /dev/null +++ b/docs/models/bankfeedstatementtransactiontype.md @@ -0,0 +1,15 @@ +# BankFeedStatementTransactionType + +Type of transaction. + + +## Values + +| Name | Value | +| ---------- | ---------- | +| `CREDIT` | credit | +| `DEBIT` | debit | +| `DEPOSIT` | deposit | +| `TRANSFER` | transfer | +| `PAYMENT` | payment | +| `OTHER` | other | \ No newline at end of file diff --git a/docs/models/createbankfeedaccountresponse.md b/docs/models/createbankfeedaccountresponse.md new file mode 100644 index 00000000..952f9b7d --- /dev/null +++ b/docs/models/createbankfeedaccountresponse.md @@ -0,0 +1,16 @@ +# CreateBankFeedAccountResponse + +Bank Feed Accounts + + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | +| `status_code` | *int* | :heavy_check_mark: | HTTP Response Status Code | 200 | +| `status` | *str* | :heavy_check_mark: | HTTP Response Status | OK | +| `service` | *str* | :heavy_check_mark: | Apideck ID of service provider | xero | +| `resource` | *str* | :heavy_check_mark: | Unified API resource name | bills | +| `operation` | *str* | :heavy_check_mark: | Operation performed | add | +| `data` | [models.UnifiedID](../models/unifiedid.md) | :heavy_check_mark: | A object containing a unique identifier for the resource that was created, updated, or deleted. | | +| `raw` | Dict[str, *Any*] | :heavy_minus_sign: | Raw response from the integration when raw=true query param is provided | | \ No newline at end of file diff --git a/docs/models/createbankfeedstatementresponse.md b/docs/models/createbankfeedstatementresponse.md new file mode 100644 index 00000000..a8d0d989 --- /dev/null +++ b/docs/models/createbankfeedstatementresponse.md @@ -0,0 +1,16 @@ +# CreateBankFeedStatementResponse + +Bank Feed Statements + + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | +| `status_code` | *int* | :heavy_check_mark: | HTTP Response Status Code | 200 | +| `status` | *str* | :heavy_check_mark: | HTTP Response Status | OK | +| `service` | *str* | :heavy_check_mark: | Apideck ID of service provider | xero | +| `resource` | *str* | :heavy_check_mark: | Unified API resource name | bills | +| `operation` | *str* | :heavy_check_mark: | Operation performed | add | +| `data` | [models.UnifiedID](../models/unifiedid.md) | :heavy_check_mark: | A object containing a unique identifier for the resource that was created, updated, or deleted. | | +| `raw` | Dict[str, *Any*] | :heavy_minus_sign: | Raw response from the integration when raw=true query param is provided | | \ No newline at end of file diff --git a/docs/models/creditordebit.md b/docs/models/creditordebit.md new file mode 100644 index 00000000..0dbb8094 --- /dev/null +++ b/docs/models/creditordebit.md @@ -0,0 +1,11 @@ +# CreditOrDebit + +Whether the amount is a credit or debit. + + +## Values + +| Name | Value | +| -------- | -------- | +| `CREDIT` | credit | +| `DEBIT` | debit | \ No newline at end of file diff --git a/docs/models/deletebankfeedaccountresponse.md b/docs/models/deletebankfeedaccountresponse.md new file mode 100644 index 00000000..2c980cbf --- /dev/null +++ b/docs/models/deletebankfeedaccountresponse.md @@ -0,0 +1,16 @@ +# DeleteBankFeedAccountResponse + +Bank Feed Accounts + + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | +| `status_code` | *int* | :heavy_check_mark: | HTTP Response Status Code | 200 | +| `status` | *str* | :heavy_check_mark: | HTTP Response Status | OK | +| `service` | *str* | :heavy_check_mark: | Apideck ID of service provider | quickbooks | +| `resource` | *str* | :heavy_check_mark: | Unified API resource name | bank-feed-accounts | +| `operation` | *str* | :heavy_check_mark: | Operation performed | delete | +| `data` | [models.UnifiedID](../models/unifiedid.md) | :heavy_check_mark: | A object containing a unique identifier for the resource that was created, updated, or deleted. | | +| `raw` | Dict[str, *Any*] | :heavy_minus_sign: | Raw response from the integration when raw=true query param is provided | | \ No newline at end of file diff --git a/docs/models/deletebankfeedstatementresponse.md b/docs/models/deletebankfeedstatementresponse.md new file mode 100644 index 00000000..afaa5075 --- /dev/null +++ b/docs/models/deletebankfeedstatementresponse.md @@ -0,0 +1,16 @@ +# DeleteBankFeedStatementResponse + +Bank Feed Statements + + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | +| `status_code` | *int* | :heavy_check_mark: | HTTP Response Status Code | 200 | +| `status` | *str* | :heavy_check_mark: | HTTP Response Status | OK | +| `service` | *str* | :heavy_check_mark: | Apideck ID of service provider | quickbooks | +| `resource` | *str* | :heavy_check_mark: | Unified API resource name | bank-feed-statements | +| `operation` | *str* | :heavy_check_mark: | Operation performed | delete | +| `data` | [models.UnifiedID](../models/unifiedid.md) | :heavy_check_mark: | A object containing a unique identifier for the resource that was created, updated, or deleted. | | +| `raw` | Dict[str, *Any*] | :heavy_minus_sign: | Raw response from the integration when raw=true query param is provided | | \ No newline at end of file diff --git a/docs/models/feedstatus.md b/docs/models/feedstatus.md new file mode 100644 index 00000000..5054b5f2 --- /dev/null +++ b/docs/models/feedstatus.md @@ -0,0 +1,11 @@ +# FeedStatus + +Current status of the bank feed. + + +## Values + +| Name | Value | +| ---------- | ---------- | +| `PENDING` | pending | +| `REJECTED` | rejected | \ No newline at end of file diff --git a/docs/models/getbankfeedaccountresponse.md b/docs/models/getbankfeedaccountresponse.md new file mode 100644 index 00000000..2343c235 --- /dev/null +++ b/docs/models/getbankfeedaccountresponse.md @@ -0,0 +1,16 @@ +# GetBankFeedAccountResponse + +Bank Feed Accounts + + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | +| `status_code` | *int* | :heavy_check_mark: | HTTP Response Status Code | 200 | +| `status` | *str* | :heavy_check_mark: | HTTP Response Status | OK | +| `service` | *str* | :heavy_check_mark: | Apideck ID of service provider | quickbooks | +| `resource` | *str* | :heavy_check_mark: | Unified API resource name | bank-feed-accounts | +| `operation` | *str* | :heavy_check_mark: | Operation performed | one | +| `data` | [models.BankFeedAccount](../models/bankfeedaccount.md) | :heavy_check_mark: | N/A | | +| `raw` | Dict[str, *Any*] | :heavy_minus_sign: | Raw response from the integration when raw=true query param is provided | | \ No newline at end of file diff --git a/docs/models/getbankfeedaccountsresponse.md b/docs/models/getbankfeedaccountsresponse.md new file mode 100644 index 00000000..843a11c8 --- /dev/null +++ b/docs/models/getbankfeedaccountsresponse.md @@ -0,0 +1,18 @@ +# GetBankFeedAccountsResponse + +Bank Feed Accounts + + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | +| `status_code` | *int* | :heavy_check_mark: | HTTP Response Status Code | 200 | +| `status` | *str* | :heavy_check_mark: | HTTP Response Status | OK | +| `service` | *str* | :heavy_check_mark: | Apideck ID of service provider | quickbooks | +| `resource` | *str* | :heavy_check_mark: | Unified API resource name | bank-feed-accounts | +| `operation` | *str* | :heavy_check_mark: | Operation performed | all | +| `data` | List[[models.BankFeedAccount](../models/bankfeedaccount.md)] | :heavy_check_mark: | N/A | | +| `meta` | [Optional[models.Meta]](../models/meta.md) | :heavy_minus_sign: | Response metadata | | +| `links` | [Optional[models.Links]](../models/links.md) | :heavy_minus_sign: | Links to navigate to previous or next pages through the API | | +| `raw` | Dict[str, *Any*] | :heavy_minus_sign: | Raw response from the integration when raw=true query param is provided | | \ No newline at end of file diff --git a/docs/models/getbankfeedstatementresponse.md b/docs/models/getbankfeedstatementresponse.md new file mode 100644 index 00000000..082d4324 --- /dev/null +++ b/docs/models/getbankfeedstatementresponse.md @@ -0,0 +1,16 @@ +# GetBankFeedStatementResponse + +Bank Feed Statements + + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | +| `status_code` | *int* | :heavy_check_mark: | HTTP Response Status Code | 200 | +| `status` | *str* | :heavy_check_mark: | HTTP Response Status | OK | +| `service` | *str* | :heavy_check_mark: | Apideck ID of service provider | quickbooks | +| `resource` | *str* | :heavy_check_mark: | Unified API resource name | bank-feed-statements | +| `operation` | *str* | :heavy_check_mark: | Operation performed | one | +| `data` | [models.BankFeedStatement](../models/bankfeedstatement.md) | :heavy_check_mark: | N/A | | +| `raw` | Dict[str, *Any*] | :heavy_minus_sign: | Raw response from the integration when raw=true query param is provided | | \ No newline at end of file diff --git a/docs/models/getbankfeedstatementsresponse.md b/docs/models/getbankfeedstatementsresponse.md new file mode 100644 index 00000000..64f5b6c8 --- /dev/null +++ b/docs/models/getbankfeedstatementsresponse.md @@ -0,0 +1,18 @@ +# GetBankFeedStatementsResponse + +Bank Feed Statements + + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | +| `status_code` | *int* | :heavy_check_mark: | HTTP Response Status Code | 200 | +| `status` | *str* | :heavy_check_mark: | HTTP Response Status | OK | +| `service` | *str* | :heavy_check_mark: | Apideck ID of service provider | quickbooks | +| `resource` | *str* | :heavy_check_mark: | Unified API resource name | bank-feed-statements | +| `operation` | *str* | :heavy_check_mark: | Operation performed | all | +| `data` | List[[models.BankFeedStatement](../models/bankfeedstatement.md)] | :heavy_check_mark: | N/A | | +| `meta` | [Optional[models.Meta]](../models/meta.md) | :heavy_minus_sign: | Response metadata | | +| `links` | [Optional[models.Links]](../models/links.md) | :heavy_minus_sign: | Links to navigate to previous or next pages through the API | | +| `raw` | Dict[str, *Any*] | :heavy_minus_sign: | Raw response from the integration when raw=true query param is provided | | \ No newline at end of file diff --git a/docs/models/statementstatus.md b/docs/models/statementstatus.md new file mode 100644 index 00000000..b34726d8 --- /dev/null +++ b/docs/models/statementstatus.md @@ -0,0 +1,12 @@ +# StatementStatus + +The current status of the bank feed statement. + + +## Values + +| Name | Value | +| ---------- | ---------- | +| `PENDING` | pending | +| `REJECTED` | rejected | +| `SUCCESS` | success | \ No newline at end of file diff --git a/docs/models/transactions.md b/docs/models/transactions.md new file mode 100644 index 00000000..9e86c87d --- /dev/null +++ b/docs/models/transactions.md @@ -0,0 +1,15 @@ +# Transactions + + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | +| `posted_date` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | The date of the transaction - YYYY:MM::DDThh:mm:ss.sTZD | 2025-01-15T12:00:00.000Z | +| `description` | *Optional[str]* | :heavy_minus_sign: | A description of the transaction. | Payment received from ACME Corp | +| `amount` | *float* | :heavy_check_mark: | The amount of the transaction. | 250 | +| `credit_or_debit` | [models.CreditOrDebit](../models/creditordebit.md) | :heavy_check_mark: | Whether the amount is a credit or debit. | debit | +| `source_transaction_id` | *str* | :heavy_check_mark: | The ID of the source transaction. | txn_987 | +| `counterparty` | *Optional[str]* | :heavy_minus_sign: | The counterparty of the transaction. | ACME Corp | +| `reference` | *Optional[str]* | :heavy_minus_sign: | The reference of the transaction. | INV-2025-01 | +| `transaction_type` | [Optional[models.BankFeedStatementTransactionType]](../models/bankfeedstatementtransactiontype.md) | :heavy_minus_sign: | Type of transaction. | payment | \ No newline at end of file diff --git a/docs/models/updatebankfeedaccountresponse.md b/docs/models/updatebankfeedaccountresponse.md new file mode 100644 index 00000000..2c5921dc --- /dev/null +++ b/docs/models/updatebankfeedaccountresponse.md @@ -0,0 +1,16 @@ +# UpdateBankFeedAccountResponse + +Bank Feed Accounts + + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | +| `status_code` | *int* | :heavy_check_mark: | HTTP Response Status Code | 200 | +| `status` | *str* | :heavy_check_mark: | HTTP Response Status | OK | +| `service` | *str* | :heavy_check_mark: | Apideck ID of service provider | quickbooks | +| `resource` | *str* | :heavy_check_mark: | Unified API resource name | bank-feed-accounts | +| `operation` | *str* | :heavy_check_mark: | Operation performed | update | +| `data` | [models.UnifiedID](../models/unifiedid.md) | :heavy_check_mark: | A object containing a unique identifier for the resource that was created, updated, or deleted. | | +| `raw` | Dict[str, *Any*] | :heavy_minus_sign: | Raw response from the integration when raw=true query param is provided | | \ No newline at end of file diff --git a/docs/models/updatebankfeedstatementresponse.md b/docs/models/updatebankfeedstatementresponse.md new file mode 100644 index 00000000..15db71ee --- /dev/null +++ b/docs/models/updatebankfeedstatementresponse.md @@ -0,0 +1,16 @@ +# UpdateBankFeedStatementResponse + +Bank Feed Statements + + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | +| `status_code` | *int* | :heavy_check_mark: | HTTP Response Status Code | 200 | +| `status` | *str* | :heavy_check_mark: | HTTP Response Status | OK | +| `service` | *str* | :heavy_check_mark: | Apideck ID of service provider | quickbooks | +| `resource` | *str* | :heavy_check_mark: | Unified API resource name | bank-feed-statements | +| `operation` | *str* | :heavy_check_mark: | Operation performed | update | +| `data` | [models.UnifiedID](../models/unifiedid.md) | :heavy_check_mark: | A object containing a unique identifier for the resource that was created, updated, or deleted. | | +| `raw` | Dict[str, *Any*] | :heavy_minus_sign: | Raw response from the integration when raw=true query param is provided | | \ No newline at end of file diff --git a/docs/sdks/bankfeedaccounts/README.md b/docs/sdks/bankfeedaccounts/README.md new file mode 100644 index 00000000..c9914c19 --- /dev/null +++ b/docs/sdks/bankfeedaccounts/README.md @@ -0,0 +1,332 @@ +# BankFeedAccounts +(*accounting.bank_feed_accounts*) + +## Overview + +### Available Operations + +* [list](#list) - List Bank Feed Accounts +* [create](#create) - Create Bank Feed Account +* [get](#get) - Get Bank Feed Account +* [update](#update) - Update Bank Feed Account +* [delete](#delete) - Delete Bank Feed Account + +## list + +List Bank Feed Accounts + +### Example Usage + +```python +from apideck_unify import Apideck +import os + + +with Apideck( + api_key=os.getenv("APIDECK_API_KEY", ""), + consumer_id="test-consumer", + app_id="dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX", +) as apideck: + + res = apideck.accounting.bank_feed_accounts.list(consumer_id="test-consumer", app_id="dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX", service_id="salesforce", pass_through={ + "search": "San Francisco", + }, fields="id,updated_at") + + while res is not None: + # Handle items + + res = res.next() + +``` + +### Parameters + +| Parameter | Type | Required | Description | Example | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `raw` | *Optional[bool]* | :heavy_minus_sign: | Include raw response. Mostly used for debugging purposes | | +| `consumer_id` | *Optional[str]* | :heavy_minus_sign: | ID of the consumer which you want to get or push data from | test-consumer | +| `app_id` | *Optional[str]* | :heavy_minus_sign: | The ID of your Unify application | dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX | +| `service_id` | *Optional[str]* | :heavy_minus_sign: | Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API. | salesforce | +| `cursor` | *OptionalNullable[str]* | :heavy_minus_sign: | Cursor to start from. You can find cursors for next/previous pages in the meta.cursors property of the response. | | +| `limit` | *Optional[int]* | :heavy_minus_sign: | Number of results to return. Minimum 1, Maximum 200, Default 20 | | +| `pass_through` | Dict[str, *Any*] | :heavy_minus_sign: | Optional unmapped key/values that will be passed through to downstream as query parameters. Ie: ?pass_through[search]=leads becomes ?search=leads | {
"search": "San Francisco"
} | +| `fields` | *OptionalNullable[str]* | :heavy_minus_sign: | The 'fields' parameter allows API users to specify the fields they want to include in the API response. If this parameter is not present, the API will return all available fields. If this parameter is present, only the fields specified in the comma-separated string will be included in the response. Nested properties can also be requested by using a dot notation.

Example: `fields=name,email,addresses.city`

In the example above, the response will only include the fields "name", "email" and "addresses.city". If any other fields are available, they will be excluded. | id,updated_at | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | | + +### Response + +**[models.AccountingBankFeedAccountsAllResponse](../../models/accountingbankfeedaccountsallresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ------------------------------ | ------------------------------ | ------------------------------ | +| models.BadRequestResponse | 400 | application/json | +| models.UnauthorizedResponse | 401 | application/json | +| models.PaymentRequiredResponse | 402 | application/json | +| models.NotFoundResponse | 404 | application/json | +| models.UnprocessableResponse | 422 | application/json | +| models.APIError | 4XX, 5XX | \*/\* | + +## create + +Create Bank Feed Account + +### Example Usage + +```python +import apideck_unify +from apideck_unify import Apideck +import os + + +with Apideck( + api_key=os.getenv("APIDECK_API_KEY", ""), + consumer_id="test-consumer", + app_id="dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX", +) as apideck: + + res = apideck.accounting.bank_feed_accounts.create(consumer_id="test-consumer", app_id="dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX", service_id="salesforce", bank_account_type=apideck_unify.BankAccountType.BANK, source_account_id="src_456", target_account_id="tgt_789", target_account_name="Main Company Checking", target_account_number="NL91ABNA0417164300", currency=apideck_unify.Currency.USD, feed_status=apideck_unify.FeedStatus.PENDING, country="US", custom_fields=[ + { + "id": "2389328923893298", + "name": "employee_level", + "description": "Employee Level", + "value": {}, + }, + { + "id": "2389328923893298", + "name": "employee_level", + "description": "Employee Level", + "value": True, + }, + ]) + + assert res.create_bank_feed_account_response is not None + + # Handle response + print(res.create_bank_feed_account_response) + +``` + +### Parameters + +| Parameter | Type | Required | Description | Example | +| --------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- | +| `raw` | *Optional[bool]* | :heavy_minus_sign: | Include raw response. Mostly used for debugging purposes | | +| `consumer_id` | *Optional[str]* | :heavy_minus_sign: | ID of the consumer which you want to get or push data from | test-consumer | +| `app_id` | *Optional[str]* | :heavy_minus_sign: | The ID of your Unify application | dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX | +| `service_id` | *Optional[str]* | :heavy_minus_sign: | Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API. | salesforce | +| `bank_account_type` | [Optional[models.BankAccountType]](../../models/bankaccounttype.md) | :heavy_minus_sign: | Type of the bank account. | bank | +| `source_account_id` | *Optional[str]* | :heavy_minus_sign: | The source account's unique identifier. | src_456 | +| `target_account_id` | *Optional[str]* | :heavy_minus_sign: | The target account's unique identifier in the accounting connector. | tgt_789 | +| `target_account_name` | *Optional[str]* | :heavy_minus_sign: | Name associated with the target account. | Main Company Checking | +| `target_account_number` | *Optional[str]* | :heavy_minus_sign: | Account number of the destination bank account. | NL91ABNA0417164300 | +| `currency` | [OptionalNullable[models.Currency]](../../models/currency.md) | :heavy_minus_sign: | Indicates the associated currency for an amount of money. Values correspond to [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217). | USD | +| `feed_status` | [Optional[models.FeedStatus]](../../models/feedstatus.md) | :heavy_minus_sign: | Current status of the bank feed. | pending | +| `country` | *OptionalNullable[str]* | :heavy_minus_sign: | Country code according to ISO 3166-1 alpha-2. | US | +| `custom_fields` | List[[models.CustomField](../../models/customfield.md)] | :heavy_minus_sign: | N/A | | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | | + +### Response + +**[models.AccountingBankFeedAccountsAddResponse](../../models/accountingbankfeedaccountsaddresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ------------------------------ | ------------------------------ | ------------------------------ | +| models.BadRequestResponse | 400 | application/json | +| models.UnauthorizedResponse | 401 | application/json | +| models.PaymentRequiredResponse | 402 | application/json | +| models.NotFoundResponse | 404 | application/json | +| models.UnprocessableResponse | 422 | application/json | +| models.APIError | 4XX, 5XX | \*/\* | + +## get + +Get Bank Feed Account + +### Example Usage + +```python +from apideck_unify import Apideck +import os + + +with Apideck( + api_key=os.getenv("APIDECK_API_KEY", ""), + consumer_id="test-consumer", + app_id="dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX", +) as apideck: + + res = apideck.accounting.bank_feed_accounts.get(id="", consumer_id="test-consumer", app_id="dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX", service_id="salesforce", fields="id,updated_at") + + assert res.get_bank_feed_account_response is not None + + # Handle response + print(res.get_bank_feed_account_response) + +``` + +### Parameters + +| Parameter | Type | Required | Description | Example | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *str* | :heavy_check_mark: | ID of the record you are acting upon. | | +| `consumer_id` | *Optional[str]* | :heavy_minus_sign: | ID of the consumer which you want to get or push data from | test-consumer | +| `app_id` | *Optional[str]* | :heavy_minus_sign: | The ID of your Unify application | dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX | +| `service_id` | *Optional[str]* | :heavy_minus_sign: | Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API. | salesforce | +| `raw` | *Optional[bool]* | :heavy_minus_sign: | Include raw response. Mostly used for debugging purposes | | +| `fields` | *OptionalNullable[str]* | :heavy_minus_sign: | The 'fields' parameter allows API users to specify the fields they want to include in the API response. If this parameter is not present, the API will return all available fields. If this parameter is present, only the fields specified in the comma-separated string will be included in the response. Nested properties can also be requested by using a dot notation.

Example: `fields=name,email,addresses.city`

In the example above, the response will only include the fields "name", "email" and "addresses.city". If any other fields are available, they will be excluded. | id,updated_at | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | | + +### Response + +**[models.AccountingBankFeedAccountsOneResponse](../../models/accountingbankfeedaccountsoneresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ------------------------------ | ------------------------------ | ------------------------------ | +| models.BadRequestResponse | 400 | application/json | +| models.UnauthorizedResponse | 401 | application/json | +| models.PaymentRequiredResponse | 402 | application/json | +| models.NotFoundResponse | 404 | application/json | +| models.UnprocessableResponse | 422 | application/json | +| models.APIError | 4XX, 5XX | \*/\* | + +## update + +Update Bank Feed Account + +### Example Usage + +```python +import apideck_unify +from apideck_unify import Apideck +import os + + +with Apideck( + api_key=os.getenv("APIDECK_API_KEY", ""), + consumer_id="test-consumer", + app_id="dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX", +) as apideck: + + res = apideck.accounting.bank_feed_accounts.update(id="", consumer_id="test-consumer", app_id="dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX", service_id="salesforce", bank_account_type=apideck_unify.BankAccountType.BANK, source_account_id="src_456", target_account_id="tgt_789", target_account_name="Main Company Checking", target_account_number="NL91ABNA0417164300", currency=apideck_unify.Currency.USD, feed_status=apideck_unify.FeedStatus.PENDING, country="US", custom_fields=[ + { + "id": "2389328923893298", + "name": "employee_level", + "description": "Employee Level", + "value": {}, + }, + { + "id": "2389328923893298", + "name": "employee_level", + "description": "Employee Level", + "value": True, + }, + { + "id": "2389328923893298", + "name": "employee_level", + "description": "Employee Level", + "value": [ + {}, + {}, + ], + }, + ]) + + assert res.update_bank_feed_account_response is not None + + # Handle response + print(res.update_bank_feed_account_response) + +``` + +### Parameters + +| Parameter | Type | Required | Description | Example | +| --------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *str* | :heavy_check_mark: | ID of the record you are acting upon. | | +| `consumer_id` | *Optional[str]* | :heavy_minus_sign: | ID of the consumer which you want to get or push data from | test-consumer | +| `app_id` | *Optional[str]* | :heavy_minus_sign: | The ID of your Unify application | dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX | +| `service_id` | *Optional[str]* | :heavy_minus_sign: | Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API. | salesforce | +| `raw` | *Optional[bool]* | :heavy_minus_sign: | Include raw response. Mostly used for debugging purposes | | +| `bank_account_type` | [Optional[models.BankAccountType]](../../models/bankaccounttype.md) | :heavy_minus_sign: | Type of the bank account. | bank | +| `source_account_id` | *Optional[str]* | :heavy_minus_sign: | The source account's unique identifier. | src_456 | +| `target_account_id` | *Optional[str]* | :heavy_minus_sign: | The target account's unique identifier in the accounting connector. | tgt_789 | +| `target_account_name` | *Optional[str]* | :heavy_minus_sign: | Name associated with the target account. | Main Company Checking | +| `target_account_number` | *Optional[str]* | :heavy_minus_sign: | Account number of the destination bank account. | NL91ABNA0417164300 | +| `currency` | [OptionalNullable[models.Currency]](../../models/currency.md) | :heavy_minus_sign: | Indicates the associated currency for an amount of money. Values correspond to [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217). | USD | +| `feed_status` | [Optional[models.FeedStatus]](../../models/feedstatus.md) | :heavy_minus_sign: | Current status of the bank feed. | pending | +| `country` | *OptionalNullable[str]* | :heavy_minus_sign: | Country code according to ISO 3166-1 alpha-2. | US | +| `custom_fields` | List[[models.CustomField](../../models/customfield.md)] | :heavy_minus_sign: | N/A | | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | | + +### Response + +**[models.AccountingBankFeedAccountsUpdateResponse](../../models/accountingbankfeedaccountsupdateresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ------------------------------ | ------------------------------ | ------------------------------ | +| models.BadRequestResponse | 400 | application/json | +| models.UnauthorizedResponse | 401 | application/json | +| models.PaymentRequiredResponse | 402 | application/json | +| models.NotFoundResponse | 404 | application/json | +| models.UnprocessableResponse | 422 | application/json | +| models.APIError | 4XX, 5XX | \*/\* | + +## delete + +Delete Bank Feed Account + +### Example Usage + +```python +from apideck_unify import Apideck +import os + + +with Apideck( + api_key=os.getenv("APIDECK_API_KEY", ""), + consumer_id="test-consumer", + app_id="dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX", +) as apideck: + + res = apideck.accounting.bank_feed_accounts.delete(id="", consumer_id="test-consumer", app_id="dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX", service_id="salesforce") + + assert res.delete_bank_feed_account_response is not None + + # Handle response + print(res.delete_bank_feed_account_response) + +``` + +### Parameters + +| Parameter | Type | Required | Description | Example | +| --------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *str* | :heavy_check_mark: | ID of the record you are acting upon. | | +| `consumer_id` | *Optional[str]* | :heavy_minus_sign: | ID of the consumer which you want to get or push data from | test-consumer | +| `app_id` | *Optional[str]* | :heavy_minus_sign: | The ID of your Unify application | dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX | +| `service_id` | *Optional[str]* | :heavy_minus_sign: | Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API. | salesforce | +| `raw` | *Optional[bool]* | :heavy_minus_sign: | Include raw response. Mostly used for debugging purposes | | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | | + +### Response + +**[models.AccountingBankFeedAccountsDeleteResponse](../../models/accountingbankfeedaccountsdeleteresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ------------------------------ | ------------------------------ | ------------------------------ | +| models.BadRequestResponse | 400 | application/json | +| models.UnauthorizedResponse | 401 | application/json | +| models.PaymentRequiredResponse | 402 | application/json | +| models.NotFoundResponse | 404 | application/json | +| models.UnprocessableResponse | 422 | application/json | +| models.APIError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/bankfeedstatements/README.md b/docs/sdks/bankfeedstatements/README.md new file mode 100644 index 00000000..c447fd33 --- /dev/null +++ b/docs/sdks/bankfeedstatements/README.md @@ -0,0 +1,351 @@ +# BankFeedStatements +(*accounting.bank_feed_statements*) + +## Overview + +### Available Operations + +* [list](#list) - List Bank Feed Statements +* [create](#create) - Create Bank Feed Statement +* [get](#get) - Get Bank Feed Statement +* [update](#update) - Update Bank Feed Statement +* [delete](#delete) - Delete Bank Feed Statement + +## list + +List Bank Feed Statements + +### Example Usage + +```python +from apideck_unify import Apideck +import os + + +with Apideck( + api_key=os.getenv("APIDECK_API_KEY", ""), + consumer_id="test-consumer", + app_id="dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX", +) as apideck: + + res = apideck.accounting.bank_feed_statements.list(consumer_id="test-consumer", app_id="dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX", service_id="salesforce", pass_through={ + "search": "San Francisco", + }, fields="id,updated_at") + + while res is not None: + # Handle items + + res = res.next() + +``` + +### Parameters + +| Parameter | Type | Required | Description | Example | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `raw` | *Optional[bool]* | :heavy_minus_sign: | Include raw response. Mostly used for debugging purposes | | +| `consumer_id` | *Optional[str]* | :heavy_minus_sign: | ID of the consumer which you want to get or push data from | test-consumer | +| `app_id` | *Optional[str]* | :heavy_minus_sign: | The ID of your Unify application | dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX | +| `service_id` | *Optional[str]* | :heavy_minus_sign: | Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API. | salesforce | +| `cursor` | *OptionalNullable[str]* | :heavy_minus_sign: | Cursor to start from. You can find cursors for next/previous pages in the meta.cursors property of the response. | | +| `limit` | *Optional[int]* | :heavy_minus_sign: | Number of results to return. Minimum 1, Maximum 200, Default 20 | | +| `pass_through` | Dict[str, *Any*] | :heavy_minus_sign: | Optional unmapped key/values that will be passed through to downstream as query parameters. Ie: ?pass_through[search]=leads becomes ?search=leads | {
"search": "San Francisco"
} | +| `fields` | *OptionalNullable[str]* | :heavy_minus_sign: | The 'fields' parameter allows API users to specify the fields they want to include in the API response. If this parameter is not present, the API will return all available fields. If this parameter is present, only the fields specified in the comma-separated string will be included in the response. Nested properties can also be requested by using a dot notation.

Example: `fields=name,email,addresses.city`

In the example above, the response will only include the fields "name", "email" and "addresses.city". If any other fields are available, they will be excluded. | id,updated_at | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | | + +### Response + +**[models.AccountingBankFeedStatementsAllResponse](../../models/accountingbankfeedstatementsallresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ------------------------------ | ------------------------------ | ------------------------------ | +| models.BadRequestResponse | 400 | application/json | +| models.UnauthorizedResponse | 401 | application/json | +| models.PaymentRequiredResponse | 402 | application/json | +| models.NotFoundResponse | 404 | application/json | +| models.UnprocessableResponse | 422 | application/json | +| models.APIError | 4XX, 5XX | \*/\* | + +## create + +Create Bank Feed Statement + +### Example Usage + +```python +import apideck_unify +from apideck_unify import Apideck +from apideck_unify.utils import parse_datetime +import os + + +with Apideck( + api_key=os.getenv("APIDECK_API_KEY", ""), + consumer_id="test-consumer", + app_id="dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX", +) as apideck: + + res = apideck.accounting.bank_feed_statements.create(consumer_id="test-consumer", app_id="dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX", service_id="salesforce", bank_feed_account_id="acc_456", status=apideck_unify.StatementStatus.PENDING, start_date=parse_datetime("2021-05-01T12:00:00.000Z"), end_date=parse_datetime("2025-01-31T12:00:00.000Z"), start_balance=10500.25, start_balance_credit_or_debit=apideck_unify.CreditOrDebit.DEBIT, end_balance=9800.5, end_balance_credit_or_debit=apideck_unify.CreditOrDebit.DEBIT, transactions=[ + { + "posted_date": parse_datetime("2025-01-15T12:00:00.000Z"), + "description": "Payment received from ACME Corp", + "amount": 250, + "credit_or_debit": apideck_unify.CreditOrDebit.DEBIT, + "source_transaction_id": "txn_987", + "counterparty": "ACME Corp", + "reference": "INV-2025-01", + "transaction_type": apideck_unify.BankFeedStatementTransactionType.PAYMENT, + }, + { + "posted_date": parse_datetime("2025-01-15T12:00:00.000Z"), + "description": "Payment received from ACME Corp", + "amount": 250, + "credit_or_debit": apideck_unify.CreditOrDebit.DEBIT, + "source_transaction_id": "txn_987", + "counterparty": "ACME Corp", + "reference": "INV-2025-01", + "transaction_type": apideck_unify.BankFeedStatementTransactionType.PAYMENT, + }, + ]) + + assert res.create_bank_feed_statement_response is not None + + # Handle response + print(res.create_bank_feed_statement_response) + +``` + +### Parameters + +| Parameter | Type | Required | Description | Example | +| --------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- | +| `raw` | *Optional[bool]* | :heavy_minus_sign: | Include raw response. Mostly used for debugging purposes | | +| `consumer_id` | *Optional[str]* | :heavy_minus_sign: | ID of the consumer which you want to get or push data from | test-consumer | +| `app_id` | *Optional[str]* | :heavy_minus_sign: | The ID of your Unify application | dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX | +| `service_id` | *Optional[str]* | :heavy_minus_sign: | Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API. | salesforce | +| `bank_feed_account_id` | *Optional[str]* | :heavy_minus_sign: | The ID of the bank feed account this statement belongs to. | acc_456 | +| `status` | [Optional[models.StatementStatus]](../../models/statementstatus.md) | :heavy_minus_sign: | The current status of the bank feed statement. | pending | +| `start_date` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_minus_sign: | Start date of the bank feed statement. | 2021-05-01T12:00:00.000Z | +| `end_date` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_minus_sign: | End date of the bank feed statement. | 2025-01-31T12:00:00.000Z | +| `start_balance` | *Optional[float]* | :heavy_minus_sign: | Balance amount at the start of the period. | 10500.25 | +| `start_balance_credit_or_debit` | [Optional[models.CreditOrDebit]](../../models/creditordebit.md) | :heavy_minus_sign: | Whether the amount is a credit or debit. | debit | +| `end_balance` | *Optional[float]* | :heavy_minus_sign: | Balance amount at the end of the period. | 9800.5 | +| `end_balance_credit_or_debit` | [Optional[models.CreditOrDebit]](../../models/creditordebit.md) | :heavy_minus_sign: | Whether the amount is a credit or debit. | debit | +| `transactions` | List[[models.Transactions](../../models/transactions.md)] | :heavy_minus_sign: | List of transactions in the bank feed statement. | | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | | + +### Response + +**[models.AccountingBankFeedStatementsAddResponse](../../models/accountingbankfeedstatementsaddresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ------------------------------ | ------------------------------ | ------------------------------ | +| models.BadRequestResponse | 400 | application/json | +| models.UnauthorizedResponse | 401 | application/json | +| models.PaymentRequiredResponse | 402 | application/json | +| models.NotFoundResponse | 404 | application/json | +| models.UnprocessableResponse | 422 | application/json | +| models.APIError | 4XX, 5XX | \*/\* | + +## get + +Get Bank Feed Statement + +### Example Usage + +```python +from apideck_unify import Apideck +import os + + +with Apideck( + api_key=os.getenv("APIDECK_API_KEY", ""), + consumer_id="test-consumer", + app_id="dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX", +) as apideck: + + res = apideck.accounting.bank_feed_statements.get(id="", consumer_id="test-consumer", app_id="dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX", service_id="salesforce", fields="id,updated_at") + + assert res.get_bank_feed_statement_response is not None + + # Handle response + print(res.get_bank_feed_statement_response) + +``` + +### Parameters + +| Parameter | Type | Required | Description | Example | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *str* | :heavy_check_mark: | ID of the record you are acting upon. | | +| `consumer_id` | *Optional[str]* | :heavy_minus_sign: | ID of the consumer which you want to get or push data from | test-consumer | +| `app_id` | *Optional[str]* | :heavy_minus_sign: | The ID of your Unify application | dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX | +| `service_id` | *Optional[str]* | :heavy_minus_sign: | Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API. | salesforce | +| `raw` | *Optional[bool]* | :heavy_minus_sign: | Include raw response. Mostly used for debugging purposes | | +| `fields` | *OptionalNullable[str]* | :heavy_minus_sign: | The 'fields' parameter allows API users to specify the fields they want to include in the API response. If this parameter is not present, the API will return all available fields. If this parameter is present, only the fields specified in the comma-separated string will be included in the response. Nested properties can also be requested by using a dot notation.

Example: `fields=name,email,addresses.city`

In the example above, the response will only include the fields "name", "email" and "addresses.city". If any other fields are available, they will be excluded. | id,updated_at | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | | + +### Response + +**[models.AccountingBankFeedStatementsOneResponse](../../models/accountingbankfeedstatementsoneresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ------------------------------ | ------------------------------ | ------------------------------ | +| models.BadRequestResponse | 400 | application/json | +| models.UnauthorizedResponse | 401 | application/json | +| models.PaymentRequiredResponse | 402 | application/json | +| models.NotFoundResponse | 404 | application/json | +| models.UnprocessableResponse | 422 | application/json | +| models.APIError | 4XX, 5XX | \*/\* | + +## update + +Update Bank Feed Statement + +### Example Usage + +```python +import apideck_unify +from apideck_unify import Apideck +from apideck_unify.utils import parse_datetime +import os + + +with Apideck( + api_key=os.getenv("APIDECK_API_KEY", ""), + consumer_id="test-consumer", + app_id="dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX", +) as apideck: + + res = apideck.accounting.bank_feed_statements.update(id="", consumer_id="test-consumer", app_id="dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX", service_id="salesforce", bank_feed_account_id="acc_456", status=apideck_unify.StatementStatus.PENDING, start_date=parse_datetime("2021-05-01T12:00:00.000Z"), end_date=parse_datetime("2025-01-31T12:00:00.000Z"), start_balance=10500.25, start_balance_credit_or_debit=apideck_unify.CreditOrDebit.DEBIT, end_balance=9800.5, end_balance_credit_or_debit=apideck_unify.CreditOrDebit.DEBIT, transactions=[ + { + "posted_date": parse_datetime("2025-01-15T12:00:00.000Z"), + "description": "Payment received from ACME Corp", + "amount": 250, + "credit_or_debit": apideck_unify.CreditOrDebit.DEBIT, + "source_transaction_id": "txn_987", + "counterparty": "ACME Corp", + "reference": "INV-2025-01", + "transaction_type": apideck_unify.BankFeedStatementTransactionType.PAYMENT, + }, + { + "posted_date": parse_datetime("2025-01-15T12:00:00.000Z"), + "description": "Payment received from ACME Corp", + "amount": 250, + "credit_or_debit": apideck_unify.CreditOrDebit.DEBIT, + "source_transaction_id": "txn_987", + "counterparty": "ACME Corp", + "reference": "INV-2025-01", + "transaction_type": apideck_unify.BankFeedStatementTransactionType.PAYMENT, + }, + { + "posted_date": parse_datetime("2025-01-15T12:00:00.000Z"), + "description": "Payment received from ACME Corp", + "amount": 250, + "credit_or_debit": apideck_unify.CreditOrDebit.DEBIT, + "source_transaction_id": "txn_987", + "counterparty": "ACME Corp", + "reference": "INV-2025-01", + "transaction_type": apideck_unify.BankFeedStatementTransactionType.PAYMENT, + }, + ]) + + assert res.update_bank_feed_statement_response is not None + + # Handle response + print(res.update_bank_feed_statement_response) + +``` + +### Parameters + +| Parameter | Type | Required | Description | Example | +| --------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *str* | :heavy_check_mark: | ID of the record you are acting upon. | | +| `consumer_id` | *Optional[str]* | :heavy_minus_sign: | ID of the consumer which you want to get or push data from | test-consumer | +| `app_id` | *Optional[str]* | :heavy_minus_sign: | The ID of your Unify application | dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX | +| `service_id` | *Optional[str]* | :heavy_minus_sign: | Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API. | salesforce | +| `raw` | *Optional[bool]* | :heavy_minus_sign: | Include raw response. Mostly used for debugging purposes | | +| `bank_feed_account_id` | *Optional[str]* | :heavy_minus_sign: | The ID of the bank feed account this statement belongs to. | acc_456 | +| `status` | [Optional[models.StatementStatus]](../../models/statementstatus.md) | :heavy_minus_sign: | The current status of the bank feed statement. | pending | +| `start_date` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_minus_sign: | Start date of the bank feed statement. | 2021-05-01T12:00:00.000Z | +| `end_date` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_minus_sign: | End date of the bank feed statement. | 2025-01-31T12:00:00.000Z | +| `start_balance` | *Optional[float]* | :heavy_minus_sign: | Balance amount at the start of the period. | 10500.25 | +| `start_balance_credit_or_debit` | [Optional[models.CreditOrDebit]](../../models/creditordebit.md) | :heavy_minus_sign: | Whether the amount is a credit or debit. | debit | +| `end_balance` | *Optional[float]* | :heavy_minus_sign: | Balance amount at the end of the period. | 9800.5 | +| `end_balance_credit_or_debit` | [Optional[models.CreditOrDebit]](../../models/creditordebit.md) | :heavy_minus_sign: | Whether the amount is a credit or debit. | debit | +| `transactions` | List[[models.Transactions](../../models/transactions.md)] | :heavy_minus_sign: | List of transactions in the bank feed statement. | | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | | + +### Response + +**[models.AccountingBankFeedStatementsUpdateResponse](../../models/accountingbankfeedstatementsupdateresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ------------------------------ | ------------------------------ | ------------------------------ | +| models.BadRequestResponse | 400 | application/json | +| models.UnauthorizedResponse | 401 | application/json | +| models.PaymentRequiredResponse | 402 | application/json | +| models.NotFoundResponse | 404 | application/json | +| models.UnprocessableResponse | 422 | application/json | +| models.APIError | 4XX, 5XX | \*/\* | + +## delete + +Delete Bank Feed Statement + +### Example Usage + +```python +from apideck_unify import Apideck +import os + + +with Apideck( + api_key=os.getenv("APIDECK_API_KEY", ""), + consumer_id="test-consumer", + app_id="dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX", +) as apideck: + + res = apideck.accounting.bank_feed_statements.delete(id="", consumer_id="test-consumer", app_id="dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX", service_id="salesforce") + + assert res.delete_bank_feed_statement_response is not None + + # Handle response + print(res.delete_bank_feed_statement_response) + +``` + +### Parameters + +| Parameter | Type | Required | Description | Example | +| --------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *str* | :heavy_check_mark: | ID of the record you are acting upon. | | +| `consumer_id` | *Optional[str]* | :heavy_minus_sign: | ID of the consumer which you want to get or push data from | test-consumer | +| `app_id` | *Optional[str]* | :heavy_minus_sign: | The ID of your Unify application | dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX | +| `service_id` | *Optional[str]* | :heavy_minus_sign: | Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API. | salesforce | +| `raw` | *Optional[bool]* | :heavy_minus_sign: | Include raw response. Mostly used for debugging purposes | | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | | + +### Response + +**[models.AccountingBankFeedStatementsDeleteResponse](../../models/accountingbankfeedstatementsdeleteresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ------------------------------ | ------------------------------ | ------------------------------ | +| models.BadRequestResponse | 400 | application/json | +| models.UnauthorizedResponse | 401 | application/json | +| models.PaymentRequiredResponse | 402 | application/json | +| models.NotFoundResponse | 404 | application/json | +| models.UnprocessableResponse | 422 | application/json | +| models.APIError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/poetry.lock b/poetry.lock index efd92699..c8d73a3a 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1,4 +1,4 @@ -# This file is automatically @generated by Poetry 2.1.2 and should not be changed by hand. +# This file is automatically @generated by Poetry 2.1.3 and should not be changed by hand. [[package]] name = "annotated-types" @@ -564,5 +564,5 @@ typing-extensions = ">=4.12.0" [metadata] lock-version = "2.1" -python-versions = ">=3.9" -content-hash = "6cad13cf7de0e6ac37e32587119a5079460e1b33ab20454449bcdd8dfec35450" +python-versions = ">=3.9.2" +content-hash = "8cd9cfb7ba8b124df79ba136fb5ce4a42ae8a587541554066da7ecad967c07d8" diff --git a/pyproject.toml b/pyproject.toml index 3a4957a0..149a3287 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,10 +1,10 @@ [project] name = "apideck-unify" -version = "0.14.1" +version = "0.15.0" description = "Python Client SDK Generated by Speakeasy." authors = [{ name = "Speakeasy" },] readme = "README-PYPI.md" -requires-python = ">=3.9" +requires-python = ">=3.9.2" dependencies = [ "httpx >=0.28.1", "jsonpath-python >=1.0.6", diff --git a/src/apideck_unify/_version.py b/src/apideck_unify/_version.py index de11a348..0f22fb49 100644 --- a/src/apideck_unify/_version.py +++ b/src/apideck_unify/_version.py @@ -3,10 +3,10 @@ import importlib.metadata __title__: str = "apideck-unify" -__version__: str = "0.14.1" +__version__: str = "0.15.0" __openapi_doc_version__: str = "10.16.5" -__gen_version__: str = "2.598.21" -__user_agent__: str = "speakeasy-sdk/python 0.14.1 2.598.21 10.16.5 apideck-unify" +__gen_version__: str = "2.599.0" +__user_agent__: str = "speakeasy-sdk/python 0.15.0 2.599.0 10.16.5 apideck-unify" try: if __package__ is not None: diff --git a/src/apideck_unify/accounting.py b/src/apideck_unify/accounting.py index 3b930dff..cab16f95 100644 --- a/src/apideck_unify/accounting.py +++ b/src/apideck_unify/accounting.py @@ -6,6 +6,8 @@ from apideck_unify.ageddebtors_sdk import AgedDebtorsSDK from apideck_unify.attachments import Attachments from apideck_unify.balancesheet_sdk import BalanceSheetSDK +from apideck_unify.bankfeedaccounts import BankFeedAccounts +from apideck_unify.bankfeedstatements import BankFeedStatements from apideck_unify.billpayments import BillPayments from apideck_unify.bills import Bills from apideck_unify.companyinfo_sdk import CompanyInfoSDK @@ -51,6 +53,8 @@ class Accounting(BaseSDK): expenses: Expenses aged_creditors: AgedCreditorsSDK aged_debtors: AgedDebtorsSDK + bank_feed_accounts: BankFeedAccounts + bank_feed_statements: BankFeedStatements def __init__(self, sdk_config: SDKConfiguration) -> None: BaseSDK.__init__(self, sdk_config) @@ -81,3 +85,5 @@ def _init_sdks(self): self.expenses = Expenses(self.sdk_configuration) self.aged_creditors = AgedCreditorsSDK(self.sdk_configuration) self.aged_debtors = AgedDebtorsSDK(self.sdk_configuration) + self.bank_feed_accounts = BankFeedAccounts(self.sdk_configuration) + self.bank_feed_statements = BankFeedStatements(self.sdk_configuration) diff --git a/src/apideck_unify/bankfeedaccounts.py b/src/apideck_unify/bankfeedaccounts.py new file mode 100644 index 00000000..d0935f38 --- /dev/null +++ b/src/apideck_unify/bankfeedaccounts.py @@ -0,0 +1,1749 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from .basesdk import BaseSDK +from apideck_unify import models, utils +from apideck_unify._hooks import HookContext +from apideck_unify.types import OptionalNullable, UNSET +from apideck_unify.utils import get_security_from_env +from jsonpath import JSONPath +from typing import Any, Dict, List, Mapping, Optional, Union + + +class BankFeedAccounts(BaseSDK): + def list( + self, + *, + raw: Optional[bool] = False, + consumer_id: Optional[str] = None, + app_id: Optional[str] = None, + service_id: Optional[str] = None, + cursor: OptionalNullable[str] = UNSET, + limit: Optional[int] = 20, + pass_through: Optional[Dict[str, Any]] = None, + fields: OptionalNullable[str] = UNSET, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> Optional[models.AccountingBankFeedAccountsAllResponse]: + r"""List Bank Feed Accounts + + List Bank Feed Accounts + + :param raw: Include raw response. Mostly used for debugging purposes + :param consumer_id: ID of the consumer which you want to get or push data from + :param app_id: The ID of your Unify application + :param service_id: Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API. + :param cursor: Cursor to start from. You can find cursors for next/previous pages in the meta.cursors property of the response. + :param limit: Number of results to return. Minimum 1, Maximum 200, Default 20 + :param pass_through: Optional unmapped key/values that will be passed through to downstream as query parameters. Ie: ?pass_through[search]=leads becomes ?search=leads + :param fields: The 'fields' parameter allows API users to specify the fields they want to include in the API response. If this parameter is not present, the API will return all available fields. If this parameter is present, only the fields specified in the comma-separated string will be included in the response. Nested properties can also be requested by using a dot notation.

Example: `fields=name,email,addresses.city`

In the example above, the response will only include the fields \"name\", \"email\" and \"addresses.city\". If any other fields are available, they will be excluded. + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.AccountingBankFeedAccountsAllRequest( + raw=raw, + consumer_id=consumer_id, + app_id=app_id, + service_id=service_id, + cursor=cursor, + limit=limit, + pass_through=pass_through, + fields=fields, + ) + + req = self._build_request( + method="GET", + path="/accounting/bank-feed-accounts", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + _globals=models.AccountingBankFeedAccountsAllGlobals( + consumer_id=self.sdk_configuration.globals.consumer_id, + app_id=self.sdk_configuration.globals.app_id, + ), + security=self.sdk_configuration.security, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + else: + retries = utils.RetryConfig( + "backoff", utils.BackoffStrategy(500, 60000, 1.5, 3600000), True + ) + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["408", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + base_url=base_url or "", + operation_id="accounting.bankFeedAccountsAll", + oauth2_scopes=[], + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["400", "401", "402", "404", "422", "4XX", "5XX"], + retry_config=retry_config, + ) + + def next_func() -> Optional[models.AccountingBankFeedAccountsAllResponse]: + body = utils.unmarshal_json(http_res.text, Union[Dict[Any, Any], List[Any]]) + next_cursor = JSONPath("$.meta.cursors.next").parse(body) + + if len(next_cursor) == 0: + return None + + next_cursor = next_cursor[0] + if next_cursor is None: + return None + + return self.list( + raw=raw, + consumer_id=consumer_id, + app_id=app_id, + service_id=service_id, + cursor=next_cursor, + limit=limit, + pass_through=pass_through, + fields=fields, + retries=retries, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return models.AccountingBankFeedAccountsAllResponse( + get_bank_feed_accounts_response=utils.unmarshal_json( + http_res.text, Optional[models.GetBankFeedAccountsResponse] + ), + http_meta=models.HTTPMetadata(request=req, response=http_res), + next=next_func, + ) + if utils.match_response(http_res, "400", "application/json"): + response_data = utils.unmarshal_json( + http_res.text, models.BadRequestResponseData + ) + raise models.BadRequestResponse(data=response_data) + if utils.match_response(http_res, "401", "application/json"): + response_data = utils.unmarshal_json( + http_res.text, models.UnauthorizedResponseData + ) + raise models.UnauthorizedResponse(data=response_data) + if utils.match_response(http_res, "402", "application/json"): + response_data = utils.unmarshal_json( + http_res.text, models.PaymentRequiredResponseData + ) + raise models.PaymentRequiredResponse(data=response_data) + if utils.match_response(http_res, "404", "application/json"): + response_data = utils.unmarshal_json( + http_res.text, models.NotFoundResponseData + ) + raise models.NotFoundResponse(data=response_data) + if utils.match_response(http_res, "422", "application/json"): + response_data = utils.unmarshal_json( + http_res.text, models.UnprocessableResponseData + ) + raise models.UnprocessableResponse(data=response_data) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise models.APIError( + "API error occurred", http_res.status_code, http_res_text, http_res + ) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise models.APIError( + "API error occurred", http_res.status_code, http_res_text, http_res + ) + if utils.match_response(http_res, "default", "application/json"): + return models.AccountingBankFeedAccountsAllResponse( + unexpected_error_response=utils.unmarshal_json( + http_res.text, Optional[models.UnexpectedErrorResponse] + ), + http_meta=models.HTTPMetadata(request=req, response=http_res), + next=next_func, + ) + + content_type = http_res.headers.get("Content-Type") + http_res_text = utils.stream_to_text(http_res) + raise models.APIError( + f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", + http_res.status_code, + http_res_text, + http_res, + ) + + async def list_async( + self, + *, + raw: Optional[bool] = False, + consumer_id: Optional[str] = None, + app_id: Optional[str] = None, + service_id: Optional[str] = None, + cursor: OptionalNullable[str] = UNSET, + limit: Optional[int] = 20, + pass_through: Optional[Dict[str, Any]] = None, + fields: OptionalNullable[str] = UNSET, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> Optional[models.AccountingBankFeedAccountsAllResponse]: + r"""List Bank Feed Accounts + + List Bank Feed Accounts + + :param raw: Include raw response. Mostly used for debugging purposes + :param consumer_id: ID of the consumer which you want to get or push data from + :param app_id: The ID of your Unify application + :param service_id: Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API. + :param cursor: Cursor to start from. You can find cursors for next/previous pages in the meta.cursors property of the response. + :param limit: Number of results to return. Minimum 1, Maximum 200, Default 20 + :param pass_through: Optional unmapped key/values that will be passed through to downstream as query parameters. Ie: ?pass_through[search]=leads becomes ?search=leads + :param fields: The 'fields' parameter allows API users to specify the fields they want to include in the API response. If this parameter is not present, the API will return all available fields. If this parameter is present, only the fields specified in the comma-separated string will be included in the response. Nested properties can also be requested by using a dot notation.

Example: `fields=name,email,addresses.city`

In the example above, the response will only include the fields \"name\", \"email\" and \"addresses.city\". If any other fields are available, they will be excluded. + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.AccountingBankFeedAccountsAllRequest( + raw=raw, + consumer_id=consumer_id, + app_id=app_id, + service_id=service_id, + cursor=cursor, + limit=limit, + pass_through=pass_through, + fields=fields, + ) + + req = self._build_request_async( + method="GET", + path="/accounting/bank-feed-accounts", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + _globals=models.AccountingBankFeedAccountsAllGlobals( + consumer_id=self.sdk_configuration.globals.consumer_id, + app_id=self.sdk_configuration.globals.app_id, + ), + security=self.sdk_configuration.security, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + else: + retries = utils.RetryConfig( + "backoff", utils.BackoffStrategy(500, 60000, 1.5, 3600000), True + ) + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["408", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + base_url=base_url or "", + operation_id="accounting.bankFeedAccountsAll", + oauth2_scopes=[], + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["400", "401", "402", "404", "422", "4XX", "5XX"], + retry_config=retry_config, + ) + + def next_func() -> Optional[models.AccountingBankFeedAccountsAllResponse]: + body = utils.unmarshal_json(http_res.text, Union[Dict[Any, Any], List[Any]]) + next_cursor = JSONPath("$.meta.cursors.next").parse(body) + + if len(next_cursor) == 0: + return None + + next_cursor = next_cursor[0] + if next_cursor is None: + return None + + return self.list( + raw=raw, + consumer_id=consumer_id, + app_id=app_id, + service_id=service_id, + cursor=next_cursor, + limit=limit, + pass_through=pass_through, + fields=fields, + retries=retries, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return models.AccountingBankFeedAccountsAllResponse( + get_bank_feed_accounts_response=utils.unmarshal_json( + http_res.text, Optional[models.GetBankFeedAccountsResponse] + ), + http_meta=models.HTTPMetadata(request=req, response=http_res), + next=next_func, + ) + if utils.match_response(http_res, "400", "application/json"): + response_data = utils.unmarshal_json( + http_res.text, models.BadRequestResponseData + ) + raise models.BadRequestResponse(data=response_data) + if utils.match_response(http_res, "401", "application/json"): + response_data = utils.unmarshal_json( + http_res.text, models.UnauthorizedResponseData + ) + raise models.UnauthorizedResponse(data=response_data) + if utils.match_response(http_res, "402", "application/json"): + response_data = utils.unmarshal_json( + http_res.text, models.PaymentRequiredResponseData + ) + raise models.PaymentRequiredResponse(data=response_data) + if utils.match_response(http_res, "404", "application/json"): + response_data = utils.unmarshal_json( + http_res.text, models.NotFoundResponseData + ) + raise models.NotFoundResponse(data=response_data) + if utils.match_response(http_res, "422", "application/json"): + response_data = utils.unmarshal_json( + http_res.text, models.UnprocessableResponseData + ) + raise models.UnprocessableResponse(data=response_data) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise models.APIError( + "API error occurred", http_res.status_code, http_res_text, http_res + ) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise models.APIError( + "API error occurred", http_res.status_code, http_res_text, http_res + ) + if utils.match_response(http_res, "default", "application/json"): + return models.AccountingBankFeedAccountsAllResponse( + unexpected_error_response=utils.unmarshal_json( + http_res.text, Optional[models.UnexpectedErrorResponse] + ), + http_meta=models.HTTPMetadata(request=req, response=http_res), + next=next_func, + ) + + content_type = http_res.headers.get("Content-Type") + http_res_text = await utils.stream_to_text_async(http_res) + raise models.APIError( + f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", + http_res.status_code, + http_res_text, + http_res, + ) + + def create( + self, + *, + raw: Optional[bool] = False, + consumer_id: Optional[str] = None, + app_id: Optional[str] = None, + service_id: Optional[str] = None, + bank_account_type: Optional[models.BankAccountType] = None, + source_account_id: Optional[str] = None, + target_account_id: Optional[str] = None, + target_account_name: Optional[str] = None, + target_account_number: Optional[str] = None, + currency: OptionalNullable[models.Currency] = UNSET, + feed_status: Optional[models.FeedStatus] = None, + country: OptionalNullable[str] = UNSET, + custom_fields: Optional[ + Union[List[models.CustomField], List[models.CustomFieldTypedDict]] + ] = None, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.AccountingBankFeedAccountsAddResponse: + r"""Create Bank Feed Account + + Create Bank Feed Account + + :param raw: Include raw response. Mostly used for debugging purposes + :param consumer_id: ID of the consumer which you want to get or push data from + :param app_id: The ID of your Unify application + :param service_id: Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API. + :param bank_account_type: Type of the bank account. + :param source_account_id: The source account's unique identifier. + :param target_account_id: The target account's unique identifier in the accounting connector. + :param target_account_name: Name associated with the target account. + :param target_account_number: Account number of the destination bank account. + :param currency: Indicates the associated currency for an amount of money. Values correspond to [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217). + :param feed_status: Current status of the bank feed. + :param country: Country code according to ISO 3166-1 alpha-2. + :param custom_fields: + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.AccountingBankFeedAccountsAddRequest( + raw=raw, + consumer_id=consumer_id, + app_id=app_id, + service_id=service_id, + bank_feed_account=models.BankFeedAccountInput( + bank_account_type=bank_account_type, + source_account_id=source_account_id, + target_account_id=target_account_id, + target_account_name=target_account_name, + target_account_number=target_account_number, + currency=currency, + feed_status=feed_status, + country=country, + custom_fields=utils.get_pydantic_model( + custom_fields, Optional[List[models.CustomField]] + ), + ), + ) + + req = self._build_request( + method="POST", + path="/accounting/bank-feed-accounts", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=True, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + _globals=models.AccountingBankFeedAccountsAddGlobals( + consumer_id=self.sdk_configuration.globals.consumer_id, + app_id=self.sdk_configuration.globals.app_id, + ), + security=self.sdk_configuration.security, + get_serialized_body=lambda: utils.serialize_request_body( + request.bank_feed_account, + False, + False, + "json", + models.BankFeedAccountInput, + ), + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + else: + retries = utils.RetryConfig( + "backoff", utils.BackoffStrategy(500, 60000, 1.5, 3600000), True + ) + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["408", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + base_url=base_url or "", + operation_id="accounting.bankFeedAccountsAdd", + oauth2_scopes=[], + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["400", "401", "402", "404", "422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "201", "application/json"): + return models.AccountingBankFeedAccountsAddResponse( + create_bank_feed_account_response=utils.unmarshal_json( + http_res.text, Optional[models.CreateBankFeedAccountResponse] + ), + http_meta=models.HTTPMetadata(request=req, response=http_res), + ) + if utils.match_response(http_res, "400", "application/json"): + response_data = utils.unmarshal_json( + http_res.text, models.BadRequestResponseData + ) + raise models.BadRequestResponse(data=response_data) + if utils.match_response(http_res, "401", "application/json"): + response_data = utils.unmarshal_json( + http_res.text, models.UnauthorizedResponseData + ) + raise models.UnauthorizedResponse(data=response_data) + if utils.match_response(http_res, "402", "application/json"): + response_data = utils.unmarshal_json( + http_res.text, models.PaymentRequiredResponseData + ) + raise models.PaymentRequiredResponse(data=response_data) + if utils.match_response(http_res, "404", "application/json"): + response_data = utils.unmarshal_json( + http_res.text, models.NotFoundResponseData + ) + raise models.NotFoundResponse(data=response_data) + if utils.match_response(http_res, "422", "application/json"): + response_data = utils.unmarshal_json( + http_res.text, models.UnprocessableResponseData + ) + raise models.UnprocessableResponse(data=response_data) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise models.APIError( + "API error occurred", http_res.status_code, http_res_text, http_res + ) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise models.APIError( + "API error occurred", http_res.status_code, http_res_text, http_res + ) + if utils.match_response(http_res, "default", "application/json"): + return models.AccountingBankFeedAccountsAddResponse( + unexpected_error_response=utils.unmarshal_json( + http_res.text, Optional[models.UnexpectedErrorResponse] + ), + http_meta=models.HTTPMetadata(request=req, response=http_res), + ) + + content_type = http_res.headers.get("Content-Type") + http_res_text = utils.stream_to_text(http_res) + raise models.APIError( + f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", + http_res.status_code, + http_res_text, + http_res, + ) + + async def create_async( + self, + *, + raw: Optional[bool] = False, + consumer_id: Optional[str] = None, + app_id: Optional[str] = None, + service_id: Optional[str] = None, + bank_account_type: Optional[models.BankAccountType] = None, + source_account_id: Optional[str] = None, + target_account_id: Optional[str] = None, + target_account_name: Optional[str] = None, + target_account_number: Optional[str] = None, + currency: OptionalNullable[models.Currency] = UNSET, + feed_status: Optional[models.FeedStatus] = None, + country: OptionalNullable[str] = UNSET, + custom_fields: Optional[ + Union[List[models.CustomField], List[models.CustomFieldTypedDict]] + ] = None, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.AccountingBankFeedAccountsAddResponse: + r"""Create Bank Feed Account + + Create Bank Feed Account + + :param raw: Include raw response. Mostly used for debugging purposes + :param consumer_id: ID of the consumer which you want to get or push data from + :param app_id: The ID of your Unify application + :param service_id: Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API. + :param bank_account_type: Type of the bank account. + :param source_account_id: The source account's unique identifier. + :param target_account_id: The target account's unique identifier in the accounting connector. + :param target_account_name: Name associated with the target account. + :param target_account_number: Account number of the destination bank account. + :param currency: Indicates the associated currency for an amount of money. Values correspond to [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217). + :param feed_status: Current status of the bank feed. + :param country: Country code according to ISO 3166-1 alpha-2. + :param custom_fields: + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.AccountingBankFeedAccountsAddRequest( + raw=raw, + consumer_id=consumer_id, + app_id=app_id, + service_id=service_id, + bank_feed_account=models.BankFeedAccountInput( + bank_account_type=bank_account_type, + source_account_id=source_account_id, + target_account_id=target_account_id, + target_account_name=target_account_name, + target_account_number=target_account_number, + currency=currency, + feed_status=feed_status, + country=country, + custom_fields=utils.get_pydantic_model( + custom_fields, Optional[List[models.CustomField]] + ), + ), + ) + + req = self._build_request_async( + method="POST", + path="/accounting/bank-feed-accounts", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=True, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + _globals=models.AccountingBankFeedAccountsAddGlobals( + consumer_id=self.sdk_configuration.globals.consumer_id, + app_id=self.sdk_configuration.globals.app_id, + ), + security=self.sdk_configuration.security, + get_serialized_body=lambda: utils.serialize_request_body( + request.bank_feed_account, + False, + False, + "json", + models.BankFeedAccountInput, + ), + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + else: + retries = utils.RetryConfig( + "backoff", utils.BackoffStrategy(500, 60000, 1.5, 3600000), True + ) + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["408", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + base_url=base_url or "", + operation_id="accounting.bankFeedAccountsAdd", + oauth2_scopes=[], + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["400", "401", "402", "404", "422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "201", "application/json"): + return models.AccountingBankFeedAccountsAddResponse( + create_bank_feed_account_response=utils.unmarshal_json( + http_res.text, Optional[models.CreateBankFeedAccountResponse] + ), + http_meta=models.HTTPMetadata(request=req, response=http_res), + ) + if utils.match_response(http_res, "400", "application/json"): + response_data = utils.unmarshal_json( + http_res.text, models.BadRequestResponseData + ) + raise models.BadRequestResponse(data=response_data) + if utils.match_response(http_res, "401", "application/json"): + response_data = utils.unmarshal_json( + http_res.text, models.UnauthorizedResponseData + ) + raise models.UnauthorizedResponse(data=response_data) + if utils.match_response(http_res, "402", "application/json"): + response_data = utils.unmarshal_json( + http_res.text, models.PaymentRequiredResponseData + ) + raise models.PaymentRequiredResponse(data=response_data) + if utils.match_response(http_res, "404", "application/json"): + response_data = utils.unmarshal_json( + http_res.text, models.NotFoundResponseData + ) + raise models.NotFoundResponse(data=response_data) + if utils.match_response(http_res, "422", "application/json"): + response_data = utils.unmarshal_json( + http_res.text, models.UnprocessableResponseData + ) + raise models.UnprocessableResponse(data=response_data) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise models.APIError( + "API error occurred", http_res.status_code, http_res_text, http_res + ) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise models.APIError( + "API error occurred", http_res.status_code, http_res_text, http_res + ) + if utils.match_response(http_res, "default", "application/json"): + return models.AccountingBankFeedAccountsAddResponse( + unexpected_error_response=utils.unmarshal_json( + http_res.text, Optional[models.UnexpectedErrorResponse] + ), + http_meta=models.HTTPMetadata(request=req, response=http_res), + ) + + content_type = http_res.headers.get("Content-Type") + http_res_text = await utils.stream_to_text_async(http_res) + raise models.APIError( + f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", + http_res.status_code, + http_res_text, + http_res, + ) + + def get( + self, + *, + id: str, + consumer_id: Optional[str] = None, + app_id: Optional[str] = None, + service_id: Optional[str] = None, + raw: Optional[bool] = False, + fields: OptionalNullable[str] = UNSET, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.AccountingBankFeedAccountsOneResponse: + r"""Get Bank Feed Account + + Get Bank Feed Account + + :param id: ID of the record you are acting upon. + :param consumer_id: ID of the consumer which you want to get or push data from + :param app_id: The ID of your Unify application + :param service_id: Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API. + :param raw: Include raw response. Mostly used for debugging purposes + :param fields: The 'fields' parameter allows API users to specify the fields they want to include in the API response. If this parameter is not present, the API will return all available fields. If this parameter is present, only the fields specified in the comma-separated string will be included in the response. Nested properties can also be requested by using a dot notation.

Example: `fields=name,email,addresses.city`

In the example above, the response will only include the fields \"name\", \"email\" and \"addresses.city\". If any other fields are available, they will be excluded. + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.AccountingBankFeedAccountsOneRequest( + id=id, + consumer_id=consumer_id, + app_id=app_id, + service_id=service_id, + raw=raw, + fields=fields, + ) + + req = self._build_request( + method="GET", + path="/accounting/bank-feed-accounts/{id}", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + _globals=models.AccountingBankFeedAccountsOneGlobals( + consumer_id=self.sdk_configuration.globals.consumer_id, + app_id=self.sdk_configuration.globals.app_id, + ), + security=self.sdk_configuration.security, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + else: + retries = utils.RetryConfig( + "backoff", utils.BackoffStrategy(500, 60000, 1.5, 3600000), True + ) + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["408", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + base_url=base_url or "", + operation_id="accounting.bankFeedAccountsOne", + oauth2_scopes=[], + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["400", "401", "402", "404", "422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return models.AccountingBankFeedAccountsOneResponse( + get_bank_feed_account_response=utils.unmarshal_json( + http_res.text, Optional[models.GetBankFeedAccountResponse] + ), + http_meta=models.HTTPMetadata(request=req, response=http_res), + ) + if utils.match_response(http_res, "400", "application/json"): + response_data = utils.unmarshal_json( + http_res.text, models.BadRequestResponseData + ) + raise models.BadRequestResponse(data=response_data) + if utils.match_response(http_res, "401", "application/json"): + response_data = utils.unmarshal_json( + http_res.text, models.UnauthorizedResponseData + ) + raise models.UnauthorizedResponse(data=response_data) + if utils.match_response(http_res, "402", "application/json"): + response_data = utils.unmarshal_json( + http_res.text, models.PaymentRequiredResponseData + ) + raise models.PaymentRequiredResponse(data=response_data) + if utils.match_response(http_res, "404", "application/json"): + response_data = utils.unmarshal_json( + http_res.text, models.NotFoundResponseData + ) + raise models.NotFoundResponse(data=response_data) + if utils.match_response(http_res, "422", "application/json"): + response_data = utils.unmarshal_json( + http_res.text, models.UnprocessableResponseData + ) + raise models.UnprocessableResponse(data=response_data) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise models.APIError( + "API error occurred", http_res.status_code, http_res_text, http_res + ) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise models.APIError( + "API error occurred", http_res.status_code, http_res_text, http_res + ) + if utils.match_response(http_res, "default", "application/json"): + return models.AccountingBankFeedAccountsOneResponse( + unexpected_error_response=utils.unmarshal_json( + http_res.text, Optional[models.UnexpectedErrorResponse] + ), + http_meta=models.HTTPMetadata(request=req, response=http_res), + ) + + content_type = http_res.headers.get("Content-Type") + http_res_text = utils.stream_to_text(http_res) + raise models.APIError( + f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", + http_res.status_code, + http_res_text, + http_res, + ) + + async def get_async( + self, + *, + id: str, + consumer_id: Optional[str] = None, + app_id: Optional[str] = None, + service_id: Optional[str] = None, + raw: Optional[bool] = False, + fields: OptionalNullable[str] = UNSET, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.AccountingBankFeedAccountsOneResponse: + r"""Get Bank Feed Account + + Get Bank Feed Account + + :param id: ID of the record you are acting upon. + :param consumer_id: ID of the consumer which you want to get or push data from + :param app_id: The ID of your Unify application + :param service_id: Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API. + :param raw: Include raw response. Mostly used for debugging purposes + :param fields: The 'fields' parameter allows API users to specify the fields they want to include in the API response. If this parameter is not present, the API will return all available fields. If this parameter is present, only the fields specified in the comma-separated string will be included in the response. Nested properties can also be requested by using a dot notation.

Example: `fields=name,email,addresses.city`

In the example above, the response will only include the fields \"name\", \"email\" and \"addresses.city\". If any other fields are available, they will be excluded. + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.AccountingBankFeedAccountsOneRequest( + id=id, + consumer_id=consumer_id, + app_id=app_id, + service_id=service_id, + raw=raw, + fields=fields, + ) + + req = self._build_request_async( + method="GET", + path="/accounting/bank-feed-accounts/{id}", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + _globals=models.AccountingBankFeedAccountsOneGlobals( + consumer_id=self.sdk_configuration.globals.consumer_id, + app_id=self.sdk_configuration.globals.app_id, + ), + security=self.sdk_configuration.security, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + else: + retries = utils.RetryConfig( + "backoff", utils.BackoffStrategy(500, 60000, 1.5, 3600000), True + ) + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["408", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + base_url=base_url or "", + operation_id="accounting.bankFeedAccountsOne", + oauth2_scopes=[], + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["400", "401", "402", "404", "422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return models.AccountingBankFeedAccountsOneResponse( + get_bank_feed_account_response=utils.unmarshal_json( + http_res.text, Optional[models.GetBankFeedAccountResponse] + ), + http_meta=models.HTTPMetadata(request=req, response=http_res), + ) + if utils.match_response(http_res, "400", "application/json"): + response_data = utils.unmarshal_json( + http_res.text, models.BadRequestResponseData + ) + raise models.BadRequestResponse(data=response_data) + if utils.match_response(http_res, "401", "application/json"): + response_data = utils.unmarshal_json( + http_res.text, models.UnauthorizedResponseData + ) + raise models.UnauthorizedResponse(data=response_data) + if utils.match_response(http_res, "402", "application/json"): + response_data = utils.unmarshal_json( + http_res.text, models.PaymentRequiredResponseData + ) + raise models.PaymentRequiredResponse(data=response_data) + if utils.match_response(http_res, "404", "application/json"): + response_data = utils.unmarshal_json( + http_res.text, models.NotFoundResponseData + ) + raise models.NotFoundResponse(data=response_data) + if utils.match_response(http_res, "422", "application/json"): + response_data = utils.unmarshal_json( + http_res.text, models.UnprocessableResponseData + ) + raise models.UnprocessableResponse(data=response_data) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise models.APIError( + "API error occurred", http_res.status_code, http_res_text, http_res + ) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise models.APIError( + "API error occurred", http_res.status_code, http_res_text, http_res + ) + if utils.match_response(http_res, "default", "application/json"): + return models.AccountingBankFeedAccountsOneResponse( + unexpected_error_response=utils.unmarshal_json( + http_res.text, Optional[models.UnexpectedErrorResponse] + ), + http_meta=models.HTTPMetadata(request=req, response=http_res), + ) + + content_type = http_res.headers.get("Content-Type") + http_res_text = await utils.stream_to_text_async(http_res) + raise models.APIError( + f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", + http_res.status_code, + http_res_text, + http_res, + ) + + def update( + self, + *, + id: str, + consumer_id: Optional[str] = None, + app_id: Optional[str] = None, + service_id: Optional[str] = None, + raw: Optional[bool] = False, + bank_account_type: Optional[models.BankAccountType] = None, + source_account_id: Optional[str] = None, + target_account_id: Optional[str] = None, + target_account_name: Optional[str] = None, + target_account_number: Optional[str] = None, + currency: OptionalNullable[models.Currency] = UNSET, + feed_status: Optional[models.FeedStatus] = None, + country: OptionalNullable[str] = UNSET, + custom_fields: Optional[ + Union[List[models.CustomField], List[models.CustomFieldTypedDict]] + ] = None, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.AccountingBankFeedAccountsUpdateResponse: + r"""Update Bank Feed Account + + Update Bank Feed Account + + :param id: ID of the record you are acting upon. + :param consumer_id: ID of the consumer which you want to get or push data from + :param app_id: The ID of your Unify application + :param service_id: Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API. + :param raw: Include raw response. Mostly used for debugging purposes + :param bank_account_type: Type of the bank account. + :param source_account_id: The source account's unique identifier. + :param target_account_id: The target account's unique identifier in the accounting connector. + :param target_account_name: Name associated with the target account. + :param target_account_number: Account number of the destination bank account. + :param currency: Indicates the associated currency for an amount of money. Values correspond to [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217). + :param feed_status: Current status of the bank feed. + :param country: Country code according to ISO 3166-1 alpha-2. + :param custom_fields: + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.AccountingBankFeedAccountsUpdateRequest( + id=id, + consumer_id=consumer_id, + app_id=app_id, + service_id=service_id, + raw=raw, + bank_feed_account=models.BankFeedAccountInput( + bank_account_type=bank_account_type, + source_account_id=source_account_id, + target_account_id=target_account_id, + target_account_name=target_account_name, + target_account_number=target_account_number, + currency=currency, + feed_status=feed_status, + country=country, + custom_fields=utils.get_pydantic_model( + custom_fields, Optional[List[models.CustomField]] + ), + ), + ) + + req = self._build_request( + method="PATCH", + path="/accounting/bank-feed-accounts/{id}", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=True, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + _globals=models.AccountingBankFeedAccountsUpdateGlobals( + consumer_id=self.sdk_configuration.globals.consumer_id, + app_id=self.sdk_configuration.globals.app_id, + ), + security=self.sdk_configuration.security, + get_serialized_body=lambda: utils.serialize_request_body( + request.bank_feed_account, + False, + False, + "json", + models.BankFeedAccountInput, + ), + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + else: + retries = utils.RetryConfig( + "backoff", utils.BackoffStrategy(500, 60000, 1.5, 3600000), True + ) + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["408", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + base_url=base_url or "", + operation_id="accounting.bankFeedAccountsUpdate", + oauth2_scopes=[], + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["400", "401", "402", "404", "422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return models.AccountingBankFeedAccountsUpdateResponse( + update_bank_feed_account_response=utils.unmarshal_json( + http_res.text, Optional[models.UpdateBankFeedAccountResponse] + ), + http_meta=models.HTTPMetadata(request=req, response=http_res), + ) + if utils.match_response(http_res, "400", "application/json"): + response_data = utils.unmarshal_json( + http_res.text, models.BadRequestResponseData + ) + raise models.BadRequestResponse(data=response_data) + if utils.match_response(http_res, "401", "application/json"): + response_data = utils.unmarshal_json( + http_res.text, models.UnauthorizedResponseData + ) + raise models.UnauthorizedResponse(data=response_data) + if utils.match_response(http_res, "402", "application/json"): + response_data = utils.unmarshal_json( + http_res.text, models.PaymentRequiredResponseData + ) + raise models.PaymentRequiredResponse(data=response_data) + if utils.match_response(http_res, "404", "application/json"): + response_data = utils.unmarshal_json( + http_res.text, models.NotFoundResponseData + ) + raise models.NotFoundResponse(data=response_data) + if utils.match_response(http_res, "422", "application/json"): + response_data = utils.unmarshal_json( + http_res.text, models.UnprocessableResponseData + ) + raise models.UnprocessableResponse(data=response_data) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise models.APIError( + "API error occurred", http_res.status_code, http_res_text, http_res + ) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise models.APIError( + "API error occurred", http_res.status_code, http_res_text, http_res + ) + if utils.match_response(http_res, "default", "application/json"): + return models.AccountingBankFeedAccountsUpdateResponse( + unexpected_error_response=utils.unmarshal_json( + http_res.text, Optional[models.UnexpectedErrorResponse] + ), + http_meta=models.HTTPMetadata(request=req, response=http_res), + ) + + content_type = http_res.headers.get("Content-Type") + http_res_text = utils.stream_to_text(http_res) + raise models.APIError( + f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", + http_res.status_code, + http_res_text, + http_res, + ) + + async def update_async( + self, + *, + id: str, + consumer_id: Optional[str] = None, + app_id: Optional[str] = None, + service_id: Optional[str] = None, + raw: Optional[bool] = False, + bank_account_type: Optional[models.BankAccountType] = None, + source_account_id: Optional[str] = None, + target_account_id: Optional[str] = None, + target_account_name: Optional[str] = None, + target_account_number: Optional[str] = None, + currency: OptionalNullable[models.Currency] = UNSET, + feed_status: Optional[models.FeedStatus] = None, + country: OptionalNullable[str] = UNSET, + custom_fields: Optional[ + Union[List[models.CustomField], List[models.CustomFieldTypedDict]] + ] = None, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.AccountingBankFeedAccountsUpdateResponse: + r"""Update Bank Feed Account + + Update Bank Feed Account + + :param id: ID of the record you are acting upon. + :param consumer_id: ID of the consumer which you want to get or push data from + :param app_id: The ID of your Unify application + :param service_id: Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API. + :param raw: Include raw response. Mostly used for debugging purposes + :param bank_account_type: Type of the bank account. + :param source_account_id: The source account's unique identifier. + :param target_account_id: The target account's unique identifier in the accounting connector. + :param target_account_name: Name associated with the target account. + :param target_account_number: Account number of the destination bank account. + :param currency: Indicates the associated currency for an amount of money. Values correspond to [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217). + :param feed_status: Current status of the bank feed. + :param country: Country code according to ISO 3166-1 alpha-2. + :param custom_fields: + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.AccountingBankFeedAccountsUpdateRequest( + id=id, + consumer_id=consumer_id, + app_id=app_id, + service_id=service_id, + raw=raw, + bank_feed_account=models.BankFeedAccountInput( + bank_account_type=bank_account_type, + source_account_id=source_account_id, + target_account_id=target_account_id, + target_account_name=target_account_name, + target_account_number=target_account_number, + currency=currency, + feed_status=feed_status, + country=country, + custom_fields=utils.get_pydantic_model( + custom_fields, Optional[List[models.CustomField]] + ), + ), + ) + + req = self._build_request_async( + method="PATCH", + path="/accounting/bank-feed-accounts/{id}", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=True, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + _globals=models.AccountingBankFeedAccountsUpdateGlobals( + consumer_id=self.sdk_configuration.globals.consumer_id, + app_id=self.sdk_configuration.globals.app_id, + ), + security=self.sdk_configuration.security, + get_serialized_body=lambda: utils.serialize_request_body( + request.bank_feed_account, + False, + False, + "json", + models.BankFeedAccountInput, + ), + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + else: + retries = utils.RetryConfig( + "backoff", utils.BackoffStrategy(500, 60000, 1.5, 3600000), True + ) + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["408", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + base_url=base_url or "", + operation_id="accounting.bankFeedAccountsUpdate", + oauth2_scopes=[], + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["400", "401", "402", "404", "422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return models.AccountingBankFeedAccountsUpdateResponse( + update_bank_feed_account_response=utils.unmarshal_json( + http_res.text, Optional[models.UpdateBankFeedAccountResponse] + ), + http_meta=models.HTTPMetadata(request=req, response=http_res), + ) + if utils.match_response(http_res, "400", "application/json"): + response_data = utils.unmarshal_json( + http_res.text, models.BadRequestResponseData + ) + raise models.BadRequestResponse(data=response_data) + if utils.match_response(http_res, "401", "application/json"): + response_data = utils.unmarshal_json( + http_res.text, models.UnauthorizedResponseData + ) + raise models.UnauthorizedResponse(data=response_data) + if utils.match_response(http_res, "402", "application/json"): + response_data = utils.unmarshal_json( + http_res.text, models.PaymentRequiredResponseData + ) + raise models.PaymentRequiredResponse(data=response_data) + if utils.match_response(http_res, "404", "application/json"): + response_data = utils.unmarshal_json( + http_res.text, models.NotFoundResponseData + ) + raise models.NotFoundResponse(data=response_data) + if utils.match_response(http_res, "422", "application/json"): + response_data = utils.unmarshal_json( + http_res.text, models.UnprocessableResponseData + ) + raise models.UnprocessableResponse(data=response_data) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise models.APIError( + "API error occurred", http_res.status_code, http_res_text, http_res + ) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise models.APIError( + "API error occurred", http_res.status_code, http_res_text, http_res + ) + if utils.match_response(http_res, "default", "application/json"): + return models.AccountingBankFeedAccountsUpdateResponse( + unexpected_error_response=utils.unmarshal_json( + http_res.text, Optional[models.UnexpectedErrorResponse] + ), + http_meta=models.HTTPMetadata(request=req, response=http_res), + ) + + content_type = http_res.headers.get("Content-Type") + http_res_text = await utils.stream_to_text_async(http_res) + raise models.APIError( + f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", + http_res.status_code, + http_res_text, + http_res, + ) + + def delete( + self, + *, + id: str, + consumer_id: Optional[str] = None, + app_id: Optional[str] = None, + service_id: Optional[str] = None, + raw: Optional[bool] = False, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.AccountingBankFeedAccountsDeleteResponse: + r"""Delete Bank Feed Account + + Delete Bank Feed Account + + :param id: ID of the record you are acting upon. + :param consumer_id: ID of the consumer which you want to get or push data from + :param app_id: The ID of your Unify application + :param service_id: Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API. + :param raw: Include raw response. Mostly used for debugging purposes + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.AccountingBankFeedAccountsDeleteRequest( + id=id, + consumer_id=consumer_id, + app_id=app_id, + service_id=service_id, + raw=raw, + ) + + req = self._build_request( + method="DELETE", + path="/accounting/bank-feed-accounts/{id}", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + _globals=models.AccountingBankFeedAccountsDeleteGlobals( + consumer_id=self.sdk_configuration.globals.consumer_id, + app_id=self.sdk_configuration.globals.app_id, + ), + security=self.sdk_configuration.security, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + else: + retries = utils.RetryConfig( + "backoff", utils.BackoffStrategy(500, 60000, 1.5, 3600000), True + ) + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["408", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + base_url=base_url or "", + operation_id="accounting.bankFeedAccountsDelete", + oauth2_scopes=[], + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["400", "401", "402", "404", "422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return models.AccountingBankFeedAccountsDeleteResponse( + delete_bank_feed_account_response=utils.unmarshal_json( + http_res.text, Optional[models.DeleteBankFeedAccountResponse] + ), + http_meta=models.HTTPMetadata(request=req, response=http_res), + ) + if utils.match_response(http_res, "400", "application/json"): + response_data = utils.unmarshal_json( + http_res.text, models.BadRequestResponseData + ) + raise models.BadRequestResponse(data=response_data) + if utils.match_response(http_res, "401", "application/json"): + response_data = utils.unmarshal_json( + http_res.text, models.UnauthorizedResponseData + ) + raise models.UnauthorizedResponse(data=response_data) + if utils.match_response(http_res, "402", "application/json"): + response_data = utils.unmarshal_json( + http_res.text, models.PaymentRequiredResponseData + ) + raise models.PaymentRequiredResponse(data=response_data) + if utils.match_response(http_res, "404", "application/json"): + response_data = utils.unmarshal_json( + http_res.text, models.NotFoundResponseData + ) + raise models.NotFoundResponse(data=response_data) + if utils.match_response(http_res, "422", "application/json"): + response_data = utils.unmarshal_json( + http_res.text, models.UnprocessableResponseData + ) + raise models.UnprocessableResponse(data=response_data) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise models.APIError( + "API error occurred", http_res.status_code, http_res_text, http_res + ) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise models.APIError( + "API error occurred", http_res.status_code, http_res_text, http_res + ) + if utils.match_response(http_res, "default", "application/json"): + return models.AccountingBankFeedAccountsDeleteResponse( + unexpected_error_response=utils.unmarshal_json( + http_res.text, Optional[models.UnexpectedErrorResponse] + ), + http_meta=models.HTTPMetadata(request=req, response=http_res), + ) + + content_type = http_res.headers.get("Content-Type") + http_res_text = utils.stream_to_text(http_res) + raise models.APIError( + f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", + http_res.status_code, + http_res_text, + http_res, + ) + + async def delete_async( + self, + *, + id: str, + consumer_id: Optional[str] = None, + app_id: Optional[str] = None, + service_id: Optional[str] = None, + raw: Optional[bool] = False, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.AccountingBankFeedAccountsDeleteResponse: + r"""Delete Bank Feed Account + + Delete Bank Feed Account + + :param id: ID of the record you are acting upon. + :param consumer_id: ID of the consumer which you want to get or push data from + :param app_id: The ID of your Unify application + :param service_id: Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API. + :param raw: Include raw response. Mostly used for debugging purposes + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.AccountingBankFeedAccountsDeleteRequest( + id=id, + consumer_id=consumer_id, + app_id=app_id, + service_id=service_id, + raw=raw, + ) + + req = self._build_request_async( + method="DELETE", + path="/accounting/bank-feed-accounts/{id}", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + _globals=models.AccountingBankFeedAccountsDeleteGlobals( + consumer_id=self.sdk_configuration.globals.consumer_id, + app_id=self.sdk_configuration.globals.app_id, + ), + security=self.sdk_configuration.security, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + else: + retries = utils.RetryConfig( + "backoff", utils.BackoffStrategy(500, 60000, 1.5, 3600000), True + ) + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["408", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + base_url=base_url or "", + operation_id="accounting.bankFeedAccountsDelete", + oauth2_scopes=[], + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["400", "401", "402", "404", "422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return models.AccountingBankFeedAccountsDeleteResponse( + delete_bank_feed_account_response=utils.unmarshal_json( + http_res.text, Optional[models.DeleteBankFeedAccountResponse] + ), + http_meta=models.HTTPMetadata(request=req, response=http_res), + ) + if utils.match_response(http_res, "400", "application/json"): + response_data = utils.unmarshal_json( + http_res.text, models.BadRequestResponseData + ) + raise models.BadRequestResponse(data=response_data) + if utils.match_response(http_res, "401", "application/json"): + response_data = utils.unmarshal_json( + http_res.text, models.UnauthorizedResponseData + ) + raise models.UnauthorizedResponse(data=response_data) + if utils.match_response(http_res, "402", "application/json"): + response_data = utils.unmarshal_json( + http_res.text, models.PaymentRequiredResponseData + ) + raise models.PaymentRequiredResponse(data=response_data) + if utils.match_response(http_res, "404", "application/json"): + response_data = utils.unmarshal_json( + http_res.text, models.NotFoundResponseData + ) + raise models.NotFoundResponse(data=response_data) + if utils.match_response(http_res, "422", "application/json"): + response_data = utils.unmarshal_json( + http_res.text, models.UnprocessableResponseData + ) + raise models.UnprocessableResponse(data=response_data) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise models.APIError( + "API error occurred", http_res.status_code, http_res_text, http_res + ) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise models.APIError( + "API error occurred", http_res.status_code, http_res_text, http_res + ) + if utils.match_response(http_res, "default", "application/json"): + return models.AccountingBankFeedAccountsDeleteResponse( + unexpected_error_response=utils.unmarshal_json( + http_res.text, Optional[models.UnexpectedErrorResponse] + ), + http_meta=models.HTTPMetadata(request=req, response=http_res), + ) + + content_type = http_res.headers.get("Content-Type") + http_res_text = await utils.stream_to_text_async(http_res) + raise models.APIError( + f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", + http_res.status_code, + http_res_text, + http_res, + ) diff --git a/src/apideck_unify/bankfeedstatements.py b/src/apideck_unify/bankfeedstatements.py new file mode 100644 index 00000000..8a87d5b7 --- /dev/null +++ b/src/apideck_unify/bankfeedstatements.py @@ -0,0 +1,1750 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from .basesdk import BaseSDK +from apideck_unify import models, utils +from apideck_unify._hooks import HookContext +from apideck_unify.types import OptionalNullable, UNSET +from apideck_unify.utils import get_security_from_env +from datetime import datetime +from jsonpath import JSONPath +from typing import Any, Dict, List, Mapping, Optional, Union + + +class BankFeedStatements(BaseSDK): + def list( + self, + *, + raw: Optional[bool] = False, + consumer_id: Optional[str] = None, + app_id: Optional[str] = None, + service_id: Optional[str] = None, + cursor: OptionalNullable[str] = UNSET, + limit: Optional[int] = 20, + pass_through: Optional[Dict[str, Any]] = None, + fields: OptionalNullable[str] = UNSET, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> Optional[models.AccountingBankFeedStatementsAllResponse]: + r"""List Bank Feed Statements + + List Bank Feed Statements + + :param raw: Include raw response. Mostly used for debugging purposes + :param consumer_id: ID of the consumer which you want to get or push data from + :param app_id: The ID of your Unify application + :param service_id: Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API. + :param cursor: Cursor to start from. You can find cursors for next/previous pages in the meta.cursors property of the response. + :param limit: Number of results to return. Minimum 1, Maximum 200, Default 20 + :param pass_through: Optional unmapped key/values that will be passed through to downstream as query parameters. Ie: ?pass_through[search]=leads becomes ?search=leads + :param fields: The 'fields' parameter allows API users to specify the fields they want to include in the API response. If this parameter is not present, the API will return all available fields. If this parameter is present, only the fields specified in the comma-separated string will be included in the response. Nested properties can also be requested by using a dot notation.

Example: `fields=name,email,addresses.city`

In the example above, the response will only include the fields \"name\", \"email\" and \"addresses.city\". If any other fields are available, they will be excluded. + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.AccountingBankFeedStatementsAllRequest( + raw=raw, + consumer_id=consumer_id, + app_id=app_id, + service_id=service_id, + cursor=cursor, + limit=limit, + pass_through=pass_through, + fields=fields, + ) + + req = self._build_request( + method="GET", + path="/accounting/bank-feed-statements", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + _globals=models.AccountingBankFeedStatementsAllGlobals( + consumer_id=self.sdk_configuration.globals.consumer_id, + app_id=self.sdk_configuration.globals.app_id, + ), + security=self.sdk_configuration.security, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + else: + retries = utils.RetryConfig( + "backoff", utils.BackoffStrategy(500, 60000, 1.5, 3600000), True + ) + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["408", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + base_url=base_url or "", + operation_id="accounting.bankFeedStatementsAll", + oauth2_scopes=[], + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["400", "401", "402", "404", "422", "4XX", "5XX"], + retry_config=retry_config, + ) + + def next_func() -> Optional[models.AccountingBankFeedStatementsAllResponse]: + body = utils.unmarshal_json(http_res.text, Union[Dict[Any, Any], List[Any]]) + next_cursor = JSONPath("$.meta.cursors.next").parse(body) + + if len(next_cursor) == 0: + return None + + next_cursor = next_cursor[0] + if next_cursor is None: + return None + + return self.list( + raw=raw, + consumer_id=consumer_id, + app_id=app_id, + service_id=service_id, + cursor=next_cursor, + limit=limit, + pass_through=pass_through, + fields=fields, + retries=retries, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return models.AccountingBankFeedStatementsAllResponse( + get_bank_feed_statements_response=utils.unmarshal_json( + http_res.text, Optional[models.GetBankFeedStatementsResponse] + ), + http_meta=models.HTTPMetadata(request=req, response=http_res), + next=next_func, + ) + if utils.match_response(http_res, "400", "application/json"): + response_data = utils.unmarshal_json( + http_res.text, models.BadRequestResponseData + ) + raise models.BadRequestResponse(data=response_data) + if utils.match_response(http_res, "401", "application/json"): + response_data = utils.unmarshal_json( + http_res.text, models.UnauthorizedResponseData + ) + raise models.UnauthorizedResponse(data=response_data) + if utils.match_response(http_res, "402", "application/json"): + response_data = utils.unmarshal_json( + http_res.text, models.PaymentRequiredResponseData + ) + raise models.PaymentRequiredResponse(data=response_data) + if utils.match_response(http_res, "404", "application/json"): + response_data = utils.unmarshal_json( + http_res.text, models.NotFoundResponseData + ) + raise models.NotFoundResponse(data=response_data) + if utils.match_response(http_res, "422", "application/json"): + response_data = utils.unmarshal_json( + http_res.text, models.UnprocessableResponseData + ) + raise models.UnprocessableResponse(data=response_data) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise models.APIError( + "API error occurred", http_res.status_code, http_res_text, http_res + ) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise models.APIError( + "API error occurred", http_res.status_code, http_res_text, http_res + ) + if utils.match_response(http_res, "default", "application/json"): + return models.AccountingBankFeedStatementsAllResponse( + unexpected_error_response=utils.unmarshal_json( + http_res.text, Optional[models.UnexpectedErrorResponse] + ), + http_meta=models.HTTPMetadata(request=req, response=http_res), + next=next_func, + ) + + content_type = http_res.headers.get("Content-Type") + http_res_text = utils.stream_to_text(http_res) + raise models.APIError( + f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", + http_res.status_code, + http_res_text, + http_res, + ) + + async def list_async( + self, + *, + raw: Optional[bool] = False, + consumer_id: Optional[str] = None, + app_id: Optional[str] = None, + service_id: Optional[str] = None, + cursor: OptionalNullable[str] = UNSET, + limit: Optional[int] = 20, + pass_through: Optional[Dict[str, Any]] = None, + fields: OptionalNullable[str] = UNSET, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> Optional[models.AccountingBankFeedStatementsAllResponse]: + r"""List Bank Feed Statements + + List Bank Feed Statements + + :param raw: Include raw response. Mostly used for debugging purposes + :param consumer_id: ID of the consumer which you want to get or push data from + :param app_id: The ID of your Unify application + :param service_id: Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API. + :param cursor: Cursor to start from. You can find cursors for next/previous pages in the meta.cursors property of the response. + :param limit: Number of results to return. Minimum 1, Maximum 200, Default 20 + :param pass_through: Optional unmapped key/values that will be passed through to downstream as query parameters. Ie: ?pass_through[search]=leads becomes ?search=leads + :param fields: The 'fields' parameter allows API users to specify the fields they want to include in the API response. If this parameter is not present, the API will return all available fields. If this parameter is present, only the fields specified in the comma-separated string will be included in the response. Nested properties can also be requested by using a dot notation.

Example: `fields=name,email,addresses.city`

In the example above, the response will only include the fields \"name\", \"email\" and \"addresses.city\". If any other fields are available, they will be excluded. + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.AccountingBankFeedStatementsAllRequest( + raw=raw, + consumer_id=consumer_id, + app_id=app_id, + service_id=service_id, + cursor=cursor, + limit=limit, + pass_through=pass_through, + fields=fields, + ) + + req = self._build_request_async( + method="GET", + path="/accounting/bank-feed-statements", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + _globals=models.AccountingBankFeedStatementsAllGlobals( + consumer_id=self.sdk_configuration.globals.consumer_id, + app_id=self.sdk_configuration.globals.app_id, + ), + security=self.sdk_configuration.security, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + else: + retries = utils.RetryConfig( + "backoff", utils.BackoffStrategy(500, 60000, 1.5, 3600000), True + ) + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["408", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + base_url=base_url or "", + operation_id="accounting.bankFeedStatementsAll", + oauth2_scopes=[], + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["400", "401", "402", "404", "422", "4XX", "5XX"], + retry_config=retry_config, + ) + + def next_func() -> Optional[models.AccountingBankFeedStatementsAllResponse]: + body = utils.unmarshal_json(http_res.text, Union[Dict[Any, Any], List[Any]]) + next_cursor = JSONPath("$.meta.cursors.next").parse(body) + + if len(next_cursor) == 0: + return None + + next_cursor = next_cursor[0] + if next_cursor is None: + return None + + return self.list( + raw=raw, + consumer_id=consumer_id, + app_id=app_id, + service_id=service_id, + cursor=next_cursor, + limit=limit, + pass_through=pass_through, + fields=fields, + retries=retries, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return models.AccountingBankFeedStatementsAllResponse( + get_bank_feed_statements_response=utils.unmarshal_json( + http_res.text, Optional[models.GetBankFeedStatementsResponse] + ), + http_meta=models.HTTPMetadata(request=req, response=http_res), + next=next_func, + ) + if utils.match_response(http_res, "400", "application/json"): + response_data = utils.unmarshal_json( + http_res.text, models.BadRequestResponseData + ) + raise models.BadRequestResponse(data=response_data) + if utils.match_response(http_res, "401", "application/json"): + response_data = utils.unmarshal_json( + http_res.text, models.UnauthorizedResponseData + ) + raise models.UnauthorizedResponse(data=response_data) + if utils.match_response(http_res, "402", "application/json"): + response_data = utils.unmarshal_json( + http_res.text, models.PaymentRequiredResponseData + ) + raise models.PaymentRequiredResponse(data=response_data) + if utils.match_response(http_res, "404", "application/json"): + response_data = utils.unmarshal_json( + http_res.text, models.NotFoundResponseData + ) + raise models.NotFoundResponse(data=response_data) + if utils.match_response(http_res, "422", "application/json"): + response_data = utils.unmarshal_json( + http_res.text, models.UnprocessableResponseData + ) + raise models.UnprocessableResponse(data=response_data) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise models.APIError( + "API error occurred", http_res.status_code, http_res_text, http_res + ) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise models.APIError( + "API error occurred", http_res.status_code, http_res_text, http_res + ) + if utils.match_response(http_res, "default", "application/json"): + return models.AccountingBankFeedStatementsAllResponse( + unexpected_error_response=utils.unmarshal_json( + http_res.text, Optional[models.UnexpectedErrorResponse] + ), + http_meta=models.HTTPMetadata(request=req, response=http_res), + next=next_func, + ) + + content_type = http_res.headers.get("Content-Type") + http_res_text = await utils.stream_to_text_async(http_res) + raise models.APIError( + f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", + http_res.status_code, + http_res_text, + http_res, + ) + + def create( + self, + *, + raw: Optional[bool] = False, + consumer_id: Optional[str] = None, + app_id: Optional[str] = None, + service_id: Optional[str] = None, + bank_feed_account_id: Optional[str] = None, + status: Optional[models.StatementStatus] = None, + start_date: Optional[datetime] = None, + end_date: Optional[datetime] = None, + start_balance: Optional[float] = None, + start_balance_credit_or_debit: Optional[models.CreditOrDebit] = None, + end_balance: Optional[float] = None, + end_balance_credit_or_debit: Optional[models.CreditOrDebit] = None, + transactions: Optional[ + Union[List[models.Transactions], List[models.TransactionsTypedDict]] + ] = None, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.AccountingBankFeedStatementsAddResponse: + r"""Create Bank Feed Statement + + Create Bank Feed Statement + + :param raw: Include raw response. Mostly used for debugging purposes + :param consumer_id: ID of the consumer which you want to get or push data from + :param app_id: The ID of your Unify application + :param service_id: Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API. + :param bank_feed_account_id: The ID of the bank feed account this statement belongs to. + :param status: The current status of the bank feed statement. + :param start_date: Start date of the bank feed statement. + :param end_date: End date of the bank feed statement. + :param start_balance: Balance amount at the start of the period. + :param start_balance_credit_or_debit: Whether the amount is a credit or debit. + :param end_balance: Balance amount at the end of the period. + :param end_balance_credit_or_debit: Whether the amount is a credit or debit. + :param transactions: List of transactions in the bank feed statement. + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.AccountingBankFeedStatementsAddRequest( + raw=raw, + consumer_id=consumer_id, + app_id=app_id, + service_id=service_id, + bank_feed_statement=models.BankFeedStatementInput( + bank_feed_account_id=bank_feed_account_id, + status=status, + start_date=start_date, + end_date=end_date, + start_balance=start_balance, + start_balance_credit_or_debit=start_balance_credit_or_debit, + end_balance=end_balance, + end_balance_credit_or_debit=end_balance_credit_or_debit, + transactions=utils.get_pydantic_model( + transactions, Optional[List[models.Transactions]] + ), + ), + ) + + req = self._build_request( + method="POST", + path="/accounting/bank-feed-statements", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=True, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + _globals=models.AccountingBankFeedStatementsAddGlobals( + consumer_id=self.sdk_configuration.globals.consumer_id, + app_id=self.sdk_configuration.globals.app_id, + ), + security=self.sdk_configuration.security, + get_serialized_body=lambda: utils.serialize_request_body( + request.bank_feed_statement, + False, + False, + "json", + models.BankFeedStatementInput, + ), + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + else: + retries = utils.RetryConfig( + "backoff", utils.BackoffStrategy(500, 60000, 1.5, 3600000), True + ) + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["408", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + base_url=base_url or "", + operation_id="accounting.bankFeedStatementsAdd", + oauth2_scopes=[], + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["400", "401", "402", "404", "422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "201", "application/json"): + return models.AccountingBankFeedStatementsAddResponse( + create_bank_feed_statement_response=utils.unmarshal_json( + http_res.text, Optional[models.CreateBankFeedStatementResponse] + ), + http_meta=models.HTTPMetadata(request=req, response=http_res), + ) + if utils.match_response(http_res, "400", "application/json"): + response_data = utils.unmarshal_json( + http_res.text, models.BadRequestResponseData + ) + raise models.BadRequestResponse(data=response_data) + if utils.match_response(http_res, "401", "application/json"): + response_data = utils.unmarshal_json( + http_res.text, models.UnauthorizedResponseData + ) + raise models.UnauthorizedResponse(data=response_data) + if utils.match_response(http_res, "402", "application/json"): + response_data = utils.unmarshal_json( + http_res.text, models.PaymentRequiredResponseData + ) + raise models.PaymentRequiredResponse(data=response_data) + if utils.match_response(http_res, "404", "application/json"): + response_data = utils.unmarshal_json( + http_res.text, models.NotFoundResponseData + ) + raise models.NotFoundResponse(data=response_data) + if utils.match_response(http_res, "422", "application/json"): + response_data = utils.unmarshal_json( + http_res.text, models.UnprocessableResponseData + ) + raise models.UnprocessableResponse(data=response_data) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise models.APIError( + "API error occurred", http_res.status_code, http_res_text, http_res + ) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise models.APIError( + "API error occurred", http_res.status_code, http_res_text, http_res + ) + if utils.match_response(http_res, "default", "application/json"): + return models.AccountingBankFeedStatementsAddResponse( + unexpected_error_response=utils.unmarshal_json( + http_res.text, Optional[models.UnexpectedErrorResponse] + ), + http_meta=models.HTTPMetadata(request=req, response=http_res), + ) + + content_type = http_res.headers.get("Content-Type") + http_res_text = utils.stream_to_text(http_res) + raise models.APIError( + f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", + http_res.status_code, + http_res_text, + http_res, + ) + + async def create_async( + self, + *, + raw: Optional[bool] = False, + consumer_id: Optional[str] = None, + app_id: Optional[str] = None, + service_id: Optional[str] = None, + bank_feed_account_id: Optional[str] = None, + status: Optional[models.StatementStatus] = None, + start_date: Optional[datetime] = None, + end_date: Optional[datetime] = None, + start_balance: Optional[float] = None, + start_balance_credit_or_debit: Optional[models.CreditOrDebit] = None, + end_balance: Optional[float] = None, + end_balance_credit_or_debit: Optional[models.CreditOrDebit] = None, + transactions: Optional[ + Union[List[models.Transactions], List[models.TransactionsTypedDict]] + ] = None, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.AccountingBankFeedStatementsAddResponse: + r"""Create Bank Feed Statement + + Create Bank Feed Statement + + :param raw: Include raw response. Mostly used for debugging purposes + :param consumer_id: ID of the consumer which you want to get or push data from + :param app_id: The ID of your Unify application + :param service_id: Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API. + :param bank_feed_account_id: The ID of the bank feed account this statement belongs to. + :param status: The current status of the bank feed statement. + :param start_date: Start date of the bank feed statement. + :param end_date: End date of the bank feed statement. + :param start_balance: Balance amount at the start of the period. + :param start_balance_credit_or_debit: Whether the amount is a credit or debit. + :param end_balance: Balance amount at the end of the period. + :param end_balance_credit_or_debit: Whether the amount is a credit or debit. + :param transactions: List of transactions in the bank feed statement. + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.AccountingBankFeedStatementsAddRequest( + raw=raw, + consumer_id=consumer_id, + app_id=app_id, + service_id=service_id, + bank_feed_statement=models.BankFeedStatementInput( + bank_feed_account_id=bank_feed_account_id, + status=status, + start_date=start_date, + end_date=end_date, + start_balance=start_balance, + start_balance_credit_or_debit=start_balance_credit_or_debit, + end_balance=end_balance, + end_balance_credit_or_debit=end_balance_credit_or_debit, + transactions=utils.get_pydantic_model( + transactions, Optional[List[models.Transactions]] + ), + ), + ) + + req = self._build_request_async( + method="POST", + path="/accounting/bank-feed-statements", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=True, + request_has_path_params=False, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + _globals=models.AccountingBankFeedStatementsAddGlobals( + consumer_id=self.sdk_configuration.globals.consumer_id, + app_id=self.sdk_configuration.globals.app_id, + ), + security=self.sdk_configuration.security, + get_serialized_body=lambda: utils.serialize_request_body( + request.bank_feed_statement, + False, + False, + "json", + models.BankFeedStatementInput, + ), + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + else: + retries = utils.RetryConfig( + "backoff", utils.BackoffStrategy(500, 60000, 1.5, 3600000), True + ) + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["408", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + base_url=base_url or "", + operation_id="accounting.bankFeedStatementsAdd", + oauth2_scopes=[], + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["400", "401", "402", "404", "422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "201", "application/json"): + return models.AccountingBankFeedStatementsAddResponse( + create_bank_feed_statement_response=utils.unmarshal_json( + http_res.text, Optional[models.CreateBankFeedStatementResponse] + ), + http_meta=models.HTTPMetadata(request=req, response=http_res), + ) + if utils.match_response(http_res, "400", "application/json"): + response_data = utils.unmarshal_json( + http_res.text, models.BadRequestResponseData + ) + raise models.BadRequestResponse(data=response_data) + if utils.match_response(http_res, "401", "application/json"): + response_data = utils.unmarshal_json( + http_res.text, models.UnauthorizedResponseData + ) + raise models.UnauthorizedResponse(data=response_data) + if utils.match_response(http_res, "402", "application/json"): + response_data = utils.unmarshal_json( + http_res.text, models.PaymentRequiredResponseData + ) + raise models.PaymentRequiredResponse(data=response_data) + if utils.match_response(http_res, "404", "application/json"): + response_data = utils.unmarshal_json( + http_res.text, models.NotFoundResponseData + ) + raise models.NotFoundResponse(data=response_data) + if utils.match_response(http_res, "422", "application/json"): + response_data = utils.unmarshal_json( + http_res.text, models.UnprocessableResponseData + ) + raise models.UnprocessableResponse(data=response_data) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise models.APIError( + "API error occurred", http_res.status_code, http_res_text, http_res + ) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise models.APIError( + "API error occurred", http_res.status_code, http_res_text, http_res + ) + if utils.match_response(http_res, "default", "application/json"): + return models.AccountingBankFeedStatementsAddResponse( + unexpected_error_response=utils.unmarshal_json( + http_res.text, Optional[models.UnexpectedErrorResponse] + ), + http_meta=models.HTTPMetadata(request=req, response=http_res), + ) + + content_type = http_res.headers.get("Content-Type") + http_res_text = await utils.stream_to_text_async(http_res) + raise models.APIError( + f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", + http_res.status_code, + http_res_text, + http_res, + ) + + def get( + self, + *, + id: str, + consumer_id: Optional[str] = None, + app_id: Optional[str] = None, + service_id: Optional[str] = None, + raw: Optional[bool] = False, + fields: OptionalNullable[str] = UNSET, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.AccountingBankFeedStatementsOneResponse: + r"""Get Bank Feed Statement + + Get Bank Feed Statement + + :param id: ID of the record you are acting upon. + :param consumer_id: ID of the consumer which you want to get or push data from + :param app_id: The ID of your Unify application + :param service_id: Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API. + :param raw: Include raw response. Mostly used for debugging purposes + :param fields: The 'fields' parameter allows API users to specify the fields they want to include in the API response. If this parameter is not present, the API will return all available fields. If this parameter is present, only the fields specified in the comma-separated string will be included in the response. Nested properties can also be requested by using a dot notation.

Example: `fields=name,email,addresses.city`

In the example above, the response will only include the fields \"name\", \"email\" and \"addresses.city\". If any other fields are available, they will be excluded. + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.AccountingBankFeedStatementsOneRequest( + id=id, + consumer_id=consumer_id, + app_id=app_id, + service_id=service_id, + raw=raw, + fields=fields, + ) + + req = self._build_request( + method="GET", + path="/accounting/bank-feed-statements/{id}", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + _globals=models.AccountingBankFeedStatementsOneGlobals( + consumer_id=self.sdk_configuration.globals.consumer_id, + app_id=self.sdk_configuration.globals.app_id, + ), + security=self.sdk_configuration.security, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + else: + retries = utils.RetryConfig( + "backoff", utils.BackoffStrategy(500, 60000, 1.5, 3600000), True + ) + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["408", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + base_url=base_url or "", + operation_id="accounting.bankFeedStatementsOne", + oauth2_scopes=[], + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["400", "401", "402", "404", "422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return models.AccountingBankFeedStatementsOneResponse( + get_bank_feed_statement_response=utils.unmarshal_json( + http_res.text, Optional[models.GetBankFeedStatementResponse] + ), + http_meta=models.HTTPMetadata(request=req, response=http_res), + ) + if utils.match_response(http_res, "400", "application/json"): + response_data = utils.unmarshal_json( + http_res.text, models.BadRequestResponseData + ) + raise models.BadRequestResponse(data=response_data) + if utils.match_response(http_res, "401", "application/json"): + response_data = utils.unmarshal_json( + http_res.text, models.UnauthorizedResponseData + ) + raise models.UnauthorizedResponse(data=response_data) + if utils.match_response(http_res, "402", "application/json"): + response_data = utils.unmarshal_json( + http_res.text, models.PaymentRequiredResponseData + ) + raise models.PaymentRequiredResponse(data=response_data) + if utils.match_response(http_res, "404", "application/json"): + response_data = utils.unmarshal_json( + http_res.text, models.NotFoundResponseData + ) + raise models.NotFoundResponse(data=response_data) + if utils.match_response(http_res, "422", "application/json"): + response_data = utils.unmarshal_json( + http_res.text, models.UnprocessableResponseData + ) + raise models.UnprocessableResponse(data=response_data) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise models.APIError( + "API error occurred", http_res.status_code, http_res_text, http_res + ) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise models.APIError( + "API error occurred", http_res.status_code, http_res_text, http_res + ) + if utils.match_response(http_res, "default", "application/json"): + return models.AccountingBankFeedStatementsOneResponse( + unexpected_error_response=utils.unmarshal_json( + http_res.text, Optional[models.UnexpectedErrorResponse] + ), + http_meta=models.HTTPMetadata(request=req, response=http_res), + ) + + content_type = http_res.headers.get("Content-Type") + http_res_text = utils.stream_to_text(http_res) + raise models.APIError( + f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", + http_res.status_code, + http_res_text, + http_res, + ) + + async def get_async( + self, + *, + id: str, + consumer_id: Optional[str] = None, + app_id: Optional[str] = None, + service_id: Optional[str] = None, + raw: Optional[bool] = False, + fields: OptionalNullable[str] = UNSET, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.AccountingBankFeedStatementsOneResponse: + r"""Get Bank Feed Statement + + Get Bank Feed Statement + + :param id: ID of the record you are acting upon. + :param consumer_id: ID of the consumer which you want to get or push data from + :param app_id: The ID of your Unify application + :param service_id: Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API. + :param raw: Include raw response. Mostly used for debugging purposes + :param fields: The 'fields' parameter allows API users to specify the fields they want to include in the API response. If this parameter is not present, the API will return all available fields. If this parameter is present, only the fields specified in the comma-separated string will be included in the response. Nested properties can also be requested by using a dot notation.

Example: `fields=name,email,addresses.city`

In the example above, the response will only include the fields \"name\", \"email\" and \"addresses.city\". If any other fields are available, they will be excluded. + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.AccountingBankFeedStatementsOneRequest( + id=id, + consumer_id=consumer_id, + app_id=app_id, + service_id=service_id, + raw=raw, + fields=fields, + ) + + req = self._build_request_async( + method="GET", + path="/accounting/bank-feed-statements/{id}", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + _globals=models.AccountingBankFeedStatementsOneGlobals( + consumer_id=self.sdk_configuration.globals.consumer_id, + app_id=self.sdk_configuration.globals.app_id, + ), + security=self.sdk_configuration.security, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + else: + retries = utils.RetryConfig( + "backoff", utils.BackoffStrategy(500, 60000, 1.5, 3600000), True + ) + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["408", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + base_url=base_url or "", + operation_id="accounting.bankFeedStatementsOne", + oauth2_scopes=[], + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["400", "401", "402", "404", "422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return models.AccountingBankFeedStatementsOneResponse( + get_bank_feed_statement_response=utils.unmarshal_json( + http_res.text, Optional[models.GetBankFeedStatementResponse] + ), + http_meta=models.HTTPMetadata(request=req, response=http_res), + ) + if utils.match_response(http_res, "400", "application/json"): + response_data = utils.unmarshal_json( + http_res.text, models.BadRequestResponseData + ) + raise models.BadRequestResponse(data=response_data) + if utils.match_response(http_res, "401", "application/json"): + response_data = utils.unmarshal_json( + http_res.text, models.UnauthorizedResponseData + ) + raise models.UnauthorizedResponse(data=response_data) + if utils.match_response(http_res, "402", "application/json"): + response_data = utils.unmarshal_json( + http_res.text, models.PaymentRequiredResponseData + ) + raise models.PaymentRequiredResponse(data=response_data) + if utils.match_response(http_res, "404", "application/json"): + response_data = utils.unmarshal_json( + http_res.text, models.NotFoundResponseData + ) + raise models.NotFoundResponse(data=response_data) + if utils.match_response(http_res, "422", "application/json"): + response_data = utils.unmarshal_json( + http_res.text, models.UnprocessableResponseData + ) + raise models.UnprocessableResponse(data=response_data) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise models.APIError( + "API error occurred", http_res.status_code, http_res_text, http_res + ) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise models.APIError( + "API error occurred", http_res.status_code, http_res_text, http_res + ) + if utils.match_response(http_res, "default", "application/json"): + return models.AccountingBankFeedStatementsOneResponse( + unexpected_error_response=utils.unmarshal_json( + http_res.text, Optional[models.UnexpectedErrorResponse] + ), + http_meta=models.HTTPMetadata(request=req, response=http_res), + ) + + content_type = http_res.headers.get("Content-Type") + http_res_text = await utils.stream_to_text_async(http_res) + raise models.APIError( + f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", + http_res.status_code, + http_res_text, + http_res, + ) + + def update( + self, + *, + id: str, + consumer_id: Optional[str] = None, + app_id: Optional[str] = None, + service_id: Optional[str] = None, + raw: Optional[bool] = False, + bank_feed_account_id: Optional[str] = None, + status: Optional[models.StatementStatus] = None, + start_date: Optional[datetime] = None, + end_date: Optional[datetime] = None, + start_balance: Optional[float] = None, + start_balance_credit_or_debit: Optional[models.CreditOrDebit] = None, + end_balance: Optional[float] = None, + end_balance_credit_or_debit: Optional[models.CreditOrDebit] = None, + transactions: Optional[ + Union[List[models.Transactions], List[models.TransactionsTypedDict]] + ] = None, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.AccountingBankFeedStatementsUpdateResponse: + r"""Update Bank Feed Statement + + Update Bank Feed Statement + + :param id: ID of the record you are acting upon. + :param consumer_id: ID of the consumer which you want to get or push data from + :param app_id: The ID of your Unify application + :param service_id: Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API. + :param raw: Include raw response. Mostly used for debugging purposes + :param bank_feed_account_id: The ID of the bank feed account this statement belongs to. + :param status: The current status of the bank feed statement. + :param start_date: Start date of the bank feed statement. + :param end_date: End date of the bank feed statement. + :param start_balance: Balance amount at the start of the period. + :param start_balance_credit_or_debit: Whether the amount is a credit or debit. + :param end_balance: Balance amount at the end of the period. + :param end_balance_credit_or_debit: Whether the amount is a credit or debit. + :param transactions: List of transactions in the bank feed statement. + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.AccountingBankFeedStatementsUpdateRequest( + id=id, + consumer_id=consumer_id, + app_id=app_id, + service_id=service_id, + raw=raw, + bank_feed_statement=models.BankFeedStatementInput( + bank_feed_account_id=bank_feed_account_id, + status=status, + start_date=start_date, + end_date=end_date, + start_balance=start_balance, + start_balance_credit_or_debit=start_balance_credit_or_debit, + end_balance=end_balance, + end_balance_credit_or_debit=end_balance_credit_or_debit, + transactions=utils.get_pydantic_model( + transactions, Optional[List[models.Transactions]] + ), + ), + ) + + req = self._build_request( + method="PATCH", + path="/accounting/bank-feed-statements/{id}", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=True, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + _globals=models.AccountingBankFeedStatementsUpdateGlobals( + consumer_id=self.sdk_configuration.globals.consumer_id, + app_id=self.sdk_configuration.globals.app_id, + ), + security=self.sdk_configuration.security, + get_serialized_body=lambda: utils.serialize_request_body( + request.bank_feed_statement, + False, + False, + "json", + models.BankFeedStatementInput, + ), + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + else: + retries = utils.RetryConfig( + "backoff", utils.BackoffStrategy(500, 60000, 1.5, 3600000), True + ) + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["408", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + base_url=base_url or "", + operation_id="accounting.bankFeedStatementsUpdate", + oauth2_scopes=[], + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["400", "401", "402", "404", "422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return models.AccountingBankFeedStatementsUpdateResponse( + update_bank_feed_statement_response=utils.unmarshal_json( + http_res.text, Optional[models.UpdateBankFeedStatementResponse] + ), + http_meta=models.HTTPMetadata(request=req, response=http_res), + ) + if utils.match_response(http_res, "400", "application/json"): + response_data = utils.unmarshal_json( + http_res.text, models.BadRequestResponseData + ) + raise models.BadRequestResponse(data=response_data) + if utils.match_response(http_res, "401", "application/json"): + response_data = utils.unmarshal_json( + http_res.text, models.UnauthorizedResponseData + ) + raise models.UnauthorizedResponse(data=response_data) + if utils.match_response(http_res, "402", "application/json"): + response_data = utils.unmarshal_json( + http_res.text, models.PaymentRequiredResponseData + ) + raise models.PaymentRequiredResponse(data=response_data) + if utils.match_response(http_res, "404", "application/json"): + response_data = utils.unmarshal_json( + http_res.text, models.NotFoundResponseData + ) + raise models.NotFoundResponse(data=response_data) + if utils.match_response(http_res, "422", "application/json"): + response_data = utils.unmarshal_json( + http_res.text, models.UnprocessableResponseData + ) + raise models.UnprocessableResponse(data=response_data) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise models.APIError( + "API error occurred", http_res.status_code, http_res_text, http_res + ) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise models.APIError( + "API error occurred", http_res.status_code, http_res_text, http_res + ) + if utils.match_response(http_res, "default", "application/json"): + return models.AccountingBankFeedStatementsUpdateResponse( + unexpected_error_response=utils.unmarshal_json( + http_res.text, Optional[models.UnexpectedErrorResponse] + ), + http_meta=models.HTTPMetadata(request=req, response=http_res), + ) + + content_type = http_res.headers.get("Content-Type") + http_res_text = utils.stream_to_text(http_res) + raise models.APIError( + f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", + http_res.status_code, + http_res_text, + http_res, + ) + + async def update_async( + self, + *, + id: str, + consumer_id: Optional[str] = None, + app_id: Optional[str] = None, + service_id: Optional[str] = None, + raw: Optional[bool] = False, + bank_feed_account_id: Optional[str] = None, + status: Optional[models.StatementStatus] = None, + start_date: Optional[datetime] = None, + end_date: Optional[datetime] = None, + start_balance: Optional[float] = None, + start_balance_credit_or_debit: Optional[models.CreditOrDebit] = None, + end_balance: Optional[float] = None, + end_balance_credit_or_debit: Optional[models.CreditOrDebit] = None, + transactions: Optional[ + Union[List[models.Transactions], List[models.TransactionsTypedDict]] + ] = None, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.AccountingBankFeedStatementsUpdateResponse: + r"""Update Bank Feed Statement + + Update Bank Feed Statement + + :param id: ID of the record you are acting upon. + :param consumer_id: ID of the consumer which you want to get or push data from + :param app_id: The ID of your Unify application + :param service_id: Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API. + :param raw: Include raw response. Mostly used for debugging purposes + :param bank_feed_account_id: The ID of the bank feed account this statement belongs to. + :param status: The current status of the bank feed statement. + :param start_date: Start date of the bank feed statement. + :param end_date: End date of the bank feed statement. + :param start_balance: Balance amount at the start of the period. + :param start_balance_credit_or_debit: Whether the amount is a credit or debit. + :param end_balance: Balance amount at the end of the period. + :param end_balance_credit_or_debit: Whether the amount is a credit or debit. + :param transactions: List of transactions in the bank feed statement. + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.AccountingBankFeedStatementsUpdateRequest( + id=id, + consumer_id=consumer_id, + app_id=app_id, + service_id=service_id, + raw=raw, + bank_feed_statement=models.BankFeedStatementInput( + bank_feed_account_id=bank_feed_account_id, + status=status, + start_date=start_date, + end_date=end_date, + start_balance=start_balance, + start_balance_credit_or_debit=start_balance_credit_or_debit, + end_balance=end_balance, + end_balance_credit_or_debit=end_balance_credit_or_debit, + transactions=utils.get_pydantic_model( + transactions, Optional[List[models.Transactions]] + ), + ), + ) + + req = self._build_request_async( + method="PATCH", + path="/accounting/bank-feed-statements/{id}", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=True, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + _globals=models.AccountingBankFeedStatementsUpdateGlobals( + consumer_id=self.sdk_configuration.globals.consumer_id, + app_id=self.sdk_configuration.globals.app_id, + ), + security=self.sdk_configuration.security, + get_serialized_body=lambda: utils.serialize_request_body( + request.bank_feed_statement, + False, + False, + "json", + models.BankFeedStatementInput, + ), + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + else: + retries = utils.RetryConfig( + "backoff", utils.BackoffStrategy(500, 60000, 1.5, 3600000), True + ) + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["408", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + base_url=base_url or "", + operation_id="accounting.bankFeedStatementsUpdate", + oauth2_scopes=[], + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["400", "401", "402", "404", "422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return models.AccountingBankFeedStatementsUpdateResponse( + update_bank_feed_statement_response=utils.unmarshal_json( + http_res.text, Optional[models.UpdateBankFeedStatementResponse] + ), + http_meta=models.HTTPMetadata(request=req, response=http_res), + ) + if utils.match_response(http_res, "400", "application/json"): + response_data = utils.unmarshal_json( + http_res.text, models.BadRequestResponseData + ) + raise models.BadRequestResponse(data=response_data) + if utils.match_response(http_res, "401", "application/json"): + response_data = utils.unmarshal_json( + http_res.text, models.UnauthorizedResponseData + ) + raise models.UnauthorizedResponse(data=response_data) + if utils.match_response(http_res, "402", "application/json"): + response_data = utils.unmarshal_json( + http_res.text, models.PaymentRequiredResponseData + ) + raise models.PaymentRequiredResponse(data=response_data) + if utils.match_response(http_res, "404", "application/json"): + response_data = utils.unmarshal_json( + http_res.text, models.NotFoundResponseData + ) + raise models.NotFoundResponse(data=response_data) + if utils.match_response(http_res, "422", "application/json"): + response_data = utils.unmarshal_json( + http_res.text, models.UnprocessableResponseData + ) + raise models.UnprocessableResponse(data=response_data) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise models.APIError( + "API error occurred", http_res.status_code, http_res_text, http_res + ) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise models.APIError( + "API error occurred", http_res.status_code, http_res_text, http_res + ) + if utils.match_response(http_res, "default", "application/json"): + return models.AccountingBankFeedStatementsUpdateResponse( + unexpected_error_response=utils.unmarshal_json( + http_res.text, Optional[models.UnexpectedErrorResponse] + ), + http_meta=models.HTTPMetadata(request=req, response=http_res), + ) + + content_type = http_res.headers.get("Content-Type") + http_res_text = await utils.stream_to_text_async(http_res) + raise models.APIError( + f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", + http_res.status_code, + http_res_text, + http_res, + ) + + def delete( + self, + *, + id: str, + consumer_id: Optional[str] = None, + app_id: Optional[str] = None, + service_id: Optional[str] = None, + raw: Optional[bool] = False, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.AccountingBankFeedStatementsDeleteResponse: + r"""Delete Bank Feed Statement + + Delete Bank Feed Statement + + :param id: ID of the record you are acting upon. + :param consumer_id: ID of the consumer which you want to get or push data from + :param app_id: The ID of your Unify application + :param service_id: Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API. + :param raw: Include raw response. Mostly used for debugging purposes + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.AccountingBankFeedStatementsDeleteRequest( + id=id, + consumer_id=consumer_id, + app_id=app_id, + service_id=service_id, + raw=raw, + ) + + req = self._build_request( + method="DELETE", + path="/accounting/bank-feed-statements/{id}", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + _globals=models.AccountingBankFeedStatementsDeleteGlobals( + consumer_id=self.sdk_configuration.globals.consumer_id, + app_id=self.sdk_configuration.globals.app_id, + ), + security=self.sdk_configuration.security, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + else: + retries = utils.RetryConfig( + "backoff", utils.BackoffStrategy(500, 60000, 1.5, 3600000), True + ) + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["408", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + base_url=base_url or "", + operation_id="accounting.bankFeedStatementsDelete", + oauth2_scopes=[], + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["400", "401", "402", "404", "422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return models.AccountingBankFeedStatementsDeleteResponse( + delete_bank_feed_statement_response=utils.unmarshal_json( + http_res.text, Optional[models.DeleteBankFeedStatementResponse] + ), + http_meta=models.HTTPMetadata(request=req, response=http_res), + ) + if utils.match_response(http_res, "400", "application/json"): + response_data = utils.unmarshal_json( + http_res.text, models.BadRequestResponseData + ) + raise models.BadRequestResponse(data=response_data) + if utils.match_response(http_res, "401", "application/json"): + response_data = utils.unmarshal_json( + http_res.text, models.UnauthorizedResponseData + ) + raise models.UnauthorizedResponse(data=response_data) + if utils.match_response(http_res, "402", "application/json"): + response_data = utils.unmarshal_json( + http_res.text, models.PaymentRequiredResponseData + ) + raise models.PaymentRequiredResponse(data=response_data) + if utils.match_response(http_res, "404", "application/json"): + response_data = utils.unmarshal_json( + http_res.text, models.NotFoundResponseData + ) + raise models.NotFoundResponse(data=response_data) + if utils.match_response(http_res, "422", "application/json"): + response_data = utils.unmarshal_json( + http_res.text, models.UnprocessableResponseData + ) + raise models.UnprocessableResponse(data=response_data) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise models.APIError( + "API error occurred", http_res.status_code, http_res_text, http_res + ) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise models.APIError( + "API error occurred", http_res.status_code, http_res_text, http_res + ) + if utils.match_response(http_res, "default", "application/json"): + return models.AccountingBankFeedStatementsDeleteResponse( + unexpected_error_response=utils.unmarshal_json( + http_res.text, Optional[models.UnexpectedErrorResponse] + ), + http_meta=models.HTTPMetadata(request=req, response=http_res), + ) + + content_type = http_res.headers.get("Content-Type") + http_res_text = utils.stream_to_text(http_res) + raise models.APIError( + f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", + http_res.status_code, + http_res_text, + http_res, + ) + + async def delete_async( + self, + *, + id: str, + consumer_id: Optional[str] = None, + app_id: Optional[str] = None, + service_id: Optional[str] = None, + raw: Optional[bool] = False, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.AccountingBankFeedStatementsDeleteResponse: + r"""Delete Bank Feed Statement + + Delete Bank Feed Statement + + :param id: ID of the record you are acting upon. + :param consumer_id: ID of the consumer which you want to get or push data from + :param app_id: The ID of your Unify application + :param service_id: Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API. + :param raw: Include raw response. Mostly used for debugging purposes + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.AccountingBankFeedStatementsDeleteRequest( + id=id, + consumer_id=consumer_id, + app_id=app_id, + service_id=service_id, + raw=raw, + ) + + req = self._build_request_async( + method="DELETE", + path="/accounting/bank-feed-statements/{id}", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=False, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + _globals=models.AccountingBankFeedStatementsDeleteGlobals( + consumer_id=self.sdk_configuration.globals.consumer_id, + app_id=self.sdk_configuration.globals.app_id, + ), + security=self.sdk_configuration.security, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + else: + retries = utils.RetryConfig( + "backoff", utils.BackoffStrategy(500, 60000, 1.5, 3600000), True + ) + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["408", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + base_url=base_url or "", + operation_id="accounting.bankFeedStatementsDelete", + oauth2_scopes=[], + security_source=get_security_from_env( + self.sdk_configuration.security, models.Security + ), + ), + request=req, + error_status_codes=["400", "401", "402", "404", "422", "4XX", "5XX"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return models.AccountingBankFeedStatementsDeleteResponse( + delete_bank_feed_statement_response=utils.unmarshal_json( + http_res.text, Optional[models.DeleteBankFeedStatementResponse] + ), + http_meta=models.HTTPMetadata(request=req, response=http_res), + ) + if utils.match_response(http_res, "400", "application/json"): + response_data = utils.unmarshal_json( + http_res.text, models.BadRequestResponseData + ) + raise models.BadRequestResponse(data=response_data) + if utils.match_response(http_res, "401", "application/json"): + response_data = utils.unmarshal_json( + http_res.text, models.UnauthorizedResponseData + ) + raise models.UnauthorizedResponse(data=response_data) + if utils.match_response(http_res, "402", "application/json"): + response_data = utils.unmarshal_json( + http_res.text, models.PaymentRequiredResponseData + ) + raise models.PaymentRequiredResponse(data=response_data) + if utils.match_response(http_res, "404", "application/json"): + response_data = utils.unmarshal_json( + http_res.text, models.NotFoundResponseData + ) + raise models.NotFoundResponse(data=response_data) + if utils.match_response(http_res, "422", "application/json"): + response_data = utils.unmarshal_json( + http_res.text, models.UnprocessableResponseData + ) + raise models.UnprocessableResponse(data=response_data) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise models.APIError( + "API error occurred", http_res.status_code, http_res_text, http_res + ) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = await utils.stream_to_text_async(http_res) + raise models.APIError( + "API error occurred", http_res.status_code, http_res_text, http_res + ) + if utils.match_response(http_res, "default", "application/json"): + return models.AccountingBankFeedStatementsDeleteResponse( + unexpected_error_response=utils.unmarshal_json( + http_res.text, Optional[models.UnexpectedErrorResponse] + ), + http_meta=models.HTTPMetadata(request=req, response=http_res), + ) + + content_type = http_res.headers.get("Content-Type") + http_res_text = await utils.stream_to_text_async(http_res) + raise models.APIError( + f"Unexpected response received (code: {http_res.status_code}, type: {content_type})", + http_res.status_code, + http_res_text, + http_res, + ) diff --git a/src/apideck_unify/models/__init__.py b/src/apideck_unify/models/__init__.py index 73dcffdb..ffe6d07b 100644 --- a/src/apideck_unify/models/__init__.py +++ b/src/apideck_unify/models/__init__.py @@ -65,6 +65,86 @@ AccountingBalanceSheetOneResponse, AccountingBalanceSheetOneResponseTypedDict, ) +from .accounting_bankfeedaccountsaddop import ( + AccountingBankFeedAccountsAddGlobals, + AccountingBankFeedAccountsAddGlobalsTypedDict, + AccountingBankFeedAccountsAddRequest, + AccountingBankFeedAccountsAddRequestTypedDict, + AccountingBankFeedAccountsAddResponse, + AccountingBankFeedAccountsAddResponseTypedDict, +) +from .accounting_bankfeedaccountsallop import ( + AccountingBankFeedAccountsAllGlobals, + AccountingBankFeedAccountsAllGlobalsTypedDict, + AccountingBankFeedAccountsAllRequest, + AccountingBankFeedAccountsAllRequestTypedDict, + AccountingBankFeedAccountsAllResponse, + AccountingBankFeedAccountsAllResponseTypedDict, +) +from .accounting_bankfeedaccountsdeleteop import ( + AccountingBankFeedAccountsDeleteGlobals, + AccountingBankFeedAccountsDeleteGlobalsTypedDict, + AccountingBankFeedAccountsDeleteRequest, + AccountingBankFeedAccountsDeleteRequestTypedDict, + AccountingBankFeedAccountsDeleteResponse, + AccountingBankFeedAccountsDeleteResponseTypedDict, +) +from .accounting_bankfeedaccountsoneop import ( + AccountingBankFeedAccountsOneGlobals, + AccountingBankFeedAccountsOneGlobalsTypedDict, + AccountingBankFeedAccountsOneRequest, + AccountingBankFeedAccountsOneRequestTypedDict, + AccountingBankFeedAccountsOneResponse, + AccountingBankFeedAccountsOneResponseTypedDict, +) +from .accounting_bankfeedaccountsupdateop import ( + AccountingBankFeedAccountsUpdateGlobals, + AccountingBankFeedAccountsUpdateGlobalsTypedDict, + AccountingBankFeedAccountsUpdateRequest, + AccountingBankFeedAccountsUpdateRequestTypedDict, + AccountingBankFeedAccountsUpdateResponse, + AccountingBankFeedAccountsUpdateResponseTypedDict, +) +from .accounting_bankfeedstatementsaddop import ( + AccountingBankFeedStatementsAddGlobals, + AccountingBankFeedStatementsAddGlobalsTypedDict, + AccountingBankFeedStatementsAddRequest, + AccountingBankFeedStatementsAddRequestTypedDict, + AccountingBankFeedStatementsAddResponse, + AccountingBankFeedStatementsAddResponseTypedDict, +) +from .accounting_bankfeedstatementsallop import ( + AccountingBankFeedStatementsAllGlobals, + AccountingBankFeedStatementsAllGlobalsTypedDict, + AccountingBankFeedStatementsAllRequest, + AccountingBankFeedStatementsAllRequestTypedDict, + AccountingBankFeedStatementsAllResponse, + AccountingBankFeedStatementsAllResponseTypedDict, +) +from .accounting_bankfeedstatementsdeleteop import ( + AccountingBankFeedStatementsDeleteGlobals, + AccountingBankFeedStatementsDeleteGlobalsTypedDict, + AccountingBankFeedStatementsDeleteRequest, + AccountingBankFeedStatementsDeleteRequestTypedDict, + AccountingBankFeedStatementsDeleteResponse, + AccountingBankFeedStatementsDeleteResponseTypedDict, +) +from .accounting_bankfeedstatementsoneop import ( + AccountingBankFeedStatementsOneGlobals, + AccountingBankFeedStatementsOneGlobalsTypedDict, + AccountingBankFeedStatementsOneRequest, + AccountingBankFeedStatementsOneRequestTypedDict, + AccountingBankFeedStatementsOneResponse, + AccountingBankFeedStatementsOneResponseTypedDict, +) +from .accounting_bankfeedstatementsupdateop import ( + AccountingBankFeedStatementsUpdateGlobals, + AccountingBankFeedStatementsUpdateGlobalsTypedDict, + AccountingBankFeedStatementsUpdateRequest, + AccountingBankFeedStatementsUpdateRequestTypedDict, + AccountingBankFeedStatementsUpdateResponse, + AccountingBankFeedStatementsUpdateResponseTypedDict, +) from .accounting_billpaymentsaddop import ( AccountingBillPaymentsAddGlobals, AccountingBillPaymentsAddGlobalsTypedDict, @@ -983,6 +1063,24 @@ PeriodType, ) from .bankaccount import AccountType, BankAccount, BankAccountTypedDict +from .bankfeedaccount import ( + BankAccountType, + BankFeedAccount, + BankFeedAccountInput, + BankFeedAccountInputTypedDict, + BankFeedAccountTypedDict, + FeedStatus, +) +from .bankfeedstatement import ( + BankFeedStatement, + BankFeedStatementInput, + BankFeedStatementInputTypedDict, + BankFeedStatementTransactionType, + BankFeedStatementTypedDict, + StatementStatus, + Transactions, + TransactionsTypedDict, +) from .benefit import Benefit, BenefitTypedDict from .bill import Bill, BillInput, BillInputTypedDict, BillStatus, BillTypedDict from .billlineitem import ( @@ -1204,6 +1302,14 @@ CreateAttachmentResponse, CreateAttachmentResponseTypedDict, ) +from .createbankfeedaccountresponse import ( + CreateBankFeedAccountResponse, + CreateBankFeedAccountResponseTypedDict, +) +from .createbankfeedstatementresponse import ( + CreateBankFeedStatementResponse, + CreateBankFeedStatementResponseTypedDict, +) from .createbillpaymentresponse import ( CreateBillPaymentResponse, CreateBillPaymentResponseTypedDict, @@ -1337,6 +1443,7 @@ CreditNotesSortBy, CreditNotesSortTypedDict, ) +from .creditordebit import CreditOrDebit from .crm_activitiesaddop import ( CrmActivitiesAddGlobals, CrmActivitiesAddGlobalsTypedDict, @@ -1710,6 +1817,14 @@ DeleteAttachmentResponse, DeleteAttachmentResponseTypedDict, ) +from .deletebankfeedaccountresponse import ( + DeleteBankFeedAccountResponse, + DeleteBankFeedAccountResponseTypedDict, +) +from .deletebankfeedstatementresponse import ( + DeleteBankFeedStatementResponse, + DeleteBankFeedStatementResponseTypedDict, +) from .deletebillpaymentresponse import ( DeleteBillPaymentResponse, DeleteBillPaymentResponseTypedDict, @@ -2307,6 +2422,22 @@ GetBalanceSheetResponse, GetBalanceSheetResponseTypedDict, ) +from .getbankfeedaccountresponse import ( + GetBankFeedAccountResponse, + GetBankFeedAccountResponseTypedDict, +) +from .getbankfeedaccountsresponse import ( + GetBankFeedAccountsResponse, + GetBankFeedAccountsResponseTypedDict, +) +from .getbankfeedstatementresponse import ( + GetBankFeedStatementResponse, + GetBankFeedStatementResponseTypedDict, +) +from .getbankfeedstatementsresponse import ( + GetBankFeedStatementsResponse, + GetBankFeedStatementsResponseTypedDict, +) from .getbillpaymentresponse import ( GetBillPaymentResponse, GetBillPaymentResponseTypedDict, @@ -3325,6 +3456,14 @@ UpdateApplicationResponse, UpdateApplicationResponseTypedDict, ) +from .updatebankfeedaccountresponse import ( + UpdateBankFeedAccountResponse, + UpdateBankFeedAccountResponseTypedDict, +) +from .updatebankfeedstatementresponse import ( + UpdateBankFeedStatementResponse, + UpdateBankFeedStatementResponseTypedDict, +) from .updatebillpaymentresponse import ( UpdateBillPaymentResponse, UpdateBillPaymentResponseTypedDict, @@ -3754,6 +3893,66 @@ "AccountingBalanceSheetOneRequestTypedDict", "AccountingBalanceSheetOneResponse", "AccountingBalanceSheetOneResponseTypedDict", + "AccountingBankFeedAccountsAddGlobals", + "AccountingBankFeedAccountsAddGlobalsTypedDict", + "AccountingBankFeedAccountsAddRequest", + "AccountingBankFeedAccountsAddRequestTypedDict", + "AccountingBankFeedAccountsAddResponse", + "AccountingBankFeedAccountsAddResponseTypedDict", + "AccountingBankFeedAccountsAllGlobals", + "AccountingBankFeedAccountsAllGlobalsTypedDict", + "AccountingBankFeedAccountsAllRequest", + "AccountingBankFeedAccountsAllRequestTypedDict", + "AccountingBankFeedAccountsAllResponse", + "AccountingBankFeedAccountsAllResponseTypedDict", + "AccountingBankFeedAccountsDeleteGlobals", + "AccountingBankFeedAccountsDeleteGlobalsTypedDict", + "AccountingBankFeedAccountsDeleteRequest", + "AccountingBankFeedAccountsDeleteRequestTypedDict", + "AccountingBankFeedAccountsDeleteResponse", + "AccountingBankFeedAccountsDeleteResponseTypedDict", + "AccountingBankFeedAccountsOneGlobals", + "AccountingBankFeedAccountsOneGlobalsTypedDict", + "AccountingBankFeedAccountsOneRequest", + "AccountingBankFeedAccountsOneRequestTypedDict", + "AccountingBankFeedAccountsOneResponse", + "AccountingBankFeedAccountsOneResponseTypedDict", + "AccountingBankFeedAccountsUpdateGlobals", + "AccountingBankFeedAccountsUpdateGlobalsTypedDict", + "AccountingBankFeedAccountsUpdateRequest", + "AccountingBankFeedAccountsUpdateRequestTypedDict", + "AccountingBankFeedAccountsUpdateResponse", + "AccountingBankFeedAccountsUpdateResponseTypedDict", + "AccountingBankFeedStatementsAddGlobals", + "AccountingBankFeedStatementsAddGlobalsTypedDict", + "AccountingBankFeedStatementsAddRequest", + "AccountingBankFeedStatementsAddRequestTypedDict", + "AccountingBankFeedStatementsAddResponse", + "AccountingBankFeedStatementsAddResponseTypedDict", + "AccountingBankFeedStatementsAllGlobals", + "AccountingBankFeedStatementsAllGlobalsTypedDict", + "AccountingBankFeedStatementsAllRequest", + "AccountingBankFeedStatementsAllRequestTypedDict", + "AccountingBankFeedStatementsAllResponse", + "AccountingBankFeedStatementsAllResponseTypedDict", + "AccountingBankFeedStatementsDeleteGlobals", + "AccountingBankFeedStatementsDeleteGlobalsTypedDict", + "AccountingBankFeedStatementsDeleteRequest", + "AccountingBankFeedStatementsDeleteRequestTypedDict", + "AccountingBankFeedStatementsDeleteResponse", + "AccountingBankFeedStatementsDeleteResponseTypedDict", + "AccountingBankFeedStatementsOneGlobals", + "AccountingBankFeedStatementsOneGlobalsTypedDict", + "AccountingBankFeedStatementsOneRequest", + "AccountingBankFeedStatementsOneRequestTypedDict", + "AccountingBankFeedStatementsOneResponse", + "AccountingBankFeedStatementsOneResponseTypedDict", + "AccountingBankFeedStatementsUpdateGlobals", + "AccountingBankFeedStatementsUpdateGlobalsTypedDict", + "AccountingBankFeedStatementsUpdateRequest", + "AccountingBankFeedStatementsUpdateRequestTypedDict", + "AccountingBankFeedStatementsUpdateResponse", + "AccountingBankFeedStatementsUpdateResponseTypedDict", "AccountingBillPaymentsAddGlobals", "AccountingBillPaymentsAddGlobalsTypedDict", "AccountingBillPaymentsAddRequest", @@ -4440,7 +4639,17 @@ "BalanceSheetUncategorizedItemsAccount", "BalanceSheetUncategorizedItemsAccountTypedDict", "BankAccount", + "BankAccountType", "BankAccountTypedDict", + "BankFeedAccount", + "BankFeedAccountInput", + "BankFeedAccountInputTypedDict", + "BankFeedAccountTypedDict", + "BankFeedStatement", + "BankFeedStatementInput", + "BankFeedStatementInputTypedDict", + "BankFeedStatementTransactionType", + "BankFeedStatementTypedDict", "Benefit", "BenefitTypedDict", "Bill", @@ -4632,6 +4841,10 @@ "CreateApplicationResponseTypedDict", "CreateAttachmentResponse", "CreateAttachmentResponseTypedDict", + "CreateBankFeedAccountResponse", + "CreateBankFeedAccountResponseTypedDict", + "CreateBankFeedStatementResponse", + "CreateBankFeedStatementResponseTypedDict", "CreateBillPaymentResponse", "CreateBillPaymentResponseTypedDict", "CreateBillResponse", @@ -4735,6 +4948,7 @@ "CreditNotesSort", "CreditNotesSortBy", "CreditNotesSortTypedDict", + "CreditOrDebit", "CrmActivitiesAddGlobals", "CrmActivitiesAddGlobalsTypedDict", "CrmActivitiesAddRequest", @@ -5018,6 +5232,10 @@ "DeleteApplicationResponseTypedDict", "DeleteAttachmentResponse", "DeleteAttachmentResponseTypedDict", + "DeleteBankFeedAccountResponse", + "DeleteBankFeedAccountResponseTypedDict", + "DeleteBankFeedStatementResponse", + "DeleteBankFeedStatementResponseTypedDict", "DeleteBillPaymentResponse", "DeleteBillPaymentResponseTypedDict", "DeleteBillResponse", @@ -5247,6 +5465,7 @@ "FILE_STORAGE_UPLOAD_SESSIONS_FINISH_OP_SERVERS", "FILE_STORAGE_UPLOAD_SESSIONS_ONE_OP_SERVERS", "FILE_STORAGE_UPLOAD_SESSIONS_UPLOAD_OP_SERVERS", + "FeedStatus", "FileStorageDriveGroupsAddGlobals", "FileStorageDriveGroupsAddGlobalsTypedDict", "FileStorageDriveGroupsAddRequest", @@ -5505,6 +5724,14 @@ "GetAttachmentsResponseTypedDict", "GetBalanceSheetResponse", "GetBalanceSheetResponseTypedDict", + "GetBankFeedAccountResponse", + "GetBankFeedAccountResponseTypedDict", + "GetBankFeedAccountsResponse", + "GetBankFeedAccountsResponseTypedDict", + "GetBankFeedStatementResponse", + "GetBankFeedStatementResponseTypedDict", + "GetBankFeedStatementsResponse", + "GetBankFeedStatementsResponseTypedDict", "GetBillPaymentResponse", "GetBillPaymentResponseTypedDict", "GetBillPaymentsResponse", @@ -6290,6 +6517,7 @@ "StageTypedDict", "Stages", "StagesTypedDict", + "StatementStatus", "Status", "SubAccounts", "SubAccountsTypedDict", @@ -6359,6 +6587,8 @@ "TrackingItem", "TrackingItemTypedDict", "TransactionType", + "Transactions", + "TransactionsTypedDict", "Type", "UnauthorizedResponse", "UnauthorizedResponseData", @@ -6390,6 +6620,10 @@ "UpdateApplicantResponseTypedDict", "UpdateApplicationResponse", "UpdateApplicationResponseTypedDict", + "UpdateBankFeedAccountResponse", + "UpdateBankFeedAccountResponseTypedDict", + "UpdateBankFeedStatementResponse", + "UpdateBankFeedStatementResponseTypedDict", "UpdateBillPaymentResponse", "UpdateBillPaymentResponseTypedDict", "UpdateBillResponse", diff --git a/src/apideck_unify/models/accounting_bankfeedaccountsaddop.py b/src/apideck_unify/models/accounting_bankfeedaccountsaddop.py new file mode 100644 index 00000000..af25493b --- /dev/null +++ b/src/apideck_unify/models/accounting_bankfeedaccountsaddop.py @@ -0,0 +1,112 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .bankfeedaccount import BankFeedAccountInput, BankFeedAccountInputTypedDict +from .createbankfeedaccountresponse import ( + CreateBankFeedAccountResponse, + CreateBankFeedAccountResponseTypedDict, +) +from .httpmetadata import HTTPMetadata, HTTPMetadataTypedDict +from .unexpectederrorresponse import ( + UnexpectedErrorResponse, + UnexpectedErrorResponseTypedDict, +) +from apideck_unify.types import BaseModel +from apideck_unify.utils import ( + FieldMetadata, + HeaderMetadata, + QueryParamMetadata, + RequestMetadata, +) +import pydantic +from typing import Optional +from typing_extensions import Annotated, NotRequired, TypedDict + + +class AccountingBankFeedAccountsAddGlobalsTypedDict(TypedDict): + consumer_id: NotRequired[str] + r"""ID of the consumer which you want to get or push data from""" + app_id: NotRequired[str] + r"""The ID of your Unify application""" + + +class AccountingBankFeedAccountsAddGlobals(BaseModel): + consumer_id: Annotated[ + Optional[str], + pydantic.Field(alias="x-apideck-consumer-id"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + r"""ID of the consumer which you want to get or push data from""" + + app_id: Annotated[ + Optional[str], + pydantic.Field(alias="x-apideck-app-id"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + r"""The ID of your Unify application""" + + +class AccountingBankFeedAccountsAddRequestTypedDict(TypedDict): + bank_feed_account: BankFeedAccountInputTypedDict + raw: NotRequired[bool] + r"""Include raw response. Mostly used for debugging purposes""" + consumer_id: NotRequired[str] + r"""ID of the consumer which you want to get or push data from""" + app_id: NotRequired[str] + r"""The ID of your Unify application""" + service_id: NotRequired[str] + r"""Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API.""" + + +class AccountingBankFeedAccountsAddRequest(BaseModel): + bank_feed_account: Annotated[ + BankFeedAccountInput, + FieldMetadata(request=RequestMetadata(media_type="application/json")), + ] + + raw: Annotated[ + Optional[bool], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = False + r"""Include raw response. Mostly used for debugging purposes""" + + consumer_id: Annotated[ + Optional[str], + pydantic.Field(alias="x-apideck-consumer-id"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + r"""ID of the consumer which you want to get or push data from""" + + app_id: Annotated[ + Optional[str], + pydantic.Field(alias="x-apideck-app-id"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + r"""The ID of your Unify application""" + + service_id: Annotated[ + Optional[str], + pydantic.Field(alias="x-apideck-service-id"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + r"""Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API.""" + + +class AccountingBankFeedAccountsAddResponseTypedDict(TypedDict): + http_meta: HTTPMetadataTypedDict + create_bank_feed_account_response: NotRequired[ + CreateBankFeedAccountResponseTypedDict + ] + r"""Bank Feed Accounts""" + unexpected_error_response: NotRequired[UnexpectedErrorResponseTypedDict] + r"""Unexpected error""" + + +class AccountingBankFeedAccountsAddResponse(BaseModel): + http_meta: Annotated[Optional[HTTPMetadata], pydantic.Field(exclude=True)] = None + + create_bank_feed_account_response: Optional[CreateBankFeedAccountResponse] = None + r"""Bank Feed Accounts""" + + unexpected_error_response: Optional[UnexpectedErrorResponse] = None + r"""Unexpected error""" diff --git a/src/apideck_unify/models/accounting_bankfeedaccountsallop.py b/src/apideck_unify/models/accounting_bankfeedaccountsallop.py new file mode 100644 index 00000000..e3d89bc3 --- /dev/null +++ b/src/apideck_unify/models/accounting_bankfeedaccountsallop.py @@ -0,0 +1,178 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .getbankfeedaccountsresponse import ( + GetBankFeedAccountsResponse, + GetBankFeedAccountsResponseTypedDict, +) +from .httpmetadata import HTTPMetadata, HTTPMetadataTypedDict +from .unexpectederrorresponse import ( + UnexpectedErrorResponse, + UnexpectedErrorResponseTypedDict, +) +from apideck_unify.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from apideck_unify.utils import FieldMetadata, HeaderMetadata, QueryParamMetadata +import pydantic +from pydantic import model_serializer +from typing import Any, Callable, Dict, Optional +from typing_extensions import Annotated, NotRequired, TypedDict + + +class AccountingBankFeedAccountsAllGlobalsTypedDict(TypedDict): + consumer_id: NotRequired[str] + r"""ID of the consumer which you want to get or push data from""" + app_id: NotRequired[str] + r"""The ID of your Unify application""" + + +class AccountingBankFeedAccountsAllGlobals(BaseModel): + consumer_id: Annotated[ + Optional[str], + pydantic.Field(alias="x-apideck-consumer-id"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + r"""ID of the consumer which you want to get or push data from""" + + app_id: Annotated[ + Optional[str], + pydantic.Field(alias="x-apideck-app-id"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + r"""The ID of your Unify application""" + + +class AccountingBankFeedAccountsAllRequestTypedDict(TypedDict): + raw: NotRequired[bool] + r"""Include raw response. Mostly used for debugging purposes""" + consumer_id: NotRequired[str] + r"""ID of the consumer which you want to get or push data from""" + app_id: NotRequired[str] + r"""The ID of your Unify application""" + service_id: NotRequired[str] + r"""Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API.""" + cursor: NotRequired[Nullable[str]] + r"""Cursor to start from. You can find cursors for next/previous pages in the meta.cursors property of the response.""" + limit: NotRequired[int] + r"""Number of results to return. Minimum 1, Maximum 200, Default 20""" + pass_through: NotRequired[Dict[str, Any]] + r"""Optional unmapped key/values that will be passed through to downstream as query parameters. Ie: ?pass_through[search]=leads becomes ?search=leads""" + fields: NotRequired[Nullable[str]] + r"""The 'fields' parameter allows API users to specify the fields they want to include in the API response. If this parameter is not present, the API will return all available fields. If this parameter is present, only the fields specified in the comma-separated string will be included in the response. Nested properties can also be requested by using a dot notation.

Example: `fields=name,email,addresses.city`

In the example above, the response will only include the fields \"name\", \"email\" and \"addresses.city\". If any other fields are available, they will be excluded.""" + + +class AccountingBankFeedAccountsAllRequest(BaseModel): + raw: Annotated[ + Optional[bool], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = False + r"""Include raw response. Mostly used for debugging purposes""" + + consumer_id: Annotated[ + Optional[str], + pydantic.Field(alias="x-apideck-consumer-id"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + r"""ID of the consumer which you want to get or push data from""" + + app_id: Annotated[ + Optional[str], + pydantic.Field(alias="x-apideck-app-id"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + r"""The ID of your Unify application""" + + service_id: Annotated[ + Optional[str], + pydantic.Field(alias="x-apideck-service-id"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + r"""Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API.""" + + cursor: Annotated[ + OptionalNullable[str], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = UNSET + r"""Cursor to start from. You can find cursors for next/previous pages in the meta.cursors property of the response.""" + + limit: Annotated[ + Optional[int], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = 20 + r"""Number of results to return. Minimum 1, Maximum 200, Default 20""" + + pass_through: Annotated[ + Optional[Dict[str, Any]], + FieldMetadata(query=QueryParamMetadata(style="deepObject", explode=True)), + ] = None + r"""Optional unmapped key/values that will be passed through to downstream as query parameters. Ie: ?pass_through[search]=leads becomes ?search=leads""" + + fields: Annotated[ + OptionalNullable[str], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = UNSET + r"""The 'fields' parameter allows API users to specify the fields they want to include in the API response. If this parameter is not present, the API will return all available fields. If this parameter is present, only the fields specified in the comma-separated string will be included in the response. Nested properties can also be requested by using a dot notation.

Example: `fields=name,email,addresses.city`

In the example above, the response will only include the fields \"name\", \"email\" and \"addresses.city\". If any other fields are available, they will be excluded.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = [ + "raw", + "consumerId", + "appId", + "serviceId", + "cursor", + "limit", + "pass_through", + "fields", + ] + nullable_fields = ["cursor", "fields"] + null_default_fields = [] + + serialized = handler(self) + + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + serialized.pop(k, None) + + optional_nullable = k in optional_fields and k in nullable_fields + is_set = ( + self.__pydantic_fields_set__.intersection({n}) + or k in null_default_fields + ) # pylint: disable=no-member + + if val is not None and val != UNSET_SENTINEL: + m[k] = val + elif val != UNSET_SENTINEL and ( + not k in optional_fields or (optional_nullable and is_set) + ): + m[k] = val + + return m + + +class AccountingBankFeedAccountsAllResponseTypedDict(TypedDict): + http_meta: HTTPMetadataTypedDict + get_bank_feed_accounts_response: NotRequired[GetBankFeedAccountsResponseTypedDict] + r"""Bank Feed Accounts""" + unexpected_error_response: NotRequired[UnexpectedErrorResponseTypedDict] + r"""Unexpected error""" + + +class AccountingBankFeedAccountsAllResponse(BaseModel): + next: Callable[[], Optional[AccountingBankFeedAccountsAllResponse]] + + http_meta: Annotated[Optional[HTTPMetadata], pydantic.Field(exclude=True)] = None + + get_bank_feed_accounts_response: Optional[GetBankFeedAccountsResponse] = None + r"""Bank Feed Accounts""" + + unexpected_error_response: Optional[UnexpectedErrorResponse] = None + r"""Unexpected error""" diff --git a/src/apideck_unify/models/accounting_bankfeedaccountsdeleteop.py b/src/apideck_unify/models/accounting_bankfeedaccountsdeleteop.py new file mode 100644 index 00000000..0f288854 --- /dev/null +++ b/src/apideck_unify/models/accounting_bankfeedaccountsdeleteop.py @@ -0,0 +1,112 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .deletebankfeedaccountresponse import ( + DeleteBankFeedAccountResponse, + DeleteBankFeedAccountResponseTypedDict, +) +from .httpmetadata import HTTPMetadata, HTTPMetadataTypedDict +from .unexpectederrorresponse import ( + UnexpectedErrorResponse, + UnexpectedErrorResponseTypedDict, +) +from apideck_unify.types import BaseModel +from apideck_unify.utils import ( + FieldMetadata, + HeaderMetadata, + PathParamMetadata, + QueryParamMetadata, +) +import pydantic +from typing import Optional +from typing_extensions import Annotated, NotRequired, TypedDict + + +class AccountingBankFeedAccountsDeleteGlobalsTypedDict(TypedDict): + consumer_id: NotRequired[str] + r"""ID of the consumer which you want to get or push data from""" + app_id: NotRequired[str] + r"""The ID of your Unify application""" + + +class AccountingBankFeedAccountsDeleteGlobals(BaseModel): + consumer_id: Annotated[ + Optional[str], + pydantic.Field(alias="x-apideck-consumer-id"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + r"""ID of the consumer which you want to get or push data from""" + + app_id: Annotated[ + Optional[str], + pydantic.Field(alias="x-apideck-app-id"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + r"""The ID of your Unify application""" + + +class AccountingBankFeedAccountsDeleteRequestTypedDict(TypedDict): + id: str + r"""ID of the record you are acting upon.""" + consumer_id: NotRequired[str] + r"""ID of the consumer which you want to get or push data from""" + app_id: NotRequired[str] + r"""The ID of your Unify application""" + service_id: NotRequired[str] + r"""Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API.""" + raw: NotRequired[bool] + r"""Include raw response. Mostly used for debugging purposes""" + + +class AccountingBankFeedAccountsDeleteRequest(BaseModel): + id: Annotated[ + str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False)) + ] + r"""ID of the record you are acting upon.""" + + consumer_id: Annotated[ + Optional[str], + pydantic.Field(alias="x-apideck-consumer-id"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + r"""ID of the consumer which you want to get or push data from""" + + app_id: Annotated[ + Optional[str], + pydantic.Field(alias="x-apideck-app-id"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + r"""The ID of your Unify application""" + + service_id: Annotated[ + Optional[str], + pydantic.Field(alias="x-apideck-service-id"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + r"""Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API.""" + + raw: Annotated[ + Optional[bool], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = False + r"""Include raw response. Mostly used for debugging purposes""" + + +class AccountingBankFeedAccountsDeleteResponseTypedDict(TypedDict): + http_meta: HTTPMetadataTypedDict + delete_bank_feed_account_response: NotRequired[ + DeleteBankFeedAccountResponseTypedDict + ] + r"""Bank Feed Accounts""" + unexpected_error_response: NotRequired[UnexpectedErrorResponseTypedDict] + r"""Unexpected error""" + + +class AccountingBankFeedAccountsDeleteResponse(BaseModel): + http_meta: Annotated[Optional[HTTPMetadata], pydantic.Field(exclude=True)] = None + + delete_bank_feed_account_response: Optional[DeleteBankFeedAccountResponse] = None + r"""Bank Feed Accounts""" + + unexpected_error_response: Optional[UnexpectedErrorResponse] = None + r"""Unexpected error""" diff --git a/src/apideck_unify/models/accounting_bankfeedaccountsoneop.py b/src/apideck_unify/models/accounting_bankfeedaccountsoneop.py new file mode 100644 index 00000000..8c5cebae --- /dev/null +++ b/src/apideck_unify/models/accounting_bankfeedaccountsoneop.py @@ -0,0 +1,155 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .getbankfeedaccountresponse import ( + GetBankFeedAccountResponse, + GetBankFeedAccountResponseTypedDict, +) +from .httpmetadata import HTTPMetadata, HTTPMetadataTypedDict +from .unexpectederrorresponse import ( + UnexpectedErrorResponse, + UnexpectedErrorResponseTypedDict, +) +from apideck_unify.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from apideck_unify.utils import ( + FieldMetadata, + HeaderMetadata, + PathParamMetadata, + QueryParamMetadata, +) +import pydantic +from pydantic import model_serializer +from typing import Optional +from typing_extensions import Annotated, NotRequired, TypedDict + + +class AccountingBankFeedAccountsOneGlobalsTypedDict(TypedDict): + consumer_id: NotRequired[str] + r"""ID of the consumer which you want to get or push data from""" + app_id: NotRequired[str] + r"""The ID of your Unify application""" + + +class AccountingBankFeedAccountsOneGlobals(BaseModel): + consumer_id: Annotated[ + Optional[str], + pydantic.Field(alias="x-apideck-consumer-id"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + r"""ID of the consumer which you want to get or push data from""" + + app_id: Annotated[ + Optional[str], + pydantic.Field(alias="x-apideck-app-id"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + r"""The ID of your Unify application""" + + +class AccountingBankFeedAccountsOneRequestTypedDict(TypedDict): + id: str + r"""ID of the record you are acting upon.""" + consumer_id: NotRequired[str] + r"""ID of the consumer which you want to get or push data from""" + app_id: NotRequired[str] + r"""The ID of your Unify application""" + service_id: NotRequired[str] + r"""Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API.""" + raw: NotRequired[bool] + r"""Include raw response. Mostly used for debugging purposes""" + fields: NotRequired[Nullable[str]] + r"""The 'fields' parameter allows API users to specify the fields they want to include in the API response. If this parameter is not present, the API will return all available fields. If this parameter is present, only the fields specified in the comma-separated string will be included in the response. Nested properties can also be requested by using a dot notation.

Example: `fields=name,email,addresses.city`

In the example above, the response will only include the fields \"name\", \"email\" and \"addresses.city\". If any other fields are available, they will be excluded.""" + + +class AccountingBankFeedAccountsOneRequest(BaseModel): + id: Annotated[ + str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False)) + ] + r"""ID of the record you are acting upon.""" + + consumer_id: Annotated[ + Optional[str], + pydantic.Field(alias="x-apideck-consumer-id"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + r"""ID of the consumer which you want to get or push data from""" + + app_id: Annotated[ + Optional[str], + pydantic.Field(alias="x-apideck-app-id"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + r"""The ID of your Unify application""" + + service_id: Annotated[ + Optional[str], + pydantic.Field(alias="x-apideck-service-id"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + r"""Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API.""" + + raw: Annotated[ + Optional[bool], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = False + r"""Include raw response. Mostly used for debugging purposes""" + + fields: Annotated[ + OptionalNullable[str], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = UNSET + r"""The 'fields' parameter allows API users to specify the fields they want to include in the API response. If this parameter is not present, the API will return all available fields. If this parameter is present, only the fields specified in the comma-separated string will be included in the response. Nested properties can also be requested by using a dot notation.

Example: `fields=name,email,addresses.city`

In the example above, the response will only include the fields \"name\", \"email\" and \"addresses.city\". If any other fields are available, they will be excluded.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = ["consumerId", "appId", "serviceId", "raw", "fields"] + nullable_fields = ["fields"] + null_default_fields = [] + + serialized = handler(self) + + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + serialized.pop(k, None) + + optional_nullable = k in optional_fields and k in nullable_fields + is_set = ( + self.__pydantic_fields_set__.intersection({n}) + or k in null_default_fields + ) # pylint: disable=no-member + + if val is not None and val != UNSET_SENTINEL: + m[k] = val + elif val != UNSET_SENTINEL and ( + not k in optional_fields or (optional_nullable and is_set) + ): + m[k] = val + + return m + + +class AccountingBankFeedAccountsOneResponseTypedDict(TypedDict): + http_meta: HTTPMetadataTypedDict + get_bank_feed_account_response: NotRequired[GetBankFeedAccountResponseTypedDict] + r"""Bank Feed Accounts""" + unexpected_error_response: NotRequired[UnexpectedErrorResponseTypedDict] + r"""Unexpected error""" + + +class AccountingBankFeedAccountsOneResponse(BaseModel): + http_meta: Annotated[Optional[HTTPMetadata], pydantic.Field(exclude=True)] = None + + get_bank_feed_account_response: Optional[GetBankFeedAccountResponse] = None + r"""Bank Feed Accounts""" + + unexpected_error_response: Optional[UnexpectedErrorResponse] = None + r"""Unexpected error""" diff --git a/src/apideck_unify/models/accounting_bankfeedaccountsupdateop.py b/src/apideck_unify/models/accounting_bankfeedaccountsupdateop.py new file mode 100644 index 00000000..c6660b20 --- /dev/null +++ b/src/apideck_unify/models/accounting_bankfeedaccountsupdateop.py @@ -0,0 +1,120 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .bankfeedaccount import BankFeedAccountInput, BankFeedAccountInputTypedDict +from .httpmetadata import HTTPMetadata, HTTPMetadataTypedDict +from .unexpectederrorresponse import ( + UnexpectedErrorResponse, + UnexpectedErrorResponseTypedDict, +) +from .updatebankfeedaccountresponse import ( + UpdateBankFeedAccountResponse, + UpdateBankFeedAccountResponseTypedDict, +) +from apideck_unify.types import BaseModel +from apideck_unify.utils import ( + FieldMetadata, + HeaderMetadata, + PathParamMetadata, + QueryParamMetadata, + RequestMetadata, +) +import pydantic +from typing import Optional +from typing_extensions import Annotated, NotRequired, TypedDict + + +class AccountingBankFeedAccountsUpdateGlobalsTypedDict(TypedDict): + consumer_id: NotRequired[str] + r"""ID of the consumer which you want to get or push data from""" + app_id: NotRequired[str] + r"""The ID of your Unify application""" + + +class AccountingBankFeedAccountsUpdateGlobals(BaseModel): + consumer_id: Annotated[ + Optional[str], + pydantic.Field(alias="x-apideck-consumer-id"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + r"""ID of the consumer which you want to get or push data from""" + + app_id: Annotated[ + Optional[str], + pydantic.Field(alias="x-apideck-app-id"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + r"""The ID of your Unify application""" + + +class AccountingBankFeedAccountsUpdateRequestTypedDict(TypedDict): + id: str + r"""ID of the record you are acting upon.""" + bank_feed_account: BankFeedAccountInputTypedDict + consumer_id: NotRequired[str] + r"""ID of the consumer which you want to get or push data from""" + app_id: NotRequired[str] + r"""The ID of your Unify application""" + service_id: NotRequired[str] + r"""Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API.""" + raw: NotRequired[bool] + r"""Include raw response. Mostly used for debugging purposes""" + + +class AccountingBankFeedAccountsUpdateRequest(BaseModel): + id: Annotated[ + str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False)) + ] + r"""ID of the record you are acting upon.""" + + bank_feed_account: Annotated[ + BankFeedAccountInput, + FieldMetadata(request=RequestMetadata(media_type="application/json")), + ] + + consumer_id: Annotated[ + Optional[str], + pydantic.Field(alias="x-apideck-consumer-id"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + r"""ID of the consumer which you want to get or push data from""" + + app_id: Annotated[ + Optional[str], + pydantic.Field(alias="x-apideck-app-id"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + r"""The ID of your Unify application""" + + service_id: Annotated[ + Optional[str], + pydantic.Field(alias="x-apideck-service-id"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + r"""Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API.""" + + raw: Annotated[ + Optional[bool], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = False + r"""Include raw response. Mostly used for debugging purposes""" + + +class AccountingBankFeedAccountsUpdateResponseTypedDict(TypedDict): + http_meta: HTTPMetadataTypedDict + update_bank_feed_account_response: NotRequired[ + UpdateBankFeedAccountResponseTypedDict + ] + r"""Bank Feed Accounts""" + unexpected_error_response: NotRequired[UnexpectedErrorResponseTypedDict] + r"""Unexpected error""" + + +class AccountingBankFeedAccountsUpdateResponse(BaseModel): + http_meta: Annotated[Optional[HTTPMetadata], pydantic.Field(exclude=True)] = None + + update_bank_feed_account_response: Optional[UpdateBankFeedAccountResponse] = None + r"""Bank Feed Accounts""" + + unexpected_error_response: Optional[UnexpectedErrorResponse] = None + r"""Unexpected error""" diff --git a/src/apideck_unify/models/accounting_bankfeedstatementsaddop.py b/src/apideck_unify/models/accounting_bankfeedstatementsaddop.py new file mode 100644 index 00000000..a0b06ed4 --- /dev/null +++ b/src/apideck_unify/models/accounting_bankfeedstatementsaddop.py @@ -0,0 +1,114 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .bankfeedstatement import BankFeedStatementInput, BankFeedStatementInputTypedDict +from .createbankfeedstatementresponse import ( + CreateBankFeedStatementResponse, + CreateBankFeedStatementResponseTypedDict, +) +from .httpmetadata import HTTPMetadata, HTTPMetadataTypedDict +from .unexpectederrorresponse import ( + UnexpectedErrorResponse, + UnexpectedErrorResponseTypedDict, +) +from apideck_unify.types import BaseModel +from apideck_unify.utils import ( + FieldMetadata, + HeaderMetadata, + QueryParamMetadata, + RequestMetadata, +) +import pydantic +from typing import Optional +from typing_extensions import Annotated, NotRequired, TypedDict + + +class AccountingBankFeedStatementsAddGlobalsTypedDict(TypedDict): + consumer_id: NotRequired[str] + r"""ID of the consumer which you want to get or push data from""" + app_id: NotRequired[str] + r"""The ID of your Unify application""" + + +class AccountingBankFeedStatementsAddGlobals(BaseModel): + consumer_id: Annotated[ + Optional[str], + pydantic.Field(alias="x-apideck-consumer-id"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + r"""ID of the consumer which you want to get or push data from""" + + app_id: Annotated[ + Optional[str], + pydantic.Field(alias="x-apideck-app-id"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + r"""The ID of your Unify application""" + + +class AccountingBankFeedStatementsAddRequestTypedDict(TypedDict): + bank_feed_statement: BankFeedStatementInputTypedDict + raw: NotRequired[bool] + r"""Include raw response. Mostly used for debugging purposes""" + consumer_id: NotRequired[str] + r"""ID of the consumer which you want to get or push data from""" + app_id: NotRequired[str] + r"""The ID of your Unify application""" + service_id: NotRequired[str] + r"""Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API.""" + + +class AccountingBankFeedStatementsAddRequest(BaseModel): + bank_feed_statement: Annotated[ + BankFeedStatementInput, + FieldMetadata(request=RequestMetadata(media_type="application/json")), + ] + + raw: Annotated[ + Optional[bool], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = False + r"""Include raw response. Mostly used for debugging purposes""" + + consumer_id: Annotated[ + Optional[str], + pydantic.Field(alias="x-apideck-consumer-id"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + r"""ID of the consumer which you want to get or push data from""" + + app_id: Annotated[ + Optional[str], + pydantic.Field(alias="x-apideck-app-id"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + r"""The ID of your Unify application""" + + service_id: Annotated[ + Optional[str], + pydantic.Field(alias="x-apideck-service-id"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + r"""Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API.""" + + +class AccountingBankFeedStatementsAddResponseTypedDict(TypedDict): + http_meta: HTTPMetadataTypedDict + create_bank_feed_statement_response: NotRequired[ + CreateBankFeedStatementResponseTypedDict + ] + r"""Bank Feed Statements""" + unexpected_error_response: NotRequired[UnexpectedErrorResponseTypedDict] + r"""Unexpected error""" + + +class AccountingBankFeedStatementsAddResponse(BaseModel): + http_meta: Annotated[Optional[HTTPMetadata], pydantic.Field(exclude=True)] = None + + create_bank_feed_statement_response: Optional[CreateBankFeedStatementResponse] = ( + None + ) + r"""Bank Feed Statements""" + + unexpected_error_response: Optional[UnexpectedErrorResponse] = None + r"""Unexpected error""" diff --git a/src/apideck_unify/models/accounting_bankfeedstatementsallop.py b/src/apideck_unify/models/accounting_bankfeedstatementsallop.py new file mode 100644 index 00000000..b6c62e0c --- /dev/null +++ b/src/apideck_unify/models/accounting_bankfeedstatementsallop.py @@ -0,0 +1,180 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .getbankfeedstatementsresponse import ( + GetBankFeedStatementsResponse, + GetBankFeedStatementsResponseTypedDict, +) +from .httpmetadata import HTTPMetadata, HTTPMetadataTypedDict +from .unexpectederrorresponse import ( + UnexpectedErrorResponse, + UnexpectedErrorResponseTypedDict, +) +from apideck_unify.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from apideck_unify.utils import FieldMetadata, HeaderMetadata, QueryParamMetadata +import pydantic +from pydantic import model_serializer +from typing import Any, Callable, Dict, Optional +from typing_extensions import Annotated, NotRequired, TypedDict + + +class AccountingBankFeedStatementsAllGlobalsTypedDict(TypedDict): + consumer_id: NotRequired[str] + r"""ID of the consumer which you want to get or push data from""" + app_id: NotRequired[str] + r"""The ID of your Unify application""" + + +class AccountingBankFeedStatementsAllGlobals(BaseModel): + consumer_id: Annotated[ + Optional[str], + pydantic.Field(alias="x-apideck-consumer-id"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + r"""ID of the consumer which you want to get or push data from""" + + app_id: Annotated[ + Optional[str], + pydantic.Field(alias="x-apideck-app-id"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + r"""The ID of your Unify application""" + + +class AccountingBankFeedStatementsAllRequestTypedDict(TypedDict): + raw: NotRequired[bool] + r"""Include raw response. Mostly used for debugging purposes""" + consumer_id: NotRequired[str] + r"""ID of the consumer which you want to get or push data from""" + app_id: NotRequired[str] + r"""The ID of your Unify application""" + service_id: NotRequired[str] + r"""Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API.""" + cursor: NotRequired[Nullable[str]] + r"""Cursor to start from. You can find cursors for next/previous pages in the meta.cursors property of the response.""" + limit: NotRequired[int] + r"""Number of results to return. Minimum 1, Maximum 200, Default 20""" + pass_through: NotRequired[Dict[str, Any]] + r"""Optional unmapped key/values that will be passed through to downstream as query parameters. Ie: ?pass_through[search]=leads becomes ?search=leads""" + fields: NotRequired[Nullable[str]] + r"""The 'fields' parameter allows API users to specify the fields they want to include in the API response. If this parameter is not present, the API will return all available fields. If this parameter is present, only the fields specified in the comma-separated string will be included in the response. Nested properties can also be requested by using a dot notation.

Example: `fields=name,email,addresses.city`

In the example above, the response will only include the fields \"name\", \"email\" and \"addresses.city\". If any other fields are available, they will be excluded.""" + + +class AccountingBankFeedStatementsAllRequest(BaseModel): + raw: Annotated[ + Optional[bool], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = False + r"""Include raw response. Mostly used for debugging purposes""" + + consumer_id: Annotated[ + Optional[str], + pydantic.Field(alias="x-apideck-consumer-id"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + r"""ID of the consumer which you want to get or push data from""" + + app_id: Annotated[ + Optional[str], + pydantic.Field(alias="x-apideck-app-id"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + r"""The ID of your Unify application""" + + service_id: Annotated[ + Optional[str], + pydantic.Field(alias="x-apideck-service-id"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + r"""Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API.""" + + cursor: Annotated[ + OptionalNullable[str], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = UNSET + r"""Cursor to start from. You can find cursors for next/previous pages in the meta.cursors property of the response.""" + + limit: Annotated[ + Optional[int], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = 20 + r"""Number of results to return. Minimum 1, Maximum 200, Default 20""" + + pass_through: Annotated[ + Optional[Dict[str, Any]], + FieldMetadata(query=QueryParamMetadata(style="deepObject", explode=True)), + ] = None + r"""Optional unmapped key/values that will be passed through to downstream as query parameters. Ie: ?pass_through[search]=leads becomes ?search=leads""" + + fields: Annotated[ + OptionalNullable[str], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = UNSET + r"""The 'fields' parameter allows API users to specify the fields they want to include in the API response. If this parameter is not present, the API will return all available fields. If this parameter is present, only the fields specified in the comma-separated string will be included in the response. Nested properties can also be requested by using a dot notation.

Example: `fields=name,email,addresses.city`

In the example above, the response will only include the fields \"name\", \"email\" and \"addresses.city\". If any other fields are available, they will be excluded.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = [ + "raw", + "consumerId", + "appId", + "serviceId", + "cursor", + "limit", + "pass_through", + "fields", + ] + nullable_fields = ["cursor", "fields"] + null_default_fields = [] + + serialized = handler(self) + + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + serialized.pop(k, None) + + optional_nullable = k in optional_fields and k in nullable_fields + is_set = ( + self.__pydantic_fields_set__.intersection({n}) + or k in null_default_fields + ) # pylint: disable=no-member + + if val is not None and val != UNSET_SENTINEL: + m[k] = val + elif val != UNSET_SENTINEL and ( + not k in optional_fields or (optional_nullable and is_set) + ): + m[k] = val + + return m + + +class AccountingBankFeedStatementsAllResponseTypedDict(TypedDict): + http_meta: HTTPMetadataTypedDict + get_bank_feed_statements_response: NotRequired[ + GetBankFeedStatementsResponseTypedDict + ] + r"""Bank Feed Statements""" + unexpected_error_response: NotRequired[UnexpectedErrorResponseTypedDict] + r"""Unexpected error""" + + +class AccountingBankFeedStatementsAllResponse(BaseModel): + next: Callable[[], Optional[AccountingBankFeedStatementsAllResponse]] + + http_meta: Annotated[Optional[HTTPMetadata], pydantic.Field(exclude=True)] = None + + get_bank_feed_statements_response: Optional[GetBankFeedStatementsResponse] = None + r"""Bank Feed Statements""" + + unexpected_error_response: Optional[UnexpectedErrorResponse] = None + r"""Unexpected error""" diff --git a/src/apideck_unify/models/accounting_bankfeedstatementsdeleteop.py b/src/apideck_unify/models/accounting_bankfeedstatementsdeleteop.py new file mode 100644 index 00000000..5a5a3e9d --- /dev/null +++ b/src/apideck_unify/models/accounting_bankfeedstatementsdeleteop.py @@ -0,0 +1,114 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .deletebankfeedstatementresponse import ( + DeleteBankFeedStatementResponse, + DeleteBankFeedStatementResponseTypedDict, +) +from .httpmetadata import HTTPMetadata, HTTPMetadataTypedDict +from .unexpectederrorresponse import ( + UnexpectedErrorResponse, + UnexpectedErrorResponseTypedDict, +) +from apideck_unify.types import BaseModel +from apideck_unify.utils import ( + FieldMetadata, + HeaderMetadata, + PathParamMetadata, + QueryParamMetadata, +) +import pydantic +from typing import Optional +from typing_extensions import Annotated, NotRequired, TypedDict + + +class AccountingBankFeedStatementsDeleteGlobalsTypedDict(TypedDict): + consumer_id: NotRequired[str] + r"""ID of the consumer which you want to get or push data from""" + app_id: NotRequired[str] + r"""The ID of your Unify application""" + + +class AccountingBankFeedStatementsDeleteGlobals(BaseModel): + consumer_id: Annotated[ + Optional[str], + pydantic.Field(alias="x-apideck-consumer-id"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + r"""ID of the consumer which you want to get or push data from""" + + app_id: Annotated[ + Optional[str], + pydantic.Field(alias="x-apideck-app-id"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + r"""The ID of your Unify application""" + + +class AccountingBankFeedStatementsDeleteRequestTypedDict(TypedDict): + id: str + r"""ID of the record you are acting upon.""" + consumer_id: NotRequired[str] + r"""ID of the consumer which you want to get or push data from""" + app_id: NotRequired[str] + r"""The ID of your Unify application""" + service_id: NotRequired[str] + r"""Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API.""" + raw: NotRequired[bool] + r"""Include raw response. Mostly used for debugging purposes""" + + +class AccountingBankFeedStatementsDeleteRequest(BaseModel): + id: Annotated[ + str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False)) + ] + r"""ID of the record you are acting upon.""" + + consumer_id: Annotated[ + Optional[str], + pydantic.Field(alias="x-apideck-consumer-id"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + r"""ID of the consumer which you want to get or push data from""" + + app_id: Annotated[ + Optional[str], + pydantic.Field(alias="x-apideck-app-id"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + r"""The ID of your Unify application""" + + service_id: Annotated[ + Optional[str], + pydantic.Field(alias="x-apideck-service-id"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + r"""Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API.""" + + raw: Annotated[ + Optional[bool], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = False + r"""Include raw response. Mostly used for debugging purposes""" + + +class AccountingBankFeedStatementsDeleteResponseTypedDict(TypedDict): + http_meta: HTTPMetadataTypedDict + delete_bank_feed_statement_response: NotRequired[ + DeleteBankFeedStatementResponseTypedDict + ] + r"""Bank Feed Statements""" + unexpected_error_response: NotRequired[UnexpectedErrorResponseTypedDict] + r"""Unexpected error""" + + +class AccountingBankFeedStatementsDeleteResponse(BaseModel): + http_meta: Annotated[Optional[HTTPMetadata], pydantic.Field(exclude=True)] = None + + delete_bank_feed_statement_response: Optional[DeleteBankFeedStatementResponse] = ( + None + ) + r"""Bank Feed Statements""" + + unexpected_error_response: Optional[UnexpectedErrorResponse] = None + r"""Unexpected error""" diff --git a/src/apideck_unify/models/accounting_bankfeedstatementsoneop.py b/src/apideck_unify/models/accounting_bankfeedstatementsoneop.py new file mode 100644 index 00000000..0505d51f --- /dev/null +++ b/src/apideck_unify/models/accounting_bankfeedstatementsoneop.py @@ -0,0 +1,155 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .getbankfeedstatementresponse import ( + GetBankFeedStatementResponse, + GetBankFeedStatementResponseTypedDict, +) +from .httpmetadata import HTTPMetadata, HTTPMetadataTypedDict +from .unexpectederrorresponse import ( + UnexpectedErrorResponse, + UnexpectedErrorResponseTypedDict, +) +from apideck_unify.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from apideck_unify.utils import ( + FieldMetadata, + HeaderMetadata, + PathParamMetadata, + QueryParamMetadata, +) +import pydantic +from pydantic import model_serializer +from typing import Optional +from typing_extensions import Annotated, NotRequired, TypedDict + + +class AccountingBankFeedStatementsOneGlobalsTypedDict(TypedDict): + consumer_id: NotRequired[str] + r"""ID of the consumer which you want to get or push data from""" + app_id: NotRequired[str] + r"""The ID of your Unify application""" + + +class AccountingBankFeedStatementsOneGlobals(BaseModel): + consumer_id: Annotated[ + Optional[str], + pydantic.Field(alias="x-apideck-consumer-id"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + r"""ID of the consumer which you want to get or push data from""" + + app_id: Annotated[ + Optional[str], + pydantic.Field(alias="x-apideck-app-id"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + r"""The ID of your Unify application""" + + +class AccountingBankFeedStatementsOneRequestTypedDict(TypedDict): + id: str + r"""ID of the record you are acting upon.""" + consumer_id: NotRequired[str] + r"""ID of the consumer which you want to get or push data from""" + app_id: NotRequired[str] + r"""The ID of your Unify application""" + service_id: NotRequired[str] + r"""Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API.""" + raw: NotRequired[bool] + r"""Include raw response. Mostly used for debugging purposes""" + fields: NotRequired[Nullable[str]] + r"""The 'fields' parameter allows API users to specify the fields they want to include in the API response. If this parameter is not present, the API will return all available fields. If this parameter is present, only the fields specified in the comma-separated string will be included in the response. Nested properties can also be requested by using a dot notation.

Example: `fields=name,email,addresses.city`

In the example above, the response will only include the fields \"name\", \"email\" and \"addresses.city\". If any other fields are available, they will be excluded.""" + + +class AccountingBankFeedStatementsOneRequest(BaseModel): + id: Annotated[ + str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False)) + ] + r"""ID of the record you are acting upon.""" + + consumer_id: Annotated[ + Optional[str], + pydantic.Field(alias="x-apideck-consumer-id"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + r"""ID of the consumer which you want to get or push data from""" + + app_id: Annotated[ + Optional[str], + pydantic.Field(alias="x-apideck-app-id"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + r"""The ID of your Unify application""" + + service_id: Annotated[ + Optional[str], + pydantic.Field(alias="x-apideck-service-id"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + r"""Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API.""" + + raw: Annotated[ + Optional[bool], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = False + r"""Include raw response. Mostly used for debugging purposes""" + + fields: Annotated[ + OptionalNullable[str], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = UNSET + r"""The 'fields' parameter allows API users to specify the fields they want to include in the API response. If this parameter is not present, the API will return all available fields. If this parameter is present, only the fields specified in the comma-separated string will be included in the response. Nested properties can also be requested by using a dot notation.

Example: `fields=name,email,addresses.city`

In the example above, the response will only include the fields \"name\", \"email\" and \"addresses.city\". If any other fields are available, they will be excluded.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = ["consumerId", "appId", "serviceId", "raw", "fields"] + nullable_fields = ["fields"] + null_default_fields = [] + + serialized = handler(self) + + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + serialized.pop(k, None) + + optional_nullable = k in optional_fields and k in nullable_fields + is_set = ( + self.__pydantic_fields_set__.intersection({n}) + or k in null_default_fields + ) # pylint: disable=no-member + + if val is not None and val != UNSET_SENTINEL: + m[k] = val + elif val != UNSET_SENTINEL and ( + not k in optional_fields or (optional_nullable and is_set) + ): + m[k] = val + + return m + + +class AccountingBankFeedStatementsOneResponseTypedDict(TypedDict): + http_meta: HTTPMetadataTypedDict + get_bank_feed_statement_response: NotRequired[GetBankFeedStatementResponseTypedDict] + r"""Bank Feed Statements""" + unexpected_error_response: NotRequired[UnexpectedErrorResponseTypedDict] + r"""Unexpected error""" + + +class AccountingBankFeedStatementsOneResponse(BaseModel): + http_meta: Annotated[Optional[HTTPMetadata], pydantic.Field(exclude=True)] = None + + get_bank_feed_statement_response: Optional[GetBankFeedStatementResponse] = None + r"""Bank Feed Statements""" + + unexpected_error_response: Optional[UnexpectedErrorResponse] = None + r"""Unexpected error""" diff --git a/src/apideck_unify/models/accounting_bankfeedstatementsupdateop.py b/src/apideck_unify/models/accounting_bankfeedstatementsupdateop.py new file mode 100644 index 00000000..ea5e3883 --- /dev/null +++ b/src/apideck_unify/models/accounting_bankfeedstatementsupdateop.py @@ -0,0 +1,122 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .bankfeedstatement import BankFeedStatementInput, BankFeedStatementInputTypedDict +from .httpmetadata import HTTPMetadata, HTTPMetadataTypedDict +from .unexpectederrorresponse import ( + UnexpectedErrorResponse, + UnexpectedErrorResponseTypedDict, +) +from .updatebankfeedstatementresponse import ( + UpdateBankFeedStatementResponse, + UpdateBankFeedStatementResponseTypedDict, +) +from apideck_unify.types import BaseModel +from apideck_unify.utils import ( + FieldMetadata, + HeaderMetadata, + PathParamMetadata, + QueryParamMetadata, + RequestMetadata, +) +import pydantic +from typing import Optional +from typing_extensions import Annotated, NotRequired, TypedDict + + +class AccountingBankFeedStatementsUpdateGlobalsTypedDict(TypedDict): + consumer_id: NotRequired[str] + r"""ID of the consumer which you want to get or push data from""" + app_id: NotRequired[str] + r"""The ID of your Unify application""" + + +class AccountingBankFeedStatementsUpdateGlobals(BaseModel): + consumer_id: Annotated[ + Optional[str], + pydantic.Field(alias="x-apideck-consumer-id"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + r"""ID of the consumer which you want to get or push data from""" + + app_id: Annotated[ + Optional[str], + pydantic.Field(alias="x-apideck-app-id"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + r"""The ID of your Unify application""" + + +class AccountingBankFeedStatementsUpdateRequestTypedDict(TypedDict): + id: str + r"""ID of the record you are acting upon.""" + bank_feed_statement: BankFeedStatementInputTypedDict + consumer_id: NotRequired[str] + r"""ID of the consumer which you want to get or push data from""" + app_id: NotRequired[str] + r"""The ID of your Unify application""" + service_id: NotRequired[str] + r"""Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API.""" + raw: NotRequired[bool] + r"""Include raw response. Mostly used for debugging purposes""" + + +class AccountingBankFeedStatementsUpdateRequest(BaseModel): + id: Annotated[ + str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False)) + ] + r"""ID of the record you are acting upon.""" + + bank_feed_statement: Annotated[ + BankFeedStatementInput, + FieldMetadata(request=RequestMetadata(media_type="application/json")), + ] + + consumer_id: Annotated[ + Optional[str], + pydantic.Field(alias="x-apideck-consumer-id"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + r"""ID of the consumer which you want to get or push data from""" + + app_id: Annotated[ + Optional[str], + pydantic.Field(alias="x-apideck-app-id"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + r"""The ID of your Unify application""" + + service_id: Annotated[ + Optional[str], + pydantic.Field(alias="x-apideck-service-id"), + FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), + ] = None + r"""Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API.""" + + raw: Annotated[ + Optional[bool], + FieldMetadata(query=QueryParamMetadata(style="form", explode=True)), + ] = False + r"""Include raw response. Mostly used for debugging purposes""" + + +class AccountingBankFeedStatementsUpdateResponseTypedDict(TypedDict): + http_meta: HTTPMetadataTypedDict + update_bank_feed_statement_response: NotRequired[ + UpdateBankFeedStatementResponseTypedDict + ] + r"""Bank Feed Statements""" + unexpected_error_response: NotRequired[UnexpectedErrorResponseTypedDict] + r"""Unexpected error""" + + +class AccountingBankFeedStatementsUpdateResponse(BaseModel): + http_meta: Annotated[Optional[HTTPMetadata], pydantic.Field(exclude=True)] = None + + update_bank_feed_statement_response: Optional[UpdateBankFeedStatementResponse] = ( + None + ) + r"""Bank Feed Statements""" + + unexpected_error_response: Optional[UnexpectedErrorResponse] = None + r"""Unexpected error""" diff --git a/src/apideck_unify/models/bankfeedaccount.py b/src/apideck_unify/models/bankfeedaccount.py new file mode 100644 index 00000000..5cdada16 --- /dev/null +++ b/src/apideck_unify/models/bankfeedaccount.py @@ -0,0 +1,251 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .currency import Currency +from .customfield import CustomField, CustomFieldTypedDict +from .custommappings import CustomMappings, CustomMappingsTypedDict +from apideck_unify.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from datetime import datetime +from enum import Enum +from pydantic import model_serializer +from typing import List, Optional +from typing_extensions import NotRequired, TypedDict + + +class BankAccountType(str, Enum): + r"""Type of the bank account.""" + + BANK = "bank" + CREDIT_CARD = "credit_card" + + +class FeedStatus(str, Enum): + r"""Current status of the bank feed.""" + + PENDING = "pending" + REJECTED = "rejected" + + +class BankFeedAccountTypedDict(TypedDict): + id: str + r"""A unique identifier for an object.""" + bank_account_type: NotRequired[BankAccountType] + r"""Type of the bank account.""" + source_account_id: NotRequired[str] + r"""The source account's unique identifier.""" + target_account_id: NotRequired[str] + r"""The target account's unique identifier in the accounting connector.""" + target_account_name: NotRequired[str] + r"""Name associated with the target account.""" + target_account_number: NotRequired[str] + r"""Account number of the destination bank account.""" + currency: NotRequired[Nullable[Currency]] + r"""Indicates the associated currency for an amount of money. Values correspond to [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217).""" + feed_status: NotRequired[FeedStatus] + r"""Current status of the bank feed.""" + country: NotRequired[Nullable[str]] + r"""Country code according to ISO 3166-1 alpha-2.""" + custom_fields: NotRequired[List[CustomFieldTypedDict]] + custom_mappings: NotRequired[Nullable[CustomMappingsTypedDict]] + r"""When custom mappings are configured on the resource, the result is included here.""" + created_at: NotRequired[Nullable[datetime]] + r"""The date and time when the object was created.""" + updated_at: NotRequired[Nullable[datetime]] + r"""The date and time when the object was last updated.""" + updated_by: NotRequired[Nullable[str]] + r"""The user who last updated the object.""" + created_by: NotRequired[Nullable[str]] + r"""The user who created the object.""" + + +class BankFeedAccount(BaseModel): + id: str + r"""A unique identifier for an object.""" + + bank_account_type: Optional[BankAccountType] = None + r"""Type of the bank account.""" + + source_account_id: Optional[str] = None + r"""The source account's unique identifier.""" + + target_account_id: Optional[str] = None + r"""The target account's unique identifier in the accounting connector.""" + + target_account_name: Optional[str] = None + r"""Name associated with the target account.""" + + target_account_number: Optional[str] = None + r"""Account number of the destination bank account.""" + + currency: OptionalNullable[Currency] = UNSET + r"""Indicates the associated currency for an amount of money. Values correspond to [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217).""" + + feed_status: Optional[FeedStatus] = None + r"""Current status of the bank feed.""" + + country: OptionalNullable[str] = UNSET + r"""Country code according to ISO 3166-1 alpha-2.""" + + custom_fields: Optional[List[CustomField]] = None + + custom_mappings: OptionalNullable[CustomMappings] = UNSET + r"""When custom mappings are configured on the resource, the result is included here.""" + + created_at: OptionalNullable[datetime] = UNSET + r"""The date and time when the object was created.""" + + updated_at: OptionalNullable[datetime] = UNSET + r"""The date and time when the object was last updated.""" + + updated_by: OptionalNullable[str] = UNSET + r"""The user who last updated the object.""" + + created_by: OptionalNullable[str] = UNSET + r"""The user who created the object.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = [ + "bank_account_type", + "source_account_id", + "target_account_id", + "target_account_name", + "target_account_number", + "currency", + "feed_status", + "country", + "custom_fields", + "custom_mappings", + "created_at", + "updated_at", + "updated_by", + "created_by", + ] + nullable_fields = [ + "currency", + "country", + "custom_mappings", + "created_at", + "updated_at", + "updated_by", + "created_by", + ] + null_default_fields = [] + + serialized = handler(self) + + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + serialized.pop(k, None) + + optional_nullable = k in optional_fields and k in nullable_fields + is_set = ( + self.__pydantic_fields_set__.intersection({n}) + or k in null_default_fields + ) # pylint: disable=no-member + + if val is not None and val != UNSET_SENTINEL: + m[k] = val + elif val != UNSET_SENTINEL and ( + not k in optional_fields or (optional_nullable and is_set) + ): + m[k] = val + + return m + + +class BankFeedAccountInputTypedDict(TypedDict): + bank_account_type: NotRequired[BankAccountType] + r"""Type of the bank account.""" + source_account_id: NotRequired[str] + r"""The source account's unique identifier.""" + target_account_id: NotRequired[str] + r"""The target account's unique identifier in the accounting connector.""" + target_account_name: NotRequired[str] + r"""Name associated with the target account.""" + target_account_number: NotRequired[str] + r"""Account number of the destination bank account.""" + currency: NotRequired[Nullable[Currency]] + r"""Indicates the associated currency for an amount of money. Values correspond to [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217).""" + feed_status: NotRequired[FeedStatus] + r"""Current status of the bank feed.""" + country: NotRequired[Nullable[str]] + r"""Country code according to ISO 3166-1 alpha-2.""" + custom_fields: NotRequired[List[CustomFieldTypedDict]] + + +class BankFeedAccountInput(BaseModel): + bank_account_type: Optional[BankAccountType] = None + r"""Type of the bank account.""" + + source_account_id: Optional[str] = None + r"""The source account's unique identifier.""" + + target_account_id: Optional[str] = None + r"""The target account's unique identifier in the accounting connector.""" + + target_account_name: Optional[str] = None + r"""Name associated with the target account.""" + + target_account_number: Optional[str] = None + r"""Account number of the destination bank account.""" + + currency: OptionalNullable[Currency] = UNSET + r"""Indicates the associated currency for an amount of money. Values correspond to [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217).""" + + feed_status: Optional[FeedStatus] = None + r"""Current status of the bank feed.""" + + country: OptionalNullable[str] = UNSET + r"""Country code according to ISO 3166-1 alpha-2.""" + + custom_fields: Optional[List[CustomField]] = None + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = [ + "bank_account_type", + "source_account_id", + "target_account_id", + "target_account_name", + "target_account_number", + "currency", + "feed_status", + "country", + "custom_fields", + ] + nullable_fields = ["currency", "country"] + null_default_fields = [] + + serialized = handler(self) + + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + serialized.pop(k, None) + + optional_nullable = k in optional_fields and k in nullable_fields + is_set = ( + self.__pydantic_fields_set__.intersection({n}) + or k in null_default_fields + ) # pylint: disable=no-member + + if val is not None and val != UNSET_SENTINEL: + m[k] = val + elif val != UNSET_SENTINEL and ( + not k in optional_fields or (optional_nullable and is_set) + ): + m[k] = val + + return m diff --git a/src/apideck_unify/models/bankfeedstatement.py b/src/apideck_unify/models/bankfeedstatement.py new file mode 100644 index 00000000..1f353995 --- /dev/null +++ b/src/apideck_unify/models/bankfeedstatement.py @@ -0,0 +1,249 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .creditordebit import CreditOrDebit +from apideck_unify.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +from datetime import datetime +from enum import Enum +from pydantic import model_serializer +from typing import List, Optional +from typing_extensions import NotRequired, TypedDict + + +class StatementStatus(str, Enum): + r"""The current status of the bank feed statement.""" + + PENDING = "pending" + REJECTED = "rejected" + SUCCESS = "success" + + +class BankFeedStatementTransactionType(str, Enum): + r"""Type of transaction.""" + + CREDIT = "credit" + DEBIT = "debit" + DEPOSIT = "deposit" + TRANSFER = "transfer" + PAYMENT = "payment" + OTHER = "other" + + +class TransactionsTypedDict(TypedDict): + posted_date: datetime + r"""The date of the transaction - YYYY:MM::DDThh:mm:ss.sTZD""" + amount: float + r"""The amount of the transaction.""" + credit_or_debit: CreditOrDebit + r"""Whether the amount is a credit or debit.""" + source_transaction_id: str + r"""The ID of the source transaction.""" + description: NotRequired[str] + r"""A description of the transaction.""" + counterparty: NotRequired[str] + r"""The counterparty of the transaction.""" + reference: NotRequired[str] + r"""The reference of the transaction.""" + transaction_type: NotRequired[BankFeedStatementTransactionType] + r"""Type of transaction.""" + + +class Transactions(BaseModel): + posted_date: datetime + r"""The date of the transaction - YYYY:MM::DDThh:mm:ss.sTZD""" + + amount: float + r"""The amount of the transaction.""" + + credit_or_debit: CreditOrDebit + r"""Whether the amount is a credit or debit.""" + + source_transaction_id: str + r"""The ID of the source transaction.""" + + description: Optional[str] = None + r"""A description of the transaction.""" + + counterparty: Optional[str] = None + r"""The counterparty of the transaction.""" + + reference: Optional[str] = None + r"""The reference of the transaction.""" + + transaction_type: Optional[BankFeedStatementTransactionType] = None + r"""Type of transaction.""" + + +class BankFeedStatementTypedDict(TypedDict): + id: str + r"""A unique identifier for an object.""" + bank_feed_account_id: NotRequired[str] + r"""The ID of the bank feed account this statement belongs to.""" + status: NotRequired[StatementStatus] + r"""The current status of the bank feed statement.""" + start_date: NotRequired[datetime] + r"""Start date of the bank feed statement.""" + end_date: NotRequired[datetime] + r"""End date of the bank feed statement.""" + start_balance: NotRequired[float] + r"""Balance amount at the start of the period.""" + start_balance_credit_or_debit: NotRequired[CreditOrDebit] + r"""Whether the amount is a credit or debit.""" + end_balance: NotRequired[float] + r"""Balance amount at the end of the period.""" + end_balance_credit_or_debit: NotRequired[CreditOrDebit] + r"""Whether the amount is a credit or debit.""" + transactions: NotRequired[List[TransactionsTypedDict]] + r"""List of transactions in the bank feed statement.""" + created_at: NotRequired[Nullable[datetime]] + r"""The date and time when the object was created.""" + created_by: NotRequired[Nullable[str]] + r"""The user who created the object.""" + updated_at: NotRequired[Nullable[datetime]] + r"""The date and time when the object was last updated.""" + updated_by: NotRequired[Nullable[str]] + r"""The user who last updated the object.""" + + +class BankFeedStatement(BaseModel): + id: str + r"""A unique identifier for an object.""" + + bank_feed_account_id: Optional[str] = None + r"""The ID of the bank feed account this statement belongs to.""" + + status: Optional[StatementStatus] = None + r"""The current status of the bank feed statement.""" + + start_date: Optional[datetime] = None + r"""Start date of the bank feed statement.""" + + end_date: Optional[datetime] = None + r"""End date of the bank feed statement.""" + + start_balance: Optional[float] = None + r"""Balance amount at the start of the period.""" + + start_balance_credit_or_debit: Optional[CreditOrDebit] = None + r"""Whether the amount is a credit or debit.""" + + end_balance: Optional[float] = None + r"""Balance amount at the end of the period.""" + + end_balance_credit_or_debit: Optional[CreditOrDebit] = None + r"""Whether the amount is a credit or debit.""" + + transactions: Optional[List[Transactions]] = None + r"""List of transactions in the bank feed statement.""" + + created_at: OptionalNullable[datetime] = UNSET + r"""The date and time when the object was created.""" + + created_by: OptionalNullable[str] = UNSET + r"""The user who created the object.""" + + updated_at: OptionalNullable[datetime] = UNSET + r"""The date and time when the object was last updated.""" + + updated_by: OptionalNullable[str] = UNSET + r"""The user who last updated the object.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = [ + "bank_feed_account_id", + "status", + "start_date", + "end_date", + "start_balance", + "start_balance_credit_or_debit", + "end_balance", + "end_balance_credit_or_debit", + "transactions", + "created_at", + "created_by", + "updated_at", + "updated_by", + ] + nullable_fields = ["created_at", "created_by", "updated_at", "updated_by"] + null_default_fields = [] + + serialized = handler(self) + + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + serialized.pop(k, None) + + optional_nullable = k in optional_fields and k in nullable_fields + is_set = ( + self.__pydantic_fields_set__.intersection({n}) + or k in null_default_fields + ) # pylint: disable=no-member + + if val is not None and val != UNSET_SENTINEL: + m[k] = val + elif val != UNSET_SENTINEL and ( + not k in optional_fields or (optional_nullable and is_set) + ): + m[k] = val + + return m + + +class BankFeedStatementInputTypedDict(TypedDict): + bank_feed_account_id: NotRequired[str] + r"""The ID of the bank feed account this statement belongs to.""" + status: NotRequired[StatementStatus] + r"""The current status of the bank feed statement.""" + start_date: NotRequired[datetime] + r"""Start date of the bank feed statement.""" + end_date: NotRequired[datetime] + r"""End date of the bank feed statement.""" + start_balance: NotRequired[float] + r"""Balance amount at the start of the period.""" + start_balance_credit_or_debit: NotRequired[CreditOrDebit] + r"""Whether the amount is a credit or debit.""" + end_balance: NotRequired[float] + r"""Balance amount at the end of the period.""" + end_balance_credit_or_debit: NotRequired[CreditOrDebit] + r"""Whether the amount is a credit or debit.""" + transactions: NotRequired[List[TransactionsTypedDict]] + r"""List of transactions in the bank feed statement.""" + + +class BankFeedStatementInput(BaseModel): + bank_feed_account_id: Optional[str] = None + r"""The ID of the bank feed account this statement belongs to.""" + + status: Optional[StatementStatus] = None + r"""The current status of the bank feed statement.""" + + start_date: Optional[datetime] = None + r"""Start date of the bank feed statement.""" + + end_date: Optional[datetime] = None + r"""End date of the bank feed statement.""" + + start_balance: Optional[float] = None + r"""Balance amount at the start of the period.""" + + start_balance_credit_or_debit: Optional[CreditOrDebit] = None + r"""Whether the amount is a credit or debit.""" + + end_balance: Optional[float] = None + r"""Balance amount at the end of the period.""" + + end_balance_credit_or_debit: Optional[CreditOrDebit] = None + r"""Whether the amount is a credit or debit.""" + + transactions: Optional[List[Transactions]] = None + r"""List of transactions in the bank feed statement.""" diff --git a/src/apideck_unify/models/createbankfeedaccountresponse.py b/src/apideck_unify/models/createbankfeedaccountresponse.py new file mode 100644 index 00000000..a316fe40 --- /dev/null +++ b/src/apideck_unify/models/createbankfeedaccountresponse.py @@ -0,0 +1,91 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .unifiedid import UnifiedID, UnifiedIDTypedDict +from apideck_unify.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +import pydantic +from pydantic import model_serializer +from typing import Any, Dict +from typing_extensions import Annotated, NotRequired, TypedDict + + +class CreateBankFeedAccountResponseTypedDict(TypedDict): + r"""Bank Feed Accounts""" + + status_code: int + r"""HTTP Response Status Code""" + status: str + r"""HTTP Response Status""" + service: str + r"""Apideck ID of service provider""" + resource: str + r"""Unified API resource name""" + operation: str + r"""Operation performed""" + data: UnifiedIDTypedDict + r"""A object containing a unique identifier for the resource that was created, updated, or deleted.""" + raw: NotRequired[Nullable[Dict[str, Any]]] + r"""Raw response from the integration when raw=true query param is provided""" + + +class CreateBankFeedAccountResponse(BaseModel): + r"""Bank Feed Accounts""" + + status_code: int + r"""HTTP Response Status Code""" + + status: str + r"""HTTP Response Status""" + + service: str + r"""Apideck ID of service provider""" + + resource: str + r"""Unified API resource name""" + + operation: str + r"""Operation performed""" + + data: UnifiedID + r"""A object containing a unique identifier for the resource that was created, updated, or deleted.""" + + raw: Annotated[OptionalNullable[Dict[str, Any]], pydantic.Field(alias="_raw")] = ( + UNSET + ) + r"""Raw response from the integration when raw=true query param is provided""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = ["_raw"] + nullable_fields = ["_raw"] + null_default_fields = [] + + serialized = handler(self) + + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + serialized.pop(k, None) + + optional_nullable = k in optional_fields and k in nullable_fields + is_set = ( + self.__pydantic_fields_set__.intersection({n}) + or k in null_default_fields + ) # pylint: disable=no-member + + if val is not None and val != UNSET_SENTINEL: + m[k] = val + elif val != UNSET_SENTINEL and ( + not k in optional_fields or (optional_nullable and is_set) + ): + m[k] = val + + return m diff --git a/src/apideck_unify/models/createbankfeedstatementresponse.py b/src/apideck_unify/models/createbankfeedstatementresponse.py new file mode 100644 index 00000000..2ff7c358 --- /dev/null +++ b/src/apideck_unify/models/createbankfeedstatementresponse.py @@ -0,0 +1,91 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .unifiedid import UnifiedID, UnifiedIDTypedDict +from apideck_unify.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +import pydantic +from pydantic import model_serializer +from typing import Any, Dict +from typing_extensions import Annotated, NotRequired, TypedDict + + +class CreateBankFeedStatementResponseTypedDict(TypedDict): + r"""Bank Feed Statements""" + + status_code: int + r"""HTTP Response Status Code""" + status: str + r"""HTTP Response Status""" + service: str + r"""Apideck ID of service provider""" + resource: str + r"""Unified API resource name""" + operation: str + r"""Operation performed""" + data: UnifiedIDTypedDict + r"""A object containing a unique identifier for the resource that was created, updated, or deleted.""" + raw: NotRequired[Nullable[Dict[str, Any]]] + r"""Raw response from the integration when raw=true query param is provided""" + + +class CreateBankFeedStatementResponse(BaseModel): + r"""Bank Feed Statements""" + + status_code: int + r"""HTTP Response Status Code""" + + status: str + r"""HTTP Response Status""" + + service: str + r"""Apideck ID of service provider""" + + resource: str + r"""Unified API resource name""" + + operation: str + r"""Operation performed""" + + data: UnifiedID + r"""A object containing a unique identifier for the resource that was created, updated, or deleted.""" + + raw: Annotated[OptionalNullable[Dict[str, Any]], pydantic.Field(alias="_raw")] = ( + UNSET + ) + r"""Raw response from the integration when raw=true query param is provided""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = ["_raw"] + nullable_fields = ["_raw"] + null_default_fields = [] + + serialized = handler(self) + + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + serialized.pop(k, None) + + optional_nullable = k in optional_fields and k in nullable_fields + is_set = ( + self.__pydantic_fields_set__.intersection({n}) + or k in null_default_fields + ) # pylint: disable=no-member + + if val is not None and val != UNSET_SENTINEL: + m[k] = val + elif val != UNSET_SENTINEL and ( + not k in optional_fields or (optional_nullable and is_set) + ): + m[k] = val + + return m diff --git a/src/apideck_unify/models/creditordebit.py b/src/apideck_unify/models/creditordebit.py new file mode 100644 index 00000000..242f1021 --- /dev/null +++ b/src/apideck_unify/models/creditordebit.py @@ -0,0 +1,11 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from enum import Enum + + +class CreditOrDebit(str, Enum): + r"""Whether the amount is a credit or debit.""" + + CREDIT = "credit" + DEBIT = "debit" diff --git a/src/apideck_unify/models/deletebankfeedaccountresponse.py b/src/apideck_unify/models/deletebankfeedaccountresponse.py new file mode 100644 index 00000000..3ee6b757 --- /dev/null +++ b/src/apideck_unify/models/deletebankfeedaccountresponse.py @@ -0,0 +1,91 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .unifiedid import UnifiedID, UnifiedIDTypedDict +from apideck_unify.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +import pydantic +from pydantic import model_serializer +from typing import Any, Dict +from typing_extensions import Annotated, NotRequired, TypedDict + + +class DeleteBankFeedAccountResponseTypedDict(TypedDict): + r"""Bank Feed Accounts""" + + status_code: int + r"""HTTP Response Status Code""" + status: str + r"""HTTP Response Status""" + service: str + r"""Apideck ID of service provider""" + resource: str + r"""Unified API resource name""" + operation: str + r"""Operation performed""" + data: UnifiedIDTypedDict + r"""A object containing a unique identifier for the resource that was created, updated, or deleted.""" + raw: NotRequired[Nullable[Dict[str, Any]]] + r"""Raw response from the integration when raw=true query param is provided""" + + +class DeleteBankFeedAccountResponse(BaseModel): + r"""Bank Feed Accounts""" + + status_code: int + r"""HTTP Response Status Code""" + + status: str + r"""HTTP Response Status""" + + service: str + r"""Apideck ID of service provider""" + + resource: str + r"""Unified API resource name""" + + operation: str + r"""Operation performed""" + + data: UnifiedID + r"""A object containing a unique identifier for the resource that was created, updated, or deleted.""" + + raw: Annotated[OptionalNullable[Dict[str, Any]], pydantic.Field(alias="_raw")] = ( + UNSET + ) + r"""Raw response from the integration when raw=true query param is provided""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = ["_raw"] + nullable_fields = ["_raw"] + null_default_fields = [] + + serialized = handler(self) + + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + serialized.pop(k, None) + + optional_nullable = k in optional_fields and k in nullable_fields + is_set = ( + self.__pydantic_fields_set__.intersection({n}) + or k in null_default_fields + ) # pylint: disable=no-member + + if val is not None and val != UNSET_SENTINEL: + m[k] = val + elif val != UNSET_SENTINEL and ( + not k in optional_fields or (optional_nullable and is_set) + ): + m[k] = val + + return m diff --git a/src/apideck_unify/models/deletebankfeedstatementresponse.py b/src/apideck_unify/models/deletebankfeedstatementresponse.py new file mode 100644 index 00000000..17fe4573 --- /dev/null +++ b/src/apideck_unify/models/deletebankfeedstatementresponse.py @@ -0,0 +1,91 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .unifiedid import UnifiedID, UnifiedIDTypedDict +from apideck_unify.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +import pydantic +from pydantic import model_serializer +from typing import Any, Dict +from typing_extensions import Annotated, NotRequired, TypedDict + + +class DeleteBankFeedStatementResponseTypedDict(TypedDict): + r"""Bank Feed Statements""" + + status_code: int + r"""HTTP Response Status Code""" + status: str + r"""HTTP Response Status""" + service: str + r"""Apideck ID of service provider""" + resource: str + r"""Unified API resource name""" + operation: str + r"""Operation performed""" + data: UnifiedIDTypedDict + r"""A object containing a unique identifier for the resource that was created, updated, or deleted.""" + raw: NotRequired[Nullable[Dict[str, Any]]] + r"""Raw response from the integration when raw=true query param is provided""" + + +class DeleteBankFeedStatementResponse(BaseModel): + r"""Bank Feed Statements""" + + status_code: int + r"""HTTP Response Status Code""" + + status: str + r"""HTTP Response Status""" + + service: str + r"""Apideck ID of service provider""" + + resource: str + r"""Unified API resource name""" + + operation: str + r"""Operation performed""" + + data: UnifiedID + r"""A object containing a unique identifier for the resource that was created, updated, or deleted.""" + + raw: Annotated[OptionalNullable[Dict[str, Any]], pydantic.Field(alias="_raw")] = ( + UNSET + ) + r"""Raw response from the integration when raw=true query param is provided""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = ["_raw"] + nullable_fields = ["_raw"] + null_default_fields = [] + + serialized = handler(self) + + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + serialized.pop(k, None) + + optional_nullable = k in optional_fields and k in nullable_fields + is_set = ( + self.__pydantic_fields_set__.intersection({n}) + or k in null_default_fields + ) # pylint: disable=no-member + + if val is not None and val != UNSET_SENTINEL: + m[k] = val + elif val != UNSET_SENTINEL and ( + not k in optional_fields or (optional_nullable and is_set) + ): + m[k] = val + + return m diff --git a/src/apideck_unify/models/getbankfeedaccountresponse.py b/src/apideck_unify/models/getbankfeedaccountresponse.py new file mode 100644 index 00000000..f7d0b206 --- /dev/null +++ b/src/apideck_unify/models/getbankfeedaccountresponse.py @@ -0,0 +1,89 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .bankfeedaccount import BankFeedAccount, BankFeedAccountTypedDict +from apideck_unify.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +import pydantic +from pydantic import model_serializer +from typing import Any, Dict +from typing_extensions import Annotated, NotRequired, TypedDict + + +class GetBankFeedAccountResponseTypedDict(TypedDict): + r"""Bank Feed Accounts""" + + status_code: int + r"""HTTP Response Status Code""" + status: str + r"""HTTP Response Status""" + service: str + r"""Apideck ID of service provider""" + resource: str + r"""Unified API resource name""" + operation: str + r"""Operation performed""" + data: BankFeedAccountTypedDict + raw: NotRequired[Nullable[Dict[str, Any]]] + r"""Raw response from the integration when raw=true query param is provided""" + + +class GetBankFeedAccountResponse(BaseModel): + r"""Bank Feed Accounts""" + + status_code: int + r"""HTTP Response Status Code""" + + status: str + r"""HTTP Response Status""" + + service: str + r"""Apideck ID of service provider""" + + resource: str + r"""Unified API resource name""" + + operation: str + r"""Operation performed""" + + data: BankFeedAccount + + raw: Annotated[OptionalNullable[Dict[str, Any]], pydantic.Field(alias="_raw")] = ( + UNSET + ) + r"""Raw response from the integration when raw=true query param is provided""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = ["_raw"] + nullable_fields = ["_raw"] + null_default_fields = [] + + serialized = handler(self) + + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + serialized.pop(k, None) + + optional_nullable = k in optional_fields and k in nullable_fields + is_set = ( + self.__pydantic_fields_set__.intersection({n}) + or k in null_default_fields + ) # pylint: disable=no-member + + if val is not None and val != UNSET_SENTINEL: + m[k] = val + elif val != UNSET_SENTINEL and ( + not k in optional_fields or (optional_nullable and is_set) + ): + m[k] = val + + return m diff --git a/src/apideck_unify/models/getbankfeedaccountsresponse.py b/src/apideck_unify/models/getbankfeedaccountsresponse.py new file mode 100644 index 00000000..59bb70e3 --- /dev/null +++ b/src/apideck_unify/models/getbankfeedaccountsresponse.py @@ -0,0 +1,101 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .bankfeedaccount import BankFeedAccount, BankFeedAccountTypedDict +from .links import Links, LinksTypedDict +from .meta import Meta, MetaTypedDict +from apideck_unify.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +import pydantic +from pydantic import model_serializer +from typing import Any, Dict, List, Optional +from typing_extensions import Annotated, NotRequired, TypedDict + + +class GetBankFeedAccountsResponseTypedDict(TypedDict): + r"""Bank Feed Accounts""" + + status_code: int + r"""HTTP Response Status Code""" + status: str + r"""HTTP Response Status""" + service: str + r"""Apideck ID of service provider""" + resource: str + r"""Unified API resource name""" + operation: str + r"""Operation performed""" + data: List[BankFeedAccountTypedDict] + meta: NotRequired[MetaTypedDict] + r"""Response metadata""" + links: NotRequired[LinksTypedDict] + r"""Links to navigate to previous or next pages through the API""" + raw: NotRequired[Nullable[Dict[str, Any]]] + r"""Raw response from the integration when raw=true query param is provided""" + + +class GetBankFeedAccountsResponse(BaseModel): + r"""Bank Feed Accounts""" + + status_code: int + r"""HTTP Response Status Code""" + + status: str + r"""HTTP Response Status""" + + service: str + r"""Apideck ID of service provider""" + + resource: str + r"""Unified API resource name""" + + operation: str + r"""Operation performed""" + + data: List[BankFeedAccount] + + meta: Optional[Meta] = None + r"""Response metadata""" + + links: Optional[Links] = None + r"""Links to navigate to previous or next pages through the API""" + + raw: Annotated[OptionalNullable[Dict[str, Any]], pydantic.Field(alias="_raw")] = ( + UNSET + ) + r"""Raw response from the integration when raw=true query param is provided""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = ["meta", "links", "_raw"] + nullable_fields = ["_raw"] + null_default_fields = [] + + serialized = handler(self) + + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + serialized.pop(k, None) + + optional_nullable = k in optional_fields and k in nullable_fields + is_set = ( + self.__pydantic_fields_set__.intersection({n}) + or k in null_default_fields + ) # pylint: disable=no-member + + if val is not None and val != UNSET_SENTINEL: + m[k] = val + elif val != UNSET_SENTINEL and ( + not k in optional_fields or (optional_nullable and is_set) + ): + m[k] = val + + return m diff --git a/src/apideck_unify/models/getbankfeedstatementresponse.py b/src/apideck_unify/models/getbankfeedstatementresponse.py new file mode 100644 index 00000000..58f0b846 --- /dev/null +++ b/src/apideck_unify/models/getbankfeedstatementresponse.py @@ -0,0 +1,89 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .bankfeedstatement import BankFeedStatement, BankFeedStatementTypedDict +from apideck_unify.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +import pydantic +from pydantic import model_serializer +from typing import Any, Dict +from typing_extensions import Annotated, NotRequired, TypedDict + + +class GetBankFeedStatementResponseTypedDict(TypedDict): + r"""Bank Feed Statements""" + + status_code: int + r"""HTTP Response Status Code""" + status: str + r"""HTTP Response Status""" + service: str + r"""Apideck ID of service provider""" + resource: str + r"""Unified API resource name""" + operation: str + r"""Operation performed""" + data: BankFeedStatementTypedDict + raw: NotRequired[Nullable[Dict[str, Any]]] + r"""Raw response from the integration when raw=true query param is provided""" + + +class GetBankFeedStatementResponse(BaseModel): + r"""Bank Feed Statements""" + + status_code: int + r"""HTTP Response Status Code""" + + status: str + r"""HTTP Response Status""" + + service: str + r"""Apideck ID of service provider""" + + resource: str + r"""Unified API resource name""" + + operation: str + r"""Operation performed""" + + data: BankFeedStatement + + raw: Annotated[OptionalNullable[Dict[str, Any]], pydantic.Field(alias="_raw")] = ( + UNSET + ) + r"""Raw response from the integration when raw=true query param is provided""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = ["_raw"] + nullable_fields = ["_raw"] + null_default_fields = [] + + serialized = handler(self) + + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + serialized.pop(k, None) + + optional_nullable = k in optional_fields and k in nullable_fields + is_set = ( + self.__pydantic_fields_set__.intersection({n}) + or k in null_default_fields + ) # pylint: disable=no-member + + if val is not None and val != UNSET_SENTINEL: + m[k] = val + elif val != UNSET_SENTINEL and ( + not k in optional_fields or (optional_nullable and is_set) + ): + m[k] = val + + return m diff --git a/src/apideck_unify/models/getbankfeedstatementsresponse.py b/src/apideck_unify/models/getbankfeedstatementsresponse.py new file mode 100644 index 00000000..f1a06f46 --- /dev/null +++ b/src/apideck_unify/models/getbankfeedstatementsresponse.py @@ -0,0 +1,101 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .bankfeedstatement import BankFeedStatement, BankFeedStatementTypedDict +from .links import Links, LinksTypedDict +from .meta import Meta, MetaTypedDict +from apideck_unify.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +import pydantic +from pydantic import model_serializer +from typing import Any, Dict, List, Optional +from typing_extensions import Annotated, NotRequired, TypedDict + + +class GetBankFeedStatementsResponseTypedDict(TypedDict): + r"""Bank Feed Statements""" + + status_code: int + r"""HTTP Response Status Code""" + status: str + r"""HTTP Response Status""" + service: str + r"""Apideck ID of service provider""" + resource: str + r"""Unified API resource name""" + operation: str + r"""Operation performed""" + data: List[BankFeedStatementTypedDict] + meta: NotRequired[MetaTypedDict] + r"""Response metadata""" + links: NotRequired[LinksTypedDict] + r"""Links to navigate to previous or next pages through the API""" + raw: NotRequired[Nullable[Dict[str, Any]]] + r"""Raw response from the integration when raw=true query param is provided""" + + +class GetBankFeedStatementsResponse(BaseModel): + r"""Bank Feed Statements""" + + status_code: int + r"""HTTP Response Status Code""" + + status: str + r"""HTTP Response Status""" + + service: str + r"""Apideck ID of service provider""" + + resource: str + r"""Unified API resource name""" + + operation: str + r"""Operation performed""" + + data: List[BankFeedStatement] + + meta: Optional[Meta] = None + r"""Response metadata""" + + links: Optional[Links] = None + r"""Links to navigate to previous or next pages through the API""" + + raw: Annotated[OptionalNullable[Dict[str, Any]], pydantic.Field(alias="_raw")] = ( + UNSET + ) + r"""Raw response from the integration when raw=true query param is provided""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = ["meta", "links", "_raw"] + nullable_fields = ["_raw"] + null_default_fields = [] + + serialized = handler(self) + + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + serialized.pop(k, None) + + optional_nullable = k in optional_fields and k in nullable_fields + is_set = ( + self.__pydantic_fields_set__.intersection({n}) + or k in null_default_fields + ) # pylint: disable=no-member + + if val is not None and val != UNSET_SENTINEL: + m[k] = val + elif val != UNSET_SENTINEL and ( + not k in optional_fields or (optional_nullable and is_set) + ): + m[k] = val + + return m diff --git a/src/apideck_unify/models/updatebankfeedaccountresponse.py b/src/apideck_unify/models/updatebankfeedaccountresponse.py new file mode 100644 index 00000000..90415965 --- /dev/null +++ b/src/apideck_unify/models/updatebankfeedaccountresponse.py @@ -0,0 +1,91 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .unifiedid import UnifiedID, UnifiedIDTypedDict +from apideck_unify.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +import pydantic +from pydantic import model_serializer +from typing import Any, Dict +from typing_extensions import Annotated, NotRequired, TypedDict + + +class UpdateBankFeedAccountResponseTypedDict(TypedDict): + r"""Bank Feed Accounts""" + + status_code: int + r"""HTTP Response Status Code""" + status: str + r"""HTTP Response Status""" + service: str + r"""Apideck ID of service provider""" + resource: str + r"""Unified API resource name""" + operation: str + r"""Operation performed""" + data: UnifiedIDTypedDict + r"""A object containing a unique identifier for the resource that was created, updated, or deleted.""" + raw: NotRequired[Nullable[Dict[str, Any]]] + r"""Raw response from the integration when raw=true query param is provided""" + + +class UpdateBankFeedAccountResponse(BaseModel): + r"""Bank Feed Accounts""" + + status_code: int + r"""HTTP Response Status Code""" + + status: str + r"""HTTP Response Status""" + + service: str + r"""Apideck ID of service provider""" + + resource: str + r"""Unified API resource name""" + + operation: str + r"""Operation performed""" + + data: UnifiedID + r"""A object containing a unique identifier for the resource that was created, updated, or deleted.""" + + raw: Annotated[OptionalNullable[Dict[str, Any]], pydantic.Field(alias="_raw")] = ( + UNSET + ) + r"""Raw response from the integration when raw=true query param is provided""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = ["_raw"] + nullable_fields = ["_raw"] + null_default_fields = [] + + serialized = handler(self) + + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + serialized.pop(k, None) + + optional_nullable = k in optional_fields and k in nullable_fields + is_set = ( + self.__pydantic_fields_set__.intersection({n}) + or k in null_default_fields + ) # pylint: disable=no-member + + if val is not None and val != UNSET_SENTINEL: + m[k] = val + elif val != UNSET_SENTINEL and ( + not k in optional_fields or (optional_nullable and is_set) + ): + m[k] = val + + return m diff --git a/src/apideck_unify/models/updatebankfeedstatementresponse.py b/src/apideck_unify/models/updatebankfeedstatementresponse.py new file mode 100644 index 00000000..98b0dfc9 --- /dev/null +++ b/src/apideck_unify/models/updatebankfeedstatementresponse.py @@ -0,0 +1,91 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .unifiedid import UnifiedID, UnifiedIDTypedDict +from apideck_unify.types import ( + BaseModel, + Nullable, + OptionalNullable, + UNSET, + UNSET_SENTINEL, +) +import pydantic +from pydantic import model_serializer +from typing import Any, Dict +from typing_extensions import Annotated, NotRequired, TypedDict + + +class UpdateBankFeedStatementResponseTypedDict(TypedDict): + r"""Bank Feed Statements""" + + status_code: int + r"""HTTP Response Status Code""" + status: str + r"""HTTP Response Status""" + service: str + r"""Apideck ID of service provider""" + resource: str + r"""Unified API resource name""" + operation: str + r"""Operation performed""" + data: UnifiedIDTypedDict + r"""A object containing a unique identifier for the resource that was created, updated, or deleted.""" + raw: NotRequired[Nullable[Dict[str, Any]]] + r"""Raw response from the integration when raw=true query param is provided""" + + +class UpdateBankFeedStatementResponse(BaseModel): + r"""Bank Feed Statements""" + + status_code: int + r"""HTTP Response Status Code""" + + status: str + r"""HTTP Response Status""" + + service: str + r"""Apideck ID of service provider""" + + resource: str + r"""Unified API resource name""" + + operation: str + r"""Operation performed""" + + data: UnifiedID + r"""A object containing a unique identifier for the resource that was created, updated, or deleted.""" + + raw: Annotated[OptionalNullable[Dict[str, Any]], pydantic.Field(alias="_raw")] = ( + UNSET + ) + r"""Raw response from the integration when raw=true query param is provided""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = ["_raw"] + nullable_fields = ["_raw"] + null_default_fields = [] + + serialized = handler(self) + + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + serialized.pop(k, None) + + optional_nullable = k in optional_fields and k in nullable_fields + is_set = ( + self.__pydantic_fields_set__.intersection({n}) + or k in null_default_fields + ) # pylint: disable=no-member + + if val is not None and val != UNSET_SENTINEL: + m[k] = val + elif val != UNSET_SENTINEL and ( + not k in optional_fields or (optional_nullable and is_set) + ): + m[k] = val + + return m