diff --git a/.gitignore b/.gitignore index 4045ca01..417f0888 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,5 @@ +.env +.env.local **/__pycache__/ **/.speakeasy/temp/ **/.speakeasy/logs/ diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index 42db52cb..b78aa669 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: 9fc67a1dcdb0fc9b14e5642856749196 - docVersion: 10.20.13 - speakeasyVersion: 1.609.0 - generationVersion: 2.692.0 - releaseVersion: 0.22.0 - configChecksum: f8184ef243c91c545e553893ae7db3bd + docChecksum: 94936f0e0287ac5fd26fef3d5f2a030b + docVersion: 10.20.16 + speakeasyVersion: 1.622.1 + generationVersion: 2.709.0 + releaseVersion: 0.22.1 + configChecksum: 2191f1001804bd3cc8170e16e9745450 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.20.3 + core: 5.20.4 deepObjectParams: 0.1.0 defaultEnabledRetries: 0.2.0 deprecations: 3.0.2 @@ -23,10 +23,10 @@ features: downloadStreams: 1.0.1 enumUnions: 0.1.0 envVarSecurityUsage: 0.3.2 - errors: 3.3.2 + errors: 3.3.3 flatRequests: 1.0.1 flattening: 3.1.1 - globalSecurity: 3.0.3 + globalSecurity: 3.0.4 globalSecurityCallbacks: 1.0.0 globalSecurityFlattening: 1.0.0 globalServerURLs: 3.1.1 @@ -75,6 +75,25 @@ generatedFiles: - docs/models/accountingbalancesheetoneglobals.md - docs/models/accountingbalancesheetonerequest.md - docs/models/accountingbalancesheetoneresponse.md + - docs/models/accountingbankaccount.md + - docs/models/accountingbankaccountaccounttype.md + - docs/models/accountingbankaccountinput.md + - docs/models/accountingbankaccountsaddglobals.md + - docs/models/accountingbankaccountsaddrequest.md + - docs/models/accountingbankaccountsaddresponse.md + - docs/models/accountingbankaccountsallglobals.md + - docs/models/accountingbankaccountsallrequest.md + - docs/models/accountingbankaccountsallresponse.md + - docs/models/accountingbankaccountsdeleteglobals.md + - docs/models/accountingbankaccountsdeleterequest.md + - docs/models/accountingbankaccountsdeleteresponse.md + - docs/models/accountingbankaccountsoneglobals.md + - docs/models/accountingbankaccountsonerequest.md + - docs/models/accountingbankaccountsoneresponse.md + - docs/models/accountingbankaccountstatus.md + - docs/models/accountingbankaccountsupdateglobals.md + - docs/models/accountingbankaccountsupdaterequest.md + - docs/models/accountingbankaccountsupdateresponse.md - docs/models/accountingbankfeedaccountsaddglobals.md - docs/models/accountingbankfeedaccountsaddrequest.md - docs/models/accountingbankfeedaccountsaddresponse.md @@ -486,6 +505,9 @@ generatedFiles: - docs/models/bankaccount.md - docs/models/bankaccount1.md - docs/models/bankaccount1accounttype.md + - docs/models/bankaccountsfilter.md + - docs/models/bankaccountsfilterstatus.md + - docs/models/bankaccountssort.md - docs/models/bankaccounttype.md - docs/models/bankfeedaccount.md - docs/models/bankfeedaccountinput.md @@ -605,6 +627,7 @@ generatedFiles: - docs/models/createapplicantresponse.md - docs/models/createapplicationresponse.md - docs/models/createattachmentresponse.md + - docs/models/createbankaccountresponse.md - docs/models/createbankfeedaccountresponse.md - docs/models/createbankfeedstatementresponse.md - docs/models/createbillpaymentresponse.md @@ -850,6 +873,7 @@ generatedFiles: - docs/models/deleteapplicantresponse.md - docs/models/deleteapplicationresponse.md - docs/models/deleteattachmentresponse.md + - docs/models/deletebankaccountresponse.md - docs/models/deletebankfeedaccountresponse.md - docs/models/deletebankfeedstatementresponse.md - docs/models/deletebillpaymentresponse.md @@ -1115,6 +1139,8 @@ generatedFiles: - docs/models/getattachmentresponse.md - docs/models/getattachmentsresponse.md - docs/models/getbalancesheetresponse.md + - docs/models/getbankaccountresponse.md + - docs/models/getbankaccountsresponse.md - docs/models/getbankfeedaccountresponse.md - docs/models/getbankfeedaccountsresponse.md - docs/models/getbankfeedstatementresponse.md @@ -1558,6 +1584,7 @@ generatedFiles: - docs/models/smsmessagesupdateresponse.md - docs/models/sociallink.md - docs/models/sociallinks.md + - docs/models/sortby.md - docs/models/sortdirection.md - docs/models/stage.md - docs/models/stages.md @@ -1625,6 +1652,7 @@ generatedFiles: - docs/models/updateactivityresponse.md - docs/models/updateapplicantresponse.md - docs/models/updateapplicationresponse.md + - docs/models/updatebankaccountresponse.md - docs/models/updatebankfeedaccountresponse.md - docs/models/updatebankfeedstatementresponse.md - docs/models/updatebillpaymentresponse.md @@ -1804,6 +1832,7 @@ generatedFiles: - docs/sdks/ats/README.md - docs/sdks/attachments/README.md - docs/sdks/balancesheetsdk/README.md + - docs/sdks/bankaccounts/README.md - docs/sdks/bankfeedaccounts/README.md - docs/sdks/bankfeedstatements/README.md - docs/sdks/billpayments/README.md @@ -1910,6 +1939,7 @@ generatedFiles: - src/apideck_unify/ats.py - src/apideck_unify/attachments.py - src/apideck_unify/balancesheet_sdk.py + - src/apideck_unify/bankaccounts.py - src/apideck_unify/bankfeedaccounts.py - src/apideck_unify/bankfeedstatements.py - src/apideck_unify/basesdk.py @@ -1976,6 +2006,11 @@ 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_bankaccountsaddop.py + - src/apideck_unify/models/accounting_bankaccountsallop.py + - src/apideck_unify/models/accounting_bankaccountsdeleteop.py + - src/apideck_unify/models/accounting_bankaccountsoneop.py + - src/apideck_unify/models/accounting_bankaccountsupdateop.py - src/apideck_unify/models/accounting_bankfeedaccountsaddop.py - src/apideck_unify/models/accounting_bankfeedaccountsallop.py - src/apideck_unify/models/accounting_bankfeedaccountsdeleteop.py @@ -2080,6 +2115,7 @@ generatedFiles: - src/apideck_unify/models/accounting_trackingcategoriesdeleteop.py - src/apideck_unify/models/accounting_trackingcategoriesoneop.py - src/apideck_unify/models/accounting_trackingcategoriesupdateop.py + - src/apideck_unify/models/accountingbankaccount.py - src/apideck_unify/models/accountingdepartment.py - src/apideck_unify/models/accountingdepartmentsfilter.py - src/apideck_unify/models/accountinglocation.py @@ -2128,6 +2164,8 @@ generatedFiles: - src/apideck_unify/models/balancesheetfilter.py - src/apideck_unify/models/bankaccount.py - src/apideck_unify/models/bankaccount1.py + - src/apideck_unify/models/bankaccountsfilter.py + - src/apideck_unify/models/bankaccountssort.py - src/apideck_unify/models/bankfeedaccount.py - src/apideck_unify/models/bankfeedstatement.py - src/apideck_unify/models/benefit.py @@ -2186,6 +2224,7 @@ generatedFiles: - src/apideck_unify/models/createapplicantresponse.py - src/apideck_unify/models/createapplicationresponse.py - src/apideck_unify/models/createattachmentresponse.py + - src/apideck_unify/models/createbankaccountresponse.py - src/apideck_unify/models/createbankfeedaccountresponse.py - src/apideck_unify/models/createbankfeedstatementresponse.py - src/apideck_unify/models/createbillpaymentresponse.py @@ -2309,6 +2348,7 @@ generatedFiles: - src/apideck_unify/models/deleteapplicantresponse.py - src/apideck_unify/models/deleteapplicationresponse.py - src/apideck_unify/models/deleteattachmentresponse.py + - src/apideck_unify/models/deletebankaccountresponse.py - src/apideck_unify/models/deletebankfeedaccountresponse.py - src/apideck_unify/models/deletebankfeedstatementresponse.py - src/apideck_unify/models/deletebillpaymentresponse.py @@ -2454,6 +2494,8 @@ generatedFiles: - src/apideck_unify/models/getattachmentresponse.py - src/apideck_unify/models/getattachmentsresponse.py - src/apideck_unify/models/getbalancesheetresponse.py + - src/apideck_unify/models/getbankaccountresponse.py + - src/apideck_unify/models/getbankaccountsresponse.py - src/apideck_unify/models/getbankfeedaccountresponse.py - src/apideck_unify/models/getbankfeedaccountsresponse.py - src/apideck_unify/models/getbankfeedstatementresponse.py @@ -2751,6 +2793,7 @@ generatedFiles: - src/apideck_unify/models/updateactivityresponse.py - src/apideck_unify/models/updateapplicantresponse.py - src/apideck_unify/models/updateapplicationresponse.py + - src/apideck_unify/models/updatebankaccountresponse.py - src/apideck_unify/models/updatebankfeedaccountresponse.py - src/apideck_unify/models/updatebankfeedstatementresponse.py - src/apideck_unify/models/updatebillpaymentresponse.py @@ -17053,7 +17096,7 @@ examples: speakeasy-default-vault-logs-all: parameters: query: - filter: {"connector_id": "crm+salesforce", "status_code": 201, "exclude_unified_apis": "vault,proxy"} + filter: {"connector_id": "crm+salesforce", "status_code": 201, "status_codes": [200, 201, 204], "exclude_unified_apis": "vault,proxy"} limit: 20 header: x-apideck-app-id: "dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX" @@ -18107,6 +18150,149 @@ examples: 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.bankAccountsAll: + speakeasy-default-accounting-bank-accounts-all: + parameters: + query: + raw: false + limit: 20 + filter: {"name": "Main Operating", "status": "active"} + sort: {"by": "updated_at", "direction": "asc"} + 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-accounts", "operation": "all", "data": [{"id": "12345", "display_id": "BA-001", "name": "Main Operating Account", "account_number": "1234567890", "account_type": "checking", "bank_name": "Chase Bank", "currency": "USD", "balance": 25000, "available_balance": 24500, "overdraft_limit": 5000, "routing_number": "021000021", "iban": "GB33BUKB20201555555555", "bic": "CHASUS33", "bsb_number": "062-001", "branch_identifier": "001", "bank_code": "BNH", "country": "US", "status": "active", "description": "Primary operating account for daily transactions", "custom_fields": [{"id": "2389328923893298", "name": "employee_level", "description": "Employee Level", "value": "Uses Salesforce and Marketo"}], "created_at": "2020-09-30T07:43:32.000Z", "updated_at": "2020-09-30T07:43:32.000Z", "created_by": "12345", "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": "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.bankAccountsAdd: + speakeasy-default-accounting-bank-accounts-add: + parameters: + query: + raw: false + header: + x-apideck-consumer-id: "test-consumer" + x-apideck-app-id: "dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX" + x-apideck-service-id: "salesforce" + requestBody: + application/json: {"display_id": "BA-001", "name": "Main Operating Account", "account_number": "1234567890", "account_type": "checking", "bank_name": "Chase Bank", "currency": "USD", "balance": 25000, "available_balance": 24500, "overdraft_limit": 5000, "routing_number": "021000021", "iban": "GB33BUKB20201555555555", "bic": "CHASUS33", "bsb_number": "062-001", "branch_identifier": "001", "bank_code": "BNH", "country": "US", "status": "active", "description": "Primary operating account for daily transactions", "custom_fields": [{"id": "2389328923893298", "name": "employee_level", "description": "Employee Level", "value": "Uses Salesforce and Marketo"}]} + responses: + "201": + application/json: {"status_code": 201, "status": "Created", "service": "quickbooks", "resource": "bank-accounts", "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": "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.bankAccountsOne: + speakeasy-default-accounting-bank-accounts-one: + 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-accounts", "operation": "one", "data": {"id": "12345", "display_id": "BA-001", "name": "Main Operating Account", "account_number": "1234567890", "account_type": "checking", "bank_name": "Chase Bank", "currency": "USD", "balance": 25000, "available_balance": 24500, "overdraft_limit": 5000, "routing_number": "021000021", "iban": "GB33BUKB20201555555555", "bic": "CHASUS33", "bsb_number": "062-001", "branch_identifier": "001", "bank_code": "BNH", "country": "US", "status": "active", "description": "Primary operating account for daily transactions", "custom_fields": [{"id": "2389328923893298", "name": "employee_level", "description": "Employee Level", "value": "Uses Salesforce and Marketo"}], "created_at": "2020-09-30T07:43:32.000Z", "updated_at": "2020-09-30T07:43:32.000Z", "created_by": "12345", "updated_by": "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": "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.bankAccountsUpdate: + speakeasy-default-accounting-bank-accounts-update: + 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: {"display_id": "BA-001", "name": "Main Operating Account", "account_number": "1234567890", "account_type": "checking", "bank_name": "Chase Bank", "currency": "USD", "balance": 25000, "available_balance": 24500, "overdraft_limit": 5000, "routing_number": "021000021", "iban": "GB33BUKB20201555555555", "bic": "CHASUS33", "bsb_number": "062-001", "branch_identifier": "001", "bank_code": "BNH", "country": "US", "status": "active", "description": "Primary operating account for daily transactions", "custom_fields": [{"id": "2389328923893298", "name": "employee_level", "description": "Employee Level", "value": "Uses Salesforce and Marketo"}]} + responses: + "200": + application/json: {"status_code": 200, "status": "OK", "service": "quickbooks", "resource": "bank-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": "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.bankAccountsDelete: + speakeasy-default-accounting-bank-accounts-delete: + 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-accounts", "operation": "delete", "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": "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"} examplesVersion: 1.0.2 generatedTests: {} -releaseNotes: "## Python SDK Changes Detected:\n* `apideck.vault.connection_consents.list()`: **Added**\n* `apideck.vault.connection_consent.update()`: **Added**\n* `apideck.accounting.company_info.get()`: `response.data.tracking_categories_mode` **Added**\n* `apideck.accounting.journal_entries.list()`: `request.filter` **Changed**\n* `apideck.accounting.expenses.list()`: \n * `request.filter` **Added**\n * `response.data.[].status` **Added**\n* `apideck.accounting.expenses.create()`: `request.status` **Added**\n* `apideck.accounting.expenses.get()`: `response.data.status` **Added**\n* `apideck.accounting.expenses.update()`: `request.status` **Added**\n* `apideck.vault.connections.list()`: `response.data.[]` **Changed**\n* `apideck.vault.connections.get()`: `response.data` **Changed**\n* `apideck.vault.connections.update()`: \n * `request` **Changed**\n * `response.data` **Changed**\n* `apideck.vault.connections.imports()`: `response.data` **Changed**\n* `apideck.vault.connections.token()`: `response.data` **Changed**\n* `apideck.vault.connection_settings.list()`: `response.data` **Changed**\n* `apideck.vault.connection_settings.update()`: \n * `request` **Changed**\n * `response.data` **Changed**\n" +releaseNotes: | + ## Python SDK Changes Detected: + * `apideck.accounting.bank_accounts.list()`: **Added** + * `apideck.accounting.bank_accounts.create()`: **Added** + * `apideck.accounting.bank_accounts.get()`: **Added** + * `apideck.accounting.bank_accounts.update()`: **Added** + * `apideck.accounting.bank_accounts.delete()`: **Added** + * `apideck.vault.logs.list()`: `request.filter` **Changed** diff --git a/.speakeasy/gen.yaml b/.speakeasy/gen.yaml index 9b421632..671b5ae7 100644 --- a/.speakeasy/gen.yaml +++ b/.speakeasy/gen.yaml @@ -19,12 +19,13 @@ generation: auth: oAuth2ClientCredentialsEnabled: true oAuth2PasswordEnabled: true + hoistGlobalSecurity: true tests: generateTests: true generateNewTests: false skipResponseBodyAssertions: false python: - version: 0.22.0 + version: 0.22.1 additionalDependencies: dev: {} main: {} @@ -63,4 +64,5 @@ python: pytestFilterWarnings: [] pytestTimeout: 0 responseFormat: envelope-http + sseFlatResponse: false templateVersion: v2 diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock index 7da12294..9288c4df 100644 --- a/.speakeasy/workflow.lock +++ b/.speakeasy/workflow.lock @@ -1,21 +1,21 @@ -speakeasyVersion: 1.609.0 +speakeasyVersion: 1.622.1 sources: Apideck: sourceNamespace: apideck - sourceRevisionDigest: sha256:0c5ea90fb5d7f038f77defc1282b15163192166b35a4982eed994ba91c8c9908 - sourceBlobDigest: sha256:1ca7f3036ed7d494f1b27dfbbe3f36be62064cdd31b0a7d7f66c8466e14722b3 + sourceRevisionDigest: sha256:b89dfeac61b6af51fea1bff368bfcd5a23f74d793f66299c9aeeaa5063dbd460 + sourceBlobDigest: sha256:8c94ca80af7cb854257519a8bf08a7a060c73248058c63f17aca9cc5208673ba tags: - latest - - speakeasy-sdk-regen-1756369056 - - 10.20.13 + - speakeasy-sdk-regen-1757940178 + - 10.20.16 targets: apideck: source: Apideck sourceNamespace: apideck - sourceRevisionDigest: sha256:0c5ea90fb5d7f038f77defc1282b15163192166b35a4982eed994ba91c8c9908 - sourceBlobDigest: sha256:1ca7f3036ed7d494f1b27dfbbe3f36be62064cdd31b0a7d7f66c8466e14722b3 + sourceRevisionDigest: sha256:b89dfeac61b6af51fea1bff368bfcd5a23f74d793f66299c9aeeaa5063dbd460 + sourceBlobDigest: sha256:8c94ca80af7cb854257519a8bf08a7a060c73248058c63f17aca9cc5208673ba codeSamplesNamespace: apideck-python-code-samples - codeSamplesRevisionDigest: sha256:4a910f95ad399ec101baf38e09b1dff30e1e9e2a21c4b1fa590779705042c82b + codeSamplesRevisionDigest: sha256:cb341d086c4574b622244fea504d29462dcbc772b1d63c39541b255c1d2e55bc workflow: workflowVersion: 1.0.0 speakeasyVersion: latest diff --git a/README.md b/README.md index 73251d4c..16c37772 100644 --- a/README.md +++ b/README.md @@ -256,6 +256,14 @@ with Apideck( * [get](docs/sdks/balancesheetsdk/README.md#get) - Get BalanceSheet +#### [accounting.bank_accounts](docs/sdks/bankaccounts/README.md) + +* [list](docs/sdks/bankaccounts/README.md#list) - List Bank Accounts +* [create](docs/sdks/bankaccounts/README.md#create) - Create Bank Account +* [get](docs/sdks/bankaccounts/README.md#get) - Get Bank Account +* [update](docs/sdks/bankaccounts/README.md#update) - Update Bank Account +* [delete](docs/sdks/bankaccounts/README.md#delete) - Delete Bank Account + #### [accounting.bank_feed_accounts](docs/sdks/bankfeedaccounts/README.md) * [list](docs/sdks/bankfeedaccounts/README.md#list) - List Bank Feed Accounts diff --git a/RELEASES.md b/RELEASES.md index e7d73be0..af1728a1 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -458,4 +458,14 @@ Based on: ### Generated - [python v0.22.0] . ### Releases -- [PyPI v0.22.0] https://pypi.org/project/apideck-unify/0.22.0 - . \ No newline at end of file +- [PyPI v0.22.0] https://pypi.org/project/apideck-unify/0.22.0 - . + +## 2025-09-23 00:18:03 +### Changes +Based on: +- OpenAPI Doc +- Speakeasy CLI 1.622.1 (2.709.0) https://github.com/speakeasy-api/speakeasy +### Generated +- [python v0.22.1] . +### Releases +- [PyPI v0.22.1] https://pypi.org/project/apideck-unify/0.22.1 - . \ No newline at end of file diff --git a/docs/models/accountingbankaccount.md b/docs/models/accountingbankaccount.md new file mode 100644 index 00000000..a4a57fc9 --- /dev/null +++ b/docs/models/accountingbankaccount.md @@ -0,0 +1,32 @@ +# AccountingBankAccount + + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *str* | :heavy_check_mark: | A unique identifier for an object. | 12345 | +| `display_id` | *OptionalNullable[str]* | :heavy_minus_sign: | Display ID for the bank account | BA-001 | +| `name` | *Optional[str]* | :heavy_minus_sign: | The name of the bank account as it appears in the accounting system | Main Operating Account | +| `account_number` | *OptionalNullable[str]* | :heavy_minus_sign: | The bank account number | 1234567890 | +| `account_type` | [Optional[models.AccountingBankAccountAccountType]](../models/accountingbankaccountaccounttype.md) | :heavy_minus_sign: | The type of bank account | checking | +| `bank_name` | *OptionalNullable[str]* | :heavy_minus_sign: | The name of the bank or financial institution | Chase Bank | +| `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 | +| `balance` | *OptionalNullable[float]* | :heavy_minus_sign: | The current balance of the bank account | 25000 | +| `available_balance` | *OptionalNullable[float]* | :heavy_minus_sign: | The available balance (considering pending transactions and overdraft) | 24500 | +| `overdraft_limit` | *OptionalNullable[float]* | :heavy_minus_sign: | The overdraft limit for the account | 5000 | +| `routing_number` | *OptionalNullable[str]* | :heavy_minus_sign: | Bank routing number (US) | 021000021 | +| `iban` | *OptionalNullable[str]* | :heavy_minus_sign: | International Bank Account Number | GB33BUKB20201555555555 | +| `bic` | *OptionalNullable[str]* | :heavy_minus_sign: | Bank Identifier Code / SWIFT Code | CHASUS33 | +| `bsb_number` | *OptionalNullable[str]* | :heavy_minus_sign: | Bank State Branch number (Australia/New Zealand) | 062-001 | +| `branch_identifier` | *OptionalNullable[str]* | :heavy_minus_sign: | Bank branch identifier | 001 | +| `bank_code` | *OptionalNullable[str]* | :heavy_minus_sign: | Bank code assigned by central bank | BNH | +| `country` | *OptionalNullable[str]* | :heavy_minus_sign: | Country code according to ISO 3166-1 alpha-2. | US | +| `status` | [OptionalNullable[models.AccountingBankAccountStatus]](../models/accountingbankaccountstatus.md) | :heavy_minus_sign: | The status of the bank account | active | +| `description` | *OptionalNullable[str]* | :heavy_minus_sign: | Description or notes about the bank account | Primary operating account for daily transactions | +| `custom_fields` | List[[models.CustomField](../models/customfield.md)] | :heavy_minus_sign: | N/A | | +| `custom_mappings` | Dict[str, *Any*] | :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 | +| `created_by` | *OptionalNullable[str]* | :heavy_minus_sign: | The user who created the object. | 12345 | +| `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/accountingbankaccountaccounttype.md b/docs/models/accountingbankaccountaccounttype.md new file mode 100644 index 00000000..1606b315 --- /dev/null +++ b/docs/models/accountingbankaccountaccounttype.md @@ -0,0 +1,15 @@ +# AccountingBankAccountAccountType + +The type of bank account + + +## Values + +| Name | Value | +| ---------------- | ---------------- | +| `CHECKING` | checking | +| `SAVINGS` | savings | +| `CREDIT_CARD` | credit_card | +| `MONEY_MARKET` | money_market | +| `LINE_OF_CREDIT` | line_of_credit | +| `OTHER` | other | \ No newline at end of file diff --git a/docs/models/accountingbankaccountinput.md b/docs/models/accountingbankaccountinput.md new file mode 100644 index 00000000..f600ae9d --- /dev/null +++ b/docs/models/accountingbankaccountinput.md @@ -0,0 +1,26 @@ +# AccountingBankAccountInput + + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | +| `display_id` | *OptionalNullable[str]* | :heavy_minus_sign: | Display ID for the bank account | BA-001 | +| `name` | *Optional[str]* | :heavy_minus_sign: | The name of the bank account as it appears in the accounting system | Main Operating Account | +| `account_number` | *OptionalNullable[str]* | :heavy_minus_sign: | The bank account number | 1234567890 | +| `account_type` | [Optional[models.AccountingBankAccountAccountType]](../models/accountingbankaccountaccounttype.md) | :heavy_minus_sign: | The type of bank account | checking | +| `bank_name` | *OptionalNullable[str]* | :heavy_minus_sign: | The name of the bank or financial institution | Chase Bank | +| `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 | +| `balance` | *OptionalNullable[float]* | :heavy_minus_sign: | The current balance of the bank account | 25000 | +| `available_balance` | *OptionalNullable[float]* | :heavy_minus_sign: | The available balance (considering pending transactions and overdraft) | 24500 | +| `overdraft_limit` | *OptionalNullable[float]* | :heavy_minus_sign: | The overdraft limit for the account | 5000 | +| `routing_number` | *OptionalNullable[str]* | :heavy_minus_sign: | Bank routing number (US) | 021000021 | +| `iban` | *OptionalNullable[str]* | :heavy_minus_sign: | International Bank Account Number | GB33BUKB20201555555555 | +| `bic` | *OptionalNullable[str]* | :heavy_minus_sign: | Bank Identifier Code / SWIFT Code | CHASUS33 | +| `bsb_number` | *OptionalNullable[str]* | :heavy_minus_sign: | Bank State Branch number (Australia/New Zealand) | 062-001 | +| `branch_identifier` | *OptionalNullable[str]* | :heavy_minus_sign: | Bank branch identifier | 001 | +| `bank_code` | *OptionalNullable[str]* | :heavy_minus_sign: | Bank code assigned by central bank | BNH | +| `country` | *OptionalNullable[str]* | :heavy_minus_sign: | Country code according to ISO 3166-1 alpha-2. | US | +| `status` | [OptionalNullable[models.AccountingBankAccountStatus]](../models/accountingbankaccountstatus.md) | :heavy_minus_sign: | The status of the bank account | active | +| `description` | *OptionalNullable[str]* | :heavy_minus_sign: | Description or notes about the bank account | Primary operating account for daily transactions | +| `custom_fields` | List[[models.CustomField](../models/customfield.md)] | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/models/accountingbankaccountsaddglobals.md b/docs/models/accountingbankaccountsaddglobals.md new file mode 100644 index 00000000..a8ccb782 --- /dev/null +++ b/docs/models/accountingbankaccountsaddglobals.md @@ -0,0 +1,9 @@ +# AccountingBankAccountsAddGlobals + + +## 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/accountingbankaccountsaddrequest.md b/docs/models/accountingbankaccountsaddrequest.md new file mode 100644 index 00000000..e5b9276a --- /dev/null +++ b/docs/models/accountingbankaccountsaddrequest.md @@ -0,0 +1,12 @@ +# AccountingBankAccountsAddRequest + + +## 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 | +| `accounting_bank_account` | [models.AccountingBankAccountInput](../models/accountingbankaccountinput.md) | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/docs/models/accountingbankaccountsaddresponse.md b/docs/models/accountingbankaccountsaddresponse.md new file mode 100644 index 00000000..a823d5fe --- /dev/null +++ b/docs/models/accountingbankaccountsaddresponse.md @@ -0,0 +1,10 @@ +# AccountingBankAccountsAddResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | +| `http_meta` | [models.HTTPMetadata](../models/httpmetadata.md) | :heavy_check_mark: | N/A | +| `create_bank_account_response` | [Optional[models.CreateBankAccountResponse]](../models/createbankaccountresponse.md) | :heavy_minus_sign: | Bank Account created | +| `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/accountingbankaccountsallglobals.md b/docs/models/accountingbankaccountsallglobals.md new file mode 100644 index 00000000..fd328b53 --- /dev/null +++ b/docs/models/accountingbankaccountsallglobals.md @@ -0,0 +1,9 @@ +# AccountingBankAccountsAllGlobals + + +## 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/accountingbankaccountsallrequest.md b/docs/models/accountingbankaccountsallrequest.md new file mode 100644 index 00000000..e66787a4 --- /dev/null +++ b/docs/models/accountingbankaccountsallrequest.md @@ -0,0 +1,17 @@ +# AccountingBankAccountsAllRequest + + +## 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 | | +| `filter_` | [Optional[models.BankAccountsFilter]](../models/bankaccountsfilter.md) | :heavy_minus_sign: | Apply filters | | +| `sort` | [Optional[models.BankAccountsSort]](../models/bankaccountssort.md) | :heavy_minus_sign: | Apply sorting | | +| `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/accountingbankaccountsallresponse.md b/docs/models/accountingbankaccountsallresponse.md new file mode 100644 index 00000000..5f0975ec --- /dev/null +++ b/docs/models/accountingbankaccountsallresponse.md @@ -0,0 +1,10 @@ +# AccountingBankAccountsAllResponse + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | +| `http_meta` | [models.HTTPMetadata](../models/httpmetadata.md) | :heavy_check_mark: | N/A | +| `get_bank_accounts_response` | [Optional[models.GetBankAccountsResponse]](../models/getbankaccountsresponse.md) | :heavy_minus_sign: | Bank 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/accountingbankaccountsdeleteglobals.md b/docs/models/accountingbankaccountsdeleteglobals.md new file mode 100644 index 00000000..19a8d649 --- /dev/null +++ b/docs/models/accountingbankaccountsdeleteglobals.md @@ -0,0 +1,9 @@ +# AccountingBankAccountsDeleteGlobals + + +## 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/accountingbankaccountsdeleterequest.md b/docs/models/accountingbankaccountsdeleterequest.md new file mode 100644 index 00000000..ed10b031 --- /dev/null +++ b/docs/models/accountingbankaccountsdeleterequest.md @@ -0,0 +1,12 @@ +# AccountingBankAccountsDeleteRequest + + +## 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/accountingbankaccountsdeleteresponse.md b/docs/models/accountingbankaccountsdeleteresponse.md new file mode 100644 index 00000000..db29dc56 --- /dev/null +++ b/docs/models/accountingbankaccountsdeleteresponse.md @@ -0,0 +1,10 @@ +# AccountingBankAccountsDeleteResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | +| `http_meta` | [models.HTTPMetadata](../models/httpmetadata.md) | :heavy_check_mark: | N/A | +| `delete_bank_account_response` | [Optional[models.DeleteBankAccountResponse]](../models/deletebankaccountresponse.md) | :heavy_minus_sign: | Bank Account deleted | +| `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/accountingbankaccountsoneglobals.md b/docs/models/accountingbankaccountsoneglobals.md new file mode 100644 index 00000000..6c04dccc --- /dev/null +++ b/docs/models/accountingbankaccountsoneglobals.md @@ -0,0 +1,9 @@ +# AccountingBankAccountsOneGlobals + + +## 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/accountingbankaccountsonerequest.md b/docs/models/accountingbankaccountsonerequest.md new file mode 100644 index 00000000..a96e7888 --- /dev/null +++ b/docs/models/accountingbankaccountsonerequest.md @@ -0,0 +1,13 @@ +# AccountingBankAccountsOneRequest + + +## 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/accountingbankaccountsoneresponse.md b/docs/models/accountingbankaccountsoneresponse.md new file mode 100644 index 00000000..556e87bf --- /dev/null +++ b/docs/models/accountingbankaccountsoneresponse.md @@ -0,0 +1,10 @@ +# AccountingBankAccountsOneResponse + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | +| `http_meta` | [models.HTTPMetadata](../models/httpmetadata.md) | :heavy_check_mark: | N/A | +| `get_bank_account_response` | [Optional[models.GetBankAccountResponse]](../models/getbankaccountresponse.md) | :heavy_minus_sign: | Bank Account | +| `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/accountingbankaccountstatus.md b/docs/models/accountingbankaccountstatus.md new file mode 100644 index 00000000..8e3a2a61 --- /dev/null +++ b/docs/models/accountingbankaccountstatus.md @@ -0,0 +1,12 @@ +# AccountingBankAccountStatus + +The status of the bank account + + +## Values + +| Name | Value | +| ---------- | ---------- | +| `ACTIVE` | active | +| `INACTIVE` | inactive | +| `CLOSED` | closed | \ No newline at end of file diff --git a/docs/models/accountingbankaccountsupdateglobals.md b/docs/models/accountingbankaccountsupdateglobals.md new file mode 100644 index 00000000..f8dcaaf3 --- /dev/null +++ b/docs/models/accountingbankaccountsupdateglobals.md @@ -0,0 +1,9 @@ +# AccountingBankAccountsUpdateGlobals + + +## 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/accountingbankaccountsupdaterequest.md b/docs/models/accountingbankaccountsupdaterequest.md new file mode 100644 index 00000000..1ed2af3c --- /dev/null +++ b/docs/models/accountingbankaccountsupdaterequest.md @@ -0,0 +1,13 @@ +# AccountingBankAccountsUpdateRequest + + +## 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 | | +| `accounting_bank_account` | [models.AccountingBankAccountInput](../models/accountingbankaccountinput.md) | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/docs/models/accountingbankaccountsupdateresponse.md b/docs/models/accountingbankaccountsupdateresponse.md new file mode 100644 index 00000000..d359981b --- /dev/null +++ b/docs/models/accountingbankaccountsupdateresponse.md @@ -0,0 +1,10 @@ +# AccountingBankAccountsUpdateResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | +| `http_meta` | [models.HTTPMetadata](../models/httpmetadata.md) | :heavy_check_mark: | N/A | +| `update_bank_account_response` | [Optional[models.UpdateBankAccountResponse]](../models/updatebankaccountresponse.md) | :heavy_minus_sign: | Bank Account updated | +| `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/bankaccountsfilter.md b/docs/models/bankaccountsfilter.md new file mode 100644 index 00000000..8bffb21c --- /dev/null +++ b/docs/models/bankaccountsfilter.md @@ -0,0 +1,9 @@ +# BankAccountsFilter + + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | +| `name` | *Optional[str]* | :heavy_minus_sign: | Filter by bank account name | Main Operating | +| `status` | [Optional[models.BankAccountsFilterStatus]](../models/bankaccountsfilterstatus.md) | :heavy_minus_sign: | Filter by account status | active | \ No newline at end of file diff --git a/docs/models/bankaccountsfilterstatus.md b/docs/models/bankaccountsfilterstatus.md new file mode 100644 index 00000000..56dce7b3 --- /dev/null +++ b/docs/models/bankaccountsfilterstatus.md @@ -0,0 +1,12 @@ +# BankAccountsFilterStatus + +Filter by account status + + +## Values + +| Name | Value | +| ---------- | ---------- | +| `ACTIVE` | active | +| `INACTIVE` | inactive | +| `CLOSED` | closed | \ No newline at end of file diff --git a/docs/models/bankaccountssort.md b/docs/models/bankaccountssort.md new file mode 100644 index 00000000..408a29c8 --- /dev/null +++ b/docs/models/bankaccountssort.md @@ -0,0 +1,9 @@ +# BankAccountsSort + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | +| `by` | [Optional[models.SortBy]](../models/sortby.md) | :heavy_minus_sign: | The field to sort by | updated_at | +| `direction` | [Optional[models.SortDirection]](../models/sortdirection.md) | :heavy_minus_sign: | The direction in which to sort the results | | \ No newline at end of file diff --git a/docs/models/createbankaccountresponse.md b/docs/models/createbankaccountresponse.md new file mode 100644 index 00000000..95684ccd --- /dev/null +++ b/docs/models/createbankaccountresponse.md @@ -0,0 +1,15 @@ +# CreateBankAccountResponse + +Bank Account created + + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | +| `status_code` | *int* | :heavy_check_mark: | HTTP Response Status Code | 201 | +| `status` | *str* | :heavy_check_mark: | HTTP Response Status | Created | +| `service` | *Optional[str]* | :heavy_minus_sign: | Apideck ID of service provider | quickbooks | +| `resource` | *Optional[str]* | :heavy_minus_sign: | Unified API resource name | bank-accounts | +| `operation` | *Optional[str]* | :heavy_minus_sign: | 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. | | \ No newline at end of file diff --git a/docs/models/deletebankaccountresponse.md b/docs/models/deletebankaccountresponse.md new file mode 100644 index 00000000..01b16cff --- /dev/null +++ b/docs/models/deletebankaccountresponse.md @@ -0,0 +1,15 @@ +# DeleteBankAccountResponse + +Bank Account deleted + + +## 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` | *Optional[str]* | :heavy_minus_sign: | Apideck ID of service provider | quickbooks | +| `resource` | *Optional[str]* | :heavy_minus_sign: | Unified API resource name | bank-accounts | +| `operation` | *Optional[str]* | :heavy_minus_sign: | 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. | | \ No newline at end of file diff --git a/docs/models/getbankaccountresponse.md b/docs/models/getbankaccountresponse.md new file mode 100644 index 00000000..d1bc1804 --- /dev/null +++ b/docs/models/getbankaccountresponse.md @@ -0,0 +1,15 @@ +# GetBankAccountResponse + +Bank Account + + +## 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` | *Optional[str]* | :heavy_minus_sign: | Apideck ID of service provider | quickbooks | +| `resource` | *Optional[str]* | :heavy_minus_sign: | Unified API resource name | bank-accounts | +| `operation` | *Optional[str]* | :heavy_minus_sign: | Operation performed | one | +| `data` | [models.AccountingBankAccount](../models/accountingbankaccount.md) | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/docs/models/getbankaccountsresponse.md b/docs/models/getbankaccountsresponse.md new file mode 100644 index 00000000..beb43109 --- /dev/null +++ b/docs/models/getbankaccountsresponse.md @@ -0,0 +1,17 @@ +# GetBankAccountsResponse + +Bank 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` | *Optional[str]* | :heavy_minus_sign: | Apideck ID of service provider | quickbooks | +| `resource` | *Optional[str]* | :heavy_minus_sign: | Unified API resource name | bank-accounts | +| `operation` | *Optional[str]* | :heavy_minus_sign: | Operation performed | all | +| `data` | List[[models.AccountingBankAccount](../models/accountingbankaccount.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 | | \ No newline at end of file diff --git a/docs/models/logsfilter.md b/docs/models/logsfilter.md index 7c0d0fd8..c4fdc49d 100644 --- a/docs/models/logsfilter.md +++ b/docs/models/logsfilter.md @@ -3,8 +3,9 @@ ## Fields -| Field | Type | Required | Description | Example | -| ------------------------- | ------------------------- | ------------------------- | ------------------------- | ------------------------- | -| `connector_id` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | crm+salesforce | -| `status_code` | *OptionalNullable[float]* | :heavy_minus_sign: | N/A | 201 | -| `exclude_unified_apis` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | vault,proxy | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | +| `connector_id` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | crm+salesforce | +| `status_code` | *OptionalNullable[float]* | :heavy_minus_sign: | Filter by a single HTTP status code. For backward compatibility - use status_codes for multiple values. | 201 | +| `status_codes` | List[*float*] | :heavy_minus_sign: | Filter by multiple HTTP status codes. Values must be between 100-599. Maximum 50 status codes allowed. | [
200,
201,
204
] | +| `exclude_unified_apis` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | vault,proxy | \ No newline at end of file diff --git a/docs/models/sortby.md b/docs/models/sortby.md new file mode 100644 index 00000000..92a2e893 --- /dev/null +++ b/docs/models/sortby.md @@ -0,0 +1,11 @@ +# SortBy + +The field to sort by + + +## Values + +| Name | Value | +| ------------ | ------------ | +| `CREATED_AT` | created_at | +| `UPDATED_AT` | updated_at | \ No newline at end of file diff --git a/docs/models/updatebankaccountresponse.md b/docs/models/updatebankaccountresponse.md new file mode 100644 index 00000000..b861c0ae --- /dev/null +++ b/docs/models/updatebankaccountresponse.md @@ -0,0 +1,15 @@ +# UpdateBankAccountResponse + +Bank Account updated + + +## 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` | *Optional[str]* | :heavy_minus_sign: | Apideck ID of service provider | quickbooks | +| `resource` | *Optional[str]* | :heavy_minus_sign: | Unified API resource name | bank-accounts | +| `operation` | *Optional[str]* | :heavy_minus_sign: | 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. | | \ No newline at end of file diff --git a/docs/sdks/bankaccounts/README.md b/docs/sdks/bankaccounts/README.md new file mode 100644 index 00000000..5e0e2e06 --- /dev/null +++ b/docs/sdks/bankaccounts/README.md @@ -0,0 +1,342 @@ +# BankAccounts +(*accounting.bank_accounts*) + +## Overview + +### Available Operations + +* [list](#list) - List Bank Accounts +* [create](#create) - Create Bank Account +* [get](#get) - Get Bank Account +* [update](#update) - Update Bank Account +* [delete](#delete) - Delete Bank Account + +## list + +List Bank Accounts + +### Example Usage + + +```python +import apideck_unify +from apideck_unify import Apideck +import os + + +with Apideck( + consumer_id="test-consumer", + app_id="dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX", + api_key=os.getenv("APIDECK_API_KEY", ""), +) as apideck: + + res = apideck.accounting.bank_accounts.list(raw=False, service_id="salesforce", limit=20, filter_={ + "name": "Main Operating", + "status": apideck_unify.BankAccountsFilterStatus.ACTIVE, + }, sort={}, 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 | | +| `filter_` | [Optional[models.BankAccountsFilter]](../../models/bankaccountsfilter.md) | :heavy_minus_sign: | Apply filters | | +| `sort` | [Optional[models.BankAccountsSort]](../../models/bankaccountssort.md) | :heavy_minus_sign: | Apply sorting | | +| `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.AccountingBankAccountsAllResponse](../../models/accountingbankaccountsallresponse.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 Account + +### Example Usage + + +```python +import apideck_unify +from apideck_unify import Apideck +import os + + +with Apideck( + consumer_id="test-consumer", + app_id="dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX", + api_key=os.getenv("APIDECK_API_KEY", ""), +) as apideck: + + res = apideck.accounting.bank_accounts.create(raw=False, service_id="salesforce", display_id="BA-001", name="Main Operating Account", account_number="1234567890", account_type=apideck_unify.AccountingBankAccountAccountType.CHECKING, bank_name="Chase Bank", currency=apideck_unify.Currency.USD, balance=25000, available_balance=24500, overdraft_limit=5000, routing_number="021000021", iban="GB33BUKB20201555555555", bic="CHASUS33", bsb_number="062-001", branch_identifier="001", bank_code="BNH", country="US", status=apideck_unify.AccountingBankAccountStatus.ACTIVE, description="Primary operating account for daily transactions", custom_fields=[ + { + "id": "2389328923893298", + "name": "employee_level", + "description": "Employee Level", + "value": "Uses Salesforce and Marketo", + }, + ]) + + assert res.create_bank_account_response is not None + + # Handle response + print(res.create_bank_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 | +| `display_id` | *OptionalNullable[str]* | :heavy_minus_sign: | Display ID for the bank account | BA-001 | +| `name` | *Optional[str]* | :heavy_minus_sign: | The name of the bank account as it appears in the accounting system | Main Operating Account | +| `account_number` | *OptionalNullable[str]* | :heavy_minus_sign: | The bank account number | 1234567890 | +| `account_type` | [Optional[models.AccountingBankAccountAccountType]](../../models/accountingbankaccountaccounttype.md) | :heavy_minus_sign: | The type of bank account | checking | +| `bank_name` | *OptionalNullable[str]* | :heavy_minus_sign: | The name of the bank or financial institution | Chase Bank | +| `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 | +| `balance` | *OptionalNullable[float]* | :heavy_minus_sign: | The current balance of the bank account | 25000 | +| `available_balance` | *OptionalNullable[float]* | :heavy_minus_sign: | The available balance (considering pending transactions and overdraft) | 24500 | +| `overdraft_limit` | *OptionalNullable[float]* | :heavy_minus_sign: | The overdraft limit for the account | 5000 | +| `routing_number` | *OptionalNullable[str]* | :heavy_minus_sign: | Bank routing number (US) | 021000021 | +| `iban` | *OptionalNullable[str]* | :heavy_minus_sign: | International Bank Account Number | GB33BUKB20201555555555 | +| `bic` | *OptionalNullable[str]* | :heavy_minus_sign: | Bank Identifier Code / SWIFT Code | CHASUS33 | +| `bsb_number` | *OptionalNullable[str]* | :heavy_minus_sign: | Bank State Branch number (Australia/New Zealand) | 062-001 | +| `branch_identifier` | *OptionalNullable[str]* | :heavy_minus_sign: | Bank branch identifier | 001 | +| `bank_code` | *OptionalNullable[str]* | :heavy_minus_sign: | Bank code assigned by central bank | BNH | +| `country` | *OptionalNullable[str]* | :heavy_minus_sign: | Country code according to ISO 3166-1 alpha-2. | US | +| `status` | [OptionalNullable[models.AccountingBankAccountStatus]](../../models/accountingbankaccountstatus.md) | :heavy_minus_sign: | The status of the bank account | active | +| `description` | *OptionalNullable[str]* | :heavy_minus_sign: | Description or notes about the bank account | Primary operating account for daily transactions | +| `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.AccountingBankAccountsAddResponse](../../models/accountingbankaccountsaddresponse.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 Account + +### Example Usage + + +```python +from apideck_unify import Apideck +import os + + +with Apideck( + consumer_id="test-consumer", + app_id="dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX", + api_key=os.getenv("APIDECK_API_KEY", ""), +) as apideck: + + res = apideck.accounting.bank_accounts.get(id="", service_id="salesforce", raw=False, fields="id,updated_at") + + assert res.get_bank_account_response is not None + + # Handle response + print(res.get_bank_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.AccountingBankAccountsOneResponse](../../models/accountingbankaccountsoneresponse.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 Account + +### Example Usage + + +```python +import apideck_unify +from apideck_unify import Apideck +import os + + +with Apideck( + consumer_id="test-consumer", + app_id="dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX", + api_key=os.getenv("APIDECK_API_KEY", ""), +) as apideck: + + res = apideck.accounting.bank_accounts.update(id="", service_id="salesforce", raw=False, display_id="BA-001", name="Main Operating Account", account_number="1234567890", account_type=apideck_unify.AccountingBankAccountAccountType.CHECKING, bank_name="Chase Bank", currency=apideck_unify.Currency.USD, balance=25000, available_balance=24500, overdraft_limit=5000, routing_number="021000021", iban="GB33BUKB20201555555555", bic="CHASUS33", bsb_number="062-001", branch_identifier="001", bank_code="BNH", country="US", status=apideck_unify.AccountingBankAccountStatus.ACTIVE, description="Primary operating account for daily transactions", custom_fields=[ + { + "id": "2389328923893298", + "name": "employee_level", + "description": "Employee Level", + "value": "Uses Salesforce and Marketo", + }, + ]) + + assert res.update_bank_account_response is not None + + # Handle response + print(res.update_bank_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 | | +| `display_id` | *OptionalNullable[str]* | :heavy_minus_sign: | Display ID for the bank account | BA-001 | +| `name` | *Optional[str]* | :heavy_minus_sign: | The name of the bank account as it appears in the accounting system | Main Operating Account | +| `account_number` | *OptionalNullable[str]* | :heavy_minus_sign: | The bank account number | 1234567890 | +| `account_type` | [Optional[models.AccountingBankAccountAccountType]](../../models/accountingbankaccountaccounttype.md) | :heavy_minus_sign: | The type of bank account | checking | +| `bank_name` | *OptionalNullable[str]* | :heavy_minus_sign: | The name of the bank or financial institution | Chase Bank | +| `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 | +| `balance` | *OptionalNullable[float]* | :heavy_minus_sign: | The current balance of the bank account | 25000 | +| `available_balance` | *OptionalNullable[float]* | :heavy_minus_sign: | The available balance (considering pending transactions and overdraft) | 24500 | +| `overdraft_limit` | *OptionalNullable[float]* | :heavy_minus_sign: | The overdraft limit for the account | 5000 | +| `routing_number` | *OptionalNullable[str]* | :heavy_minus_sign: | Bank routing number (US) | 021000021 | +| `iban` | *OptionalNullable[str]* | :heavy_minus_sign: | International Bank Account Number | GB33BUKB20201555555555 | +| `bic` | *OptionalNullable[str]* | :heavy_minus_sign: | Bank Identifier Code / SWIFT Code | CHASUS33 | +| `bsb_number` | *OptionalNullable[str]* | :heavy_minus_sign: | Bank State Branch number (Australia/New Zealand) | 062-001 | +| `branch_identifier` | *OptionalNullable[str]* | :heavy_minus_sign: | Bank branch identifier | 001 | +| `bank_code` | *OptionalNullable[str]* | :heavy_minus_sign: | Bank code assigned by central bank | BNH | +| `country` | *OptionalNullable[str]* | :heavy_minus_sign: | Country code according to ISO 3166-1 alpha-2. | US | +| `status` | [OptionalNullable[models.AccountingBankAccountStatus]](../../models/accountingbankaccountstatus.md) | :heavy_minus_sign: | The status of the bank account | active | +| `description` | *OptionalNullable[str]* | :heavy_minus_sign: | Description or notes about the bank account | Primary operating account for daily transactions | +| `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.AccountingBankAccountsUpdateResponse](../../models/accountingbankaccountsupdateresponse.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 Account + +### Example Usage + + +```python +from apideck_unify import Apideck +import os + + +with Apideck( + consumer_id="test-consumer", + app_id="dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX", + api_key=os.getenv("APIDECK_API_KEY", ""), +) as apideck: + + res = apideck.accounting.bank_accounts.delete(id="", service_id="salesforce", raw=False) + + assert res.delete_bank_account_response is not None + + # Handle response + print(res.delete_bank_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.AccountingBankAccountsDeleteResponse](../../models/accountingbankaccountsdeleteresponse.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/pyproject.toml b/pyproject.toml index e6caff60..c3617639 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,7 +1,7 @@ [project] name = "apideck-unify" -version = "0.22.0" +version = "0.22.1" description = "Python Client SDK Generated by Speakeasy." authors = [{ name = "Speakeasy" },] readme = "README-PYPI.md" @@ -36,7 +36,6 @@ build-backend = "poetry.core.masonry.api" [tool.pytest.ini_options] asyncio_default_fixture_loop_scope = "function" -asyncio_mode = "auto" pythonpath = ["src"] [tool.mypy] diff --git a/src/apideck_unify/_version.py b/src/apideck_unify/_version.py index 8bc05418..22b2dcb7 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.22.0" -__openapi_doc_version__: str = "10.20.13" -__gen_version__: str = "2.692.0" -__user_agent__: str = "speakeasy-sdk/python 0.22.0 2.692.0 10.20.13 apideck-unify" +__version__: str = "0.22.1" +__openapi_doc_version__: str = "10.20.16" +__gen_version__: str = "2.709.0" +__user_agent__: str = "speakeasy-sdk/python 0.22.1 2.709.0 10.20.16 apideck-unify" try: if __package__ is not None: diff --git a/src/apideck_unify/accounting.py b/src/apideck_unify/accounting.py index 5a23cf3e..1cf7d2b4 100644 --- a/src/apideck_unify/accounting.py +++ b/src/apideck_unify/accounting.py @@ -6,6 +6,7 @@ from apideck_unify.ageddebtors_sdk import AgedDebtorsSDK from apideck_unify.attachments import Attachments from apideck_unify.balancesheet_sdk import BalanceSheetSDK +from apideck_unify.bankaccounts import BankAccounts from apideck_unify.bankfeedaccounts import BankFeedAccounts from apideck_unify.bankfeedstatements import BankFeedStatements from apideck_unify.billpayments import BillPayments @@ -51,6 +52,7 @@ class Accounting(BaseSDK): locations: Locations departments: Departments attachments: Attachments + bank_accounts: BankAccounts tracking_categories: TrackingCategories bill_payments: BillPayments expenses: Expenses @@ -109,6 +111,9 @@ def _init_sdks(self): self.attachments = Attachments( self.sdk_configuration, parent_ref=self.parent_ref ) + self.bank_accounts = BankAccounts( + self.sdk_configuration, parent_ref=self.parent_ref + ) self.tracking_categories = TrackingCategories( self.sdk_configuration, parent_ref=self.parent_ref ) diff --git a/src/apideck_unify/bankaccounts.py b/src/apideck_unify/bankaccounts.py new file mode 100644 index 00000000..d39d9d29 --- /dev/null +++ b/src/apideck_unify/bankaccounts.py @@ -0,0 +1,1798 @@ +"""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 apideck_unify.utils.unmarshal_json_response import unmarshal_json_response +from jsonpath import JSONPath +from typing import Any, Dict, List, Mapping, Optional, Union + + +class BankAccounts(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, + filter_: Optional[ + Union[models.BankAccountsFilter, models.BankAccountsFilterTypedDict] + ] = None, + sort: Optional[ + Union[models.BankAccountsSort, models.BankAccountsSortTypedDict] + ] = None, + 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.AccountingBankAccountsAllResponse]: + r"""List Bank Accounts + + List Bank 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 filter_: Apply filters + :param sort: Apply sorting + :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.AccountingBankAccountsAllRequest( + raw=raw, + consumer_id=consumer_id, + app_id=app_id, + service_id=service_id, + cursor=cursor, + limit=limit, + filter_=utils.get_pydantic_model( + filter_, Optional[models.BankAccountsFilter] + ), + sort=utils.get_pydantic_model(sort, Optional[models.BankAccountsSort]), + pass_through=pass_through, + fields=fields, + ) + + req = self._build_request( + method="GET", + path="/accounting/bank-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.AccountingBankAccountsAllGlobals( + 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( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="accounting.bankAccountsAll", + 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.AccountingBankAccountsAllResponse]: + 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 or str(next_cursor).strip() == "": + return None + + return self.list( + raw=raw, + consumer_id=consumer_id, + app_id=app_id, + service_id=service_id, + cursor=next_cursor, + limit=limit, + filter_=filter_, + sort=sort, + pass_through=pass_through, + fields=fields, + retries=retries, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return models.AccountingBankAccountsAllResponse( + get_bank_accounts_response=unmarshal_json_response( + Optional[models.GetBankAccountsResponse], http_res + ), + http_meta=models.HTTPMetadata(request=req, response=http_res), + next=next_func, + ) + if utils.match_response(http_res, "400", "application/json"): + response_data = unmarshal_json_response( + models.BadRequestResponseData, http_res + ) + raise models.BadRequestResponse(response_data, http_res) + if utils.match_response(http_res, "401", "application/json"): + response_data = unmarshal_json_response( + models.UnauthorizedResponseData, http_res + ) + raise models.UnauthorizedResponse(response_data, http_res) + if utils.match_response(http_res, "402", "application/json"): + response_data = unmarshal_json_response( + models.PaymentRequiredResponseData, http_res + ) + raise models.PaymentRequiredResponse(response_data, http_res) + if utils.match_response(http_res, "404", "application/json"): + response_data = unmarshal_json_response( + models.NotFoundResponseData, http_res + ) + raise models.NotFoundResponse(response_data, http_res) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + models.UnprocessableResponseData, http_res + ) + raise models.UnprocessableResponse(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "default", "application/json"): + return models.AccountingBankAccountsAllResponse( + unexpected_error_response=unmarshal_json_response( + Optional[models.UnexpectedErrorResponse], http_res + ), + http_meta=models.HTTPMetadata(request=req, response=http_res), + next=next_func, + ) + + raise models.APIError("Unexpected response received", 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, + filter_: Optional[ + Union[models.BankAccountsFilter, models.BankAccountsFilterTypedDict] + ] = None, + sort: Optional[ + Union[models.BankAccountsSort, models.BankAccountsSortTypedDict] + ] = None, + 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.AccountingBankAccountsAllResponse]: + r"""List Bank Accounts + + List Bank 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 filter_: Apply filters + :param sort: Apply sorting + :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.AccountingBankAccountsAllRequest( + raw=raw, + consumer_id=consumer_id, + app_id=app_id, + service_id=service_id, + cursor=cursor, + limit=limit, + filter_=utils.get_pydantic_model( + filter_, Optional[models.BankAccountsFilter] + ), + sort=utils.get_pydantic_model(sort, Optional[models.BankAccountsSort]), + pass_through=pass_through, + fields=fields, + ) + + req = self._build_request_async( + method="GET", + path="/accounting/bank-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.AccountingBankAccountsAllGlobals( + 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( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="accounting.bankAccountsAll", + 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.AccountingBankAccountsAllResponse]: + 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 or str(next_cursor).strip() == "": + return None + + return self.list( + raw=raw, + consumer_id=consumer_id, + app_id=app_id, + service_id=service_id, + cursor=next_cursor, + limit=limit, + filter_=filter_, + sort=sort, + pass_through=pass_through, + fields=fields, + retries=retries, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return models.AccountingBankAccountsAllResponse( + get_bank_accounts_response=unmarshal_json_response( + Optional[models.GetBankAccountsResponse], http_res + ), + http_meta=models.HTTPMetadata(request=req, response=http_res), + next=next_func, + ) + if utils.match_response(http_res, "400", "application/json"): + response_data = unmarshal_json_response( + models.BadRequestResponseData, http_res + ) + raise models.BadRequestResponse(response_data, http_res) + if utils.match_response(http_res, "401", "application/json"): + response_data = unmarshal_json_response( + models.UnauthorizedResponseData, http_res + ) + raise models.UnauthorizedResponse(response_data, http_res) + if utils.match_response(http_res, "402", "application/json"): + response_data = unmarshal_json_response( + models.PaymentRequiredResponseData, http_res + ) + raise models.PaymentRequiredResponse(response_data, http_res) + if utils.match_response(http_res, "404", "application/json"): + response_data = unmarshal_json_response( + models.NotFoundResponseData, http_res + ) + raise models.NotFoundResponse(response_data, http_res) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + models.UnprocessableResponseData, http_res + ) + raise models.UnprocessableResponse(response_data, http_res) + 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, http_res_text) + 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, http_res_text) + if utils.match_response(http_res, "default", "application/json"): + return models.AccountingBankAccountsAllResponse( + unexpected_error_response=unmarshal_json_response( + Optional[models.UnexpectedErrorResponse], http_res + ), + http_meta=models.HTTPMetadata(request=req, response=http_res), + next=next_func, + ) + + raise models.APIError("Unexpected response received", http_res) + + def create( + self, + *, + raw: Optional[bool] = False, + consumer_id: Optional[str] = None, + app_id: Optional[str] = None, + service_id: Optional[str] = None, + display_id: OptionalNullable[str] = UNSET, + name: Optional[str] = None, + account_number: OptionalNullable[str] = UNSET, + account_type: Optional[models.AccountingBankAccountAccountType] = None, + bank_name: OptionalNullable[str] = UNSET, + currency: OptionalNullable[models.Currency] = UNSET, + balance: OptionalNullable[float] = UNSET, + available_balance: OptionalNullable[float] = UNSET, + overdraft_limit: OptionalNullable[float] = UNSET, + routing_number: OptionalNullable[str] = UNSET, + iban: OptionalNullable[str] = UNSET, + bic: OptionalNullable[str] = UNSET, + bsb_number: OptionalNullable[str] = UNSET, + branch_identifier: OptionalNullable[str] = UNSET, + bank_code: OptionalNullable[str] = UNSET, + country: OptionalNullable[str] = UNSET, + status: OptionalNullable[models.AccountingBankAccountStatus] = UNSET, + description: 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.AccountingBankAccountsAddResponse: + r"""Create Bank Account + + Create Bank 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 display_id: Display ID for the bank account + :param name: The name of the bank account as it appears in the accounting system + :param account_number: The bank account number + :param account_type: The type of bank account + :param bank_name: The name of the bank or financial institution + :param currency: Indicates the associated currency for an amount of money. Values correspond to [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217). + :param balance: The current balance of the bank account + :param available_balance: The available balance (considering pending transactions and overdraft) + :param overdraft_limit: The overdraft limit for the account + :param routing_number: Bank routing number (US) + :param iban: International Bank Account Number + :param bic: Bank Identifier Code / SWIFT Code + :param bsb_number: Bank State Branch number (Australia/New Zealand) + :param branch_identifier: Bank branch identifier + :param bank_code: Bank code assigned by central bank + :param country: Country code according to ISO 3166-1 alpha-2. + :param status: The status of the bank account + :param description: Description or notes about the bank account + :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.AccountingBankAccountsAddRequest( + raw=raw, + consumer_id=consumer_id, + app_id=app_id, + service_id=service_id, + accounting_bank_account=models.AccountingBankAccountInput( + display_id=display_id, + name=name, + account_number=account_number, + account_type=account_type, + bank_name=bank_name, + currency=currency, + balance=balance, + available_balance=available_balance, + overdraft_limit=overdraft_limit, + routing_number=routing_number, + iban=iban, + bic=bic, + bsb_number=bsb_number, + branch_identifier=branch_identifier, + bank_code=bank_code, + country=country, + status=status, + description=description, + custom_fields=utils.get_pydantic_model( + custom_fields, Optional[List[models.CustomField]] + ), + ), + ) + + req = self._build_request( + method="POST", + path="/accounting/bank-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.AccountingBankAccountsAddGlobals( + 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.accounting_bank_account, + False, + False, + "json", + models.AccountingBankAccountInput, + ), + 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( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="accounting.bankAccountsAdd", + 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.AccountingBankAccountsAddResponse( + create_bank_account_response=unmarshal_json_response( + Optional[models.CreateBankAccountResponse], http_res + ), + http_meta=models.HTTPMetadata(request=req, response=http_res), + ) + if utils.match_response(http_res, "400", "application/json"): + response_data = unmarshal_json_response( + models.BadRequestResponseData, http_res + ) + raise models.BadRequestResponse(response_data, http_res) + if utils.match_response(http_res, "401", "application/json"): + response_data = unmarshal_json_response( + models.UnauthorizedResponseData, http_res + ) + raise models.UnauthorizedResponse(response_data, http_res) + if utils.match_response(http_res, "402", "application/json"): + response_data = unmarshal_json_response( + models.PaymentRequiredResponseData, http_res + ) + raise models.PaymentRequiredResponse(response_data, http_res) + if utils.match_response(http_res, "404", "application/json"): + response_data = unmarshal_json_response( + models.NotFoundResponseData, http_res + ) + raise models.NotFoundResponse(response_data, http_res) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + models.UnprocessableResponseData, http_res + ) + raise models.UnprocessableResponse(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "default", "application/json"): + return models.AccountingBankAccountsAddResponse( + unexpected_error_response=unmarshal_json_response( + Optional[models.UnexpectedErrorResponse], http_res + ), + http_meta=models.HTTPMetadata(request=req, response=http_res), + ) + + raise models.APIError("Unexpected response received", 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, + display_id: OptionalNullable[str] = UNSET, + name: Optional[str] = None, + account_number: OptionalNullable[str] = UNSET, + account_type: Optional[models.AccountingBankAccountAccountType] = None, + bank_name: OptionalNullable[str] = UNSET, + currency: OptionalNullable[models.Currency] = UNSET, + balance: OptionalNullable[float] = UNSET, + available_balance: OptionalNullable[float] = UNSET, + overdraft_limit: OptionalNullable[float] = UNSET, + routing_number: OptionalNullable[str] = UNSET, + iban: OptionalNullable[str] = UNSET, + bic: OptionalNullable[str] = UNSET, + bsb_number: OptionalNullable[str] = UNSET, + branch_identifier: OptionalNullable[str] = UNSET, + bank_code: OptionalNullable[str] = UNSET, + country: OptionalNullable[str] = UNSET, + status: OptionalNullable[models.AccountingBankAccountStatus] = UNSET, + description: 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.AccountingBankAccountsAddResponse: + r"""Create Bank Account + + Create Bank 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 display_id: Display ID for the bank account + :param name: The name of the bank account as it appears in the accounting system + :param account_number: The bank account number + :param account_type: The type of bank account + :param bank_name: The name of the bank or financial institution + :param currency: Indicates the associated currency for an amount of money. Values correspond to [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217). + :param balance: The current balance of the bank account + :param available_balance: The available balance (considering pending transactions and overdraft) + :param overdraft_limit: The overdraft limit for the account + :param routing_number: Bank routing number (US) + :param iban: International Bank Account Number + :param bic: Bank Identifier Code / SWIFT Code + :param bsb_number: Bank State Branch number (Australia/New Zealand) + :param branch_identifier: Bank branch identifier + :param bank_code: Bank code assigned by central bank + :param country: Country code according to ISO 3166-1 alpha-2. + :param status: The status of the bank account + :param description: Description or notes about the bank account + :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.AccountingBankAccountsAddRequest( + raw=raw, + consumer_id=consumer_id, + app_id=app_id, + service_id=service_id, + accounting_bank_account=models.AccountingBankAccountInput( + display_id=display_id, + name=name, + account_number=account_number, + account_type=account_type, + bank_name=bank_name, + currency=currency, + balance=balance, + available_balance=available_balance, + overdraft_limit=overdraft_limit, + routing_number=routing_number, + iban=iban, + bic=bic, + bsb_number=bsb_number, + branch_identifier=branch_identifier, + bank_code=bank_code, + country=country, + status=status, + description=description, + custom_fields=utils.get_pydantic_model( + custom_fields, Optional[List[models.CustomField]] + ), + ), + ) + + req = self._build_request_async( + method="POST", + path="/accounting/bank-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.AccountingBankAccountsAddGlobals( + 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.accounting_bank_account, + False, + False, + "json", + models.AccountingBankAccountInput, + ), + 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( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="accounting.bankAccountsAdd", + 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.AccountingBankAccountsAddResponse( + create_bank_account_response=unmarshal_json_response( + Optional[models.CreateBankAccountResponse], http_res + ), + http_meta=models.HTTPMetadata(request=req, response=http_res), + ) + if utils.match_response(http_res, "400", "application/json"): + response_data = unmarshal_json_response( + models.BadRequestResponseData, http_res + ) + raise models.BadRequestResponse(response_data, http_res) + if utils.match_response(http_res, "401", "application/json"): + response_data = unmarshal_json_response( + models.UnauthorizedResponseData, http_res + ) + raise models.UnauthorizedResponse(response_data, http_res) + if utils.match_response(http_res, "402", "application/json"): + response_data = unmarshal_json_response( + models.PaymentRequiredResponseData, http_res + ) + raise models.PaymentRequiredResponse(response_data, http_res) + if utils.match_response(http_res, "404", "application/json"): + response_data = unmarshal_json_response( + models.NotFoundResponseData, http_res + ) + raise models.NotFoundResponse(response_data, http_res) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + models.UnprocessableResponseData, http_res + ) + raise models.UnprocessableResponse(response_data, http_res) + 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, http_res_text) + 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, http_res_text) + if utils.match_response(http_res, "default", "application/json"): + return models.AccountingBankAccountsAddResponse( + unexpected_error_response=unmarshal_json_response( + Optional[models.UnexpectedErrorResponse], http_res + ), + http_meta=models.HTTPMetadata(request=req, response=http_res), + ) + + raise models.APIError("Unexpected response received", 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.AccountingBankAccountsOneResponse: + r"""Get Bank Account + + Get Bank 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.AccountingBankAccountsOneRequest( + 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-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.AccountingBankAccountsOneGlobals( + 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( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="accounting.bankAccountsOne", + 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.AccountingBankAccountsOneResponse( + get_bank_account_response=unmarshal_json_response( + Optional[models.GetBankAccountResponse], http_res + ), + http_meta=models.HTTPMetadata(request=req, response=http_res), + ) + if utils.match_response(http_res, "400", "application/json"): + response_data = unmarshal_json_response( + models.BadRequestResponseData, http_res + ) + raise models.BadRequestResponse(response_data, http_res) + if utils.match_response(http_res, "401", "application/json"): + response_data = unmarshal_json_response( + models.UnauthorizedResponseData, http_res + ) + raise models.UnauthorizedResponse(response_data, http_res) + if utils.match_response(http_res, "402", "application/json"): + response_data = unmarshal_json_response( + models.PaymentRequiredResponseData, http_res + ) + raise models.PaymentRequiredResponse(response_data, http_res) + if utils.match_response(http_res, "404", "application/json"): + response_data = unmarshal_json_response( + models.NotFoundResponseData, http_res + ) + raise models.NotFoundResponse(response_data, http_res) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + models.UnprocessableResponseData, http_res + ) + raise models.UnprocessableResponse(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "default", "application/json"): + return models.AccountingBankAccountsOneResponse( + unexpected_error_response=unmarshal_json_response( + Optional[models.UnexpectedErrorResponse], http_res + ), + http_meta=models.HTTPMetadata(request=req, response=http_res), + ) + + raise models.APIError("Unexpected response received", 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.AccountingBankAccountsOneResponse: + r"""Get Bank Account + + Get Bank 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.AccountingBankAccountsOneRequest( + 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-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.AccountingBankAccountsOneGlobals( + 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( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="accounting.bankAccountsOne", + 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.AccountingBankAccountsOneResponse( + get_bank_account_response=unmarshal_json_response( + Optional[models.GetBankAccountResponse], http_res + ), + http_meta=models.HTTPMetadata(request=req, response=http_res), + ) + if utils.match_response(http_res, "400", "application/json"): + response_data = unmarshal_json_response( + models.BadRequestResponseData, http_res + ) + raise models.BadRequestResponse(response_data, http_res) + if utils.match_response(http_res, "401", "application/json"): + response_data = unmarshal_json_response( + models.UnauthorizedResponseData, http_res + ) + raise models.UnauthorizedResponse(response_data, http_res) + if utils.match_response(http_res, "402", "application/json"): + response_data = unmarshal_json_response( + models.PaymentRequiredResponseData, http_res + ) + raise models.PaymentRequiredResponse(response_data, http_res) + if utils.match_response(http_res, "404", "application/json"): + response_data = unmarshal_json_response( + models.NotFoundResponseData, http_res + ) + raise models.NotFoundResponse(response_data, http_res) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + models.UnprocessableResponseData, http_res + ) + raise models.UnprocessableResponse(response_data, http_res) + 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, http_res_text) + 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, http_res_text) + if utils.match_response(http_res, "default", "application/json"): + return models.AccountingBankAccountsOneResponse( + unexpected_error_response=unmarshal_json_response( + Optional[models.UnexpectedErrorResponse], http_res + ), + http_meta=models.HTTPMetadata(request=req, response=http_res), + ) + + raise models.APIError("Unexpected response received", 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, + display_id: OptionalNullable[str] = UNSET, + name: Optional[str] = None, + account_number: OptionalNullable[str] = UNSET, + account_type: Optional[models.AccountingBankAccountAccountType] = None, + bank_name: OptionalNullable[str] = UNSET, + currency: OptionalNullable[models.Currency] = UNSET, + balance: OptionalNullable[float] = UNSET, + available_balance: OptionalNullable[float] = UNSET, + overdraft_limit: OptionalNullable[float] = UNSET, + routing_number: OptionalNullable[str] = UNSET, + iban: OptionalNullable[str] = UNSET, + bic: OptionalNullable[str] = UNSET, + bsb_number: OptionalNullable[str] = UNSET, + branch_identifier: OptionalNullable[str] = UNSET, + bank_code: OptionalNullable[str] = UNSET, + country: OptionalNullable[str] = UNSET, + status: OptionalNullable[models.AccountingBankAccountStatus] = UNSET, + description: 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.AccountingBankAccountsUpdateResponse: + r"""Update Bank Account + + Update Bank 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 display_id: Display ID for the bank account + :param name: The name of the bank account as it appears in the accounting system + :param account_number: The bank account number + :param account_type: The type of bank account + :param bank_name: The name of the bank or financial institution + :param currency: Indicates the associated currency for an amount of money. Values correspond to [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217). + :param balance: The current balance of the bank account + :param available_balance: The available balance (considering pending transactions and overdraft) + :param overdraft_limit: The overdraft limit for the account + :param routing_number: Bank routing number (US) + :param iban: International Bank Account Number + :param bic: Bank Identifier Code / SWIFT Code + :param bsb_number: Bank State Branch number (Australia/New Zealand) + :param branch_identifier: Bank branch identifier + :param bank_code: Bank code assigned by central bank + :param country: Country code according to ISO 3166-1 alpha-2. + :param status: The status of the bank account + :param description: Description or notes about the bank account + :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.AccountingBankAccountsUpdateRequest( + id=id, + consumer_id=consumer_id, + app_id=app_id, + service_id=service_id, + raw=raw, + accounting_bank_account=models.AccountingBankAccountInput( + display_id=display_id, + name=name, + account_number=account_number, + account_type=account_type, + bank_name=bank_name, + currency=currency, + balance=balance, + available_balance=available_balance, + overdraft_limit=overdraft_limit, + routing_number=routing_number, + iban=iban, + bic=bic, + bsb_number=bsb_number, + branch_identifier=branch_identifier, + bank_code=bank_code, + country=country, + status=status, + description=description, + custom_fields=utils.get_pydantic_model( + custom_fields, Optional[List[models.CustomField]] + ), + ), + ) + + req = self._build_request( + method="PATCH", + path="/accounting/bank-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.AccountingBankAccountsUpdateGlobals( + 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.accounting_bank_account, + False, + False, + "json", + models.AccountingBankAccountInput, + ), + 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( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="accounting.bankAccountsUpdate", + 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.AccountingBankAccountsUpdateResponse( + update_bank_account_response=unmarshal_json_response( + Optional[models.UpdateBankAccountResponse], http_res + ), + http_meta=models.HTTPMetadata(request=req, response=http_res), + ) + if utils.match_response(http_res, "400", "application/json"): + response_data = unmarshal_json_response( + models.BadRequestResponseData, http_res + ) + raise models.BadRequestResponse(response_data, http_res) + if utils.match_response(http_res, "401", "application/json"): + response_data = unmarshal_json_response( + models.UnauthorizedResponseData, http_res + ) + raise models.UnauthorizedResponse(response_data, http_res) + if utils.match_response(http_res, "402", "application/json"): + response_data = unmarshal_json_response( + models.PaymentRequiredResponseData, http_res + ) + raise models.PaymentRequiredResponse(response_data, http_res) + if utils.match_response(http_res, "404", "application/json"): + response_data = unmarshal_json_response( + models.NotFoundResponseData, http_res + ) + raise models.NotFoundResponse(response_data, http_res) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + models.UnprocessableResponseData, http_res + ) + raise models.UnprocessableResponse(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "default", "application/json"): + return models.AccountingBankAccountsUpdateResponse( + unexpected_error_response=unmarshal_json_response( + Optional[models.UnexpectedErrorResponse], http_res + ), + http_meta=models.HTTPMetadata(request=req, response=http_res), + ) + + raise models.APIError("Unexpected response received", 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, + display_id: OptionalNullable[str] = UNSET, + name: Optional[str] = None, + account_number: OptionalNullable[str] = UNSET, + account_type: Optional[models.AccountingBankAccountAccountType] = None, + bank_name: OptionalNullable[str] = UNSET, + currency: OptionalNullable[models.Currency] = UNSET, + balance: OptionalNullable[float] = UNSET, + available_balance: OptionalNullable[float] = UNSET, + overdraft_limit: OptionalNullable[float] = UNSET, + routing_number: OptionalNullable[str] = UNSET, + iban: OptionalNullable[str] = UNSET, + bic: OptionalNullable[str] = UNSET, + bsb_number: OptionalNullable[str] = UNSET, + branch_identifier: OptionalNullable[str] = UNSET, + bank_code: OptionalNullable[str] = UNSET, + country: OptionalNullable[str] = UNSET, + status: OptionalNullable[models.AccountingBankAccountStatus] = UNSET, + description: 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.AccountingBankAccountsUpdateResponse: + r"""Update Bank Account + + Update Bank 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 display_id: Display ID for the bank account + :param name: The name of the bank account as it appears in the accounting system + :param account_number: The bank account number + :param account_type: The type of bank account + :param bank_name: The name of the bank or financial institution + :param currency: Indicates the associated currency for an amount of money. Values correspond to [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217). + :param balance: The current balance of the bank account + :param available_balance: The available balance (considering pending transactions and overdraft) + :param overdraft_limit: The overdraft limit for the account + :param routing_number: Bank routing number (US) + :param iban: International Bank Account Number + :param bic: Bank Identifier Code / SWIFT Code + :param bsb_number: Bank State Branch number (Australia/New Zealand) + :param branch_identifier: Bank branch identifier + :param bank_code: Bank code assigned by central bank + :param country: Country code according to ISO 3166-1 alpha-2. + :param status: The status of the bank account + :param description: Description or notes about the bank account + :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.AccountingBankAccountsUpdateRequest( + id=id, + consumer_id=consumer_id, + app_id=app_id, + service_id=service_id, + raw=raw, + accounting_bank_account=models.AccountingBankAccountInput( + display_id=display_id, + name=name, + account_number=account_number, + account_type=account_type, + bank_name=bank_name, + currency=currency, + balance=balance, + available_balance=available_balance, + overdraft_limit=overdraft_limit, + routing_number=routing_number, + iban=iban, + bic=bic, + bsb_number=bsb_number, + branch_identifier=branch_identifier, + bank_code=bank_code, + country=country, + status=status, + description=description, + custom_fields=utils.get_pydantic_model( + custom_fields, Optional[List[models.CustomField]] + ), + ), + ) + + req = self._build_request_async( + method="PATCH", + path="/accounting/bank-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.AccountingBankAccountsUpdateGlobals( + 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.accounting_bank_account, + False, + False, + "json", + models.AccountingBankAccountInput, + ), + 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( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="accounting.bankAccountsUpdate", + 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.AccountingBankAccountsUpdateResponse( + update_bank_account_response=unmarshal_json_response( + Optional[models.UpdateBankAccountResponse], http_res + ), + http_meta=models.HTTPMetadata(request=req, response=http_res), + ) + if utils.match_response(http_res, "400", "application/json"): + response_data = unmarshal_json_response( + models.BadRequestResponseData, http_res + ) + raise models.BadRequestResponse(response_data, http_res) + if utils.match_response(http_res, "401", "application/json"): + response_data = unmarshal_json_response( + models.UnauthorizedResponseData, http_res + ) + raise models.UnauthorizedResponse(response_data, http_res) + if utils.match_response(http_res, "402", "application/json"): + response_data = unmarshal_json_response( + models.PaymentRequiredResponseData, http_res + ) + raise models.PaymentRequiredResponse(response_data, http_res) + if utils.match_response(http_res, "404", "application/json"): + response_data = unmarshal_json_response( + models.NotFoundResponseData, http_res + ) + raise models.NotFoundResponse(response_data, http_res) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + models.UnprocessableResponseData, http_res + ) + raise models.UnprocessableResponse(response_data, http_res) + 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, http_res_text) + 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, http_res_text) + if utils.match_response(http_res, "default", "application/json"): + return models.AccountingBankAccountsUpdateResponse( + unexpected_error_response=unmarshal_json_response( + Optional[models.UnexpectedErrorResponse], http_res + ), + http_meta=models.HTTPMetadata(request=req, response=http_res), + ) + + raise models.APIError("Unexpected response received", 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.AccountingBankAccountsDeleteResponse: + r"""Delete Bank Account + + Delete Bank 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.AccountingBankAccountsDeleteRequest( + 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-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.AccountingBankAccountsDeleteGlobals( + 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( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="accounting.bankAccountsDelete", + 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.AccountingBankAccountsDeleteResponse( + delete_bank_account_response=unmarshal_json_response( + Optional[models.DeleteBankAccountResponse], http_res + ), + http_meta=models.HTTPMetadata(request=req, response=http_res), + ) + if utils.match_response(http_res, "400", "application/json"): + response_data = unmarshal_json_response( + models.BadRequestResponseData, http_res + ) + raise models.BadRequestResponse(response_data, http_res) + if utils.match_response(http_res, "401", "application/json"): + response_data = unmarshal_json_response( + models.UnauthorizedResponseData, http_res + ) + raise models.UnauthorizedResponse(response_data, http_res) + if utils.match_response(http_res, "402", "application/json"): + response_data = unmarshal_json_response( + models.PaymentRequiredResponseData, http_res + ) + raise models.PaymentRequiredResponse(response_data, http_res) + if utils.match_response(http_res, "404", "application/json"): + response_data = unmarshal_json_response( + models.NotFoundResponseData, http_res + ) + raise models.NotFoundResponse(response_data, http_res) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + models.UnprocessableResponseData, http_res + ) + raise models.UnprocessableResponse(response_data, http_res) + if utils.match_response(http_res, "4XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "5XX", "*"): + http_res_text = utils.stream_to_text(http_res) + raise models.APIError("API error occurred", http_res, http_res_text) + if utils.match_response(http_res, "default", "application/json"): + return models.AccountingBankAccountsDeleteResponse( + unexpected_error_response=unmarshal_json_response( + Optional[models.UnexpectedErrorResponse], http_res + ), + http_meta=models.HTTPMetadata(request=req, response=http_res), + ) + + raise models.APIError("Unexpected response received", 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.AccountingBankAccountsDeleteResponse: + r"""Delete Bank Account + + Delete Bank 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.AccountingBankAccountsDeleteRequest( + 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-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.AccountingBankAccountsDeleteGlobals( + 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( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="accounting.bankAccountsDelete", + 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.AccountingBankAccountsDeleteResponse( + delete_bank_account_response=unmarshal_json_response( + Optional[models.DeleteBankAccountResponse], http_res + ), + http_meta=models.HTTPMetadata(request=req, response=http_res), + ) + if utils.match_response(http_res, "400", "application/json"): + response_data = unmarshal_json_response( + models.BadRequestResponseData, http_res + ) + raise models.BadRequestResponse(response_data, http_res) + if utils.match_response(http_res, "401", "application/json"): + response_data = unmarshal_json_response( + models.UnauthorizedResponseData, http_res + ) + raise models.UnauthorizedResponse(response_data, http_res) + if utils.match_response(http_res, "402", "application/json"): + response_data = unmarshal_json_response( + models.PaymentRequiredResponseData, http_res + ) + raise models.PaymentRequiredResponse(response_data, http_res) + if utils.match_response(http_res, "404", "application/json"): + response_data = unmarshal_json_response( + models.NotFoundResponseData, http_res + ) + raise models.NotFoundResponse(response_data, http_res) + if utils.match_response(http_res, "422", "application/json"): + response_data = unmarshal_json_response( + models.UnprocessableResponseData, http_res + ) + raise models.UnprocessableResponse(response_data, http_res) + 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, http_res_text) + 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, http_res_text) + if utils.match_response(http_res, "default", "application/json"): + return models.AccountingBankAccountsDeleteResponse( + unexpected_error_response=unmarshal_json_response( + Optional[models.UnexpectedErrorResponse], http_res + ), + http_meta=models.HTTPMetadata(request=req, response=http_res), + ) + + raise models.APIError("Unexpected response received", http_res) diff --git a/src/apideck_unify/models/__init__.py b/src/apideck_unify/models/__init__.py index 4898de47..515eaa84 100644 --- a/src/apideck_unify/models/__init__.py +++ b/src/apideck_unify/models/__init__.py @@ -72,6 +72,46 @@ AccountingBalanceSheetOneResponse, AccountingBalanceSheetOneResponseTypedDict, ) + from .accounting_bankaccountsaddop import ( + AccountingBankAccountsAddGlobals, + AccountingBankAccountsAddGlobalsTypedDict, + AccountingBankAccountsAddRequest, + AccountingBankAccountsAddRequestTypedDict, + AccountingBankAccountsAddResponse, + AccountingBankAccountsAddResponseTypedDict, + ) + from .accounting_bankaccountsallop import ( + AccountingBankAccountsAllGlobals, + AccountingBankAccountsAllGlobalsTypedDict, + AccountingBankAccountsAllRequest, + AccountingBankAccountsAllRequestTypedDict, + AccountingBankAccountsAllResponse, + AccountingBankAccountsAllResponseTypedDict, + ) + from .accounting_bankaccountsdeleteop import ( + AccountingBankAccountsDeleteGlobals, + AccountingBankAccountsDeleteGlobalsTypedDict, + AccountingBankAccountsDeleteRequest, + AccountingBankAccountsDeleteRequestTypedDict, + AccountingBankAccountsDeleteResponse, + AccountingBankAccountsDeleteResponseTypedDict, + ) + from .accounting_bankaccountsoneop import ( + AccountingBankAccountsOneGlobals, + AccountingBankAccountsOneGlobalsTypedDict, + AccountingBankAccountsOneRequest, + AccountingBankAccountsOneRequestTypedDict, + AccountingBankAccountsOneResponse, + AccountingBankAccountsOneResponseTypedDict, + ) + from .accounting_bankaccountsupdateop import ( + AccountingBankAccountsUpdateGlobals, + AccountingBankAccountsUpdateGlobalsTypedDict, + AccountingBankAccountsUpdateRequest, + AccountingBankAccountsUpdateRequestTypedDict, + AccountingBankAccountsUpdateResponse, + AccountingBankAccountsUpdateResponseTypedDict, + ) from .accounting_bankfeedaccountsaddop import ( AccountingBankFeedAccountsAddGlobals, AccountingBankFeedAccountsAddGlobalsTypedDict, @@ -904,6 +944,14 @@ AccountingTrackingCategoriesUpdateResponse, AccountingTrackingCategoriesUpdateResponseTypedDict, ) + from .accountingbankaccount import ( + AccountingBankAccount, + AccountingBankAccountAccountType, + AccountingBankAccountInput, + AccountingBankAccountInputTypedDict, + AccountingBankAccountStatus, + AccountingBankAccountTypedDict, + ) from .accountingdepartment import ( AccountingDepartment, AccountingDepartmentInput, @@ -1136,6 +1184,12 @@ BankAccount1AccountType, BankAccount1TypedDict, ) + from .bankaccountsfilter import ( + BankAccountsFilter, + BankAccountsFilterStatus, + BankAccountsFilterTypedDict, + ) + from .bankaccountssort import BankAccountsSort, BankAccountsSortTypedDict, SortBy from .bankfeedaccount import ( BankAccountType, BankFeedAccount, @@ -1389,6 +1443,10 @@ CreateAttachmentResponse, CreateAttachmentResponseTypedDict, ) + from .createbankaccountresponse import ( + CreateBankAccountResponse, + CreateBankAccountResponseTypedDict, + ) from .createbankfeedaccountresponse import ( CreateBankFeedAccountResponse, CreateBankFeedAccountResponseTypedDict, @@ -2058,6 +2116,10 @@ DeleteAttachmentResponse, DeleteAttachmentResponseTypedDict, ) + from .deletebankaccountresponse import ( + DeleteBankAccountResponse, + DeleteBankAccountResponseTypedDict, + ) from .deletebankfeedaccountresponse import ( DeleteBankFeedAccountResponse, DeleteBankFeedAccountResponseTypedDict, @@ -2737,6 +2799,14 @@ GetBalanceSheetResponse, GetBalanceSheetResponseTypedDict, ) + from .getbankaccountresponse import ( + GetBankAccountResponse, + GetBankAccountResponseTypedDict, + ) + from .getbankaccountsresponse import ( + GetBankAccountsResponse, + GetBankAccountsResponseTypedDict, + ) from .getbankfeedaccountresponse import ( GetBankFeedAccountResponse, GetBankFeedAccountResponseTypedDict, @@ -3894,6 +3964,10 @@ UpdateApplicationResponse, UpdateApplicationResponseTypedDict, ) + from .updatebankaccountresponse import ( + UpdateBankAccountResponse, + UpdateBankAccountResponseTypedDict, + ) from .updatebankfeedaccountresponse import ( UpdateBankFeedAccountResponse, UpdateBankFeedAccountResponseTypedDict, @@ -4407,6 +4481,42 @@ "AccountingBalanceSheetOneRequestTypedDict", "AccountingBalanceSheetOneResponse", "AccountingBalanceSheetOneResponseTypedDict", + "AccountingBankAccount", + "AccountingBankAccountAccountType", + "AccountingBankAccountInput", + "AccountingBankAccountInputTypedDict", + "AccountingBankAccountStatus", + "AccountingBankAccountTypedDict", + "AccountingBankAccountsAddGlobals", + "AccountingBankAccountsAddGlobalsTypedDict", + "AccountingBankAccountsAddRequest", + "AccountingBankAccountsAddRequestTypedDict", + "AccountingBankAccountsAddResponse", + "AccountingBankAccountsAddResponseTypedDict", + "AccountingBankAccountsAllGlobals", + "AccountingBankAccountsAllGlobalsTypedDict", + "AccountingBankAccountsAllRequest", + "AccountingBankAccountsAllRequestTypedDict", + "AccountingBankAccountsAllResponse", + "AccountingBankAccountsAllResponseTypedDict", + "AccountingBankAccountsDeleteGlobals", + "AccountingBankAccountsDeleteGlobalsTypedDict", + "AccountingBankAccountsDeleteRequest", + "AccountingBankAccountsDeleteRequestTypedDict", + "AccountingBankAccountsDeleteResponse", + "AccountingBankAccountsDeleteResponseTypedDict", + "AccountingBankAccountsOneGlobals", + "AccountingBankAccountsOneGlobalsTypedDict", + "AccountingBankAccountsOneRequest", + "AccountingBankAccountsOneRequestTypedDict", + "AccountingBankAccountsOneResponse", + "AccountingBankAccountsOneResponseTypedDict", + "AccountingBankAccountsUpdateGlobals", + "AccountingBankAccountsUpdateGlobalsTypedDict", + "AccountingBankAccountsUpdateRequest", + "AccountingBankAccountsUpdateRequestTypedDict", + "AccountingBankAccountsUpdateResponse", + "AccountingBankAccountsUpdateResponseTypedDict", "AccountingBankFeedAccountsAddGlobals", "AccountingBankFeedAccountsAddGlobalsTypedDict", "AccountingBankFeedAccountsAddRequest", @@ -5203,6 +5313,11 @@ "BankAccount1TypedDict", "BankAccountType", "BankAccountTypedDict", + "BankAccountsFilter", + "BankAccountsFilterStatus", + "BankAccountsFilterTypedDict", + "BankAccountsSort", + "BankAccountsSortTypedDict", "BankFeedAccount", "BankFeedAccountInput", "BankFeedAccountInputTypedDict", @@ -5415,6 +5530,8 @@ "CreateApplicationResponseTypedDict", "CreateAttachmentResponse", "CreateAttachmentResponseTypedDict", + "CreateBankAccountResponse", + "CreateBankAccountResponseTypedDict", "CreateBankFeedAccountResponse", "CreateBankFeedAccountResponseTypedDict", "CreateBankFeedStatementResponse", @@ -5894,6 +6011,8 @@ "DeleteApplicationResponseTypedDict", "DeleteAttachmentResponse", "DeleteAttachmentResponseTypedDict", + "DeleteBankAccountResponse", + "DeleteBankAccountResponseTypedDict", "DeleteBankFeedAccountResponse", "DeleteBankFeedAccountResponseTypedDict", "DeleteBankFeedStatementResponse", @@ -6400,6 +6519,10 @@ "GetAttachmentsResponseTypedDict", "GetBalanceSheetResponse", "GetBalanceSheetResponseTypedDict", + "GetBankAccountResponse", + "GetBankAccountResponseTypedDict", + "GetBankAccountsResponse", + "GetBankAccountsResponseTypedDict", "GetBankFeedAccountResponse", "GetBankFeedAccountResponseTypedDict", "GetBankFeedAccountsResponse", @@ -7233,6 +7356,7 @@ "SocialLinkTypedDict", "SocialLinks", "SocialLinksTypedDict", + "SortBy", "SortDirection", "Stage", "StageTypedDict", @@ -7343,6 +7467,8 @@ "UpdateApplicantResponseTypedDict", "UpdateApplicationResponse", "UpdateApplicationResponseTypedDict", + "UpdateBankAccountResponse", + "UpdateBankAccountResponseTypedDict", "UpdateBankFeedAccountResponse", "UpdateBankFeedAccountResponseTypedDict", "UpdateBankFeedStatementResponse", @@ -7716,6 +7842,36 @@ "AccountingBalanceSheetOneRequestTypedDict": ".accounting_balancesheetoneop", "AccountingBalanceSheetOneResponse": ".accounting_balancesheetoneop", "AccountingBalanceSheetOneResponseTypedDict": ".accounting_balancesheetoneop", + "AccountingBankAccountsAddGlobals": ".accounting_bankaccountsaddop", + "AccountingBankAccountsAddGlobalsTypedDict": ".accounting_bankaccountsaddop", + "AccountingBankAccountsAddRequest": ".accounting_bankaccountsaddop", + "AccountingBankAccountsAddRequestTypedDict": ".accounting_bankaccountsaddop", + "AccountingBankAccountsAddResponse": ".accounting_bankaccountsaddop", + "AccountingBankAccountsAddResponseTypedDict": ".accounting_bankaccountsaddop", + "AccountingBankAccountsAllGlobals": ".accounting_bankaccountsallop", + "AccountingBankAccountsAllGlobalsTypedDict": ".accounting_bankaccountsallop", + "AccountingBankAccountsAllRequest": ".accounting_bankaccountsallop", + "AccountingBankAccountsAllRequestTypedDict": ".accounting_bankaccountsallop", + "AccountingBankAccountsAllResponse": ".accounting_bankaccountsallop", + "AccountingBankAccountsAllResponseTypedDict": ".accounting_bankaccountsallop", + "AccountingBankAccountsDeleteGlobals": ".accounting_bankaccountsdeleteop", + "AccountingBankAccountsDeleteGlobalsTypedDict": ".accounting_bankaccountsdeleteop", + "AccountingBankAccountsDeleteRequest": ".accounting_bankaccountsdeleteop", + "AccountingBankAccountsDeleteRequestTypedDict": ".accounting_bankaccountsdeleteop", + "AccountingBankAccountsDeleteResponse": ".accounting_bankaccountsdeleteop", + "AccountingBankAccountsDeleteResponseTypedDict": ".accounting_bankaccountsdeleteop", + "AccountingBankAccountsOneGlobals": ".accounting_bankaccountsoneop", + "AccountingBankAccountsOneGlobalsTypedDict": ".accounting_bankaccountsoneop", + "AccountingBankAccountsOneRequest": ".accounting_bankaccountsoneop", + "AccountingBankAccountsOneRequestTypedDict": ".accounting_bankaccountsoneop", + "AccountingBankAccountsOneResponse": ".accounting_bankaccountsoneop", + "AccountingBankAccountsOneResponseTypedDict": ".accounting_bankaccountsoneop", + "AccountingBankAccountsUpdateGlobals": ".accounting_bankaccountsupdateop", + "AccountingBankAccountsUpdateGlobalsTypedDict": ".accounting_bankaccountsupdateop", + "AccountingBankAccountsUpdateRequest": ".accounting_bankaccountsupdateop", + "AccountingBankAccountsUpdateRequestTypedDict": ".accounting_bankaccountsupdateop", + "AccountingBankAccountsUpdateResponse": ".accounting_bankaccountsupdateop", + "AccountingBankAccountsUpdateResponseTypedDict": ".accounting_bankaccountsupdateop", "AccountingBankFeedAccountsAddGlobals": ".accounting_bankfeedaccountsaddop", "AccountingBankFeedAccountsAddGlobalsTypedDict": ".accounting_bankfeedaccountsaddop", "AccountingBankFeedAccountsAddRequest": ".accounting_bankfeedaccountsaddop", @@ -8340,6 +8496,12 @@ "AccountingTrackingCategoriesUpdateRequestTypedDict": ".accounting_trackingcategoriesupdateop", "AccountingTrackingCategoriesUpdateResponse": ".accounting_trackingcategoriesupdateop", "AccountingTrackingCategoriesUpdateResponseTypedDict": ".accounting_trackingcategoriesupdateop", + "AccountingBankAccount": ".accountingbankaccount", + "AccountingBankAccountAccountType": ".accountingbankaccount", + "AccountingBankAccountInput": ".accountingbankaccount", + "AccountingBankAccountInputTypedDict": ".accountingbankaccount", + "AccountingBankAccountStatus": ".accountingbankaccount", + "AccountingBankAccountTypedDict": ".accountingbankaccount", "AccountingDepartment": ".accountingdepartment", "AccountingDepartmentInput": ".accountingdepartment", "AccountingDepartmentInputTypedDict": ".accountingdepartment", @@ -8533,6 +8695,12 @@ "BankAccount1": ".bankaccount1", "BankAccount1AccountType": ".bankaccount1", "BankAccount1TypedDict": ".bankaccount1", + "BankAccountsFilter": ".bankaccountsfilter", + "BankAccountsFilterStatus": ".bankaccountsfilter", + "BankAccountsFilterTypedDict": ".bankaccountsfilter", + "BankAccountsSort": ".bankaccountssort", + "BankAccountsSortTypedDict": ".bankaccountssort", + "SortBy": ".bankaccountssort", "BankAccountType": ".bankfeedaccount", "BankFeedAccount": ".bankfeedaccount", "BankFeedAccountInput": ".bankfeedaccount", @@ -8757,6 +8925,8 @@ "CreateApplicationResponseTypedDict": ".createapplicationresponse", "CreateAttachmentResponse": ".createattachmentresponse", "CreateAttachmentResponseTypedDict": ".createattachmentresponse", + "CreateBankAccountResponse": ".createbankaccountresponse", + "CreateBankAccountResponseTypedDict": ".createbankaccountresponse", "CreateBankFeedAccountResponse": ".createbankfeedaccountresponse", "CreateBankFeedAccountResponseTypedDict": ".createbankfeedaccountresponse", "CreateBankFeedStatementResponse": ".createbankfeedstatementresponse", @@ -9233,6 +9403,8 @@ "DeleteApplicationResponseTypedDict": ".deleteapplicationresponse", "DeleteAttachmentResponse": ".deleteattachmentresponse", "DeleteAttachmentResponseTypedDict": ".deleteattachmentresponse", + "DeleteBankAccountResponse": ".deletebankaccountresponse", + "DeleteBankAccountResponseTypedDict": ".deletebankaccountresponse", "DeleteBankFeedAccountResponse": ".deletebankfeedaccountresponse", "DeleteBankFeedAccountResponseTypedDict": ".deletebankfeedaccountresponse", "DeleteBankFeedStatementResponse": ".deletebankfeedstatementresponse", @@ -9733,6 +9905,10 @@ "GetAttachmentsResponseTypedDict": ".getattachmentsresponse", "GetBalanceSheetResponse": ".getbalancesheetresponse", "GetBalanceSheetResponseTypedDict": ".getbalancesheetresponse", + "GetBankAccountResponse": ".getbankaccountresponse", + "GetBankAccountResponseTypedDict": ".getbankaccountresponse", + "GetBankAccountsResponse": ".getbankaccountsresponse", + "GetBankAccountsResponseTypedDict": ".getbankaccountsresponse", "GetBankFeedAccountResponse": ".getbankfeedaccountresponse", "GetBankFeedAccountResponseTypedDict": ".getbankfeedaccountresponse", "GetBankFeedAccountsResponse": ".getbankfeedaccountsresponse", @@ -10661,6 +10837,8 @@ "UpdateApplicantResponseTypedDict": ".updateapplicantresponse", "UpdateApplicationResponse": ".updateapplicationresponse", "UpdateApplicationResponseTypedDict": ".updateapplicationresponse", + "UpdateBankAccountResponse": ".updatebankaccountresponse", + "UpdateBankAccountResponseTypedDict": ".updatebankaccountresponse", "UpdateBankFeedAccountResponse": ".updatebankfeedaccountresponse", "UpdateBankFeedAccountResponseTypedDict": ".updatebankfeedaccountresponse", "UpdateBankFeedStatementResponse": ".updatebankfeedstatementresponse", diff --git a/src/apideck_unify/models/accounting_bankaccountsaddop.py b/src/apideck_unify/models/accounting_bankaccountsaddop.py new file mode 100644 index 00000000..6ca8e422 --- /dev/null +++ b/src/apideck_unify/models/accounting_bankaccountsaddop.py @@ -0,0 +1,113 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .accountingbankaccount import ( + AccountingBankAccountInput, + AccountingBankAccountInputTypedDict, +) +from .createbankaccountresponse import ( + CreateBankAccountResponse, + CreateBankAccountResponseTypedDict, +) +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 AccountingBankAccountsAddGlobalsTypedDict(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 AccountingBankAccountsAddGlobals(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 AccountingBankAccountsAddRequestTypedDict(TypedDict): + accounting_bank_account: AccountingBankAccountInputTypedDict + 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 AccountingBankAccountsAddRequest(BaseModel): + accounting_bank_account: Annotated[ + AccountingBankAccountInput, + 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 AccountingBankAccountsAddResponseTypedDict(TypedDict): + http_meta: HTTPMetadataTypedDict + create_bank_account_response: NotRequired[CreateBankAccountResponseTypedDict] + r"""Bank Account created""" + unexpected_error_response: NotRequired[UnexpectedErrorResponseTypedDict] + r"""Unexpected error""" + + +class AccountingBankAccountsAddResponse(BaseModel): + http_meta: Annotated[Optional[HTTPMetadata], pydantic.Field(exclude=True)] = None + + create_bank_account_response: Optional[CreateBankAccountResponse] = None + r"""Bank Account created""" + + unexpected_error_response: Optional[UnexpectedErrorResponse] = None + r"""Unexpected error""" diff --git a/src/apideck_unify/models/accounting_bankaccountsallop.py b/src/apideck_unify/models/accounting_bankaccountsallop.py new file mode 100644 index 00000000..fc00a8ca --- /dev/null +++ b/src/apideck_unify/models/accounting_bankaccountsallop.py @@ -0,0 +1,199 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .bankaccountsfilter import BankAccountsFilter, BankAccountsFilterTypedDict +from .bankaccountssort import BankAccountsSort, BankAccountsSortTypedDict +from .getbankaccountsresponse import ( + GetBankAccountsResponse, + GetBankAccountsResponseTypedDict, +) +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 AccountingBankAccountsAllGlobalsTypedDict(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 AccountingBankAccountsAllGlobals(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 AccountingBankAccountsAllRequestTypedDict(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""" + filter_: NotRequired[BankAccountsFilterTypedDict] + r"""Apply filters""" + sort: NotRequired[BankAccountsSortTypedDict] + r"""Apply sorting""" + 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 AccountingBankAccountsAllRequest(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""" + + filter_: Annotated[ + Optional[BankAccountsFilter], + pydantic.Field(alias="filter"), + FieldMetadata(query=QueryParamMetadata(style="deepObject", explode=True)), + ] = None + r"""Apply filters""" + + sort: Annotated[ + Optional[BankAccountsSort], + FieldMetadata(query=QueryParamMetadata(style="deepObject", explode=True)), + ] = None + r"""Apply sorting""" + + 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", + "filter", + "sort", + "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 AccountingBankAccountsAllResponseTypedDict(TypedDict): + http_meta: HTTPMetadataTypedDict + get_bank_accounts_response: NotRequired[GetBankAccountsResponseTypedDict] + r"""Bank Accounts""" + unexpected_error_response: NotRequired[UnexpectedErrorResponseTypedDict] + r"""Unexpected error""" + + +class AccountingBankAccountsAllResponse(BaseModel): + next: Callable[[], Optional[AccountingBankAccountsAllResponse]] + + http_meta: Annotated[Optional[HTTPMetadata], pydantic.Field(exclude=True)] = None + + get_bank_accounts_response: Optional[GetBankAccountsResponse] = None + r"""Bank Accounts""" + + unexpected_error_response: Optional[UnexpectedErrorResponse] = None + r"""Unexpected error""" diff --git a/src/apideck_unify/models/accounting_bankaccountsdeleteop.py b/src/apideck_unify/models/accounting_bankaccountsdeleteop.py new file mode 100644 index 00000000..db03e0fd --- /dev/null +++ b/src/apideck_unify/models/accounting_bankaccountsdeleteop.py @@ -0,0 +1,110 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .deletebankaccountresponse import ( + DeleteBankAccountResponse, + DeleteBankAccountResponseTypedDict, +) +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 AccountingBankAccountsDeleteGlobalsTypedDict(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 AccountingBankAccountsDeleteGlobals(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 AccountingBankAccountsDeleteRequestTypedDict(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 AccountingBankAccountsDeleteRequest(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 AccountingBankAccountsDeleteResponseTypedDict(TypedDict): + http_meta: HTTPMetadataTypedDict + delete_bank_account_response: NotRequired[DeleteBankAccountResponseTypedDict] + r"""Bank Account deleted""" + unexpected_error_response: NotRequired[UnexpectedErrorResponseTypedDict] + r"""Unexpected error""" + + +class AccountingBankAccountsDeleteResponse(BaseModel): + http_meta: Annotated[Optional[HTTPMetadata], pydantic.Field(exclude=True)] = None + + delete_bank_account_response: Optional[DeleteBankAccountResponse] = None + r"""Bank Account deleted""" + + unexpected_error_response: Optional[UnexpectedErrorResponse] = None + r"""Unexpected error""" diff --git a/src/apideck_unify/models/accounting_bankaccountsoneop.py b/src/apideck_unify/models/accounting_bankaccountsoneop.py new file mode 100644 index 00000000..38102e2f --- /dev/null +++ b/src/apideck_unify/models/accounting_bankaccountsoneop.py @@ -0,0 +1,155 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .getbankaccountresponse import ( + GetBankAccountResponse, + GetBankAccountResponseTypedDict, +) +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 AccountingBankAccountsOneGlobalsTypedDict(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 AccountingBankAccountsOneGlobals(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 AccountingBankAccountsOneRequestTypedDict(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 AccountingBankAccountsOneRequest(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 AccountingBankAccountsOneResponseTypedDict(TypedDict): + http_meta: HTTPMetadataTypedDict + get_bank_account_response: NotRequired[GetBankAccountResponseTypedDict] + r"""Bank Account""" + unexpected_error_response: NotRequired[UnexpectedErrorResponseTypedDict] + r"""Unexpected error""" + + +class AccountingBankAccountsOneResponse(BaseModel): + http_meta: Annotated[Optional[HTTPMetadata], pydantic.Field(exclude=True)] = None + + get_bank_account_response: Optional[GetBankAccountResponse] = None + r"""Bank Account""" + + unexpected_error_response: Optional[UnexpectedErrorResponse] = None + r"""Unexpected error""" diff --git a/src/apideck_unify/models/accounting_bankaccountsupdateop.py b/src/apideck_unify/models/accounting_bankaccountsupdateop.py new file mode 100644 index 00000000..5c2739ac --- /dev/null +++ b/src/apideck_unify/models/accounting_bankaccountsupdateop.py @@ -0,0 +1,121 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .accountingbankaccount import ( + AccountingBankAccountInput, + AccountingBankAccountInputTypedDict, +) +from .httpmetadata import HTTPMetadata, HTTPMetadataTypedDict +from .unexpectederrorresponse import ( + UnexpectedErrorResponse, + UnexpectedErrorResponseTypedDict, +) +from .updatebankaccountresponse import ( + UpdateBankAccountResponse, + UpdateBankAccountResponseTypedDict, +) +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 AccountingBankAccountsUpdateGlobalsTypedDict(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 AccountingBankAccountsUpdateGlobals(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 AccountingBankAccountsUpdateRequestTypedDict(TypedDict): + id: str + r"""ID of the record you are acting upon.""" + accounting_bank_account: AccountingBankAccountInputTypedDict + 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 AccountingBankAccountsUpdateRequest(BaseModel): + id: Annotated[ + str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False)) + ] + r"""ID of the record you are acting upon.""" + + accounting_bank_account: Annotated[ + AccountingBankAccountInput, + 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 AccountingBankAccountsUpdateResponseTypedDict(TypedDict): + http_meta: HTTPMetadataTypedDict + update_bank_account_response: NotRequired[UpdateBankAccountResponseTypedDict] + r"""Bank Account updated""" + unexpected_error_response: NotRequired[UnexpectedErrorResponseTypedDict] + r"""Unexpected error""" + + +class AccountingBankAccountsUpdateResponse(BaseModel): + http_meta: Annotated[Optional[HTTPMetadata], pydantic.Field(exclude=True)] = None + + update_bank_account_response: Optional[UpdateBankAccountResponse] = None + r"""Bank Account updated""" + + unexpected_error_response: Optional[UnexpectedErrorResponse] = None + r"""Unexpected error""" diff --git a/src/apideck_unify/models/accountingbankaccount.py b/src/apideck_unify/models/accountingbankaccount.py new file mode 100644 index 00000000..0cc1a4a1 --- /dev/null +++ b/src/apideck_unify/models/accountingbankaccount.py @@ -0,0 +1,406 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .currency import Currency +from .customfield import CustomField, CustomFieldTypedDict +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 Any, Dict, List, Optional +from typing_extensions import NotRequired, TypedDict + + +class AccountingBankAccountAccountType(str, Enum): + r"""The type of bank account""" + + CHECKING = "checking" + SAVINGS = "savings" + CREDIT_CARD = "credit_card" + MONEY_MARKET = "money_market" + LINE_OF_CREDIT = "line_of_credit" + OTHER = "other" + + +class AccountingBankAccountStatus(str, Enum): + r"""The status of the bank account""" + + ACTIVE = "active" + INACTIVE = "inactive" + CLOSED = "closed" + + +class AccountingBankAccountTypedDict(TypedDict): + id: str + r"""A unique identifier for an object.""" + display_id: NotRequired[Nullable[str]] + r"""Display ID for the bank account""" + name: NotRequired[str] + r"""The name of the bank account as it appears in the accounting system""" + account_number: NotRequired[Nullable[str]] + r"""The bank account number""" + account_type: NotRequired[AccountingBankAccountAccountType] + r"""The type of bank account""" + bank_name: NotRequired[Nullable[str]] + r"""The name of the bank or financial institution""" + 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).""" + balance: NotRequired[Nullable[float]] + r"""The current balance of the bank account""" + available_balance: NotRequired[Nullable[float]] + r"""The available balance (considering pending transactions and overdraft)""" + overdraft_limit: NotRequired[Nullable[float]] + r"""The overdraft limit for the account""" + routing_number: NotRequired[Nullable[str]] + r"""Bank routing number (US)""" + iban: NotRequired[Nullable[str]] + r"""International Bank Account Number""" + bic: NotRequired[Nullable[str]] + r"""Bank Identifier Code / SWIFT Code""" + bsb_number: NotRequired[Nullable[str]] + r"""Bank State Branch number (Australia/New Zealand)""" + branch_identifier: NotRequired[Nullable[str]] + r"""Bank branch identifier""" + bank_code: NotRequired[Nullable[str]] + r"""Bank code assigned by central bank""" + country: NotRequired[Nullable[str]] + r"""Country code according to ISO 3166-1 alpha-2.""" + status: NotRequired[Nullable[AccountingBankAccountStatus]] + r"""The status of the bank account""" + description: NotRequired[Nullable[str]] + r"""Description or notes about the bank account""" + custom_fields: NotRequired[List[CustomFieldTypedDict]] + custom_mappings: NotRequired[Nullable[Dict[str, Any]]] + 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.""" + created_by: NotRequired[Nullable[str]] + r"""The user who created the object.""" + updated_by: NotRequired[Nullable[str]] + r"""The user who last updated the object.""" + + +class AccountingBankAccount(BaseModel): + id: str + r"""A unique identifier for an object.""" + + display_id: OptionalNullable[str] = UNSET + r"""Display ID for the bank account""" + + name: Optional[str] = None + r"""The name of the bank account as it appears in the accounting system""" + + account_number: OptionalNullable[str] = UNSET + r"""The bank account number""" + + account_type: Optional[AccountingBankAccountAccountType] = None + r"""The type of bank account""" + + bank_name: OptionalNullable[str] = UNSET + r"""The name of the bank or financial institution""" + + 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).""" + + balance: OptionalNullable[float] = UNSET + r"""The current balance of the bank account""" + + available_balance: OptionalNullable[float] = UNSET + r"""The available balance (considering pending transactions and overdraft)""" + + overdraft_limit: OptionalNullable[float] = UNSET + r"""The overdraft limit for the account""" + + routing_number: OptionalNullable[str] = UNSET + r"""Bank routing number (US)""" + + iban: OptionalNullable[str] = UNSET + r"""International Bank Account Number""" + + bic: OptionalNullable[str] = UNSET + r"""Bank Identifier Code / SWIFT Code""" + + bsb_number: OptionalNullable[str] = UNSET + r"""Bank State Branch number (Australia/New Zealand)""" + + branch_identifier: OptionalNullable[str] = UNSET + r"""Bank branch identifier""" + + bank_code: OptionalNullable[str] = UNSET + r"""Bank code assigned by central bank""" + + country: OptionalNullable[str] = UNSET + r"""Country code according to ISO 3166-1 alpha-2.""" + + status: OptionalNullable[AccountingBankAccountStatus] = UNSET + r"""The status of the bank account""" + + description: OptionalNullable[str] = UNSET + r"""Description or notes about the bank account""" + + custom_fields: Optional[List[CustomField]] = None + + custom_mappings: OptionalNullable[Dict[str, Any]] = 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.""" + + created_by: OptionalNullable[str] = UNSET + r"""The user who created the object.""" + + updated_by: OptionalNullable[str] = UNSET + r"""The user who last updated the object.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = [ + "display_id", + "name", + "account_number", + "account_type", + "bank_name", + "currency", + "balance", + "available_balance", + "overdraft_limit", + "routing_number", + "iban", + "bic", + "bsb_number", + "branch_identifier", + "bank_code", + "country", + "status", + "description", + "custom_fields", + "custom_mappings", + "created_at", + "updated_at", + "created_by", + "updated_by", + ] + nullable_fields = [ + "display_id", + "account_number", + "bank_name", + "currency", + "balance", + "available_balance", + "overdraft_limit", + "routing_number", + "iban", + "bic", + "bsb_number", + "branch_identifier", + "bank_code", + "country", + "status", + "description", + "custom_mappings", + "created_at", + "updated_at", + "created_by", + "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 AccountingBankAccountInputTypedDict(TypedDict): + display_id: NotRequired[Nullable[str]] + r"""Display ID for the bank account""" + name: NotRequired[str] + r"""The name of the bank account as it appears in the accounting system""" + account_number: NotRequired[Nullable[str]] + r"""The bank account number""" + account_type: NotRequired[AccountingBankAccountAccountType] + r"""The type of bank account""" + bank_name: NotRequired[Nullable[str]] + r"""The name of the bank or financial institution""" + 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).""" + balance: NotRequired[Nullable[float]] + r"""The current balance of the bank account""" + available_balance: NotRequired[Nullable[float]] + r"""The available balance (considering pending transactions and overdraft)""" + overdraft_limit: NotRequired[Nullable[float]] + r"""The overdraft limit for the account""" + routing_number: NotRequired[Nullable[str]] + r"""Bank routing number (US)""" + iban: NotRequired[Nullable[str]] + r"""International Bank Account Number""" + bic: NotRequired[Nullable[str]] + r"""Bank Identifier Code / SWIFT Code""" + bsb_number: NotRequired[Nullable[str]] + r"""Bank State Branch number (Australia/New Zealand)""" + branch_identifier: NotRequired[Nullable[str]] + r"""Bank branch identifier""" + bank_code: NotRequired[Nullable[str]] + r"""Bank code assigned by central bank""" + country: NotRequired[Nullable[str]] + r"""Country code according to ISO 3166-1 alpha-2.""" + status: NotRequired[Nullable[AccountingBankAccountStatus]] + r"""The status of the bank account""" + description: NotRequired[Nullable[str]] + r"""Description or notes about the bank account""" + custom_fields: NotRequired[List[CustomFieldTypedDict]] + + +class AccountingBankAccountInput(BaseModel): + display_id: OptionalNullable[str] = UNSET + r"""Display ID for the bank account""" + + name: Optional[str] = None + r"""The name of the bank account as it appears in the accounting system""" + + account_number: OptionalNullable[str] = UNSET + r"""The bank account number""" + + account_type: Optional[AccountingBankAccountAccountType] = None + r"""The type of bank account""" + + bank_name: OptionalNullable[str] = UNSET + r"""The name of the bank or financial institution""" + + 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).""" + + balance: OptionalNullable[float] = UNSET + r"""The current balance of the bank account""" + + available_balance: OptionalNullable[float] = UNSET + r"""The available balance (considering pending transactions and overdraft)""" + + overdraft_limit: OptionalNullable[float] = UNSET + r"""The overdraft limit for the account""" + + routing_number: OptionalNullable[str] = UNSET + r"""Bank routing number (US)""" + + iban: OptionalNullable[str] = UNSET + r"""International Bank Account Number""" + + bic: OptionalNullable[str] = UNSET + r"""Bank Identifier Code / SWIFT Code""" + + bsb_number: OptionalNullable[str] = UNSET + r"""Bank State Branch number (Australia/New Zealand)""" + + branch_identifier: OptionalNullable[str] = UNSET + r"""Bank branch identifier""" + + bank_code: OptionalNullable[str] = UNSET + r"""Bank code assigned by central bank""" + + country: OptionalNullable[str] = UNSET + r"""Country code according to ISO 3166-1 alpha-2.""" + + status: OptionalNullable[AccountingBankAccountStatus] = UNSET + r"""The status of the bank account""" + + description: OptionalNullable[str] = UNSET + r"""Description or notes about the bank account""" + + custom_fields: Optional[List[CustomField]] = None + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = [ + "display_id", + "name", + "account_number", + "account_type", + "bank_name", + "currency", + "balance", + "available_balance", + "overdraft_limit", + "routing_number", + "iban", + "bic", + "bsb_number", + "branch_identifier", + "bank_code", + "country", + "status", + "description", + "custom_fields", + ] + nullable_fields = [ + "display_id", + "account_number", + "bank_name", + "currency", + "balance", + "available_balance", + "overdraft_limit", + "routing_number", + "iban", + "bic", + "bsb_number", + "branch_identifier", + "bank_code", + "country", + "status", + "description", + ] + 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/apideckerror.py b/src/apideck_unify/models/apideckerror.py index 81abbbbc..9d9ded4e 100644 --- a/src/apideck_unify/models/apideckerror.py +++ b/src/apideck_unify/models/apideckerror.py @@ -2,25 +2,29 @@ import httpx from typing import Optional +from dataclasses import dataclass, field +@dataclass(frozen=True) class ApideckError(Exception): """The base class for all HTTP error responses.""" message: str status_code: int body: str - headers: httpx.Headers - raw_response: httpx.Response + headers: httpx.Headers = field(hash=False) + raw_response: httpx.Response = field(hash=False) def __init__( self, message: str, raw_response: httpx.Response, body: Optional[str] = None ): - self.message = message - self.status_code = raw_response.status_code - self.body = body if body is not None else raw_response.text - self.headers = raw_response.headers - self.raw_response = raw_response + object.__setattr__(self, "message", message) + object.__setattr__(self, "status_code", raw_response.status_code) + object.__setattr__( + self, "body", body if body is not None else raw_response.text + ) + object.__setattr__(self, "headers", raw_response.headers) + object.__setattr__(self, "raw_response", raw_response) def __str__(self): return self.message diff --git a/src/apideck_unify/models/apierror.py b/src/apideck_unify/models/apierror.py index 91d12df7..35496ec8 100644 --- a/src/apideck_unify/models/apierror.py +++ b/src/apideck_unify/models/apierror.py @@ -2,12 +2,14 @@ import httpx from typing import Optional +from dataclasses import dataclass from apideck_unify.models import ApideckError MAX_MESSAGE_LEN = 10_000 +@dataclass(frozen=True) class APIError(ApideckError): """The fallback error class if no more specific error class is matched.""" diff --git a/src/apideck_unify/models/badrequestresponse.py b/src/apideck_unify/models/badrequestresponse.py index 0e1d28cb..c87eeb62 100644 --- a/src/apideck_unify/models/badrequestresponse.py +++ b/src/apideck_unify/models/badrequestresponse.py @@ -3,6 +3,7 @@ from __future__ import annotations from apideck_unify.models import ApideckError from apideck_unify.types import BaseModel +from dataclasses import dataclass, field import httpx from typing import Any, Dict, Optional, Union from typing_extensions import TypeAliasType @@ -40,10 +41,11 @@ class BadRequestResponseData(BaseModel): r"""Link to documentation of error type""" +@dataclass(frozen=True) class BadRequestResponse(ApideckError): r"""Bad Request""" - data: BadRequestResponseData + data: BadRequestResponseData = field(hash=False) def __init__( self, @@ -54,4 +56,4 @@ def __init__( fallback = body or raw_response.text message = str(data.message) or fallback super().__init__(message, raw_response, body) - self.data = data + object.__setattr__(self, "data", data) diff --git a/src/apideck_unify/models/bankaccountsfilter.py b/src/apideck_unify/models/bankaccountsfilter.py new file mode 100644 index 00000000..cc2b55a8 --- /dev/null +++ b/src/apideck_unify/models/bankaccountsfilter.py @@ -0,0 +1,33 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from apideck_unify.types import BaseModel +from apideck_unify.utils import FieldMetadata +from enum import Enum +from typing import Optional +from typing_extensions import Annotated, NotRequired, TypedDict + + +class BankAccountsFilterStatus(str, Enum): + r"""Filter by account status""" + + ACTIVE = "active" + INACTIVE = "inactive" + CLOSED = "closed" + + +class BankAccountsFilterTypedDict(TypedDict): + name: NotRequired[str] + r"""Filter by bank account name""" + status: NotRequired[BankAccountsFilterStatus] + r"""Filter by account status""" + + +class BankAccountsFilter(BaseModel): + name: Annotated[Optional[str], FieldMetadata(query=True)] = None + r"""Filter by bank account name""" + + status: Annotated[Optional[BankAccountsFilterStatus], FieldMetadata(query=True)] = ( + None + ) + r"""Filter by account status""" diff --git a/src/apideck_unify/models/bankaccountssort.py b/src/apideck_unify/models/bankaccountssort.py new file mode 100644 index 00000000..30baa39e --- /dev/null +++ b/src/apideck_unify/models/bankaccountssort.py @@ -0,0 +1,33 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .sortdirection import SortDirection +from apideck_unify.types import BaseModel +from apideck_unify.utils import FieldMetadata +from enum import Enum +from typing import Optional +from typing_extensions import Annotated, NotRequired, TypedDict + + +class SortBy(str, Enum): + r"""The field to sort by""" + + CREATED_AT = "created_at" + UPDATED_AT = "updated_at" + + +class BankAccountsSortTypedDict(TypedDict): + by: NotRequired[SortBy] + r"""The field to sort by""" + direction: NotRequired[SortDirection] + r"""The direction in which to sort the results""" + + +class BankAccountsSort(BaseModel): + by: Annotated[Optional[SortBy], FieldMetadata(query=True)] = SortBy.UPDATED_AT + r"""The field to sort by""" + + direction: Annotated[Optional[SortDirection], FieldMetadata(query=True)] = ( + SortDirection.ASC + ) + r"""The direction in which to sort the results""" diff --git a/src/apideck_unify/models/createbankaccountresponse.py b/src/apideck_unify/models/createbankaccountresponse.py new file mode 100644 index 00000000..82758dd8 --- /dev/null +++ b/src/apideck_unify/models/createbankaccountresponse.py @@ -0,0 +1,46 @@ +"""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 +from typing import Optional +from typing_extensions import NotRequired, TypedDict + + +class CreateBankAccountResponseTypedDict(TypedDict): + r"""Bank Account created""" + + status_code: int + r"""HTTP Response Status Code""" + status: str + r"""HTTP Response Status""" + data: UnifiedIDTypedDict + r"""A object containing a unique identifier for the resource that was created, updated, or deleted.""" + service: NotRequired[str] + r"""Apideck ID of service provider""" + resource: NotRequired[str] + r"""Unified API resource name""" + operation: NotRequired[str] + r"""Operation performed""" + + +class CreateBankAccountResponse(BaseModel): + r"""Bank Account created""" + + status_code: int + r"""HTTP Response Status Code""" + + status: str + r"""HTTP Response Status""" + + data: UnifiedID + r"""A object containing a unique identifier for the resource that was created, updated, or deleted.""" + + service: Optional[str] = None + r"""Apideck ID of service provider""" + + resource: Optional[str] = None + r"""Unified API resource name""" + + operation: Optional[str] = None + r"""Operation performed""" diff --git a/src/apideck_unify/models/deletebankaccountresponse.py b/src/apideck_unify/models/deletebankaccountresponse.py new file mode 100644 index 00000000..2b5ca37e --- /dev/null +++ b/src/apideck_unify/models/deletebankaccountresponse.py @@ -0,0 +1,46 @@ +"""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 +from typing import Optional +from typing_extensions import NotRequired, TypedDict + + +class DeleteBankAccountResponseTypedDict(TypedDict): + r"""Bank Account deleted""" + + status_code: int + r"""HTTP Response Status Code""" + status: str + r"""HTTP Response Status""" + data: UnifiedIDTypedDict + r"""A object containing a unique identifier for the resource that was created, updated, or deleted.""" + service: NotRequired[str] + r"""Apideck ID of service provider""" + resource: NotRequired[str] + r"""Unified API resource name""" + operation: NotRequired[str] + r"""Operation performed""" + + +class DeleteBankAccountResponse(BaseModel): + r"""Bank Account deleted""" + + status_code: int + r"""HTTP Response Status Code""" + + status: str + r"""HTTP Response Status""" + + data: UnifiedID + r"""A object containing a unique identifier for the resource that was created, updated, or deleted.""" + + service: Optional[str] = None + r"""Apideck ID of service provider""" + + resource: Optional[str] = None + r"""Unified API resource name""" + + operation: Optional[str] = None + r"""Operation performed""" diff --git a/src/apideck_unify/models/getbankaccountresponse.py b/src/apideck_unify/models/getbankaccountresponse.py new file mode 100644 index 00000000..2339be06 --- /dev/null +++ b/src/apideck_unify/models/getbankaccountresponse.py @@ -0,0 +1,44 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .accountingbankaccount import AccountingBankAccount, AccountingBankAccountTypedDict +from apideck_unify.types import BaseModel +from typing import Optional +from typing_extensions import NotRequired, TypedDict + + +class GetBankAccountResponseTypedDict(TypedDict): + r"""Bank Account""" + + status_code: int + r"""HTTP Response Status Code""" + status: str + r"""HTTP Response Status""" + data: AccountingBankAccountTypedDict + service: NotRequired[str] + r"""Apideck ID of service provider""" + resource: NotRequired[str] + r"""Unified API resource name""" + operation: NotRequired[str] + r"""Operation performed""" + + +class GetBankAccountResponse(BaseModel): + r"""Bank Account""" + + status_code: int + r"""HTTP Response Status Code""" + + status: str + r"""HTTP Response Status""" + + data: AccountingBankAccount + + service: Optional[str] = None + r"""Apideck ID of service provider""" + + resource: Optional[str] = None + r"""Unified API resource name""" + + operation: Optional[str] = None + r"""Operation performed""" diff --git a/src/apideck_unify/models/getbankaccountsresponse.py b/src/apideck_unify/models/getbankaccountsresponse.py new file mode 100644 index 00000000..c25dad4d --- /dev/null +++ b/src/apideck_unify/models/getbankaccountsresponse.py @@ -0,0 +1,56 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .accountingbankaccount import AccountingBankAccount, AccountingBankAccountTypedDict +from .links import Links, LinksTypedDict +from .meta import Meta, MetaTypedDict +from apideck_unify.types import BaseModel +from typing import List, Optional +from typing_extensions import NotRequired, TypedDict + + +class GetBankAccountsResponseTypedDict(TypedDict): + r"""Bank Accounts""" + + status_code: int + r"""HTTP Response Status Code""" + status: str + r"""HTTP Response Status""" + data: List[AccountingBankAccountTypedDict] + service: NotRequired[str] + r"""Apideck ID of service provider""" + resource: NotRequired[str] + r"""Unified API resource name""" + operation: NotRequired[str] + r"""Operation performed""" + meta: NotRequired[MetaTypedDict] + r"""Response metadata""" + links: NotRequired[LinksTypedDict] + r"""Links to navigate to previous or next pages through the API""" + + +class GetBankAccountsResponse(BaseModel): + r"""Bank Accounts""" + + status_code: int + r"""HTTP Response Status Code""" + + status: str + r"""HTTP Response Status""" + + data: List[AccountingBankAccount] + + service: Optional[str] = None + r"""Apideck ID of service provider""" + + resource: Optional[str] = None + r"""Unified API resource name""" + + operation: Optional[str] = None + r"""Operation performed""" + + meta: Optional[Meta] = None + r"""Response metadata""" + + links: Optional[Links] = None + r"""Links to navigate to previous or next pages through the API""" diff --git a/src/apideck_unify/models/logsfilter.py b/src/apideck_unify/models/logsfilter.py index 7bbbb237..4b4a37f8 100644 --- a/src/apideck_unify/models/logsfilter.py +++ b/src/apideck_unify/models/logsfilter.py @@ -10,12 +10,16 @@ ) from apideck_unify.utils import FieldMetadata from pydantic import model_serializer +from typing import List from typing_extensions import Annotated, NotRequired, TypedDict class LogsFilterTypedDict(TypedDict): connector_id: NotRequired[Nullable[str]] status_code: NotRequired[Nullable[float]] + r"""Filter by a single HTTP status code. For backward compatibility - use status_codes for multiple values.""" + status_codes: NotRequired[Nullable[List[float]]] + r"""Filter by multiple HTTP status codes. Values must be between 100-599. Maximum 50 status codes allowed.""" exclude_unified_apis: NotRequired[Nullable[str]] @@ -23,6 +27,12 @@ class LogsFilter(BaseModel): connector_id: Annotated[OptionalNullable[str], FieldMetadata(query=True)] = UNSET status_code: Annotated[OptionalNullable[float], FieldMetadata(query=True)] = UNSET + r"""Filter by a single HTTP status code. For backward compatibility - use status_codes for multiple values.""" + + status_codes: Annotated[ + OptionalNullable[List[float]], FieldMetadata(query=True) + ] = UNSET + r"""Filter by multiple HTTP status codes. Values must be between 100-599. Maximum 50 status codes allowed.""" exclude_unified_apis: Annotated[ OptionalNullable[str], FieldMetadata(query=True) @@ -30,8 +40,18 @@ class LogsFilter(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = ["connector_id", "status_code", "exclude_unified_apis"] - nullable_fields = ["connector_id", "status_code", "exclude_unified_apis"] + optional_fields = [ + "connector_id", + "status_code", + "status_codes", + "exclude_unified_apis", + ] + nullable_fields = [ + "connector_id", + "status_code", + "status_codes", + "exclude_unified_apis", + ] null_default_fields = [] serialized = handler(self) diff --git a/src/apideck_unify/models/no_response_error.py b/src/apideck_unify/models/no_response_error.py index f98beea2..b710ea2b 100644 --- a/src/apideck_unify/models/no_response_error.py +++ b/src/apideck_unify/models/no_response_error.py @@ -1,12 +1,16 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" +from dataclasses import dataclass + + +@dataclass(frozen=True) class NoResponseError(Exception): """Error raised when no HTTP response is received from the server.""" message: str def __init__(self, message: str = "No response received"): - self.message = message + object.__setattr__(self, "message", message) super().__init__(message) def __str__(self): diff --git a/src/apideck_unify/models/notfoundresponse.py b/src/apideck_unify/models/notfoundresponse.py index 28447ab7..1def3961 100644 --- a/src/apideck_unify/models/notfoundresponse.py +++ b/src/apideck_unify/models/notfoundresponse.py @@ -3,6 +3,7 @@ from __future__ import annotations from apideck_unify.models import ApideckError from apideck_unify.types import BaseModel +from dataclasses import dataclass, field import httpx from typing import Any, Dict, Optional, Union from typing_extensions import TypeAliasType @@ -40,10 +41,11 @@ class NotFoundResponseData(BaseModel): r"""Link to documentation of error type""" +@dataclass(frozen=True) class NotFoundResponse(ApideckError): r"""The specified resource was not found""" - data: NotFoundResponseData + data: NotFoundResponseData = field(hash=False) def __init__( self, @@ -54,4 +56,4 @@ def __init__( fallback = body or raw_response.text message = str(data.message) or fallback super().__init__(message, raw_response, body) - self.data = data + object.__setattr__(self, "data", data) diff --git a/src/apideck_unify/models/paymentrequiredresponse.py b/src/apideck_unify/models/paymentrequiredresponse.py index cc926ff2..23d2c904 100644 --- a/src/apideck_unify/models/paymentrequiredresponse.py +++ b/src/apideck_unify/models/paymentrequiredresponse.py @@ -3,6 +3,7 @@ from __future__ import annotations from apideck_unify.models import ApideckError from apideck_unify.types import BaseModel +from dataclasses import dataclass, field import httpx from typing import Optional @@ -27,10 +28,11 @@ class PaymentRequiredResponseData(BaseModel): r"""Link to documentation of error type""" +@dataclass(frozen=True) class PaymentRequiredResponse(ApideckError): r"""Payment Required""" - data: PaymentRequiredResponseData + data: PaymentRequiredResponseData = field(hash=False) def __init__( self, @@ -41,4 +43,4 @@ def __init__( fallback = body or raw_response.text message = str(data.message) or fallback super().__init__(message, raw_response, body) - self.data = data + object.__setattr__(self, "data", data) diff --git a/src/apideck_unify/models/responsevalidationerror.py b/src/apideck_unify/models/responsevalidationerror.py index 668dca44..1df89a36 100644 --- a/src/apideck_unify/models/responsevalidationerror.py +++ b/src/apideck_unify/models/responsevalidationerror.py @@ -2,10 +2,12 @@ import httpx from typing import Optional +from dataclasses import dataclass from apideck_unify.models import ApideckError +@dataclass(frozen=True) class ResponseValidationError(ApideckError): """Error raised when there is a type mismatch between the response data and the expected Pydantic model.""" diff --git a/src/apideck_unify/models/unauthorizedresponse.py b/src/apideck_unify/models/unauthorizedresponse.py index 44a7bc2e..62d1a002 100644 --- a/src/apideck_unify/models/unauthorizedresponse.py +++ b/src/apideck_unify/models/unauthorizedresponse.py @@ -3,6 +3,7 @@ from __future__ import annotations from apideck_unify.models import ApideckError from apideck_unify.types import BaseModel +from dataclasses import dataclass, field import httpx from typing import Any, Dict, Optional, Union from typing_extensions import TypeAliasType @@ -40,10 +41,11 @@ class UnauthorizedResponseData(BaseModel): r"""Link to documentation of error type""" +@dataclass(frozen=True) class UnauthorizedResponse(ApideckError): r"""Unauthorized""" - data: UnauthorizedResponseData + data: UnauthorizedResponseData = field(hash=False) def __init__( self, @@ -54,4 +56,4 @@ def __init__( fallback = body or raw_response.text message = str(data.message) or fallback super().__init__(message, raw_response, body) - self.data = data + object.__setattr__(self, "data", data) diff --git a/src/apideck_unify/models/unprocessableresponse.py b/src/apideck_unify/models/unprocessableresponse.py index b2e81ae5..51dce184 100644 --- a/src/apideck_unify/models/unprocessableresponse.py +++ b/src/apideck_unify/models/unprocessableresponse.py @@ -3,6 +3,7 @@ from __future__ import annotations from apideck_unify.models import ApideckError from apideck_unify.types import BaseModel +from dataclasses import dataclass, field import httpx from typing import Any, Dict, Optional, Union from typing_extensions import TypeAliasType @@ -40,10 +41,11 @@ class UnprocessableResponseData(BaseModel): r"""Link to documentation of error type""" +@dataclass(frozen=True) class UnprocessableResponse(ApideckError): r"""Unprocessable""" - data: UnprocessableResponseData + data: UnprocessableResponseData = field(hash=False) def __init__( self, @@ -54,4 +56,4 @@ def __init__( fallback = body or raw_response.text message = str(data.message) or fallback super().__init__(message, raw_response, body) - self.data = data + object.__setattr__(self, "data", data) diff --git a/src/apideck_unify/models/updatebankaccountresponse.py b/src/apideck_unify/models/updatebankaccountresponse.py new file mode 100644 index 00000000..420d8809 --- /dev/null +++ b/src/apideck_unify/models/updatebankaccountresponse.py @@ -0,0 +1,46 @@ +"""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 +from typing import Optional +from typing_extensions import NotRequired, TypedDict + + +class UpdateBankAccountResponseTypedDict(TypedDict): + r"""Bank Account updated""" + + status_code: int + r"""HTTP Response Status Code""" + status: str + r"""HTTP Response Status""" + data: UnifiedIDTypedDict + r"""A object containing a unique identifier for the resource that was created, updated, or deleted.""" + service: NotRequired[str] + r"""Apideck ID of service provider""" + resource: NotRequired[str] + r"""Unified API resource name""" + operation: NotRequired[str] + r"""Operation performed""" + + +class UpdateBankAccountResponse(BaseModel): + r"""Bank Account updated""" + + status_code: int + r"""HTTP Response Status Code""" + + status: str + r"""HTTP Response Status""" + + data: UnifiedID + r"""A object containing a unique identifier for the resource that was created, updated, or deleted.""" + + service: Optional[str] = None + r"""Apideck ID of service provider""" + + resource: Optional[str] = None + r"""Unified API resource name""" + + operation: Optional[str] = None + r"""Operation performed"""