From f01744824644216a5518bf66ea3ccd8ccf972e8d Mon Sep 17 00:00:00 2001 From: fern-api <115122769+fern-api[bot]@users.noreply.github.com> Date: Sun, 21 Apr 2024 19:24:48 +0000 Subject: [PATCH] SDK regeneration --- poetry.lock | 270 ++++++------- pyproject.toml | 2 +- src/merge/client.py | 8 +- src/merge/core/client_wrapper.py | 2 +- src/merge/environment.py | 6 +- src/merge/resources/accounting/__init__.py | 16 + .../resources/account_details/client.py | 4 +- .../resources/account_token/client.py | 8 +- .../resources/accounting_periods/client.py | 16 +- .../accounting/resources/accounts/client.py | 80 +--- .../accounting/resources/addresses/client.py | 16 +- .../resources/async_passthrough/client.py | 28 +- .../resources/attachments/client.py | 32 +- .../resources/audit_trail/client.py | 8 +- .../resources/available_actions/client.py | 4 +- .../resources/balance_sheets/client.py | 22 +- .../resources/cash_flow_statements/client.py | 26 +- .../resources/company_info/client.py | 26 +- .../accounting/resources/contacts/client.py | 68 +--- .../resources/credit_notes/client.py | 58 +-- .../resources/delete_account/client.py | 4 +- .../accounting/resources/expenses/client.py | 46 +-- .../resources/field_mapping/client.py | 32 +- .../resources/force_resync/client.py | 4 +- .../resources/generate_key/client.py | 8 +- .../resources/income_statements/client.py | 26 +- .../accounting/resources/invoices/client.py | 304 ++++++++++++-- .../accounting/resources/issues/client.py | 22 +- .../accounting/resources/items/client.py | 42 +- .../resources/journal_entries/client.py | 38 +- .../accounting/resources/link_token/client.py | 22 +- .../resources/linked_accounts/client.py | 18 +- .../resources/passthrough/client.py | 20 +- .../accounting/resources/payments/client.py | 301 ++++++++++++-- .../resources/phone_numbers/client.py | 8 +- .../resources/purchase_orders/client.py | 54 +-- .../resources/regenerate_key/client.py | 8 +- .../accounting/resources/scopes/client.py | 42 +- .../resources/selective_sync/client.py | 30 +- .../resources/sync_status/client.py | 4 +- .../accounting/resources/tax_rates/client.py | 22 +- .../resources/tracking_categories/client.py | 42 +- .../resources/transactions/client.py | 26 +- .../resources/vendor_credits/client.py | 26 +- .../resources/webhook_receivers/client.py | 12 +- .../resources/accounting/types/__init__.py | 16 + .../resources/accounting/types/account.py | 8 +- .../types/account_details_and_actions.py | 3 + .../accounting/types/accounting_attachment.py | 8 +- .../accounting/types/accounting_period.py | 8 +- .../types/accounting_phone_number.py | 4 +- .../resources/accounting/types/address.py | 8 +- .../accounting/types/audit_log_event.py | 3 + .../accounting/types/balance_sheet.py | 8 +- .../accounting/types/cash_flow_statement.py | 8 +- .../accounting/types/company_info.py | 8 +- .../accounting/types/condition_schema.py | 8 +- .../resources/accounting/types/contact.py | 8 +- .../resources/accounting/types/credit_note.py | 8 +- .../accounting/types/credit_note_line_item.py | 12 +- .../types/data_passthrough_request.py | 10 +- .../accounting/types/event_type_enum.py | 15 + .../resources/accounting/types/expense.py | 12 +- .../accounting/types/expense_line.py | 10 +- .../accounting/types/income_statement.py | 8 +- .../resources/accounting/types/invoice.py | 10 +- .../accounting/types/invoice_line_item.py | 10 +- src/merge/resources/accounting/types/item.py | 8 +- .../accounting/types/journal_entry.py | 12 +- .../accounting/types/journal_line.py | 10 +- .../types/linked_account_condition.py | 8 +- .../types/linked_account_condition_request.py | 1 + .../types/patched_payment_request.py | 381 ++++++++++++++++++ .../types/patched_payment_request_account.py | 7 + ...tched_payment_request_accounting_period.py | 7 + ...d_payment_request_applied_to_lines_item.py | 7 + .../types/patched_payment_request_company.py | 7 + .../types/patched_payment_request_contact.py | 7 + .../types/patched_payment_request_currency.py | 7 + ...ayment_request_tracking_categories_item.py | 7 + .../resources/accounting/types/payment.py | 8 +- .../accounting/types/payment_line_item.py | 12 +- .../types/payment_line_item_request.py | 2 +- .../accounting/types/purchase_order.py | 12 +- .../types/purchase_order_line_item.py | 10 +- .../resources/accounting/types/report_item.py | 8 +- .../resources/accounting/types/tax_rate.py | 12 +- .../accounting/types/tracking_category.py | 12 +- .../resources/accounting/types/transaction.py | 12 +- .../accounting/types/transaction_line_item.py | 10 +- .../accounting/types/vendor_credit.py | 8 +- .../accounting/types/vendor_credit_line.py | 10 +- src/merge/resources/ats/__init__.py | 24 +- src/merge/resources/ats/client.py | 3 + src/merge/resources/ats/resources/__init__.py | 4 + .../ats/resources/account_details/client.py | 4 +- .../ats/resources/account_token/client.py | 8 +- .../ats/resources/activities/client.py | 78 +--- .../ats/resources/applications/client.py | 76 +--- .../types/applications_list_request_expand.py | 132 ++++++ .../applications_retrieve_request_expand.py | 132 ++++++ .../ats/resources/async_passthrough/client.py | 30 +- .../ats/resources/attachments/client.py | 62 +-- .../ats/resources/audit_trail/client.py | 8 +- .../ats/resources/available_actions/client.py | 4 +- .../ats/resources/candidates/client.py | 126 ++---- .../ats/resources/delete_account/client.py | 4 +- .../ats/resources/departments/client.py | 12 +- .../resources/ats/resources/eeocs/client.py | 54 +-- .../ats/resources/field_mapping/client.py | 32 +- .../ats/resources/force_resync/client.py | 4 +- .../ats/resources/generate_key/client.py | 8 +- .../ats/resources/interviews/client.py | 78 +--- .../resources/ats/resources/issues/client.py | 22 +- .../resources/job_interview_stages/client.py | 22 +- .../ats/resources/job_postings/__init__.py | 5 + .../ats/resources/job_postings/client.py | 351 ++++++++++++++++ .../resources/job_postings/types/__init__.py | 5 + .../types/job_postings_list_request_status.py | 33 ++ .../resources/ats/resources/jobs/client.py | 56 +-- .../jobs/types/jobs_list_request_expand.py | 66 +++ .../types/jobs_retrieve_request_expand.py | 66 +++ .../ats/resources/link_token/client.py | 22 +- .../ats/resources/linked_accounts/client.py | 18 +- .../resources/ats/resources/offers/client.py | 42 +- .../resources/ats/resources/offices/client.py | 12 +- .../ats/resources/passthrough/client.py | 20 +- .../ats/resources/regenerate_key/client.py | 8 +- .../ats/resources/reject_reasons/client.py | 12 +- .../resources/ats/resources/scopes/client.py | 38 +- .../ats/resources/scorecards/client.py | 42 +- .../ats/resources/selective_sync/client.py | 26 +- .../ats/resources/sync_status/client.py | 4 +- .../resources/ats/resources/tags/client.py | 4 +- .../resources/ats/resources/users/client.py | 34 +- .../ats/resources/webhook_receivers/client.py | 12 +- src/merge/resources/ats/types/__init__.py | 20 +- .../ats/types/account_details_and_actions.py | 3 + src/merge/resources/ats/types/activity.py | 8 +- src/merge/resources/ats/types/application.py | 10 +- .../ats/types/application_offers_item.py | 7 + .../ats/types/application_request.py | 2 + .../types/application_request_offers_item.py | 7 + src/merge/resources/ats/types/attachment.py | 8 +- .../resources/ats/types/audit_log_event.py | 3 + src/merge/resources/ats/types/candidate.py | 8 +- .../resources/ats/types/condition_schema.py | 8 +- .../ats/types/data_passthrough_request.py | 10 +- src/merge/resources/ats/types/department.py | 8 +- src/merge/resources/ats/types/eeoc.py | 8 +- .../resources/ats/types/email_address.py | 8 +- .../resources/ats/types/event_type_enum.py | 15 + .../external_target_field_api_response.py | 1 + .../field_mapping_api_instance_response.py | 1 + src/merge/resources/ats/types/job.py | 21 +- .../ats/types/job_interview_stage.py | 8 +- src/merge/resources/ats/types/job_posting.py | 80 ++++ .../resources/ats/types/job_posting_job.py | 7 + .../job_posting_job_posting_urls_item.py | 7 + .../ats/types/job_posting_status_enum.py | 41 ++ .../resources/ats/types/job_type_enum.py | 31 ++ .../ats/types/linked_account_condition.py | 8 +- .../types/linked_account_condition_request.py | 1 + src/merge/resources/ats/types/offer.py | 16 +- src/merge/resources/ats/types/office.py | 8 +- .../ats/types/paginated_job_posting_list.py | 31 ++ src/merge/resources/ats/types/phone_number.py | 8 +- .../resources/ats/types/reject_reason.py | 8 +- .../ats/types/remote_field_api_response.py | 1 + src/merge/resources/ats/types/remote_user.py | 8 +- .../ats/types/scheduled_interview.py | 8 +- src/merge/resources/ats/types/scorecard.py | 8 +- .../resources/ats/types/screening_question.py | 8 +- .../ats/types/screening_question_option.py | 4 +- .../ats/types/screening_question_type.py | 4 +- ...num.py => screening_question_type_enum.py} | 18 +- src/merge/resources/ats/types/tag.py | 8 +- src/merge/resources/ats/types/url.py | 8 +- .../crm/resources/account_details/client.py | 4 +- .../crm/resources/account_token/client.py | 8 +- .../crm/resources/accounts/client.py | 104 ++--- .../crm/resources/association_types/client.py | 66 +-- .../crm/resources/associations/client.py | 38 +- .../crm/resources/async_passthrough/client.py | 30 +- .../crm/resources/audit_trail/client.py | 8 +- .../crm/resources/available_actions/client.py | 4 +- .../crm/resources/contacts/client.py | 104 ++--- .../resources/custom_object_classes/client.py | 22 +- .../crm/resources/custom_objects/client.py | 146 +------ .../crm/resources/delete_account/client.py | 4 +- .../crm/resources/engagement_types/client.py | 16 +- .../crm/resources/engagements/client.py | 116 ++---- .../crm/resources/field_mapping/client.py | 32 +- .../crm/resources/force_resync/client.py | 4 +- .../crm/resources/generate_key/client.py | 8 +- .../resources/crm/resources/issues/client.py | 22 +- .../resources/crm/resources/leads/client.py | 64 +-- .../crm/resources/link_token/client.py | 22 +- .../crm/resources/linked_accounts/client.py | 18 +- .../resources/crm/resources/notes/client.py | 46 +-- .../crm/resources/opportunities/client.py | 144 ++----- .../crm/resources/passthrough/client.py | 20 +- .../crm/resources/regenerate_key/client.py | 8 +- .../resources/crm/resources/scopes/client.py | 38 +- .../crm/resources/selective_sync/client.py | 26 +- .../resources/crm/resources/stages/client.py | 16 +- .../crm/resources/sync_status/client.py | 4 +- .../resources/crm/resources/tasks/client.py | 112 ++--- .../resources/crm/resources/users/client.py | 24 +- .../crm/resources/webhook_receivers/client.py | 12 +- src/merge/resources/crm/types/account.py | 12 +- .../crm/types/account_details_and_actions.py | 3 + src/merge/resources/crm/types/address.py | 8 +- src/merge/resources/crm/types/association.py | 6 +- .../crm/types/association_sub_type.py | 2 +- .../resources/crm/types/association_type.py | 12 +- .../resources/crm/types/audit_log_event.py | 3 + .../resources/crm/types/condition_schema.py | 8 +- src/merge/resources/crm/types/contact.py | 12 +- .../resources/crm/types/custom_object.py | 6 +- .../crm/types/custom_object_class.py | 8 +- .../crm/types/data_passthrough_request.py | 10 +- .../resources/crm/types/email_address.py | 4 +- src/merge/resources/crm/types/engagement.py | 12 +- .../resources/crm/types/engagement_type.py | 12 +- .../resources/crm/types/event_type_enum.py | 15 + src/merge/resources/crm/types/lead.py | 12 +- .../crm/types/linked_account_condition.py | 8 +- .../types/linked_account_condition_request.py | 1 + src/merge/resources/crm/types/note.py | 12 +- src/merge/resources/crm/types/opportunity.py | 12 +- src/merge/resources/crm/types/phone_number.py | 4 +- ...ote_field_class_for_custom_object_class.py | 8 +- src/merge/resources/crm/types/stage.py | 8 +- src/merge/resources/crm/types/task.py | 12 +- src/merge/resources/crm/types/user.py | 12 +- .../resources/account_details/client.py | 4 +- .../resources/account_token/client.py | 8 +- .../resources/async_passthrough/client.py | 28 +- .../resources/audit_trail/client.py | 8 +- .../resources/available_actions/client.py | 4 +- .../resources/delete_account/client.py | 4 +- .../filestorage/resources/drives/client.py | 12 +- .../resources/field_mapping/client.py | 32 +- .../filestorage/resources/files/client.py | 64 ++- .../filestorage/resources/folders/client.py | 48 +-- .../resources/force_resync/client.py | 4 +- .../resources/generate_key/client.py | 8 +- .../filestorage/resources/groups/client.py | 12 +- .../filestorage/resources/issues/client.py | 22 +- .../resources/link_token/client.py | 22 +- .../resources/linked_accounts/client.py | 14 +- .../resources/passthrough/client.py | 20 +- .../resources/regenerate_key/client.py | 8 +- .../filestorage/resources/scopes/client.py | 42 +- .../resources/selective_sync/client.py | 30 +- .../resources/sync_status/client.py | 4 +- .../filestorage/resources/users/client.py | 12 +- .../resources/webhook_receivers/client.py | 12 +- .../types/account_details_and_actions.py | 3 + .../filestorage/types/audit_log_event.py | 3 + .../filestorage/types/condition_schema.py | 8 +- .../types/data_passthrough_request.py | 10 +- .../resources/filestorage/types/drive.py | 8 +- .../filestorage/types/event_type_enum.py | 15 + src/merge/resources/filestorage/types/file.py | 8 +- .../resources/filestorage/types/folder.py | 8 +- .../resources/filestorage/types/group.py | 8 +- .../types/linked_account_condition.py | 8 +- .../types/linked_account_condition_request.py | 1 + .../resources/filestorage/types/permission.py | 8 +- src/merge/resources/filestorage/types/user.py | 8 +- .../hris/resources/account_details/client.py | 4 +- .../hris/resources/account_token/client.py | 12 +- .../resources/async_passthrough/client.py | 30 +- .../hris/resources/audit_trail/client.py | 8 +- .../resources/available_actions/client.py | 4 +- .../hris/resources/bank_info/client.py | 50 +-- .../hris/resources/benefits/client.py | 22 +- .../hris/resources/companies/client.py | 12 +- .../hris/resources/delete_account/client.py | 4 +- .../hris/resources/dependents/client.py | 12 +- .../resources/employee_payroll_runs/client.py | 26 +- .../hris/resources/employees/client.py | 134 +----- .../resources/employer_benefits/client.py | 12 +- .../hris/resources/employments/client.py | 62 +-- .../hris/resources/field_mapping/client.py | 32 +- .../hris/resources/force_resync/client.py | 4 +- .../hris/resources/generate_key/client.py | 8 +- .../resources/hris/resources/groups/client.py | 42 +- .../resources/hris/resources/issues/client.py | 22 +- .../hris/resources/link_token/client.py | 22 +- .../hris/resources/linked_accounts/client.py | 14 +- .../hris/resources/locations/client.py | 38 +- .../hris/resources/passthrough/client.py | 20 +- .../hris/resources/pay_groups/client.py | 12 +- .../hris/resources/payroll_runs/client.py | 54 +-- .../hris/resources/regenerate_key/client.py | 8 +- .../resources/hris/resources/scopes/client.py | 38 +- .../hris/resources/selective_sync/client.py | 34 +- .../hris/resources/sync_status/client.py | 4 +- .../resources/hris/resources/teams/client.py | 22 +- .../hris/resources/time_off/client.py | 100 +---- .../resources/time_off_balances/client.py | 42 +- .../resources/timesheet_entries/client.py | 56 +-- .../resources/webhook_receivers/client.py | 12 +- .../hris/types/account_details_and_actions.py | 3 + .../resources/hris/types/audit_log_event.py | 3 + src/merge/resources/hris/types/bank_info.py | 8 +- src/merge/resources/hris/types/benefit.py | 8 +- src/merge/resources/hris/types/company.py | 8 +- .../resources/hris/types/condition_schema.py | 8 +- .../hris/types/data_passthrough_request.py | 10 +- src/merge/resources/hris/types/deduction.py | 8 +- src/merge/resources/hris/types/dependent.py | 8 +- src/merge/resources/hris/types/earning.py | 8 +- src/merge/resources/hris/types/employee.py | 8 +- .../hris/types/employee_payroll_run.py | 8 +- .../resources/hris/types/employer_benefit.py | 8 +- src/merge/resources/hris/types/employment.py | 8 +- .../resources/hris/types/event_type_enum.py | 15 + .../external_target_field_api_response.py | 1 + .../field_mapping_api_instance_response.py | 1 + src/merge/resources/hris/types/group.py | 10 +- .../hris/types/linked_account_condition.py | 8 +- .../types/linked_account_condition_request.py | 1 + src/merge/resources/hris/types/location.py | 8 +- src/merge/resources/hris/types/pay_group.py | 8 +- src/merge/resources/hris/types/payroll_run.py | 8 +- .../hris/types/remote_field_api_response.py | 1 + src/merge/resources/hris/types/tax.py | 8 +- src/merge/resources/hris/types/team.py | 8 +- src/merge/resources/hris/types/time_off.py | 8 +- .../resources/hris/types/time_off_balance.py | 8 +- .../resources/hris/types/timesheet_entry.py | 11 +- .../resources/account_details/client.py | 4 +- .../resources/account_token/client.py | 8 +- .../ticketing/resources/accounts/client.py | 12 +- .../resources/async_passthrough/client.py | 28 +- .../ticketing/resources/attachments/client.py | 52 +-- .../ticketing/resources/audit_trail/client.py | 8 +- .../resources/available_actions/client.py | 4 +- .../ticketing/resources/collections/client.py | 50 +-- .../ticketing/resources/comments/client.py | 44 +- .../ticketing/resources/contacts/client.py | 22 +- .../resources/delete_account/client.py | 4 +- .../resources/field_mapping/client.py | 32 +- .../resources/force_resync/client.py | 4 +- .../resources/generate_key/client.py | 8 +- .../ticketing/resources/issues/client.py | 22 +- .../ticketing/resources/link_token/client.py | 22 +- .../resources/linked_accounts/client.py | 14 +- .../ticketing/resources/passthrough/client.py | 20 +- .../ticketing/resources/projects/client.py | 28 +- .../resources/regenerate_key/client.py | 8 +- .../ticketing/resources/roles/client.py | 12 +- .../ticketing/resources/scopes/client.py | 42 +- .../resources/selective_sync/client.py | 30 +- .../ticketing/resources/sync_status/client.py | 4 +- .../ticketing/resources/tags/client.py | 12 +- .../ticketing/resources/teams/client.py | 12 +- .../ticketing/resources/tickets/client.py | 184 ++------- .../ticketing/resources/users/client.py | 26 +- .../resources/webhook_receivers/client.py | 12 +- .../resources/ticketing/types/account.py | 8 +- .../types/account_details_and_actions.py | 3 + .../resources/ticketing/types/attachment.py | 8 +- .../ticketing/types/audit_log_event.py | 3 + .../resources/ticketing/types/collection.py | 8 +- .../resources/ticketing/types/comment.py | 8 +- .../ticketing/types/condition_schema.py | 8 +- .../resources/ticketing/types/contact.py | 8 +- .../types/data_passthrough_request.py | 10 +- .../ticketing/types/event_type_enum.py | 15 + .../types/linked_account_condition.py | 8 +- .../types/linked_account_condition_request.py | 1 + .../ticketing/types/patched_ticket_request.py | 4 +- .../resources/ticketing/types/project.py | 8 +- src/merge/resources/ticketing/types/role.py | 8 +- src/merge/resources/ticketing/types/tag.py | 8 +- src/merge/resources/ticketing/types/team.py | 8 +- src/merge/resources/ticketing/types/ticket.py | 12 +- .../ticketing/types/ticket_request.py | 4 +- src/merge/resources/ticketing/types/user.py | 8 +- 384 files changed, 4739 insertions(+), 4278 deletions(-) create mode 100644 src/merge/resources/accounting/types/patched_payment_request.py create mode 100644 src/merge/resources/accounting/types/patched_payment_request_account.py create mode 100644 src/merge/resources/accounting/types/patched_payment_request_accounting_period.py create mode 100644 src/merge/resources/accounting/types/patched_payment_request_applied_to_lines_item.py create mode 100644 src/merge/resources/accounting/types/patched_payment_request_company.py create mode 100644 src/merge/resources/accounting/types/patched_payment_request_contact.py create mode 100644 src/merge/resources/accounting/types/patched_payment_request_currency.py create mode 100644 src/merge/resources/accounting/types/patched_payment_request_tracking_categories_item.py create mode 100644 src/merge/resources/ats/resources/job_postings/__init__.py create mode 100644 src/merge/resources/ats/resources/job_postings/client.py create mode 100644 src/merge/resources/ats/resources/job_postings/types/__init__.py create mode 100644 src/merge/resources/ats/resources/job_postings/types/job_postings_list_request_status.py create mode 100644 src/merge/resources/ats/types/application_offers_item.py create mode 100644 src/merge/resources/ats/types/application_request_offers_item.py create mode 100644 src/merge/resources/ats/types/job_posting.py create mode 100644 src/merge/resources/ats/types/job_posting_job.py create mode 100644 src/merge/resources/ats/types/job_posting_job_posting_urls_item.py create mode 100644 src/merge/resources/ats/types/job_posting_status_enum.py create mode 100644 src/merge/resources/ats/types/job_type_enum.py create mode 100644 src/merge/resources/ats/types/paginated_job_posting_list.py rename src/merge/resources/ats/types/{type_enum.py => screening_question_type_enum.py} (72%) diff --git a/poetry.lock b/poetry.lock index c8a61e9d..73fd2b5b 100644 --- a/poetry.lock +++ b/poetry.lock @@ -60,13 +60,13 @@ files = [ [[package]] name = "exceptiongroup" -version = "1.2.0" +version = "1.2.1" description = "Backport of PEP 654 (exception groups)" optional = false python-versions = ">=3.7" files = [ - {file = "exceptiongroup-1.2.0-py3-none-any.whl", hash = "sha256:4bfd3996ac73b41e9b9628b04e079f193850720ea5945fc96a08633c66912f14"}, - {file = "exceptiongroup-1.2.0.tar.gz", hash = "sha256:91f5c769735f051a4290d52edd0858999b57e5876e9f85937691bd4c9fa3ed68"}, + {file = "exceptiongroup-1.2.1-py3-none-any.whl", hash = "sha256:5258b9ed329c5bbdd31a309f53cbfb0b155341807f6ff7606a1e801a891b29ad"}, + {file = "exceptiongroup-1.2.1.tar.gz", hash = "sha256:a4785e48b045528f5bfe627b6ad554ff32def154f42372786903b7abcfe1aa16"}, ] [package.extras] @@ -85,13 +85,13 @@ files = [ [[package]] name = "httpcore" -version = "1.0.4" +version = "1.0.5" description = "A minimal low-level HTTP client." optional = false python-versions = ">=3.8" files = [ - {file = "httpcore-1.0.4-py3-none-any.whl", hash = "sha256:ac418c1db41bade2ad53ae2f3834a3a0f5ae76b56cf5aa497d2d033384fc7d73"}, - {file = "httpcore-1.0.4.tar.gz", hash = "sha256:cb2839ccfcba0d2d3c1131d3c3e26dfc327326fbe7a5dc0dbfe9f6c9151bb022"}, + {file = "httpcore-1.0.5-py3-none-any.whl", hash = "sha256:421f18bac248b25d310f3cacd198d55b8e6125c107797b609ff9b7a6ba7991b5"}, + {file = "httpcore-1.0.5.tar.gz", hash = "sha256:34a38e2f9291467ee3b44e89dd52615370e152954ba21721378a87b2960f7a61"}, ] [package.dependencies] @@ -102,7 +102,7 @@ h11 = ">=0.13,<0.15" asyncio = ["anyio (>=4.0,<5.0)"] http2 = ["h2 (>=3,<5)"] socks = ["socksio (==1.*)"] -trio = ["trio (>=0.22.0,<0.25.0)"] +trio = ["trio (>=0.22.0,<0.26.0)"] [[package]] name = "httpx" @@ -130,13 +130,13 @@ socks = ["socksio (==1.*)"] [[package]] name = "idna" -version = "3.6" +version = "3.7" description = "Internationalized Domain Names in Applications (IDNA)" optional = false python-versions = ">=3.5" files = [ - {file = "idna-3.6-py3-none-any.whl", hash = "sha256:c05567e9c24a6b9faaa835c4821bad0590fbb9d5779e7caa6e1cc4978e7eb24f"}, - {file = "idna-3.6.tar.gz", hash = "sha256:9ecdbbd083b06798ae1e86adcbfe8ab1479cf864e4ee30fe4e46a003d12491ca"}, + {file = "idna-3.7-py3-none-any.whl", hash = "sha256:82fee1fc78add43492d3a1898bfa6d8a904cc97d8427f683ed8e798d07761aa0"}, + {file = "idna-3.7.tar.gz", hash = "sha256:028ff3aadf0609c1fd278d8ea3089299412a7a8b9bd005dd08b9f8285bcb5cfc"}, ] [[package]] @@ -152,38 +152,38 @@ files = [ [[package]] name = "mypy" -version = "1.8.0" +version = "1.9.0" description = "Optional static typing for Python" optional = false python-versions = ">=3.8" files = [ - {file = "mypy-1.8.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:485a8942f671120f76afffff70f259e1cd0f0cfe08f81c05d8816d958d4577d3"}, - {file = "mypy-1.8.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:df9824ac11deaf007443e7ed2a4a26bebff98d2bc43c6da21b2b64185da011c4"}, - {file = "mypy-1.8.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:2afecd6354bbfb6e0160f4e4ad9ba6e4e003b767dd80d85516e71f2e955ab50d"}, - {file = "mypy-1.8.0-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:8963b83d53ee733a6e4196954502b33567ad07dfd74851f32be18eb932fb1cb9"}, - {file = "mypy-1.8.0-cp310-cp310-win_amd64.whl", hash = "sha256:e46f44b54ebddbeedbd3d5b289a893219065ef805d95094d16a0af6630f5d410"}, - {file = "mypy-1.8.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:855fe27b80375e5c5878492f0729540db47b186509c98dae341254c8f45f42ae"}, - {file = "mypy-1.8.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:4c886c6cce2d070bd7df4ec4a05a13ee20c0aa60cb587e8d1265b6c03cf91da3"}, - {file = "mypy-1.8.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d19c413b3c07cbecf1f991e2221746b0d2a9410b59cb3f4fb9557f0365a1a817"}, - {file = "mypy-1.8.0-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:9261ed810972061388918c83c3f5cd46079d875026ba97380f3e3978a72f503d"}, - {file = "mypy-1.8.0-cp311-cp311-win_amd64.whl", hash = "sha256:51720c776d148bad2372ca21ca29256ed483aa9a4cdefefcef49006dff2a6835"}, - {file = "mypy-1.8.0-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:52825b01f5c4c1c4eb0db253ec09c7aa17e1a7304d247c48b6f3599ef40db8bd"}, - {file = "mypy-1.8.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:f5ac9a4eeb1ec0f1ccdc6f326bcdb464de5f80eb07fb38b5ddd7b0de6bc61e55"}, - {file = "mypy-1.8.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:afe3fe972c645b4632c563d3f3eff1cdca2fa058f730df2b93a35e3b0c538218"}, - {file = "mypy-1.8.0-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:42c6680d256ab35637ef88891c6bd02514ccb7e1122133ac96055ff458f93fc3"}, - {file = "mypy-1.8.0-cp312-cp312-win_amd64.whl", hash = "sha256:720a5ca70e136b675af3af63db533c1c8c9181314d207568bbe79051f122669e"}, - {file = "mypy-1.8.0-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:028cf9f2cae89e202d7b6593cd98db6759379f17a319b5faf4f9978d7084cdc6"}, - {file = "mypy-1.8.0-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:4e6d97288757e1ddba10dd9549ac27982e3e74a49d8d0179fc14d4365c7add66"}, - {file = "mypy-1.8.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7f1478736fcebb90f97e40aff11a5f253af890c845ee0c850fe80aa060a267c6"}, - {file = "mypy-1.8.0-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:42419861b43e6962a649068a61f4a4839205a3ef525b858377a960b9e2de6e0d"}, - {file = "mypy-1.8.0-cp38-cp38-win_amd64.whl", hash = "sha256:2b5b6c721bd4aabaadead3a5e6fa85c11c6c795e0c81a7215776ef8afc66de02"}, - {file = "mypy-1.8.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:5c1538c38584029352878a0466f03a8ee7547d7bd9f641f57a0f3017a7c905b8"}, - {file = "mypy-1.8.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:4ef4be7baf08a203170f29e89d79064463b7fc7a0908b9d0d5114e8009c3a259"}, - {file = "mypy-1.8.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7178def594014aa6c35a8ff411cf37d682f428b3b5617ca79029d8ae72f5402b"}, - {file = "mypy-1.8.0-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:ab3c84fa13c04aeeeabb2a7f67a25ef5d77ac9d6486ff33ded762ef353aa5592"}, - {file = "mypy-1.8.0-cp39-cp39-win_amd64.whl", hash = "sha256:99b00bc72855812a60d253420d8a2eae839b0afa4938f09f4d2aa9bb4654263a"}, - {file = "mypy-1.8.0-py3-none-any.whl", hash = "sha256:538fd81bb5e430cc1381a443971c0475582ff9f434c16cd46d2c66763ce85d9d"}, - {file = "mypy-1.8.0.tar.gz", hash = "sha256:6ff8b244d7085a0b425b56d327b480c3b29cafbd2eff27316a004f9a7391ae07"}, + {file = "mypy-1.9.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:f8a67616990062232ee4c3952f41c779afac41405806042a8126fe96e098419f"}, + {file = "mypy-1.9.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:d357423fa57a489e8c47b7c85dfb96698caba13d66e086b412298a1a0ea3b0ed"}, + {file = "mypy-1.9.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:49c87c15aed320de9b438ae7b00c1ac91cd393c1b854c2ce538e2a72d55df150"}, + {file = "mypy-1.9.0-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:48533cdd345c3c2e5ef48ba3b0d3880b257b423e7995dada04248725c6f77374"}, + {file = "mypy-1.9.0-cp310-cp310-win_amd64.whl", hash = "sha256:4d3dbd346cfec7cb98e6cbb6e0f3c23618af826316188d587d1c1bc34f0ede03"}, + {file = "mypy-1.9.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:653265f9a2784db65bfca694d1edd23093ce49740b2244cde583aeb134c008f3"}, + {file = "mypy-1.9.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:3a3c007ff3ee90f69cf0a15cbcdf0995749569b86b6d2f327af01fd1b8aee9dc"}, + {file = "mypy-1.9.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:2418488264eb41f69cc64a69a745fad4a8f86649af4b1041a4c64ee61fc61129"}, + {file = "mypy-1.9.0-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:68edad3dc7d70f2f17ae4c6c1b9471a56138ca22722487eebacfd1eb5321d612"}, + {file = "mypy-1.9.0-cp311-cp311-win_amd64.whl", hash = "sha256:85ca5fcc24f0b4aeedc1d02f93707bccc04733f21d41c88334c5482219b1ccb3"}, + {file = "mypy-1.9.0-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:aceb1db093b04db5cd390821464504111b8ec3e351eb85afd1433490163d60cd"}, + {file = "mypy-1.9.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:0235391f1c6f6ce487b23b9dbd1327b4ec33bb93934aa986efe8a9563d9349e6"}, + {file = "mypy-1.9.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d4d5ddc13421ba3e2e082a6c2d74c2ddb3979c39b582dacd53dd5d9431237185"}, + {file = "mypy-1.9.0-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:190da1ee69b427d7efa8aa0d5e5ccd67a4fb04038c380237a0d96829cb157913"}, + {file = "mypy-1.9.0-cp312-cp312-win_amd64.whl", hash = "sha256:fe28657de3bfec596bbeef01cb219833ad9d38dd5393fc649f4b366840baefe6"}, + {file = "mypy-1.9.0-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:e54396d70be04b34f31d2edf3362c1edd023246c82f1730bbf8768c28db5361b"}, + {file = "mypy-1.9.0-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:5e6061f44f2313b94f920e91b204ec600982961e07a17e0f6cd83371cb23f5c2"}, + {file = "mypy-1.9.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:81a10926e5473c5fc3da8abb04119a1f5811a236dc3a38d92015cb1e6ba4cb9e"}, + {file = "mypy-1.9.0-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:b685154e22e4e9199fc95f298661deea28aaede5ae16ccc8cbb1045e716b3e04"}, + {file = "mypy-1.9.0-cp38-cp38-win_amd64.whl", hash = "sha256:5d741d3fc7c4da608764073089e5f58ef6352bedc223ff58f2f038c2c4698a89"}, + {file = "mypy-1.9.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:587ce887f75dd9700252a3abbc9c97bbe165a4a630597845c61279cf32dfbf02"}, + {file = "mypy-1.9.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:f88566144752999351725ac623471661c9d1cd8caa0134ff98cceeea181789f4"}, + {file = "mypy-1.9.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:61758fabd58ce4b0720ae1e2fea5cfd4431591d6d590b197775329264f86311d"}, + {file = "mypy-1.9.0-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:e49499be624dead83927e70c756970a0bc8240e9f769389cdf5714b0784ca6bf"}, + {file = "mypy-1.9.0-cp39-cp39-win_amd64.whl", hash = "sha256:571741dc4194b4f82d344b15e8837e8c5fcc462d66d076748142327626a1b6e9"}, + {file = "mypy-1.9.0-py3-none-any.whl", hash = "sha256:a260627a570559181a9ea5de61ac6297aa5af202f06fd7ab093ce74e7181e43e"}, + {file = "mypy-1.9.0.tar.gz", hash = "sha256:3cc5da0127e6a478cddd906068496a97a7618a21ce9b54bde5bf7e539c7af974"}, ] [package.dependencies] @@ -210,24 +210,24 @@ files = [ [[package]] name = "packaging" -version = "23.2" +version = "24.0" description = "Core utilities for Python packages" optional = false python-versions = ">=3.7" files = [ - {file = "packaging-23.2-py3-none-any.whl", hash = "sha256:8c491190033a9af7e1d931d0b5dacc2ef47509b34dd0de67ed209b5203fc88c7"}, - {file = "packaging-23.2.tar.gz", hash = "sha256:048fb0e9405036518eaaf48a55953c750c11e1a1b68e0dd1a9d62ed0c092cfc5"}, + {file = "packaging-24.0-py3-none-any.whl", hash = "sha256:2ddfb553fdf02fb784c234c7ba6ccc288296ceabec964ad2eae3777778130bc5"}, + {file = "packaging-24.0.tar.gz", hash = "sha256:eb82c5e3e56209074766e6885bb04b8c38a0c015d0a30036ebe7ece34c9989e9"}, ] [[package]] name = "pluggy" -version = "1.4.0" +version = "1.5.0" description = "plugin and hook calling mechanisms for python" optional = false python-versions = ">=3.8" files = [ - {file = "pluggy-1.4.0-py3-none-any.whl", hash = "sha256:7db9f7b503d67d1c5b95f59773ebb58a8c1c288129a88665838012cfb07b8981"}, - {file = "pluggy-1.4.0.tar.gz", hash = "sha256:8c85c2876142a764e5b7548e7d9a0e0ddb46f5185161049a79b7e974454223be"}, + {file = "pluggy-1.5.0-py3-none-any.whl", hash = "sha256:44e1ad92c8ca002de6377e165f3e0f1be63266ab4d554740532335b9d75ea669"}, + {file = "pluggy-1.5.0.tar.gz", hash = "sha256:2cffa88e94fdc978c4c574f15f9e59b7f4201d439195c3715ca9e2486f1d0cf1"}, ] [package.extras] @@ -236,18 +236,18 @@ testing = ["pytest", "pytest-benchmark"] [[package]] name = "pydantic" -version = "2.6.2" +version = "2.7.0" description = "Data validation using Python type hints" optional = false python-versions = ">=3.8" files = [ - {file = "pydantic-2.6.2-py3-none-any.whl", hash = "sha256:37a5432e54b12fecaa1049c5195f3d860a10e01bdfd24f1840ef14bd0d3aeab3"}, - {file = "pydantic-2.6.2.tar.gz", hash = "sha256:a09be1c3d28f3abe37f8a78af58284b236a92ce520105ddc91a6d29ea1176ba7"}, + {file = "pydantic-2.7.0-py3-none-any.whl", hash = "sha256:9dee74a271705f14f9a1567671d144a851c675b072736f0a7b2608fd9e495352"}, + {file = "pydantic-2.7.0.tar.gz", hash = "sha256:b5ecdd42262ca2462e2624793551e80911a1e989f462910bb81aef974b4bb383"}, ] [package.dependencies] annotated-types = ">=0.4.0" -pydantic-core = "2.16.3" +pydantic-core = "2.18.1" typing-extensions = ">=4.6.1" [package.extras] @@ -255,90 +255,90 @@ email = ["email-validator (>=2.0.0)"] [[package]] name = "pydantic-core" -version = "2.16.3" -description = "" +version = "2.18.1" +description = "Core functionality for Pydantic validation and serialization" optional = false python-versions = ">=3.8" files = [ - {file = "pydantic_core-2.16.3-cp310-cp310-macosx_10_12_x86_64.whl", hash = "sha256:75b81e678d1c1ede0785c7f46690621e4c6e63ccd9192af1f0bd9d504bbb6bf4"}, - {file = "pydantic_core-2.16.3-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:9c865a7ee6f93783bd5d781af5a4c43dadc37053a5b42f7d18dc019f8c9d2bd1"}, - {file = "pydantic_core-2.16.3-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:162e498303d2b1c036b957a1278fa0899d02b2842f1ff901b6395104c5554a45"}, - {file = "pydantic_core-2.16.3-cp310-cp310-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:2f583bd01bbfbff4eaee0868e6fc607efdfcc2b03c1c766b06a707abbc856187"}, - {file = "pydantic_core-2.16.3-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:b926dd38db1519ed3043a4de50214e0d600d404099c3392f098a7f9d75029ff8"}, - {file = "pydantic_core-2.16.3-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:716b542728d4c742353448765aa7cdaa519a7b82f9564130e2b3f6766018c9ec"}, - {file = "pydantic_core-2.16.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:fc4ad7f7ee1a13d9cb49d8198cd7d7e3aa93e425f371a68235f784e99741561f"}, - {file = "pydantic_core-2.16.3-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:bd87f48924f360e5d1c5f770d6155ce0e7d83f7b4e10c2f9ec001c73cf475c99"}, - {file = "pydantic_core-2.16.3-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:0df446663464884297c793874573549229f9eca73b59360878f382a0fc085979"}, - {file = "pydantic_core-2.16.3-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:4df8a199d9f6afc5ae9a65f8f95ee52cae389a8c6b20163762bde0426275b7db"}, - {file = "pydantic_core-2.16.3-cp310-none-win32.whl", hash = "sha256:456855f57b413f077dff513a5a28ed838dbbb15082ba00f80750377eed23d132"}, - {file = "pydantic_core-2.16.3-cp310-none-win_amd64.whl", hash = "sha256:732da3243e1b8d3eab8c6ae23ae6a58548849d2e4a4e03a1924c8ddf71a387cb"}, - {file = "pydantic_core-2.16.3-cp311-cp311-macosx_10_12_x86_64.whl", hash = "sha256:519ae0312616026bf4cedc0fe459e982734f3ca82ee8c7246c19b650b60a5ee4"}, - {file = "pydantic_core-2.16.3-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:b3992a322a5617ded0a9f23fd06dbc1e4bd7cf39bc4ccf344b10f80af58beacd"}, - {file = "pydantic_core-2.16.3-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:8d62da299c6ecb04df729e4b5c52dc0d53f4f8430b4492b93aa8de1f541c4aac"}, - {file = "pydantic_core-2.16.3-cp311-cp311-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:2acca2be4bb2f2147ada8cac612f8a98fc09f41c89f87add7256ad27332c2fda"}, - {file = "pydantic_core-2.16.3-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:1b662180108c55dfbf1280d865b2d116633d436cfc0bba82323554873967b340"}, - {file = "pydantic_core-2.16.3-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:e7c6ed0dc9d8e65f24f5824291550139fe6f37fac03788d4580da0d33bc00c97"}, - {file = "pydantic_core-2.16.3-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a6b1bb0827f56654b4437955555dc3aeeebeddc47c2d7ed575477f082622c49e"}, - {file = "pydantic_core-2.16.3-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:e56f8186d6210ac7ece503193ec84104da7ceb98f68ce18c07282fcc2452e76f"}, - {file = "pydantic_core-2.16.3-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:936e5db01dd49476fa8f4383c259b8b1303d5dd5fb34c97de194560698cc2c5e"}, - {file = "pydantic_core-2.16.3-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:33809aebac276089b78db106ee692bdc9044710e26f24a9a2eaa35a0f9fa70ba"}, - {file = "pydantic_core-2.16.3-cp311-none-win32.whl", hash = "sha256:ded1c35f15c9dea16ead9bffcde9bb5c7c031bff076355dc58dcb1cb436c4721"}, - {file = "pydantic_core-2.16.3-cp311-none-win_amd64.whl", hash = "sha256:d89ca19cdd0dd5f31606a9329e309d4fcbb3df860960acec32630297d61820df"}, - {file = "pydantic_core-2.16.3-cp311-none-win_arm64.whl", hash = "sha256:6162f8d2dc27ba21027f261e4fa26f8bcb3cf9784b7f9499466a311ac284b5b9"}, - {file = "pydantic_core-2.16.3-cp312-cp312-macosx_10_12_x86_64.whl", hash = "sha256:0f56ae86b60ea987ae8bcd6654a887238fd53d1384f9b222ac457070b7ac4cff"}, - {file = "pydantic_core-2.16.3-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:c9bd22a2a639e26171068f8ebb5400ce2c1bc7d17959f60a3b753ae13c632975"}, - {file = "pydantic_core-2.16.3-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:4204e773b4b408062960e65468d5346bdfe139247ee5f1ca2a378983e11388a2"}, - {file = "pydantic_core-2.16.3-cp312-cp312-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:f651dd19363c632f4abe3480a7c87a9773be27cfe1341aef06e8759599454120"}, - {file = "pydantic_core-2.16.3-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:aaf09e615a0bf98d406657e0008e4a8701b11481840be7d31755dc9f97c44053"}, - {file = "pydantic_core-2.16.3-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:8e47755d8152c1ab5b55928ab422a76e2e7b22b5ed8e90a7d584268dd49e9c6b"}, - {file = "pydantic_core-2.16.3-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:500960cb3a0543a724a81ba859da816e8cf01b0e6aaeedf2c3775d12ee49cade"}, - {file = "pydantic_core-2.16.3-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:cf6204fe865da605285c34cf1172879d0314ff267b1c35ff59de7154f35fdc2e"}, - {file = "pydantic_core-2.16.3-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:d33dd21f572545649f90c38c227cc8631268ba25c460b5569abebdd0ec5974ca"}, - {file = "pydantic_core-2.16.3-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:49d5d58abd4b83fb8ce763be7794d09b2f50f10aa65c0f0c1696c677edeb7cbf"}, - {file = "pydantic_core-2.16.3-cp312-none-win32.whl", hash = "sha256:f53aace168a2a10582e570b7736cc5bef12cae9cf21775e3eafac597e8551fbe"}, - {file = "pydantic_core-2.16.3-cp312-none-win_amd64.whl", hash = "sha256:0d32576b1de5a30d9a97f300cc6a3f4694c428d956adbc7e6e2f9cad279e45ed"}, - {file = "pydantic_core-2.16.3-cp312-none-win_arm64.whl", hash = "sha256:ec08be75bb268473677edb83ba71e7e74b43c008e4a7b1907c6d57e940bf34b6"}, - {file = "pydantic_core-2.16.3-cp38-cp38-macosx_10_12_x86_64.whl", hash = "sha256:b1f6f5938d63c6139860f044e2538baeee6f0b251a1816e7adb6cbce106a1f01"}, - {file = "pydantic_core-2.16.3-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:2a1ef6a36fdbf71538142ed604ad19b82f67b05749512e47f247a6ddd06afdc7"}, - {file = "pydantic_core-2.16.3-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:704d35ecc7e9c31d48926150afada60401c55efa3b46cd1ded5a01bdffaf1d48"}, - {file = "pydantic_core-2.16.3-cp38-cp38-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:d937653a696465677ed583124b94a4b2d79f5e30b2c46115a68e482c6a591c8a"}, - {file = "pydantic_core-2.16.3-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:c9803edf8e29bd825f43481f19c37f50d2b01899448273b3a7758441b512acf8"}, - {file = "pydantic_core-2.16.3-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:72282ad4892a9fb2da25defeac8c2e84352c108705c972db82ab121d15f14e6d"}, - {file = "pydantic_core-2.16.3-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7f752826b5b8361193df55afcdf8ca6a57d0232653494ba473630a83ba50d8c9"}, - {file = "pydantic_core-2.16.3-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:4384a8f68ddb31a0b0c3deae88765f5868a1b9148939c3f4121233314ad5532c"}, - {file = "pydantic_core-2.16.3-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:a4b2bf78342c40b3dc830880106f54328928ff03e357935ad26c7128bbd66ce8"}, - {file = "pydantic_core-2.16.3-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:13dcc4802961b5f843a9385fc821a0b0135e8c07fc3d9949fd49627c1a5e6ae5"}, - {file = "pydantic_core-2.16.3-cp38-none-win32.whl", hash = "sha256:e3e70c94a0c3841e6aa831edab1619ad5c511199be94d0c11ba75fe06efe107a"}, - {file = "pydantic_core-2.16.3-cp38-none-win_amd64.whl", hash = "sha256:ecdf6bf5f578615f2e985a5e1f6572e23aa632c4bd1dc67f8f406d445ac115ed"}, - {file = "pydantic_core-2.16.3-cp39-cp39-macosx_10_12_x86_64.whl", hash = "sha256:bda1ee3e08252b8d41fa5537413ffdddd58fa73107171a126d3b9ff001b9b820"}, - {file = "pydantic_core-2.16.3-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:21b888c973e4f26b7a96491c0965a8a312e13be108022ee510248fe379a5fa23"}, - {file = "pydantic_core-2.16.3-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:be0ec334369316fa73448cc8c982c01e5d2a81c95969d58b8f6e272884df0074"}, - {file = "pydantic_core-2.16.3-cp39-cp39-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:b5b6079cc452a7c53dd378c6f881ac528246b3ac9aae0f8eef98498a75657805"}, - {file = "pydantic_core-2.16.3-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:7ee8d5f878dccb6d499ba4d30d757111847b6849ae07acdd1205fffa1fc1253c"}, - {file = "pydantic_core-2.16.3-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:7233d65d9d651242a68801159763d09e9ec96e8a158dbf118dc090cd77a104c9"}, - {file = "pydantic_core-2.16.3-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c6119dc90483a5cb50a1306adb8d52c66e447da88ea44f323e0ae1a5fcb14256"}, - {file = "pydantic_core-2.16.3-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:578114bc803a4c1ff9946d977c221e4376620a46cf78da267d946397dc9514a8"}, - {file = "pydantic_core-2.16.3-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:d8f99b147ff3fcf6b3cc60cb0c39ea443884d5559a30b1481e92495f2310ff2b"}, - {file = "pydantic_core-2.16.3-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:4ac6b4ce1e7283d715c4b729d8f9dab9627586dafce81d9eaa009dd7f25dd972"}, - {file = "pydantic_core-2.16.3-cp39-none-win32.whl", hash = "sha256:e7774b570e61cb998490c5235740d475413a1f6de823169b4cf94e2fe9e9f6b2"}, - {file = "pydantic_core-2.16.3-cp39-none-win_amd64.whl", hash = "sha256:9091632a25b8b87b9a605ec0e61f241c456e9248bfdcf7abdf344fdb169c81cf"}, - {file = "pydantic_core-2.16.3-pp310-pypy310_pp73-macosx_10_12_x86_64.whl", hash = "sha256:36fa178aacbc277bc6b62a2c3da95226520da4f4e9e206fdf076484363895d2c"}, - {file = "pydantic_core-2.16.3-pp310-pypy310_pp73-macosx_11_0_arm64.whl", hash = "sha256:dcca5d2bf65c6fb591fff92da03f94cd4f315972f97c21975398bd4bd046854a"}, - {file = "pydantic_core-2.16.3-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:2a72fb9963cba4cd5793854fd12f4cfee731e86df140f59ff52a49b3552db241"}, - {file = "pydantic_core-2.16.3-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b60cc1a081f80a2105a59385b92d82278b15d80ebb3adb200542ae165cd7d183"}, - {file = "pydantic_core-2.16.3-pp310-pypy310_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:cbcc558401de90a746d02ef330c528f2e668c83350f045833543cd57ecead1ad"}, - {file = "pydantic_core-2.16.3-pp310-pypy310_pp73-musllinux_1_1_aarch64.whl", hash = "sha256:fee427241c2d9fb7192b658190f9f5fd6dfe41e02f3c1489d2ec1e6a5ab1e04a"}, - {file = "pydantic_core-2.16.3-pp310-pypy310_pp73-musllinux_1_1_x86_64.whl", hash = "sha256:f4cb85f693044e0f71f394ff76c98ddc1bc0953e48c061725e540396d5c8a2e1"}, - {file = "pydantic_core-2.16.3-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:b29eeb887aa931c2fcef5aa515d9d176d25006794610c264ddc114c053bf96fe"}, - {file = "pydantic_core-2.16.3-pp39-pypy39_pp73-macosx_10_12_x86_64.whl", hash = "sha256:a425479ee40ff021f8216c9d07a6a3b54b31c8267c6e17aa88b70d7ebd0e5e5b"}, - {file = "pydantic_core-2.16.3-pp39-pypy39_pp73-macosx_11_0_arm64.whl", hash = "sha256:5c5cbc703168d1b7a838668998308018a2718c2130595e8e190220238addc96f"}, - {file = "pydantic_core-2.16.3-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:99b6add4c0b39a513d323d3b93bc173dac663c27b99860dd5bf491b240d26137"}, - {file = "pydantic_core-2.16.3-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:75f76ee558751746d6a38f89d60b6228fa174e5172d143886af0f85aa306fd89"}, - {file = "pydantic_core-2.16.3-pp39-pypy39_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:00ee1c97b5364b84cb0bd82e9bbf645d5e2871fb8c58059d158412fee2d33d8a"}, - {file = "pydantic_core-2.16.3-pp39-pypy39_pp73-musllinux_1_1_aarch64.whl", hash = "sha256:287073c66748f624be4cef893ef9174e3eb88fe0b8a78dc22e88eca4bc357ca6"}, - {file = "pydantic_core-2.16.3-pp39-pypy39_pp73-musllinux_1_1_x86_64.whl", hash = "sha256:ed25e1835c00a332cb10c683cd39da96a719ab1dfc08427d476bce41b92531fc"}, - {file = "pydantic_core-2.16.3-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:86b3d0033580bd6bbe07590152007275bd7af95f98eaa5bd36f3da219dcd93da"}, - {file = "pydantic_core-2.16.3.tar.gz", hash = "sha256:1cac689f80a3abab2d3c0048b29eea5751114054f032a941a32de4c852c59cad"}, + {file = "pydantic_core-2.18.1-cp310-cp310-macosx_10_12_x86_64.whl", hash = "sha256:ee9cf33e7fe14243f5ca6977658eb7d1042caaa66847daacbd2117adb258b226"}, + {file = "pydantic_core-2.18.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:6b7bbb97d82659ac8b37450c60ff2e9f97e4eb0f8a8a3645a5568b9334b08b50"}, + {file = "pydantic_core-2.18.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:df4249b579e75094f7e9bb4bd28231acf55e308bf686b952f43100a5a0be394c"}, + {file = "pydantic_core-2.18.1-cp310-cp310-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:d0491006a6ad20507aec2be72e7831a42efc93193d2402018007ff827dc62926"}, + {file = "pydantic_core-2.18.1-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:2ae80f72bb7a3e397ab37b53a2b49c62cc5496412e71bc4f1277620a7ce3f52b"}, + {file = "pydantic_core-2.18.1-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:58aca931bef83217fca7a390e0486ae327c4af9c3e941adb75f8772f8eeb03a1"}, + {file = "pydantic_core-2.18.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:1be91ad664fc9245404a789d60cba1e91c26b1454ba136d2a1bf0c2ac0c0505a"}, + {file = "pydantic_core-2.18.1-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:667880321e916a8920ef49f5d50e7983792cf59f3b6079f3c9dac2b88a311d17"}, + {file = "pydantic_core-2.18.1-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:f7054fdc556f5421f01e39cbb767d5ec5c1139ea98c3e5b350e02e62201740c7"}, + {file = "pydantic_core-2.18.1-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:030e4f9516f9947f38179249778709a460a3adb516bf39b5eb9066fcfe43d0e6"}, + {file = "pydantic_core-2.18.1-cp310-none-win32.whl", hash = "sha256:2e91711e36e229978d92642bfc3546333a9127ecebb3f2761372e096395fc649"}, + {file = "pydantic_core-2.18.1-cp310-none-win_amd64.whl", hash = "sha256:9a29726f91c6cb390b3c2338f0df5cd3e216ad7a938762d11c994bb37552edb0"}, + {file = "pydantic_core-2.18.1-cp311-cp311-macosx_10_12_x86_64.whl", hash = "sha256:9ece8a49696669d483d206b4474c367852c44815fca23ac4e48b72b339807f80"}, + {file = "pydantic_core-2.18.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:7a5d83efc109ceddb99abd2c1316298ced2adb4570410defe766851a804fcd5b"}, + {file = "pydantic_core-2.18.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:5f7973c381283783cd1043a8c8f61ea5ce7a3a58b0369f0ee0ee975eaf2f2a1b"}, + {file = "pydantic_core-2.18.1-cp311-cp311-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:54c7375c62190a7845091f521add19b0f026bcf6ae674bdb89f296972272e86d"}, + {file = "pydantic_core-2.18.1-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:dd63cec4e26e790b70544ae5cc48d11b515b09e05fdd5eff12e3195f54b8a586"}, + {file = "pydantic_core-2.18.1-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:561cf62c8a3498406495cfc49eee086ed2bb186d08bcc65812b75fda42c38294"}, + {file = "pydantic_core-2.18.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:68717c38a68e37af87c4da20e08f3e27d7e4212e99e96c3d875fbf3f4812abfc"}, + {file = "pydantic_core-2.18.1-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:2d5728e93d28a3c63ee513d9ffbac9c5989de8c76e049dbcb5bfe4b923a9739d"}, + {file = "pydantic_core-2.18.1-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:f0f17814c505f07806e22b28856c59ac80cee7dd0fbb152aed273e116378f519"}, + {file = "pydantic_core-2.18.1-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:d816f44a51ba5175394bc6c7879ca0bd2be560b2c9e9f3411ef3a4cbe644c2e9"}, + {file = "pydantic_core-2.18.1-cp311-none-win32.whl", hash = "sha256:09f03dfc0ef8c22622eaa8608caa4a1e189cfb83ce847045eca34f690895eccb"}, + {file = "pydantic_core-2.18.1-cp311-none-win_amd64.whl", hash = "sha256:27f1009dc292f3b7ca77feb3571c537276b9aad5dd4efb471ac88a8bd09024e9"}, + {file = "pydantic_core-2.18.1-cp311-none-win_arm64.whl", hash = "sha256:48dd883db92e92519201f2b01cafa881e5f7125666141a49ffba8b9facc072b0"}, + {file = "pydantic_core-2.18.1-cp312-cp312-macosx_10_12_x86_64.whl", hash = "sha256:b6b0e4912030c6f28bcb72b9ebe4989d6dc2eebcd2a9cdc35fefc38052dd4fe8"}, + {file = "pydantic_core-2.18.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:f3202a429fe825b699c57892d4371c74cc3456d8d71b7f35d6028c96dfecad31"}, + {file = "pydantic_core-2.18.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a3982b0a32d0a88b3907e4b0dc36809fda477f0757c59a505d4e9b455f384b8b"}, + {file = "pydantic_core-2.18.1-cp312-cp312-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:25595ac311f20e5324d1941909b0d12933f1fd2171075fcff763e90f43e92a0d"}, + {file = "pydantic_core-2.18.1-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:14fe73881cf8e4cbdaded8ca0aa671635b597e42447fec7060d0868b52d074e6"}, + {file = "pydantic_core-2.18.1-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:ca976884ce34070799e4dfc6fbd68cb1d181db1eefe4a3a94798ddfb34b8867f"}, + {file = "pydantic_core-2.18.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:684d840d2c9ec5de9cb397fcb3f36d5ebb6fa0d94734f9886032dd796c1ead06"}, + {file = "pydantic_core-2.18.1-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:54764c083bbe0264f0f746cefcded6cb08fbbaaf1ad1d78fb8a4c30cff999a90"}, + {file = "pydantic_core-2.18.1-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:201713f2f462e5c015b343e86e68bd8a530a4f76609b33d8f0ec65d2b921712a"}, + {file = "pydantic_core-2.18.1-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:fd1a9edb9dd9d79fbeac1ea1f9a8dd527a6113b18d2e9bcc0d541d308dae639b"}, + {file = "pydantic_core-2.18.1-cp312-none-win32.whl", hash = "sha256:d5e6b7155b8197b329dc787356cfd2684c9d6a6b1a197f6bbf45f5555a98d411"}, + {file = "pydantic_core-2.18.1-cp312-none-win_amd64.whl", hash = "sha256:9376d83d686ec62e8b19c0ac3bf8d28d8a5981d0df290196fb6ef24d8a26f0d6"}, + {file = "pydantic_core-2.18.1-cp312-none-win_arm64.whl", hash = "sha256:c562b49c96906b4029b5685075fe1ebd3b5cc2601dfa0b9e16c2c09d6cbce048"}, + {file = "pydantic_core-2.18.1-cp38-cp38-macosx_10_12_x86_64.whl", hash = "sha256:3e352f0191d99fe617371096845070dee295444979efb8f27ad941227de6ad09"}, + {file = "pydantic_core-2.18.1-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:c0295d52b012cbe0d3059b1dba99159c3be55e632aae1999ab74ae2bd86a33d7"}, + {file = "pydantic_core-2.18.1-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:56823a92075780582d1ffd4489a2e61d56fd3ebb4b40b713d63f96dd92d28144"}, + {file = "pydantic_core-2.18.1-cp38-cp38-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:dd3f79e17b56741b5177bcc36307750d50ea0698df6aa82f69c7db32d968c1c2"}, + {file = "pydantic_core-2.18.1-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:38a5024de321d672a132b1834a66eeb7931959c59964b777e8f32dbe9523f6b1"}, + {file = "pydantic_core-2.18.1-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:d2ce426ee691319d4767748c8e0895cfc56593d725594e415f274059bcf3cb76"}, + {file = "pydantic_core-2.18.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:2adaeea59849ec0939af5c5d476935f2bab4b7f0335b0110f0f069a41024278e"}, + {file = "pydantic_core-2.18.1-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:9b6431559676a1079eac0f52d6d0721fb8e3c5ba43c37bc537c8c83724031feb"}, + {file = "pydantic_core-2.18.1-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:85233abb44bc18d16e72dc05bf13848a36f363f83757541f1a97db2f8d58cfd9"}, + {file = "pydantic_core-2.18.1-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:641a018af4fe48be57a2b3d7a1f0f5dbca07c1d00951d3d7463f0ac9dac66622"}, + {file = "pydantic_core-2.18.1-cp38-none-win32.whl", hash = "sha256:63d7523cd95d2fde0d28dc42968ac731b5bb1e516cc56b93a50ab293f4daeaad"}, + {file = "pydantic_core-2.18.1-cp38-none-win_amd64.whl", hash = "sha256:907a4d7720abfcb1c81619863efd47c8a85d26a257a2dbebdb87c3b847df0278"}, + {file = "pydantic_core-2.18.1-cp39-cp39-macosx_10_12_x86_64.whl", hash = "sha256:aad17e462f42ddbef5984d70c40bfc4146c322a2da79715932cd8976317054de"}, + {file = "pydantic_core-2.18.1-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:94b9769ba435b598b547c762184bcfc4783d0d4c7771b04a3b45775c3589ca44"}, + {file = "pydantic_core-2.18.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:80e0e57cc704a52fb1b48f16d5b2c8818da087dbee6f98d9bf19546930dc64b5"}, + {file = "pydantic_core-2.18.1-cp39-cp39-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:76b86e24039c35280ceee6dce7e62945eb93a5175d43689ba98360ab31eebc4a"}, + {file = "pydantic_core-2.18.1-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:12a05db5013ec0ca4a32cc6433f53faa2a014ec364031408540ba858c2172bb0"}, + {file = "pydantic_core-2.18.1-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:250ae39445cb5475e483a36b1061af1bc233de3e9ad0f4f76a71b66231b07f88"}, + {file = "pydantic_core-2.18.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a32204489259786a923e02990249c65b0f17235073149d0033efcebe80095570"}, + {file = "pydantic_core-2.18.1-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:6395a4435fa26519fd96fdccb77e9d00ddae9dd6c742309bd0b5610609ad7fb2"}, + {file = "pydantic_core-2.18.1-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:2533ad2883f001efa72f3d0e733fb846710c3af6dcdd544fe5bf14fa5fe2d7db"}, + {file = "pydantic_core-2.18.1-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:b560b72ed4816aee52783c66854d96157fd8175631f01ef58e894cc57c84f0f6"}, + {file = "pydantic_core-2.18.1-cp39-none-win32.whl", hash = "sha256:582cf2cead97c9e382a7f4d3b744cf0ef1a6e815e44d3aa81af3ad98762f5a9b"}, + {file = "pydantic_core-2.18.1-cp39-none-win_amd64.whl", hash = "sha256:ca71d501629d1fa50ea7fa3b08ba884fe10cefc559f5c6c8dfe9036c16e8ae89"}, + {file = "pydantic_core-2.18.1-pp310-pypy310_pp73-macosx_10_12_x86_64.whl", hash = "sha256:e178e5b66a06ec5bf51668ec0d4ac8cfb2bdcb553b2c207d58148340efd00143"}, + {file = "pydantic_core-2.18.1-pp310-pypy310_pp73-macosx_11_0_arm64.whl", hash = "sha256:72722ce529a76a4637a60be18bd789d8fb871e84472490ed7ddff62d5fed620d"}, + {file = "pydantic_core-2.18.1-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:2fe0c1ce5b129455e43f941f7a46f61f3d3861e571f2905d55cdbb8b5c6f5e2c"}, + {file = "pydantic_core-2.18.1-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d4284c621f06a72ce2cb55f74ea3150113d926a6eb78ab38340c08f770eb9b4d"}, + {file = "pydantic_core-2.18.1-pp310-pypy310_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:1a0c3e718f4e064efde68092d9d974e39572c14e56726ecfaeebbe6544521f47"}, + {file = "pydantic_core-2.18.1-pp310-pypy310_pp73-musllinux_1_1_aarch64.whl", hash = "sha256:2027493cc44c23b598cfaf200936110433d9caa84e2c6cf487a83999638a96ac"}, + {file = "pydantic_core-2.18.1-pp310-pypy310_pp73-musllinux_1_1_x86_64.whl", hash = "sha256:76909849d1a6bffa5a07742294f3fa1d357dc917cb1fe7b470afbc3a7579d539"}, + {file = "pydantic_core-2.18.1-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:ee7ccc7fb7e921d767f853b47814c3048c7de536663e82fbc37f5eb0d532224b"}, + {file = "pydantic_core-2.18.1-pp39-pypy39_pp73-macosx_10_12_x86_64.whl", hash = "sha256:ee2794111c188548a4547eccc73a6a8527fe2af6cf25e1a4ebda2fd01cdd2e60"}, + {file = "pydantic_core-2.18.1-pp39-pypy39_pp73-macosx_11_0_arm64.whl", hash = "sha256:a139fe9f298dc097349fb4f28c8b81cc7a202dbfba66af0e14be5cfca4ef7ce5"}, + {file = "pydantic_core-2.18.1-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d074b07a10c391fc5bbdcb37b2f16f20fcd9e51e10d01652ab298c0d07908ee2"}, + {file = "pydantic_core-2.18.1-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c69567ddbac186e8c0aadc1f324a60a564cfe25e43ef2ce81bcc4b8c3abffbae"}, + {file = "pydantic_core-2.18.1-pp39-pypy39_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:baf1c7b78cddb5af00971ad5294a4583188bda1495b13760d9f03c9483bb6203"}, + {file = "pydantic_core-2.18.1-pp39-pypy39_pp73-musllinux_1_1_aarch64.whl", hash = "sha256:2684a94fdfd1b146ff10689c6e4e815f6a01141781c493b97342cdc5b06f4d5d"}, + {file = "pydantic_core-2.18.1-pp39-pypy39_pp73-musllinux_1_1_x86_64.whl", hash = "sha256:73c1bc8a86a5c9e8721a088df234265317692d0b5cd9e86e975ce3bc3db62a59"}, + {file = "pydantic_core-2.18.1-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:e60defc3c15defb70bb38dd605ff7e0fae5f6c9c7cbfe0ad7868582cb7e844a6"}, + {file = "pydantic_core-2.18.1.tar.gz", hash = "sha256:de9d3e8717560eb05e28739d1b35e4eac2e458553a52a301e51352a7ffc86a35"}, ] [package.dependencies] @@ -368,13 +368,13 @@ testing = ["argcomplete", "attrs (>=19.2.0)", "hypothesis (>=3.56)", "mock", "no [[package]] name = "sniffio" -version = "1.3.0" +version = "1.3.1" description = "Sniff out which async library your code is running under" optional = false python-versions = ">=3.7" files = [ - {file = "sniffio-1.3.0-py3-none-any.whl", hash = "sha256:eecefdce1e5bbfb7ad2eeaabf7c1eeb404d7757c379bd1f7e5cce9d8bf425384"}, - {file = "sniffio-1.3.0.tar.gz", hash = "sha256:e60305c5e5d314f5389259b7f22aaa33d8f7dee49763119234af3755c55b9101"}, + {file = "sniffio-1.3.1-py3-none-any.whl", hash = "sha256:2f6da418d1f1e0fddd844478f41680e794e6051915791a034ff65e5f100525a2"}, + {file = "sniffio-1.3.1.tar.gz", hash = "sha256:f4324edc670a0f49750a81b895f35c3adb843cca46f0530f79fc1babb23789dc"}, ] [[package]] @@ -390,13 +390,13 @@ files = [ [[package]] name = "typing-extensions" -version = "4.9.0" +version = "4.11.0" description = "Backported and Experimental Type Hints for Python 3.8+" optional = false python-versions = ">=3.8" files = [ - {file = "typing_extensions-4.9.0-py3-none-any.whl", hash = "sha256:af72aea155e91adfc61c3ae9e0e342dbc0cba726d6cba4b6c72c1f34e47291cd"}, - {file = "typing_extensions-4.9.0.tar.gz", hash = "sha256:23478f88c37f27d76ac8aee6c905017a143b0b1b886c3c9f66bc2fd94f9f5783"}, + {file = "typing_extensions-4.11.0-py3-none-any.whl", hash = "sha256:c1f94d72897edaf4ce775bb7558d5b79d8126906a14ea5ed1635921406c0387a"}, + {file = "typing_extensions-4.11.0.tar.gz", hash = "sha256:83f085bd5ca59c80295fc2a82ab5dac679cbe02b9f33f7d83af68e241bea51b0"}, ] [metadata] diff --git a/pyproject.toml b/pyproject.toml index a13d8db9..552b0714 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "MergePythonClient" -version = "1.0.7" +version = "1.0.9" description = "" readme = "README.md" authors = [] diff --git a/src/merge/client.py b/src/merge/client.py index 85d06bf1..22cd2f56 100644 --- a/src/merge/client.py +++ b/src/merge/client.py @@ -32,10 +32,10 @@ def __init__( httpx_client=httpx.Client(timeout=timeout) if httpx_client is None else httpx_client, ) self.ats = AtsClient(client_wrapper=self._client_wrapper) - self.crm = CrmClient(client_wrapper=self._client_wrapper) self.filestorage = FilestorageClient(client_wrapper=self._client_wrapper) - self.hris = HrisClient(client_wrapper=self._client_wrapper) + self.crm = CrmClient(client_wrapper=self._client_wrapper) self.ticketing = TicketingClient(client_wrapper=self._client_wrapper) + self.hris = HrisClient(client_wrapper=self._client_wrapper) self.accounting = AccountingClient(client_wrapper=self._client_wrapper) @@ -57,10 +57,10 @@ def __init__( httpx_client=httpx.AsyncClient(timeout=timeout) if httpx_client is None else httpx_client, ) self.ats = AsyncAtsClient(client_wrapper=self._client_wrapper) - self.crm = AsyncCrmClient(client_wrapper=self._client_wrapper) self.filestorage = AsyncFilestorageClient(client_wrapper=self._client_wrapper) - self.hris = AsyncHrisClient(client_wrapper=self._client_wrapper) + self.crm = AsyncCrmClient(client_wrapper=self._client_wrapper) self.ticketing = AsyncTicketingClient(client_wrapper=self._client_wrapper) + self.hris = AsyncHrisClient(client_wrapper=self._client_wrapper) self.accounting = AsyncAccountingClient(client_wrapper=self._client_wrapper) diff --git a/src/merge/core/client_wrapper.py b/src/merge/core/client_wrapper.py index 7797af50..f5e68c46 100644 --- a/src/merge/core/client_wrapper.py +++ b/src/merge/core/client_wrapper.py @@ -21,7 +21,7 @@ def get_headers(self) -> typing.Dict[str, str]: headers: typing.Dict[str, str] = { "X-Fern-Language": "Python", "X-Fern-SDK-Name": "MergePythonClient", - "X-Fern-SDK-Version": "1.0.7", + "X-Fern-SDK-Version": "1.0.9", } if self._account_token is not None: headers["X-Account-Token"] = self._account_token diff --git a/src/merge/environment.py b/src/merge/environment.py index a13660cd..499dced1 100644 --- a/src/merge/environment.py +++ b/src/merge/environment.py @@ -4,6 +4,6 @@ class MergeEnvironment(enum.Enum): - PRODUCTION = "https://api.merge.dev" - SANDBOX = "https://api-sandbox.merge.dev" - PRODUCTION_EU = "https://api-eu.merge.dev" + PRODUCTION = "https://api.merge.dev/api" + SANDBOX = "https://api-sandbox.merge.dev/api" + PRODUCTION_EU = "https://api-eu.merge.dev/api" diff --git a/src/merge/resources/accounting/__init__.py b/src/merge/resources/accounting/__init__.py index 8c69be88..49271a85 100644 --- a/src/merge/resources/accounting/__init__.py +++ b/src/merge/resources/accounting/__init__.py @@ -234,6 +234,14 @@ PaginatedTrackingCategoryList, PaginatedTransactionList, PaginatedVendorCreditList, + PatchedPaymentRequest, + PatchedPaymentRequestAccount, + PatchedPaymentRequestAccountingPeriod, + PatchedPaymentRequestAppliedToLinesItem, + PatchedPaymentRequestCompany, + PatchedPaymentRequestContact, + PatchedPaymentRequestCurrency, + PatchedPaymentRequestTrackingCategoriesItem, Payment, PaymentAccount, PaymentAccountingPeriod, @@ -652,6 +660,14 @@ "PaginatedTrackingCategoryList", "PaginatedTransactionList", "PaginatedVendorCreditList", + "PatchedPaymentRequest", + "PatchedPaymentRequestAccount", + "PatchedPaymentRequestAccountingPeriod", + "PatchedPaymentRequestAppliedToLinesItem", + "PatchedPaymentRequestCompany", + "PatchedPaymentRequestContact", + "PatchedPaymentRequestCurrency", + "PatchedPaymentRequestTrackingCategoriesItem", "Payment", "PaymentAccount", "PaymentAccountingPeriod", diff --git a/src/merge/resources/accounting/resources/account_details/client.py b/src/merge/resources/accounting/resources/account_details/client.py index 972eb784..f0c4dfd6 100644 --- a/src/merge/resources/accounting/resources/account_details/client.py +++ b/src/merge/resources/accounting/resources/account_details/client.py @@ -38,7 +38,7 @@ def retrieve(self, *, request_options: typing.Optional[RequestOptions] = None) - """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/accounting/v1/account-details"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "accounting/v1/account-details"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -84,7 +84,7 @@ async def retrieve(self, *, request_options: typing.Optional[RequestOptions] = N """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/accounting/v1/account-details"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "accounting/v1/account-details"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), diff --git a/src/merge/resources/accounting/resources/account_token/client.py b/src/merge/resources/accounting/resources/account_token/client.py index 45424c0d..d238d2c2 100644 --- a/src/merge/resources/accounting/resources/account_token/client.py +++ b/src/merge/resources/accounting/resources/account_token/client.py @@ -37,13 +37,13 @@ def retrieve(self, public_token: str, *, request_options: typing.Optional[Reques api_key="YOUR_API_KEY", ) client.accounting.account_token.retrieve( - public_token="string", + public_token="public_token", ) """ _response = self._client_wrapper.httpx_client.request( "GET", urllib.parse.urljoin( - f"{self._client_wrapper.get_base_url()}/", f"api/accounting/v1/account-token/{public_token}" + f"{self._client_wrapper.get_base_url()}/", f"accounting/v1/account-token/{public_token}" ), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None @@ -91,13 +91,13 @@ async def retrieve( api_key="YOUR_API_KEY", ) await client.accounting.account_token.retrieve( - public_token="string", + public_token="public_token", ) """ _response = await self._client_wrapper.httpx_client.request( "GET", urllib.parse.urljoin( - f"{self._client_wrapper.get_base_url()}/", f"api/accounting/v1/account-token/{public_token}" + f"{self._client_wrapper.get_base_url()}/", f"accounting/v1/account-token/{public_token}" ), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None diff --git a/src/merge/resources/accounting/resources/accounting_periods/client.py b/src/merge/resources/accounting/resources/accounting_periods/client.py index 2b578f28..495141a9 100644 --- a/src/merge/resources/accounting/resources/accounting_periods/client.py +++ b/src/merge/resources/accounting/resources/accounting_periods/client.py @@ -55,7 +55,7 @@ def list( """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/accounting/v1/accounting-periods"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "accounting/v1/accounting-periods"), params=jsonable_encoder( remove_none_from_dict( { @@ -115,14 +115,12 @@ def retrieve( api_key="YOUR_API_KEY", ) client.accounting.accounting_periods.retrieve( - id="string", + id="id", ) """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin( - f"{self._client_wrapper.get_base_url()}/", f"api/accounting/v1/accounting-periods/{id}" - ), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"accounting/v1/accounting-periods/{id}"), params=jsonable_encoder( remove_none_from_dict( { @@ -193,7 +191,7 @@ async def list( """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/accounting/v1/accounting-periods"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "accounting/v1/accounting-periods"), params=jsonable_encoder( remove_none_from_dict( { @@ -253,14 +251,12 @@ async def retrieve( api_key="YOUR_API_KEY", ) await client.accounting.accounting_periods.retrieve( - id="string", + id="id", ) """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin( - f"{self._client_wrapper.get_base_url()}/", f"api/accounting/v1/accounting-periods/{id}" - ), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"accounting/v1/accounting-periods/{id}"), params=jsonable_encoder( remove_none_from_dict( { diff --git a/src/merge/resources/accounting/resources/accounts/client.py b/src/merge/resources/accounting/resources/accounts/client.py index ea4eb466..5ec50ed2 100644 --- a/src/merge/resources/accounting/resources/accounts/client.py +++ b/src/merge/resources/accounting/resources/accounts/client.py @@ -80,29 +80,21 @@ def list( - remote_id: typing.Optional[str]. The API provider's ID for the given object. - - show_enum_origins: typing.Optional[AccountsListRequestShowEnumOrigins]. Which fields should be returned in non-normalized form. + - show_enum_origins: typing.Optional[AccountsListRequestShowEnumOrigins]. A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from merge.client import Merge - from merge.resources.accounting import ( - AccountsListRequestRemoteFields, - AccountsListRequestShowEnumOrigins, - ) client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) - client.accounting.accounts.list( - expand="company", - remote_fields=AccountsListRequestRemoteFields.CLASSIFICATION, - show_enum_origins=AccountsListRequestShowEnumOrigins.CLASSIFICATION, - ) + client.accounting.accounts.list() """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/accounting/v1/accounts"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "accounting/v1/accounts"), params=jsonable_encoder( remove_none_from_dict( { @@ -175,19 +167,12 @@ def create( api_key="YOUR_API_KEY", ) client.accounting.accounts.create( - model=AccountRequest( - name="Cash", - description="Cash", - type="Asset", - account_number="X12Y9AB", - parent_account="22d92d6c-22f9-11ed-861d-0242ac120002", - company="595c8f97-2ac4-45b7-b000-41bdf43240b5", - ), + model=AccountRequest(), ) """ _response = self._client_wrapper.httpx_client.request( "POST", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/accounting/v1/accounts"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "accounting/v1/accounts"), params=jsonable_encoder( remove_none_from_dict( { @@ -249,30 +234,23 @@ def retrieve( - remote_fields: typing.Optional[AccountsRetrieveRequestRemoteFields]. Deprecated. Use show_enum_origins. - - show_enum_origins: typing.Optional[AccountsRetrieveRequestShowEnumOrigins]. Which fields should be returned in non-normalized form. + - show_enum_origins: typing.Optional[AccountsRetrieveRequestShowEnumOrigins]. A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from merge.client import Merge - from merge.resources.accounting import ( - AccountsRetrieveRequestRemoteFields, - AccountsRetrieveRequestShowEnumOrigins, - ) client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) client.accounting.accounts.retrieve( - id="string", - expand="company", - remote_fields=AccountsRetrieveRequestRemoteFields.CLASSIFICATION, - show_enum_origins=AccountsRetrieveRequestShowEnumOrigins.CLASSIFICATION, + id="id", ) """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"api/accounting/v1/accounts/{id}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"accounting/v1/accounts/{id}"), params=jsonable_encoder( remove_none_from_dict( { @@ -325,7 +303,7 @@ def meta_post_retrieve(self, *, request_options: typing.Optional[RequestOptions] """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/accounting/v1/accounts/meta/post"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "accounting/v1/accounts/meta/post"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -400,29 +378,21 @@ async def list( - remote_id: typing.Optional[str]. The API provider's ID for the given object. - - show_enum_origins: typing.Optional[AccountsListRequestShowEnumOrigins]. Which fields should be returned in non-normalized form. + - show_enum_origins: typing.Optional[AccountsListRequestShowEnumOrigins]. A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from merge.client import AsyncMerge - from merge.resources.accounting import ( - AccountsListRequestRemoteFields, - AccountsListRequestShowEnumOrigins, - ) client = AsyncMerge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) - await client.accounting.accounts.list( - expand="company", - remote_fields=AccountsListRequestRemoteFields.CLASSIFICATION, - show_enum_origins=AccountsListRequestShowEnumOrigins.CLASSIFICATION, - ) + await client.accounting.accounts.list() """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/accounting/v1/accounts"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "accounting/v1/accounts"), params=jsonable_encoder( remove_none_from_dict( { @@ -495,19 +465,12 @@ async def create( api_key="YOUR_API_KEY", ) await client.accounting.accounts.create( - model=AccountRequest( - name="Cash", - description="Cash", - type="Asset", - account_number="X12Y9AB", - parent_account="22d92d6c-22f9-11ed-861d-0242ac120002", - company="595c8f97-2ac4-45b7-b000-41bdf43240b5", - ), + model=AccountRequest(), ) """ _response = await self._client_wrapper.httpx_client.request( "POST", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/accounting/v1/accounts"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "accounting/v1/accounts"), params=jsonable_encoder( remove_none_from_dict( { @@ -569,30 +532,23 @@ async def retrieve( - remote_fields: typing.Optional[AccountsRetrieveRequestRemoteFields]. Deprecated. Use show_enum_origins. - - show_enum_origins: typing.Optional[AccountsRetrieveRequestShowEnumOrigins]. Which fields should be returned in non-normalized form. + - show_enum_origins: typing.Optional[AccountsRetrieveRequestShowEnumOrigins]. A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from merge.client import AsyncMerge - from merge.resources.accounting import ( - AccountsRetrieveRequestRemoteFields, - AccountsRetrieveRequestShowEnumOrigins, - ) client = AsyncMerge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) await client.accounting.accounts.retrieve( - id="string", - expand="company", - remote_fields=AccountsRetrieveRequestRemoteFields.CLASSIFICATION, - show_enum_origins=AccountsRetrieveRequestShowEnumOrigins.CLASSIFICATION, + id="id", ) """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"api/accounting/v1/accounts/{id}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"accounting/v1/accounts/{id}"), params=jsonable_encoder( remove_none_from_dict( { @@ -645,7 +601,7 @@ async def meta_post_retrieve(self, *, request_options: typing.Optional[RequestOp """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/accounting/v1/accounts/meta/post"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "accounting/v1/accounts/meta/post"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), diff --git a/src/merge/resources/accounting/resources/addresses/client.py b/src/merge/resources/accounting/resources/addresses/client.py index 6082a1bd..615667f4 100644 --- a/src/merge/resources/accounting/resources/addresses/client.py +++ b/src/merge/resources/accounting/resources/addresses/client.py @@ -40,7 +40,7 @@ def retrieve( - remote_fields: typing.Optional[typing.Literal["type"]]. Deprecated. Use show_enum_origins. - - show_enum_origins: typing.Optional[typing.Literal["type"]]. Which fields should be returned in non-normalized form. + - show_enum_origins: typing.Optional[typing.Literal["type"]]. A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- @@ -51,14 +51,12 @@ def retrieve( api_key="YOUR_API_KEY", ) client.accounting.addresses.retrieve( - id="string", - remote_fields="type", - show_enum_origins="type", + id="id", ) """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"api/accounting/v1/addresses/{id}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"accounting/v1/addresses/{id}"), params=jsonable_encoder( remove_none_from_dict( { @@ -117,7 +115,7 @@ async def retrieve( - remote_fields: typing.Optional[typing.Literal["type"]]. Deprecated. Use show_enum_origins. - - show_enum_origins: typing.Optional[typing.Literal["type"]]. Which fields should be returned in non-normalized form. + - show_enum_origins: typing.Optional[typing.Literal["type"]]. A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- @@ -128,14 +126,12 @@ async def retrieve( api_key="YOUR_API_KEY", ) await client.accounting.addresses.retrieve( - id="string", - remote_fields="type", - show_enum_origins="type", + id="id", ) """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"api/accounting/v1/addresses/{id}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"accounting/v1/addresses/{id}"), params=jsonable_encoder( remove_none_from_dict( { diff --git a/src/merge/resources/accounting/resources/async_passthrough/client.py b/src/merge/resources/accounting/resources/async_passthrough/client.py index 989bc572..e2b160d0 100644 --- a/src/merge/resources/accounting/resources/async_passthrough/client.py +++ b/src/merge/resources/accounting/resources/async_passthrough/client.py @@ -38,11 +38,7 @@ def create( - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from merge.client import Merge - from merge.resources.accounting import ( - DataPassthroughRequest, - MethodEnum, - RequestFormatEnum, - ) + from merge.resources.accounting import DataPassthroughRequest, MethodEnum client = Merge( account_token="YOUR_ACCOUNT_TOKEN", @@ -52,14 +48,12 @@ def create( request=DataPassthroughRequest( method=MethodEnum.GET, path="/scooters", - data='{"company": "Lime", "model": "Gen 2.5"}', - request_format=RequestFormatEnum.JSON, ), ) """ _response = self._client_wrapper.httpx_client.request( "POST", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/accounting/v1/async-passthrough"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "accounting/v1/async-passthrough"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -107,14 +101,14 @@ def retrieve( api_key="YOUR_API_KEY", ) client.accounting.async_passthrough.retrieve( - async_passthrough_receipt_id="string", + async_passthrough_receipt_id="async_passthrough_receipt_id", ) """ _response = self._client_wrapper.httpx_client.request( "GET", urllib.parse.urljoin( f"{self._client_wrapper.get_base_url()}/", - f"api/accounting/v1/async-passthrough/{async_passthrough_receipt_id}", + f"accounting/v1/async-passthrough/{async_passthrough_receipt_id}", ), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None @@ -156,11 +150,7 @@ async def create( - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from merge.client import AsyncMerge - from merge.resources.accounting import ( - DataPassthroughRequest, - MethodEnum, - RequestFormatEnum, - ) + from merge.resources.accounting import DataPassthroughRequest, MethodEnum client = AsyncMerge( account_token="YOUR_ACCOUNT_TOKEN", @@ -170,14 +160,12 @@ async def create( request=DataPassthroughRequest( method=MethodEnum.GET, path="/scooters", - data='{"company": "Lime", "model": "Gen 2.5"}', - request_format=RequestFormatEnum.JSON, ), ) """ _response = await self._client_wrapper.httpx_client.request( "POST", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/accounting/v1/async-passthrough"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "accounting/v1/async-passthrough"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -225,14 +213,14 @@ async def retrieve( api_key="YOUR_API_KEY", ) await client.accounting.async_passthrough.retrieve( - async_passthrough_receipt_id="string", + async_passthrough_receipt_id="async_passthrough_receipt_id", ) """ _response = await self._client_wrapper.httpx_client.request( "GET", urllib.parse.urljoin( f"{self._client_wrapper.get_base_url()}/", - f"api/accounting/v1/async-passthrough/{async_passthrough_receipt_id}", + f"accounting/v1/async-passthrough/{async_passthrough_receipt_id}", ), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None diff --git a/src/merge/resources/accounting/resources/attachments/client.py b/src/merge/resources/accounting/resources/attachments/client.py index a65afb4a..6d837833 100644 --- a/src/merge/resources/accounting/resources/attachments/client.py +++ b/src/merge/resources/accounting/resources/attachments/client.py @@ -81,7 +81,7 @@ def list( """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/accounting/v1/attachments"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "accounting/v1/attachments"), params=jsonable_encoder( remove_none_from_dict( { @@ -151,16 +151,12 @@ def create( api_key="YOUR_API_KEY", ) client.accounting.attachments.create( - model=AccountingAttachmentRequest( - file_name="invoice.png", - file_url="https://merge-brand.s3.amazonaws.com/20210315/rect-logo-270x80%402x.png", - company="595c8f97-2ac4-45b7-b000-41bdf43240b5", - ), + model=AccountingAttachmentRequest(), ) """ _response = self._client_wrapper.httpx_client.request( "POST", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/accounting/v1/attachments"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "accounting/v1/attachments"), params=jsonable_encoder( remove_none_from_dict( { @@ -224,12 +220,12 @@ def retrieve( api_key="YOUR_API_KEY", ) client.accounting.attachments.retrieve( - id="string", + id="id", ) """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"api/accounting/v1/attachments/{id}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"accounting/v1/attachments/{id}"), params=jsonable_encoder( remove_none_from_dict( { @@ -279,7 +275,7 @@ def meta_post_retrieve(self, *, request_options: typing.Optional[RequestOptions] """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/accounting/v1/attachments/meta/post"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "accounting/v1/attachments/meta/post"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -359,7 +355,7 @@ async def list( """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/accounting/v1/attachments"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "accounting/v1/attachments"), params=jsonable_encoder( remove_none_from_dict( { @@ -429,16 +425,12 @@ async def create( api_key="YOUR_API_KEY", ) await client.accounting.attachments.create( - model=AccountingAttachmentRequest( - file_name="invoice.png", - file_url="https://merge-brand.s3.amazonaws.com/20210315/rect-logo-270x80%402x.png", - company="595c8f97-2ac4-45b7-b000-41bdf43240b5", - ), + model=AccountingAttachmentRequest(), ) """ _response = await self._client_wrapper.httpx_client.request( "POST", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/accounting/v1/attachments"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "accounting/v1/attachments"), params=jsonable_encoder( remove_none_from_dict( { @@ -502,12 +494,12 @@ async def retrieve( api_key="YOUR_API_KEY", ) await client.accounting.attachments.retrieve( - id="string", + id="id", ) """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"api/accounting/v1/attachments/{id}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"accounting/v1/attachments/{id}"), params=jsonable_encoder( remove_none_from_dict( { @@ -557,7 +549,7 @@ async def meta_post_retrieve(self, *, request_options: typing.Optional[RequestOp """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/accounting/v1/attachments/meta/post"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "accounting/v1/attachments/meta/post"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), diff --git a/src/merge/resources/accounting/resources/audit_trail/client.py b/src/merge/resources/accounting/resources/audit_trail/client.py index c14c54ed..447aebc2 100644 --- a/src/merge/resources/accounting/resources/audit_trail/client.py +++ b/src/merge/resources/accounting/resources/audit_trail/client.py @@ -40,7 +40,7 @@ def list( - end_date: typing.Optional[str]. If included, will only include audit trail events that occurred before this time - - event_type: typing.Optional[str]. If included, will only include events with the given event type. Possible values include: `CREATED_REMOTE_PRODUCTION_API_KEY`, `DELETED_REMOTE_PRODUCTION_API_KEY`, `CREATED_TEST_API_KEY`, `DELETED_TEST_API_KEY`, `REGENERATED_PRODUCTION_API_KEY`, `INVITED_USER`, `TWO_FACTOR_AUTH_ENABLED`, `TWO_FACTOR_AUTH_DISABLED`, `DELETED_LINKED_ACCOUNT`, `CREATED_DESTINATION`, `DELETED_DESTINATION`, `CHANGED_DESTINATION`, `CHANGED_SCOPES`, `CHANGED_PERSONAL_INFORMATION`, `CHANGED_ORGANIZATION_SETTINGS`, `ENABLED_INTEGRATION`, `DISABLED_INTEGRATION`, `ENABLED_CATEGORY`, `DISABLED_CATEGORY`, `CHANGED_PASSWORD`, `RESET_PASSWORD`, `ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION`, `ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT`, `DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION`, `DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT`, `CREATED_INTEGRATION_WIDE_FIELD_MAPPING`, `CREATED_LINKED_ACCOUNT_FIELD_MAPPING`, `CHANGED_INTEGRATION_WIDE_FIELD_MAPPING`, `CHANGED_LINKED_ACCOUNT_FIELD_MAPPING`, `DELETED_INTEGRATION_WIDE_FIELD_MAPPING`, `DELETED_LINKED_ACCOUNT_FIELD_MAPPING` + - event_type: typing.Optional[str]. If included, will only include events with the given event type. Possible values include: `CREATED_REMOTE_PRODUCTION_API_KEY`, `DELETED_REMOTE_PRODUCTION_API_KEY`, `CREATED_TEST_API_KEY`, `DELETED_TEST_API_KEY`, `REGENERATED_PRODUCTION_API_KEY`, `INVITED_USER`, `TWO_FACTOR_AUTH_ENABLED`, `TWO_FACTOR_AUTH_DISABLED`, `DELETED_LINKED_ACCOUNT`, `CREATED_DESTINATION`, `DELETED_DESTINATION`, `CHANGED_DESTINATION`, `CHANGED_SCOPES`, `CHANGED_PERSONAL_INFORMATION`, `CHANGED_ORGANIZATION_SETTINGS`, `ENABLED_INTEGRATION`, `DISABLED_INTEGRATION`, `ENABLED_CATEGORY`, `DISABLED_CATEGORY`, `CHANGED_PASSWORD`, `RESET_PASSWORD`, `ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION`, `ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT`, `DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION`, `DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT`, `CREATED_INTEGRATION_WIDE_FIELD_MAPPING`, `CREATED_LINKED_ACCOUNT_FIELD_MAPPING`, `CHANGED_INTEGRATION_WIDE_FIELD_MAPPING`, `CHANGED_LINKED_ACCOUNT_FIELD_MAPPING`, `DELETED_INTEGRATION_WIDE_FIELD_MAPPING`, `DELETED_LINKED_ACCOUNT_FIELD_MAPPING`, `FORCED_LINKED_ACCOUNT_RESYNC`, `MUTED_ISSUE`, `GENERATED_MAGIC_LINK` - page_size: typing.Optional[int]. Number of results to return per page. @@ -60,7 +60,7 @@ def list( """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/accounting/v1/audit-trail"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "accounting/v1/audit-trail"), params=jsonable_encoder( remove_none_from_dict( { @@ -122,7 +122,7 @@ async def list( - end_date: typing.Optional[str]. If included, will only include audit trail events that occurred before this time - - event_type: typing.Optional[str]. If included, will only include events with the given event type. Possible values include: `CREATED_REMOTE_PRODUCTION_API_KEY`, `DELETED_REMOTE_PRODUCTION_API_KEY`, `CREATED_TEST_API_KEY`, `DELETED_TEST_API_KEY`, `REGENERATED_PRODUCTION_API_KEY`, `INVITED_USER`, `TWO_FACTOR_AUTH_ENABLED`, `TWO_FACTOR_AUTH_DISABLED`, `DELETED_LINKED_ACCOUNT`, `CREATED_DESTINATION`, `DELETED_DESTINATION`, `CHANGED_DESTINATION`, `CHANGED_SCOPES`, `CHANGED_PERSONAL_INFORMATION`, `CHANGED_ORGANIZATION_SETTINGS`, `ENABLED_INTEGRATION`, `DISABLED_INTEGRATION`, `ENABLED_CATEGORY`, `DISABLED_CATEGORY`, `CHANGED_PASSWORD`, `RESET_PASSWORD`, `ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION`, `ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT`, `DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION`, `DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT`, `CREATED_INTEGRATION_WIDE_FIELD_MAPPING`, `CREATED_LINKED_ACCOUNT_FIELD_MAPPING`, `CHANGED_INTEGRATION_WIDE_FIELD_MAPPING`, `CHANGED_LINKED_ACCOUNT_FIELD_MAPPING`, `DELETED_INTEGRATION_WIDE_FIELD_MAPPING`, `DELETED_LINKED_ACCOUNT_FIELD_MAPPING` + - event_type: typing.Optional[str]. If included, will only include events with the given event type. Possible values include: `CREATED_REMOTE_PRODUCTION_API_KEY`, `DELETED_REMOTE_PRODUCTION_API_KEY`, `CREATED_TEST_API_KEY`, `DELETED_TEST_API_KEY`, `REGENERATED_PRODUCTION_API_KEY`, `INVITED_USER`, `TWO_FACTOR_AUTH_ENABLED`, `TWO_FACTOR_AUTH_DISABLED`, `DELETED_LINKED_ACCOUNT`, `CREATED_DESTINATION`, `DELETED_DESTINATION`, `CHANGED_DESTINATION`, `CHANGED_SCOPES`, `CHANGED_PERSONAL_INFORMATION`, `CHANGED_ORGANIZATION_SETTINGS`, `ENABLED_INTEGRATION`, `DISABLED_INTEGRATION`, `ENABLED_CATEGORY`, `DISABLED_CATEGORY`, `CHANGED_PASSWORD`, `RESET_PASSWORD`, `ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION`, `ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT`, `DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION`, `DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT`, `CREATED_INTEGRATION_WIDE_FIELD_MAPPING`, `CREATED_LINKED_ACCOUNT_FIELD_MAPPING`, `CHANGED_INTEGRATION_WIDE_FIELD_MAPPING`, `CHANGED_LINKED_ACCOUNT_FIELD_MAPPING`, `DELETED_INTEGRATION_WIDE_FIELD_MAPPING`, `DELETED_LINKED_ACCOUNT_FIELD_MAPPING`, `FORCED_LINKED_ACCOUNT_RESYNC`, `MUTED_ISSUE`, `GENERATED_MAGIC_LINK` - page_size: typing.Optional[int]. Number of results to return per page. @@ -142,7 +142,7 @@ async def list( """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/accounting/v1/audit-trail"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "accounting/v1/audit-trail"), params=jsonable_encoder( remove_none_from_dict( { diff --git a/src/merge/resources/accounting/resources/available_actions/client.py b/src/merge/resources/accounting/resources/available_actions/client.py index ccf1946f..770d1163 100644 --- a/src/merge/resources/accounting/resources/available_actions/client.py +++ b/src/merge/resources/accounting/resources/available_actions/client.py @@ -38,7 +38,7 @@ def retrieve(self, *, request_options: typing.Optional[RequestOptions] = None) - """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/accounting/v1/available-actions"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "accounting/v1/available-actions"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -84,7 +84,7 @@ async def retrieve(self, *, request_options: typing.Optional[RequestOptions] = N """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/accounting/v1/available-actions"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "accounting/v1/available-actions"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), diff --git a/src/merge/resources/accounting/resources/balance_sheets/client.py b/src/merge/resources/accounting/resources/balance_sheets/client.py index f020cc61..7a9e3d38 100644 --- a/src/merge/resources/accounting/resources/balance_sheets/client.py +++ b/src/merge/resources/accounting/resources/balance_sheets/client.py @@ -74,13 +74,11 @@ def list( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) - client.accounting.balance_sheets.list( - expand="company", - ) + client.accounting.balance_sheets.list() """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/accounting/v1/balance-sheets"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "accounting/v1/balance-sheets"), params=jsonable_encoder( remove_none_from_dict( { @@ -150,13 +148,12 @@ def retrieve( api_key="YOUR_API_KEY", ) client.accounting.balance_sheets.retrieve( - id="string", - expand="company", + id="id", ) """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"api/accounting/v1/balance-sheets/{id}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"accounting/v1/balance-sheets/{id}"), params=jsonable_encoder( remove_none_from_dict( { @@ -245,13 +242,11 @@ async def list( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) - await client.accounting.balance_sheets.list( - expand="company", - ) + await client.accounting.balance_sheets.list() """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/accounting/v1/balance-sheets"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "accounting/v1/balance-sheets"), params=jsonable_encoder( remove_none_from_dict( { @@ -321,13 +316,12 @@ async def retrieve( api_key="YOUR_API_KEY", ) await client.accounting.balance_sheets.retrieve( - id="string", - expand="company", + id="id", ) """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"api/accounting/v1/balance-sheets/{id}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"accounting/v1/balance-sheets/{id}"), params=jsonable_encoder( remove_none_from_dict( { diff --git a/src/merge/resources/accounting/resources/cash_flow_statements/client.py b/src/merge/resources/accounting/resources/cash_flow_statements/client.py index 108012e2..a85b639c 100644 --- a/src/merge/resources/accounting/resources/cash_flow_statements/client.py +++ b/src/merge/resources/accounting/resources/cash_flow_statements/client.py @@ -74,13 +74,11 @@ def list( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) - client.accounting.cash_flow_statements.list( - expand="company", - ) + client.accounting.cash_flow_statements.list() """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/accounting/v1/cash-flow-statements"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "accounting/v1/cash-flow-statements"), params=jsonable_encoder( remove_none_from_dict( { @@ -150,15 +148,12 @@ def retrieve( api_key="YOUR_API_KEY", ) client.accounting.cash_flow_statements.retrieve( - id="string", - expand="company", + id="id", ) """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin( - f"{self._client_wrapper.get_base_url()}/", f"api/accounting/v1/cash-flow-statements/{id}" - ), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"accounting/v1/cash-flow-statements/{id}"), params=jsonable_encoder( remove_none_from_dict( { @@ -247,13 +242,11 @@ async def list( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) - await client.accounting.cash_flow_statements.list( - expand="company", - ) + await client.accounting.cash_flow_statements.list() """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/accounting/v1/cash-flow-statements"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "accounting/v1/cash-flow-statements"), params=jsonable_encoder( remove_none_from_dict( { @@ -323,15 +316,12 @@ async def retrieve( api_key="YOUR_API_KEY", ) await client.accounting.cash_flow_statements.retrieve( - id="string", - expand="company", + id="id", ) """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin( - f"{self._client_wrapper.get_base_url()}/", f"api/accounting/v1/cash-flow-statements/{id}" - ), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"accounting/v1/cash-flow-statements/{id}"), params=jsonable_encoder( remove_none_from_dict( { diff --git a/src/merge/resources/accounting/resources/company_info/client.py b/src/merge/resources/accounting/resources/company_info/client.py index d20d4b27..e1ae7134 100644 --- a/src/merge/resources/accounting/resources/company_info/client.py +++ b/src/merge/resources/accounting/resources/company_info/client.py @@ -68,19 +68,16 @@ def list( - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from merge.client import Merge - from merge.resources.accounting import CompanyInfoListRequestExpand client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) - client.accounting.company_info.list( - expand=CompanyInfoListRequestExpand.ADDRESSES, - ) + client.accounting.company_info.list() """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/accounting/v1/company-info"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "accounting/v1/company-info"), params=jsonable_encoder( remove_none_from_dict( { @@ -143,20 +140,18 @@ def retrieve( - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from merge.client import Merge - from merge.resources.accounting import CompanyInfoRetrieveRequestExpand client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) client.accounting.company_info.retrieve( - id="string", - expand=CompanyInfoRetrieveRequestExpand.ADDRESSES, + id="id", ) """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"api/accounting/v1/company-info/{id}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"accounting/v1/company-info/{id}"), params=jsonable_encoder( remove_none_from_dict( { @@ -237,19 +232,16 @@ async def list( - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from merge.client import AsyncMerge - from merge.resources.accounting import CompanyInfoListRequestExpand client = AsyncMerge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) - await client.accounting.company_info.list( - expand=CompanyInfoListRequestExpand.ADDRESSES, - ) + await client.accounting.company_info.list() """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/accounting/v1/company-info"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "accounting/v1/company-info"), params=jsonable_encoder( remove_none_from_dict( { @@ -312,20 +304,18 @@ async def retrieve( - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from merge.client import AsyncMerge - from merge.resources.accounting import CompanyInfoRetrieveRequestExpand client = AsyncMerge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) await client.accounting.company_info.retrieve( - id="string", - expand=CompanyInfoRetrieveRequestExpand.ADDRESSES, + id="id", ) """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"api/accounting/v1/company-info/{id}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"accounting/v1/company-info/{id}"), params=jsonable_encoder( remove_none_from_dict( { diff --git a/src/merge/resources/accounting/resources/contacts/client.py b/src/merge/resources/accounting/resources/contacts/client.py index 5d576210..b4c8efb9 100644 --- a/src/merge/resources/accounting/resources/contacts/client.py +++ b/src/merge/resources/accounting/resources/contacts/client.py @@ -84,26 +84,21 @@ def list( - remote_id: typing.Optional[str]. The API provider's ID for the given object. - - show_enum_origins: typing.Optional[typing.Literal["status"]]. Which fields should be returned in non-normalized form. + - show_enum_origins: typing.Optional[typing.Literal["status"]]. A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from merge.client import Merge - from merge.resources.accounting import ContactsListRequestExpand client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) - client.accounting.contacts.list( - expand=ContactsListRequestExpand.ADDRESSES, - remote_fields="status", - show_enum_origins="status", - ) + client.accounting.contacts.list() """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/accounting/v1/contacts"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "accounting/v1/contacts"), params=jsonable_encoder( remove_none_from_dict( { @@ -178,19 +173,12 @@ def create( api_key="YOUR_API_KEY", ) client.accounting.contacts.create( - model=ContactRequest( - name="Gil Feig's Pickleball Team", - is_customer=True, - email_address="pickleball@merge.dev", - tax_number="12-3456789", - currency="USD", - company="595c8f97-2ac4-45b7-b000-41bdf43240b5", - ), + model=ContactRequest(), ) """ _response = self._client_wrapper.httpx_client.request( "POST", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/accounting/v1/contacts"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "accounting/v1/contacts"), params=jsonable_encoder( remove_none_from_dict( { @@ -252,27 +240,23 @@ def retrieve( - remote_fields: typing.Optional[typing.Literal["status"]]. Deprecated. Use show_enum_origins. - - show_enum_origins: typing.Optional[typing.Literal["status"]]. Which fields should be returned in non-normalized form. + - show_enum_origins: typing.Optional[typing.Literal["status"]]. A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from merge.client import Merge - from merge.resources.accounting import ContactsRetrieveRequestExpand client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) client.accounting.contacts.retrieve( - id="string", - expand=ContactsRetrieveRequestExpand.ADDRESSES, - remote_fields="status", - show_enum_origins="status", + id="id", ) """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"api/accounting/v1/contacts/{id}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"accounting/v1/contacts/{id}"), params=jsonable_encoder( remove_none_from_dict( { @@ -325,7 +309,7 @@ def meta_post_retrieve(self, *, request_options: typing.Optional[RequestOptions] """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/accounting/v1/contacts/meta/post"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "accounting/v1/contacts/meta/post"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -406,26 +390,21 @@ async def list( - remote_id: typing.Optional[str]. The API provider's ID for the given object. - - show_enum_origins: typing.Optional[typing.Literal["status"]]. Which fields should be returned in non-normalized form. + - show_enum_origins: typing.Optional[typing.Literal["status"]]. A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from merge.client import AsyncMerge - from merge.resources.accounting import ContactsListRequestExpand client = AsyncMerge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) - await client.accounting.contacts.list( - expand=ContactsListRequestExpand.ADDRESSES, - remote_fields="status", - show_enum_origins="status", - ) + await client.accounting.contacts.list() """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/accounting/v1/contacts"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "accounting/v1/contacts"), params=jsonable_encoder( remove_none_from_dict( { @@ -500,19 +479,12 @@ async def create( api_key="YOUR_API_KEY", ) await client.accounting.contacts.create( - model=ContactRequest( - name="Gil Feig's Pickleball Team", - is_customer=True, - email_address="pickleball@merge.dev", - tax_number="12-3456789", - currency="USD", - company="595c8f97-2ac4-45b7-b000-41bdf43240b5", - ), + model=ContactRequest(), ) """ _response = await self._client_wrapper.httpx_client.request( "POST", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/accounting/v1/contacts"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "accounting/v1/contacts"), params=jsonable_encoder( remove_none_from_dict( { @@ -574,27 +546,23 @@ async def retrieve( - remote_fields: typing.Optional[typing.Literal["status"]]. Deprecated. Use show_enum_origins. - - show_enum_origins: typing.Optional[typing.Literal["status"]]. Which fields should be returned in non-normalized form. + - show_enum_origins: typing.Optional[typing.Literal["status"]]. A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from merge.client import AsyncMerge - from merge.resources.accounting import ContactsRetrieveRequestExpand client = AsyncMerge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) await client.accounting.contacts.retrieve( - id="string", - expand=ContactsRetrieveRequestExpand.ADDRESSES, - remote_fields="status", - show_enum_origins="status", + id="id", ) """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"api/accounting/v1/contacts/{id}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"accounting/v1/contacts/{id}"), params=jsonable_encoder( remove_none_from_dict( { @@ -647,7 +615,7 @@ async def meta_post_retrieve(self, *, request_options: typing.Optional[RequestOp """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/accounting/v1/contacts/meta/post"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "accounting/v1/contacts/meta/post"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), diff --git a/src/merge/resources/accounting/resources/credit_notes/client.py b/src/merge/resources/accounting/resources/credit_notes/client.py index 47b4f998..b8ae3804 100644 --- a/src/merge/resources/accounting/resources/credit_notes/client.py +++ b/src/merge/resources/accounting/resources/credit_notes/client.py @@ -78,7 +78,7 @@ def list( - remote_id: typing.Optional[str]. The API provider's ID for the given object. - - show_enum_origins: typing.Optional[CreditNotesListRequestShowEnumOrigins]. Which fields should be returned in non-normalized form. + - show_enum_origins: typing.Optional[CreditNotesListRequestShowEnumOrigins]. A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) - transaction_date_after: typing.Optional[dt.datetime]. If provided, will only return objects created after this datetime. @@ -87,25 +87,16 @@ def list( - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from merge.client import Merge - from merge.resources.accounting import ( - CreditNotesListRequestExpand, - CreditNotesListRequestRemoteFields, - CreditNotesListRequestShowEnumOrigins, - ) client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) - client.accounting.credit_notes.list( - expand=CreditNotesListRequestExpand.ACCOUNTING_PERIOD, - remote_fields=CreditNotesListRequestRemoteFields.STATUS, - show_enum_origins=CreditNotesListRequestShowEnumOrigins.STATUS, - ) + client.accounting.credit_notes.list() """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/accounting/v1/credit-notes"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "accounting/v1/credit-notes"), params=jsonable_encoder( remove_none_from_dict( { @@ -178,31 +169,23 @@ def retrieve( - remote_fields: typing.Optional[CreditNotesRetrieveRequestRemoteFields]. Deprecated. Use show_enum_origins. - - show_enum_origins: typing.Optional[CreditNotesRetrieveRequestShowEnumOrigins]. Which fields should be returned in non-normalized form. + - show_enum_origins: typing.Optional[CreditNotesRetrieveRequestShowEnumOrigins]. A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from merge.client import Merge - from merge.resources.accounting import ( - CreditNotesRetrieveRequestExpand, - CreditNotesRetrieveRequestRemoteFields, - CreditNotesRetrieveRequestShowEnumOrigins, - ) client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) client.accounting.credit_notes.retrieve( - id="string", - expand=CreditNotesRetrieveRequestExpand.ACCOUNTING_PERIOD, - remote_fields=CreditNotesRetrieveRequestRemoteFields.STATUS, - show_enum_origins=CreditNotesRetrieveRequestShowEnumOrigins.STATUS, + id="id", ) """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"api/accounting/v1/credit-notes/{id}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"accounting/v1/credit-notes/{id}"), params=jsonable_encoder( remove_none_from_dict( { @@ -291,7 +274,7 @@ async def list( - remote_id: typing.Optional[str]. The API provider's ID for the given object. - - show_enum_origins: typing.Optional[CreditNotesListRequestShowEnumOrigins]. Which fields should be returned in non-normalized form. + - show_enum_origins: typing.Optional[CreditNotesListRequestShowEnumOrigins]. A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) - transaction_date_after: typing.Optional[dt.datetime]. If provided, will only return objects created after this datetime. @@ -300,25 +283,16 @@ async def list( - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from merge.client import AsyncMerge - from merge.resources.accounting import ( - CreditNotesListRequestExpand, - CreditNotesListRequestRemoteFields, - CreditNotesListRequestShowEnumOrigins, - ) client = AsyncMerge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) - await client.accounting.credit_notes.list( - expand=CreditNotesListRequestExpand.ACCOUNTING_PERIOD, - remote_fields=CreditNotesListRequestRemoteFields.STATUS, - show_enum_origins=CreditNotesListRequestShowEnumOrigins.STATUS, - ) + await client.accounting.credit_notes.list() """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/accounting/v1/credit-notes"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "accounting/v1/credit-notes"), params=jsonable_encoder( remove_none_from_dict( { @@ -391,31 +365,23 @@ async def retrieve( - remote_fields: typing.Optional[CreditNotesRetrieveRequestRemoteFields]. Deprecated. Use show_enum_origins. - - show_enum_origins: typing.Optional[CreditNotesRetrieveRequestShowEnumOrigins]. Which fields should be returned in non-normalized form. + - show_enum_origins: typing.Optional[CreditNotesRetrieveRequestShowEnumOrigins]. A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from merge.client import AsyncMerge - from merge.resources.accounting import ( - CreditNotesRetrieveRequestExpand, - CreditNotesRetrieveRequestRemoteFields, - CreditNotesRetrieveRequestShowEnumOrigins, - ) client = AsyncMerge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) await client.accounting.credit_notes.retrieve( - id="string", - expand=CreditNotesRetrieveRequestExpand.ACCOUNTING_PERIOD, - remote_fields=CreditNotesRetrieveRequestRemoteFields.STATUS, - show_enum_origins=CreditNotesRetrieveRequestShowEnumOrigins.STATUS, + id="id", ) """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"api/accounting/v1/credit-notes/{id}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"accounting/v1/credit-notes/{id}"), params=jsonable_encoder( remove_none_from_dict( { diff --git a/src/merge/resources/accounting/resources/delete_account/client.py b/src/merge/resources/accounting/resources/delete_account/client.py index 61478915..ae7305b4 100644 --- a/src/merge/resources/accounting/resources/delete_account/client.py +++ b/src/merge/resources/accounting/resources/delete_account/client.py @@ -32,7 +32,7 @@ def delete(self, *, request_options: typing.Optional[RequestOptions] = None) -> """ _response = self._client_wrapper.httpx_client.request( "POST", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/accounting/v1/delete-account"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "accounting/v1/delete-account"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -81,7 +81,7 @@ async def delete(self, *, request_options: typing.Optional[RequestOptions] = Non """ _response = await self._client_wrapper.httpx_client.request( "POST", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/accounting/v1/delete-account"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "accounting/v1/delete-account"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), diff --git a/src/merge/resources/accounting/resources/expenses/client.py b/src/merge/resources/accounting/resources/expenses/client.py index 59f05dbd..6ec336d9 100644 --- a/src/merge/resources/accounting/resources/expenses/client.py +++ b/src/merge/resources/accounting/resources/expenses/client.py @@ -83,19 +83,16 @@ def list( - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from merge.client import Merge - from merge.resources.accounting import ExpensesListRequestExpand client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) - client.accounting.expenses.list( - expand=ExpensesListRequestExpand.ACCOUNT, - ) + client.accounting.expenses.list() """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/accounting/v1/expenses"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "accounting/v1/expenses"), params=jsonable_encoder( remove_none_from_dict( { @@ -172,16 +169,12 @@ def create( api_key="YOUR_API_KEY", ) client.accounting.expenses.create( - model=ExpenseRequest( - total_amount=10000.0, - exchange_rate="2.9", - memo="New employee supplies", - ), + model=ExpenseRequest(), ) """ _response = self._client_wrapper.httpx_client.request( "POST", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/accounting/v1/expenses"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "accounting/v1/expenses"), params=jsonable_encoder( remove_none_from_dict( { @@ -242,20 +235,18 @@ def retrieve( - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from merge.client import Merge - from merge.resources.accounting import ExpensesRetrieveRequestExpand client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) client.accounting.expenses.retrieve( - id="string", - expand=ExpensesRetrieveRequestExpand.ACCOUNT, + id="id", ) """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"api/accounting/v1/expenses/{id}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"accounting/v1/expenses/{id}"), params=jsonable_encoder( remove_none_from_dict( { @@ -306,7 +297,7 @@ def meta_post_retrieve(self, *, request_options: typing.Optional[RequestOptions] """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/accounting/v1/expenses/meta/post"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "accounting/v1/expenses/meta/post"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -386,19 +377,16 @@ async def list( - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from merge.client import AsyncMerge - from merge.resources.accounting import ExpensesListRequestExpand client = AsyncMerge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) - await client.accounting.expenses.list( - expand=ExpensesListRequestExpand.ACCOUNT, - ) + await client.accounting.expenses.list() """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/accounting/v1/expenses"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "accounting/v1/expenses"), params=jsonable_encoder( remove_none_from_dict( { @@ -475,16 +463,12 @@ async def create( api_key="YOUR_API_KEY", ) await client.accounting.expenses.create( - model=ExpenseRequest( - total_amount=10000.0, - exchange_rate="2.9", - memo="New employee supplies", - ), + model=ExpenseRequest(), ) """ _response = await self._client_wrapper.httpx_client.request( "POST", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/accounting/v1/expenses"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "accounting/v1/expenses"), params=jsonable_encoder( remove_none_from_dict( { @@ -545,20 +529,18 @@ async def retrieve( - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from merge.client import AsyncMerge - from merge.resources.accounting import ExpensesRetrieveRequestExpand client = AsyncMerge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) await client.accounting.expenses.retrieve( - id="string", - expand=ExpensesRetrieveRequestExpand.ACCOUNT, + id="id", ) """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"api/accounting/v1/expenses/{id}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"accounting/v1/expenses/{id}"), params=jsonable_encoder( remove_none_from_dict( { @@ -609,7 +591,7 @@ async def meta_post_retrieve(self, *, request_options: typing.Optional[RequestOp """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/accounting/v1/expenses/meta/post"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "accounting/v1/expenses/meta/post"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), diff --git a/src/merge/resources/accounting/resources/field_mapping/client.py b/src/merge/resources/accounting/resources/field_mapping/client.py index 11ef7a00..d312c845 100644 --- a/src/merge/resources/accounting/resources/field_mapping/client.py +++ b/src/merge/resources/accounting/resources/field_mapping/client.py @@ -46,7 +46,7 @@ def field_mappings_retrieve( """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/accounting/v1/field-mappings"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "accounting/v1/field-mappings"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -116,7 +116,7 @@ def field_mappings_create( """ _response = self._client_wrapper.httpx_client.request( "POST", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/accounting/v1/field-mappings"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "accounting/v1/field-mappings"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -182,13 +182,13 @@ def field_mappings_destroy( api_key="YOUR_API_KEY", ) client.accounting.field_mapping.field_mappings_destroy( - field_mapping_id="string", + field_mapping_id="field_mapping_id", ) """ _response = self._client_wrapper.httpx_client.request( "DELETE", urllib.parse.urljoin( - f"{self._client_wrapper.get_base_url()}/", f"api/accounting/v1/field-mappings/{field_mapping_id}" + f"{self._client_wrapper.get_base_url()}/", f"accounting/v1/field-mappings/{field_mapping_id}" ), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None @@ -243,7 +243,7 @@ def field_mappings_partial_update( api_key="YOUR_API_KEY", ) client.accounting.field_mapping.field_mappings_partial_update( - field_mapping_id="string", + field_mapping_id="field_mapping_id", remote_method="GET", remote_url_path="/example-url-path", ) @@ -258,7 +258,7 @@ def field_mappings_partial_update( _response = self._client_wrapper.httpx_client.request( "PATCH", urllib.parse.urljoin( - f"{self._client_wrapper.get_base_url()}/", f"api/accounting/v1/field-mappings/{field_mapping_id}" + f"{self._client_wrapper.get_base_url()}/", f"accounting/v1/field-mappings/{field_mapping_id}" ), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None @@ -316,7 +316,7 @@ def remote_fields_retrieve( """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/accounting/v1/remote-fields"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "accounting/v1/remote-fields"), params=jsonable_encoder( remove_none_from_dict( { @@ -369,7 +369,7 @@ def target_fields_retrieve( """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/accounting/v1/target-fields"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "accounting/v1/target-fields"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -417,7 +417,7 @@ async def field_mappings_retrieve( """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/accounting/v1/field-mappings"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "accounting/v1/field-mappings"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -487,7 +487,7 @@ async def field_mappings_create( """ _response = await self._client_wrapper.httpx_client.request( "POST", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/accounting/v1/field-mappings"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "accounting/v1/field-mappings"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -553,13 +553,13 @@ async def field_mappings_destroy( api_key="YOUR_API_KEY", ) await client.accounting.field_mapping.field_mappings_destroy( - field_mapping_id="string", + field_mapping_id="field_mapping_id", ) """ _response = await self._client_wrapper.httpx_client.request( "DELETE", urllib.parse.urljoin( - f"{self._client_wrapper.get_base_url()}/", f"api/accounting/v1/field-mappings/{field_mapping_id}" + f"{self._client_wrapper.get_base_url()}/", f"accounting/v1/field-mappings/{field_mapping_id}" ), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None @@ -614,7 +614,7 @@ async def field_mappings_partial_update( api_key="YOUR_API_KEY", ) await client.accounting.field_mapping.field_mappings_partial_update( - field_mapping_id="string", + field_mapping_id="field_mapping_id", remote_method="GET", remote_url_path="/example-url-path", ) @@ -629,7 +629,7 @@ async def field_mappings_partial_update( _response = await self._client_wrapper.httpx_client.request( "PATCH", urllib.parse.urljoin( - f"{self._client_wrapper.get_base_url()}/", f"api/accounting/v1/field-mappings/{field_mapping_id}" + f"{self._client_wrapper.get_base_url()}/", f"accounting/v1/field-mappings/{field_mapping_id}" ), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None @@ -687,7 +687,7 @@ async def remote_fields_retrieve( """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/accounting/v1/remote-fields"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "accounting/v1/remote-fields"), params=jsonable_encoder( remove_none_from_dict( { @@ -740,7 +740,7 @@ async def target_fields_retrieve( """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/accounting/v1/target-fields"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "accounting/v1/target-fields"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), diff --git a/src/merge/resources/accounting/resources/force_resync/client.py b/src/merge/resources/accounting/resources/force_resync/client.py index 9b640173..7981110e 100644 --- a/src/merge/resources/accounting/resources/force_resync/client.py +++ b/src/merge/resources/accounting/resources/force_resync/client.py @@ -40,7 +40,7 @@ def sync_status_resync_create( """ _response = self._client_wrapper.httpx_client.request( "POST", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/accounting/v1/sync-status/resync"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "accounting/v1/sync-status/resync"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -91,7 +91,7 @@ async def sync_status_resync_create( """ _response = await self._client_wrapper.httpx_client.request( "POST", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/accounting/v1/sync-status/resync"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "accounting/v1/sync-status/resync"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), diff --git a/src/merge/resources/accounting/resources/generate_key/client.py b/src/merge/resources/accounting/resources/generate_key/client.py index e374cb6e..1a31feb5 100644 --- a/src/merge/resources/accounting/resources/generate_key/client.py +++ b/src/merge/resources/accounting/resources/generate_key/client.py @@ -29,7 +29,7 @@ def create(self, *, name: str, request_options: typing.Optional[RequestOptions] Create a remote key. Parameters: - - name: str. + - name: str. The name of the remote key - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- @@ -45,7 +45,7 @@ def create(self, *, name: str, request_options: typing.Optional[RequestOptions] """ _response = self._client_wrapper.httpx_client.request( "POST", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/accounting/v1/generate-key"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "accounting/v1/generate-key"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -85,7 +85,7 @@ async def create(self, *, name: str, request_options: typing.Optional[RequestOpt Create a remote key. Parameters: - - name: str. + - name: str. The name of the remote key - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- @@ -101,7 +101,7 @@ async def create(self, *, name: str, request_options: typing.Optional[RequestOpt """ _response = await self._client_wrapper.httpx_client.request( "POST", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/accounting/v1/generate-key"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "accounting/v1/generate-key"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), diff --git a/src/merge/resources/accounting/resources/income_statements/client.py b/src/merge/resources/accounting/resources/income_statements/client.py index ab4c59b6..8696d51f 100644 --- a/src/merge/resources/accounting/resources/income_statements/client.py +++ b/src/merge/resources/accounting/resources/income_statements/client.py @@ -74,13 +74,11 @@ def list( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) - client.accounting.income_statements.list( - expand="company", - ) + client.accounting.income_statements.list() """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/accounting/v1/income-statements"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "accounting/v1/income-statements"), params=jsonable_encoder( remove_none_from_dict( { @@ -150,15 +148,12 @@ def retrieve( api_key="YOUR_API_KEY", ) client.accounting.income_statements.retrieve( - id="string", - expand="company", + id="id", ) """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin( - f"{self._client_wrapper.get_base_url()}/", f"api/accounting/v1/income-statements/{id}" - ), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"accounting/v1/income-statements/{id}"), params=jsonable_encoder( remove_none_from_dict( { @@ -247,13 +242,11 @@ async def list( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) - await client.accounting.income_statements.list( - expand="company", - ) + await client.accounting.income_statements.list() """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/accounting/v1/income-statements"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "accounting/v1/income-statements"), params=jsonable_encoder( remove_none_from_dict( { @@ -323,15 +316,12 @@ async def retrieve( api_key="YOUR_API_KEY", ) await client.accounting.income_statements.retrieve( - id="string", - expand="company", + id="id", ) """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin( - f"{self._client_wrapper.get_base_url()}/", f"api/accounting/v1/income-statements/{id}" - ), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"accounting/v1/income-statements/{id}"), params=jsonable_encoder( remove_none_from_dict( { diff --git a/src/merge/resources/accounting/resources/invoices/client.py b/src/merge/resources/accounting/resources/invoices/client.py index fc423f85..ba997c51 100644 --- a/src/merge/resources/accounting/resources/invoices/client.py +++ b/src/merge/resources/accounting/resources/invoices/client.py @@ -89,7 +89,7 @@ def list( - remote_id: typing.Optional[str]. The API provider's ID for the given object. - - show_enum_origins: typing.Optional[typing.Literal["type"]]. Which fields should be returned in non-normalized form. + - show_enum_origins: typing.Optional[typing.Literal["type"]]. A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) - type: typing.Optional[InvoicesListRequestType]. If provided, will only return Invoices with this type @@ -98,25 +98,16 @@ def list( - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from merge.client import Merge - from merge.resources.accounting import ( - InvoicesListRequestExpand, - InvoicesListRequestType, - ) client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) - client.accounting.invoices.list( - expand=InvoicesListRequestExpand.ACCOUNTING_PERIOD, - remote_fields="type", - show_enum_origins="type", - type=InvoicesListRequestType.ACCOUNTS_PAYABLE, - ) + client.accounting.invoices.list() """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/accounting/v1/invoices"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "accounting/v1/invoices"), params=jsonable_encoder( remove_none_from_dict( { @@ -202,7 +193,7 @@ def create( """ _response = self._client_wrapper.httpx_client.request( "POST", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/accounting/v1/invoices"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "accounting/v1/invoices"), params=jsonable_encoder( remove_none_from_dict( { @@ -264,27 +255,23 @@ def retrieve( - remote_fields: typing.Optional[typing.Literal["type"]]. Deprecated. Use show_enum_origins. - - show_enum_origins: typing.Optional[typing.Literal["type"]]. Which fields should be returned in non-normalized form. + - show_enum_origins: typing.Optional[typing.Literal["type"]]. A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from merge.client import Merge - from merge.resources.accounting import InvoicesRetrieveRequestExpand client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) client.accounting.invoices.retrieve( - id="string", - expand=InvoicesRetrieveRequestExpand.ACCOUNTING_PERIOD, - remote_fields="type", - show_enum_origins="type", + id="id", ) """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"api/accounting/v1/invoices/{id}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"accounting/v1/invoices/{id}"), params=jsonable_encoder( remove_none_from_dict( { @@ -320,6 +307,128 @@ def retrieve( raise ApiError(status_code=_response.status_code, body=_response.text) raise ApiError(status_code=_response.status_code, body=_response_json) + def partial_update( + self, + id: str, + *, + is_debug_mode: typing.Optional[bool] = None, + run_async: typing.Optional[bool] = None, + model: InvoiceRequest, + request_options: typing.Optional[RequestOptions] = None, + ) -> InvoiceResponse: + """ + Updates an `Invoice` object with the given `id`. + + Parameters: + - id: str. + + - is_debug_mode: typing.Optional[bool]. Whether to include debug fields (such as log file links) in the response. + + - run_async: typing.Optional[bool]. Whether or not third-party updates should be run asynchronously. + + - model: InvoiceRequest. + + - request_options: typing.Optional[RequestOptions]. Request-specific configuration. + --- + from merge.client import Merge + from merge.resources.accounting import InvoiceRequest + + client = Merge( + account_token="YOUR_ACCOUNT_TOKEN", + api_key="YOUR_API_KEY", + ) + client.accounting.invoices.partial_update( + id="id", + model=InvoiceRequest(), + ) + """ + _response = self._client_wrapper.httpx_client.request( + "PATCH", + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"accounting/v1/invoices/{id}"), + params=jsonable_encoder( + remove_none_from_dict( + { + "is_debug_mode": is_debug_mode, + "run_async": run_async, + **( + request_options.get("additional_query_parameters", {}) + if request_options is not None + else {} + ), + } + ) + ), + json=jsonable_encoder({"model": model}) + if request_options is None or request_options.get("additional_body_parameters") is None + else { + **jsonable_encoder({"model": model}), + **(jsonable_encoder(remove_none_from_dict(request_options.get("additional_body_parameters", {})))), + }, + headers=jsonable_encoder( + remove_none_from_dict( + { + **self._client_wrapper.get_headers(), + **(request_options.get("additional_headers", {}) if request_options is not None else {}), + } + ) + ), + timeout=request_options.get("timeout_in_seconds") + if request_options is not None and request_options.get("timeout_in_seconds") is not None + else 60, + ) + if 200 <= _response.status_code < 300: + return pydantic.parse_obj_as(InvoiceResponse, _response.json()) # type: ignore + try: + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) + + def meta_patch_retrieve(self, id: str, *, request_options: typing.Optional[RequestOptions] = None) -> MetaResponse: + """ + Returns metadata for `Invoice` PATCHs. + + Parameters: + - id: str. + + - request_options: typing.Optional[RequestOptions]. Request-specific configuration. + --- + from merge.client import Merge + + client = Merge( + account_token="YOUR_ACCOUNT_TOKEN", + api_key="YOUR_API_KEY", + ) + client.accounting.invoices.meta_patch_retrieve( + id="id", + ) + """ + _response = self._client_wrapper.httpx_client.request( + "GET", + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"accounting/v1/invoices/meta/patch/{id}"), + params=jsonable_encoder( + request_options.get("additional_query_parameters") if request_options is not None else None + ), + headers=jsonable_encoder( + remove_none_from_dict( + { + **self._client_wrapper.get_headers(), + **(request_options.get("additional_headers", {}) if request_options is not None else {}), + } + ) + ), + timeout=request_options.get("timeout_in_seconds") + if request_options is not None and request_options.get("timeout_in_seconds") is not None + else 60, + ) + if 200 <= _response.status_code < 300: + return pydantic.parse_obj_as(MetaResponse, _response.json()) # type: ignore + try: + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) + def meta_post_retrieve(self, *, request_options: typing.Optional[RequestOptions] = None) -> MetaResponse: """ Returns metadata for `Invoice` POSTs. @@ -337,7 +446,7 @@ def meta_post_retrieve(self, *, request_options: typing.Optional[RequestOptions] """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/accounting/v1/invoices/meta/post"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "accounting/v1/invoices/meta/post"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -422,7 +531,7 @@ async def list( - remote_id: typing.Optional[str]. The API provider's ID for the given object. - - show_enum_origins: typing.Optional[typing.Literal["type"]]. Which fields should be returned in non-normalized form. + - show_enum_origins: typing.Optional[typing.Literal["type"]]. A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) - type: typing.Optional[InvoicesListRequestType]. If provided, will only return Invoices with this type @@ -431,25 +540,16 @@ async def list( - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from merge.client import AsyncMerge - from merge.resources.accounting import ( - InvoicesListRequestExpand, - InvoicesListRequestType, - ) client = AsyncMerge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) - await client.accounting.invoices.list( - expand=InvoicesListRequestExpand.ACCOUNTING_PERIOD, - remote_fields="type", - show_enum_origins="type", - type=InvoicesListRequestType.ACCOUNTS_PAYABLE, - ) + await client.accounting.invoices.list() """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/accounting/v1/invoices"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "accounting/v1/invoices"), params=jsonable_encoder( remove_none_from_dict( { @@ -535,7 +635,7 @@ async def create( """ _response = await self._client_wrapper.httpx_client.request( "POST", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/accounting/v1/invoices"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "accounting/v1/invoices"), params=jsonable_encoder( remove_none_from_dict( { @@ -597,27 +697,23 @@ async def retrieve( - remote_fields: typing.Optional[typing.Literal["type"]]. Deprecated. Use show_enum_origins. - - show_enum_origins: typing.Optional[typing.Literal["type"]]. Which fields should be returned in non-normalized form. + - show_enum_origins: typing.Optional[typing.Literal["type"]]. A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from merge.client import AsyncMerge - from merge.resources.accounting import InvoicesRetrieveRequestExpand client = AsyncMerge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) await client.accounting.invoices.retrieve( - id="string", - expand=InvoicesRetrieveRequestExpand.ACCOUNTING_PERIOD, - remote_fields="type", - show_enum_origins="type", + id="id", ) """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"api/accounting/v1/invoices/{id}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"accounting/v1/invoices/{id}"), params=jsonable_encoder( remove_none_from_dict( { @@ -653,6 +749,130 @@ async def retrieve( raise ApiError(status_code=_response.status_code, body=_response.text) raise ApiError(status_code=_response.status_code, body=_response_json) + async def partial_update( + self, + id: str, + *, + is_debug_mode: typing.Optional[bool] = None, + run_async: typing.Optional[bool] = None, + model: InvoiceRequest, + request_options: typing.Optional[RequestOptions] = None, + ) -> InvoiceResponse: + """ + Updates an `Invoice` object with the given `id`. + + Parameters: + - id: str. + + - is_debug_mode: typing.Optional[bool]. Whether to include debug fields (such as log file links) in the response. + + - run_async: typing.Optional[bool]. Whether or not third-party updates should be run asynchronously. + + - model: InvoiceRequest. + + - request_options: typing.Optional[RequestOptions]. Request-specific configuration. + --- + from merge.client import AsyncMerge + from merge.resources.accounting import InvoiceRequest + + client = AsyncMerge( + account_token="YOUR_ACCOUNT_TOKEN", + api_key="YOUR_API_KEY", + ) + await client.accounting.invoices.partial_update( + id="id", + model=InvoiceRequest(), + ) + """ + _response = await self._client_wrapper.httpx_client.request( + "PATCH", + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"accounting/v1/invoices/{id}"), + params=jsonable_encoder( + remove_none_from_dict( + { + "is_debug_mode": is_debug_mode, + "run_async": run_async, + **( + request_options.get("additional_query_parameters", {}) + if request_options is not None + else {} + ), + } + ) + ), + json=jsonable_encoder({"model": model}) + if request_options is None or request_options.get("additional_body_parameters") is None + else { + **jsonable_encoder({"model": model}), + **(jsonable_encoder(remove_none_from_dict(request_options.get("additional_body_parameters", {})))), + }, + headers=jsonable_encoder( + remove_none_from_dict( + { + **self._client_wrapper.get_headers(), + **(request_options.get("additional_headers", {}) if request_options is not None else {}), + } + ) + ), + timeout=request_options.get("timeout_in_seconds") + if request_options is not None and request_options.get("timeout_in_seconds") is not None + else 60, + ) + if 200 <= _response.status_code < 300: + return pydantic.parse_obj_as(InvoiceResponse, _response.json()) # type: ignore + try: + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) + + async def meta_patch_retrieve( + self, id: str, *, request_options: typing.Optional[RequestOptions] = None + ) -> MetaResponse: + """ + Returns metadata for `Invoice` PATCHs. + + Parameters: + - id: str. + + - request_options: typing.Optional[RequestOptions]. Request-specific configuration. + --- + from merge.client import AsyncMerge + + client = AsyncMerge( + account_token="YOUR_ACCOUNT_TOKEN", + api_key="YOUR_API_KEY", + ) + await client.accounting.invoices.meta_patch_retrieve( + id="id", + ) + """ + _response = await self._client_wrapper.httpx_client.request( + "GET", + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"accounting/v1/invoices/meta/patch/{id}"), + params=jsonable_encoder( + request_options.get("additional_query_parameters") if request_options is not None else None + ), + headers=jsonable_encoder( + remove_none_from_dict( + { + **self._client_wrapper.get_headers(), + **(request_options.get("additional_headers", {}) if request_options is not None else {}), + } + ) + ), + timeout=request_options.get("timeout_in_seconds") + if request_options is not None and request_options.get("timeout_in_seconds") is not None + else 60, + ) + if 200 <= _response.status_code < 300: + return pydantic.parse_obj_as(MetaResponse, _response.json()) # type: ignore + try: + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) + async def meta_post_retrieve(self, *, request_options: typing.Optional[RequestOptions] = None) -> MetaResponse: """ Returns metadata for `Invoice` POSTs. @@ -670,7 +890,7 @@ async def meta_post_retrieve(self, *, request_options: typing.Optional[RequestOp """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/accounting/v1/invoices/meta/post"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "accounting/v1/invoices/meta/post"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), diff --git a/src/merge/resources/accounting/resources/issues/client.py b/src/merge/resources/accounting/resources/issues/client.py index c7cb5f93..2b672949 100644 --- a/src/merge/resources/accounting/resources/issues/client.py +++ b/src/merge/resources/accounting/resources/issues/client.py @@ -78,19 +78,16 @@ def list( - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from merge.client import Merge - from merge.resources.accounting import IssuesListRequestStatus client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) - client.accounting.issues.list( - status=IssuesListRequestStatus.ONGOING, - ) + client.accounting.issues.list() """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/accounting/v1/issues"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "accounting/v1/issues"), params=jsonable_encoder( remove_none_from_dict( { @@ -159,12 +156,12 @@ def retrieve(self, id: str, *, request_options: typing.Optional[RequestOptions] api_key="YOUR_API_KEY", ) client.accounting.issues.retrieve( - id="string", + id="id", ) """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"api/accounting/v1/issues/{id}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"accounting/v1/issues/{id}"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -246,19 +243,16 @@ async def list( - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from merge.client import AsyncMerge - from merge.resources.accounting import IssuesListRequestStatus client = AsyncMerge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) - await client.accounting.issues.list( - status=IssuesListRequestStatus.ONGOING, - ) + await client.accounting.issues.list() """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/accounting/v1/issues"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "accounting/v1/issues"), params=jsonable_encoder( remove_none_from_dict( { @@ -327,12 +321,12 @@ async def retrieve(self, id: str, *, request_options: typing.Optional[RequestOpt api_key="YOUR_API_KEY", ) await client.accounting.issues.retrieve( - id="string", + id="id", ) """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"api/accounting/v1/issues/{id}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"accounting/v1/issues/{id}"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), diff --git a/src/merge/resources/accounting/resources/items/client.py b/src/merge/resources/accounting/resources/items/client.py index bb7d1c9b..17248c58 100644 --- a/src/merge/resources/accounting/resources/items/client.py +++ b/src/merge/resources/accounting/resources/items/client.py @@ -72,26 +72,21 @@ def list( - remote_id: typing.Optional[str]. The API provider's ID for the given object. - - show_enum_origins: typing.Optional[typing.Literal["status"]]. Which fields should be returned in non-normalized form. + - show_enum_origins: typing.Optional[typing.Literal["status"]]. A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from merge.client import Merge - from merge.resources.accounting import ItemsListRequestExpand client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) - client.accounting.items.list( - expand=ItemsListRequestExpand.COMPANY, - remote_fields="status", - show_enum_origins="status", - ) + client.accounting.items.list() """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/accounting/v1/items"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "accounting/v1/items"), params=jsonable_encoder( remove_none_from_dict( { @@ -158,27 +153,23 @@ def retrieve( - remote_fields: typing.Optional[typing.Literal["status"]]. Deprecated. Use show_enum_origins. - - show_enum_origins: typing.Optional[typing.Literal["status"]]. Which fields should be returned in non-normalized form. + - show_enum_origins: typing.Optional[typing.Literal["status"]]. A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from merge.client import Merge - from merge.resources.accounting import ItemsRetrieveRequestExpand client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) client.accounting.items.retrieve( - id="string", - expand=ItemsRetrieveRequestExpand.COMPANY, - remote_fields="status", - show_enum_origins="status", + id="id", ) """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"api/accounting/v1/items/{id}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"accounting/v1/items/{id}"), params=jsonable_encoder( remove_none_from_dict( { @@ -265,26 +256,21 @@ async def list( - remote_id: typing.Optional[str]. The API provider's ID for the given object. - - show_enum_origins: typing.Optional[typing.Literal["status"]]. Which fields should be returned in non-normalized form. + - show_enum_origins: typing.Optional[typing.Literal["status"]]. A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from merge.client import AsyncMerge - from merge.resources.accounting import ItemsListRequestExpand client = AsyncMerge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) - await client.accounting.items.list( - expand=ItemsListRequestExpand.COMPANY, - remote_fields="status", - show_enum_origins="status", - ) + await client.accounting.items.list() """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/accounting/v1/items"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "accounting/v1/items"), params=jsonable_encoder( remove_none_from_dict( { @@ -351,27 +337,23 @@ async def retrieve( - remote_fields: typing.Optional[typing.Literal["status"]]. Deprecated. Use show_enum_origins. - - show_enum_origins: typing.Optional[typing.Literal["status"]]. Which fields should be returned in non-normalized form. + - show_enum_origins: typing.Optional[typing.Literal["status"]]. A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from merge.client import AsyncMerge - from merge.resources.accounting import ItemsRetrieveRequestExpand client = AsyncMerge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) await client.accounting.items.retrieve( - id="string", - expand=ItemsRetrieveRequestExpand.COMPANY, - remote_fields="status", - show_enum_origins="status", + id="id", ) """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"api/accounting/v1/items/{id}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"accounting/v1/items/{id}"), params=jsonable_encoder( remove_none_from_dict( { diff --git a/src/merge/resources/accounting/resources/journal_entries/client.py b/src/merge/resources/accounting/resources/journal_entries/client.py index b5b8fe10..5608c9d4 100644 --- a/src/merge/resources/accounting/resources/journal_entries/client.py +++ b/src/merge/resources/accounting/resources/journal_entries/client.py @@ -83,19 +83,16 @@ def list( - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from merge.client import Merge - from merge.resources.accounting import JournalEntriesListRequestExpand client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) - client.accounting.journal_entries.list( - expand=JournalEntriesListRequestExpand.ACCOUNTING_PERIOD, - ) + client.accounting.journal_entries.list() """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/accounting/v1/journal-entries"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "accounting/v1/journal-entries"), params=jsonable_encoder( remove_none_from_dict( { @@ -177,7 +174,7 @@ def create( """ _response = self._client_wrapper.httpx_client.request( "POST", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/accounting/v1/journal-entries"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "accounting/v1/journal-entries"), params=jsonable_encoder( remove_none_from_dict( { @@ -238,20 +235,18 @@ def retrieve( - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from merge.client import Merge - from merge.resources.accounting import JournalEntriesRetrieveRequestExpand client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) client.accounting.journal_entries.retrieve( - id="string", - expand=JournalEntriesRetrieveRequestExpand.ACCOUNTING_PERIOD, + id="id", ) """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"api/accounting/v1/journal-entries/{id}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"accounting/v1/journal-entries/{id}"), params=jsonable_encoder( remove_none_from_dict( { @@ -302,9 +297,7 @@ def meta_post_retrieve(self, *, request_options: typing.Optional[RequestOptions] """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin( - f"{self._client_wrapper.get_base_url()}/", "api/accounting/v1/journal-entries/meta/post" - ), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "accounting/v1/journal-entries/meta/post"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -384,19 +377,16 @@ async def list( - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from merge.client import AsyncMerge - from merge.resources.accounting import JournalEntriesListRequestExpand client = AsyncMerge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) - await client.accounting.journal_entries.list( - expand=JournalEntriesListRequestExpand.ACCOUNTING_PERIOD, - ) + await client.accounting.journal_entries.list() """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/accounting/v1/journal-entries"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "accounting/v1/journal-entries"), params=jsonable_encoder( remove_none_from_dict( { @@ -478,7 +468,7 @@ async def create( """ _response = await self._client_wrapper.httpx_client.request( "POST", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/accounting/v1/journal-entries"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "accounting/v1/journal-entries"), params=jsonable_encoder( remove_none_from_dict( { @@ -539,20 +529,18 @@ async def retrieve( - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from merge.client import AsyncMerge - from merge.resources.accounting import JournalEntriesRetrieveRequestExpand client = AsyncMerge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) await client.accounting.journal_entries.retrieve( - id="string", - expand=JournalEntriesRetrieveRequestExpand.ACCOUNTING_PERIOD, + id="id", ) """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"api/accounting/v1/journal-entries/{id}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"accounting/v1/journal-entries/{id}"), params=jsonable_encoder( remove_none_from_dict( { @@ -603,9 +591,7 @@ async def meta_post_retrieve(self, *, request_options: typing.Optional[RequestOp """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin( - f"{self._client_wrapper.get_base_url()}/", "api/accounting/v1/journal-entries/meta/post" - ), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "accounting/v1/journal-entries/meta/post"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), diff --git a/src/merge/resources/accounting/resources/link_token/client.py b/src/merge/resources/accounting/resources/link_token/client.py index 893ec754..db392f22 100644 --- a/src/merge/resources/accounting/resources/link_token/client.py +++ b/src/merge/resources/accounting/resources/link_token/client.py @@ -41,6 +41,7 @@ def create( category_common_model_scopes: typing.Optional[ typing.Dict[str, typing.Optional[typing.List[IndividualCommonModelScopeDeserializerRequest]]] ] = OMIT, + language: typing.Optional[str] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> LinkToken: """ @@ -65,9 +66,12 @@ def create( - category_common_model_scopes: typing.Optional[typing.Dict[str, typing.Optional[typing.List[IndividualCommonModelScopeDeserializerRequest]]]]. When creating a Link Token, you can set permissions for Common Models that will apply to the account that is going to be linked. Any model or field not specified in link token payload will default to existing settings. + - language: typing.Optional[str]. The language code for the language to localize Merge Link to. + - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from merge.client import Merge + from merge.resources.accounting import CategoriesEnum client = Merge( account_token="YOUR_ACCOUNT_TOKEN", @@ -77,8 +81,7 @@ def create( end_user_email_address="example@gmail.com", end_user_organization_name="Test Organization", end_user_origin_id="12345", - categories=[], - integration="bamboohr", + categories=[CategoriesEnum.HRIS], ) """ _request: typing.Dict[str, typing.Any] = { @@ -97,9 +100,11 @@ def create( _request["common_models"] = common_models if category_common_model_scopes is not OMIT: _request["category_common_model_scopes"] = category_common_model_scopes + if language is not OMIT: + _request["language"] = language _response = self._client_wrapper.httpx_client.request( "POST", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/accounting/v1/link-token"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "accounting/v1/link-token"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -148,6 +153,7 @@ async def create( category_common_model_scopes: typing.Optional[ typing.Dict[str, typing.Optional[typing.List[IndividualCommonModelScopeDeserializerRequest]]] ] = OMIT, + language: typing.Optional[str] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> LinkToken: """ @@ -172,9 +178,12 @@ async def create( - category_common_model_scopes: typing.Optional[typing.Dict[str, typing.Optional[typing.List[IndividualCommonModelScopeDeserializerRequest]]]]. When creating a Link Token, you can set permissions for Common Models that will apply to the account that is going to be linked. Any model or field not specified in link token payload will default to existing settings. + - language: typing.Optional[str]. The language code for the language to localize Merge Link to. + - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from merge.client import AsyncMerge + from merge.resources.accounting import CategoriesEnum client = AsyncMerge( account_token="YOUR_ACCOUNT_TOKEN", @@ -184,8 +193,7 @@ async def create( end_user_email_address="example@gmail.com", end_user_organization_name="Test Organization", end_user_origin_id="12345", - categories=[], - integration="bamboohr", + categories=[CategoriesEnum.HRIS], ) """ _request: typing.Dict[str, typing.Any] = { @@ -204,9 +212,11 @@ async def create( _request["common_models"] = common_models if category_common_model_scopes is not OMIT: _request["category_common_model_scopes"] = category_common_model_scopes + if language is not OMIT: + _request["language"] = language _response = await self._client_wrapper.httpx_client.request( "POST", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/accounting/v1/link-token"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "accounting/v1/link-token"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), diff --git a/src/merge/resources/accounting/resources/linked_accounts/client.py b/src/merge/resources/accounting/resources/linked_accounts/client.py index 56923811..a363ed80 100644 --- a/src/merge/resources/accounting/resources/linked_accounts/client.py +++ b/src/merge/resources/accounting/resources/linked_accounts/client.py @@ -44,7 +44,7 @@ def list( List linked accounts for your organization. Parameters: - - category: typing.Optional[LinkedAccountsListRequestCategory]. Options: ('hris', 'ats', 'accounting', 'ticketing', 'crm', 'mktg', 'filestorage') + - category: typing.Optional[LinkedAccountsListRequestCategory]. Options: `accounting`, `ats`, `crm`, `filestorage`, `hris`, `mktg`, `ticketing` - `hris` - hris - `ats` - ats @@ -80,19 +80,16 @@ def list( - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from merge.client import Merge - from merge.resources.accounting import LinkedAccountsListRequestCategory client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) - client.accounting.linked_accounts.list( - category=LinkedAccountsListRequestCategory.ACCOUNTING, - ) + client.accounting.linked_accounts.list() """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/accounting/v1/linked-accounts"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "accounting/v1/linked-accounts"), params=jsonable_encoder( remove_none_from_dict( { @@ -164,7 +161,7 @@ async def list( List linked accounts for your organization. Parameters: - - category: typing.Optional[LinkedAccountsListRequestCategory]. Options: ('hris', 'ats', 'accounting', 'ticketing', 'crm', 'mktg', 'filestorage') + - category: typing.Optional[LinkedAccountsListRequestCategory]. Options: `accounting`, `ats`, `crm`, `filestorage`, `hris`, `mktg`, `ticketing` - `hris` - hris - `ats` - ats @@ -200,19 +197,16 @@ async def list( - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from merge.client import AsyncMerge - from merge.resources.accounting import LinkedAccountsListRequestCategory client = AsyncMerge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) - await client.accounting.linked_accounts.list( - category=LinkedAccountsListRequestCategory.ACCOUNTING, - ) + await client.accounting.linked_accounts.list() """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/accounting/v1/linked-accounts"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "accounting/v1/linked-accounts"), params=jsonable_encoder( remove_none_from_dict( { diff --git a/src/merge/resources/accounting/resources/passthrough/client.py b/src/merge/resources/accounting/resources/passthrough/client.py index f1411d18..3a94debf 100644 --- a/src/merge/resources/accounting/resources/passthrough/client.py +++ b/src/merge/resources/accounting/resources/passthrough/client.py @@ -37,11 +37,7 @@ def create( - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from merge.client import Merge - from merge.resources.accounting import ( - DataPassthroughRequest, - MethodEnum, - RequestFormatEnum, - ) + from merge.resources.accounting import DataPassthroughRequest, MethodEnum client = Merge( account_token="YOUR_ACCOUNT_TOKEN", @@ -51,14 +47,12 @@ def create( request=DataPassthroughRequest( method=MethodEnum.GET, path="/scooters", - data='{"company": "Lime", "model": "Gen 2.5"}', - request_format=RequestFormatEnum.JSON, ), ) """ _response = self._client_wrapper.httpx_client.request( "POST", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/accounting/v1/passthrough"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "accounting/v1/passthrough"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -105,11 +99,7 @@ async def create( - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from merge.client import AsyncMerge - from merge.resources.accounting import ( - DataPassthroughRequest, - MethodEnum, - RequestFormatEnum, - ) + from merge.resources.accounting import DataPassthroughRequest, MethodEnum client = AsyncMerge( account_token="YOUR_ACCOUNT_TOKEN", @@ -119,14 +109,12 @@ async def create( request=DataPassthroughRequest( method=MethodEnum.GET, path="/scooters", - data='{"company": "Lime", "model": "Gen 2.5"}', - request_format=RequestFormatEnum.JSON, ), ) """ _response = await self._client_wrapper.httpx_client.request( "POST", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/accounting/v1/passthrough"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "accounting/v1/passthrough"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), diff --git a/src/merge/resources/accounting/resources/payments/client.py b/src/merge/resources/accounting/resources/payments/client.py index 6745e49f..4677e6a6 100644 --- a/src/merge/resources/accounting/resources/payments/client.py +++ b/src/merge/resources/accounting/resources/payments/client.py @@ -13,6 +13,7 @@ from .....core.request_options import RequestOptions from ...types.meta_response import MetaResponse from ...types.paginated_payment_list import PaginatedPaymentList +from ...types.patched_payment_request import PatchedPaymentRequest from ...types.payment import Payment from ...types.payment_request import PaymentRequest from ...types.payment_response import PaymentResponse @@ -89,19 +90,16 @@ def list( - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from merge.client import Merge - from merge.resources.accounting import PaymentsListRequestExpand client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) - client.accounting.payments.list( - expand=PaymentsListRequestExpand.ACCOUNT, - ) + client.accounting.payments.list() """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/accounting/v1/payments"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "accounting/v1/payments"), params=jsonable_encoder( remove_none_from_dict( { @@ -172,8 +170,6 @@ def create( - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- - import datetime - from merge.client import Merge from merge.resources.accounting import PaymentRequest @@ -182,18 +178,12 @@ def create( api_key="YOUR_API_KEY", ) client.accounting.payments.create( - model=PaymentRequest( - transaction_date=datetime.datetime.fromisoformat( - "2020-03-31 00:00:00+00:00", - ), - exchange_rate="2.9", - total_amount=50.0, - ), + model=PaymentRequest(), ) """ _response = self._client_wrapper.httpx_client.request( "POST", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/accounting/v1/payments"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "accounting/v1/payments"), params=jsonable_encoder( remove_none_from_dict( { @@ -254,20 +244,18 @@ def retrieve( - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from merge.client import Merge - from merge.resources.accounting import PaymentsRetrieveRequestExpand client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) client.accounting.payments.retrieve( - id="string", - expand=PaymentsRetrieveRequestExpand.ACCOUNT, + id="id", ) """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"api/accounting/v1/payments/{id}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"accounting/v1/payments/{id}"), params=jsonable_encoder( remove_none_from_dict( { @@ -301,6 +289,128 @@ def retrieve( raise ApiError(status_code=_response.status_code, body=_response.text) raise ApiError(status_code=_response.status_code, body=_response_json) + def partial_update( + self, + id: str, + *, + is_debug_mode: typing.Optional[bool] = None, + run_async: typing.Optional[bool] = None, + model: PatchedPaymentRequest, + request_options: typing.Optional[RequestOptions] = None, + ) -> PaymentResponse: + """ + Updates a `Payment` object with the given `id`. + + Parameters: + - id: str. + + - is_debug_mode: typing.Optional[bool]. Whether to include debug fields (such as log file links) in the response. + + - run_async: typing.Optional[bool]. Whether or not third-party updates should be run asynchronously. + + - model: PatchedPaymentRequest. + + - request_options: typing.Optional[RequestOptions]. Request-specific configuration. + --- + from merge.client import Merge + from merge.resources.accounting import PatchedPaymentRequest + + client = Merge( + account_token="YOUR_ACCOUNT_TOKEN", + api_key="YOUR_API_KEY", + ) + client.accounting.payments.partial_update( + id="id", + model=PatchedPaymentRequest(), + ) + """ + _response = self._client_wrapper.httpx_client.request( + "PATCH", + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"accounting/v1/payments/{id}"), + params=jsonable_encoder( + remove_none_from_dict( + { + "is_debug_mode": is_debug_mode, + "run_async": run_async, + **( + request_options.get("additional_query_parameters", {}) + if request_options is not None + else {} + ), + } + ) + ), + json=jsonable_encoder({"model": model}) + if request_options is None or request_options.get("additional_body_parameters") is None + else { + **jsonable_encoder({"model": model}), + **(jsonable_encoder(remove_none_from_dict(request_options.get("additional_body_parameters", {})))), + }, + headers=jsonable_encoder( + remove_none_from_dict( + { + **self._client_wrapper.get_headers(), + **(request_options.get("additional_headers", {}) if request_options is not None else {}), + } + ) + ), + timeout=request_options.get("timeout_in_seconds") + if request_options is not None and request_options.get("timeout_in_seconds") is not None + else 60, + ) + if 200 <= _response.status_code < 300: + return pydantic.parse_obj_as(PaymentResponse, _response.json()) # type: ignore + try: + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) + + def meta_patch_retrieve(self, id: str, *, request_options: typing.Optional[RequestOptions] = None) -> MetaResponse: + """ + Returns metadata for `Payment` PATCHs. + + Parameters: + - id: str. + + - request_options: typing.Optional[RequestOptions]. Request-specific configuration. + --- + from merge.client import Merge + + client = Merge( + account_token="YOUR_ACCOUNT_TOKEN", + api_key="YOUR_API_KEY", + ) + client.accounting.payments.meta_patch_retrieve( + id="id", + ) + """ + _response = self._client_wrapper.httpx_client.request( + "GET", + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"accounting/v1/payments/meta/patch/{id}"), + params=jsonable_encoder( + request_options.get("additional_query_parameters") if request_options is not None else None + ), + headers=jsonable_encoder( + remove_none_from_dict( + { + **self._client_wrapper.get_headers(), + **(request_options.get("additional_headers", {}) if request_options is not None else {}), + } + ) + ), + timeout=request_options.get("timeout_in_seconds") + if request_options is not None and request_options.get("timeout_in_seconds") is not None + else 60, + ) + if 200 <= _response.status_code < 300: + return pydantic.parse_obj_as(MetaResponse, _response.json()) # type: ignore + try: + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) + def meta_post_retrieve(self, *, request_options: typing.Optional[RequestOptions] = None) -> MetaResponse: """ Returns metadata for `Payment` POSTs. @@ -318,7 +428,7 @@ def meta_post_retrieve(self, *, request_options: typing.Optional[RequestOptions] """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/accounting/v1/payments/meta/post"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "accounting/v1/payments/meta/post"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -404,19 +514,16 @@ async def list( - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from merge.client import AsyncMerge - from merge.resources.accounting import PaymentsListRequestExpand client = AsyncMerge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) - await client.accounting.payments.list( - expand=PaymentsListRequestExpand.ACCOUNT, - ) + await client.accounting.payments.list() """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/accounting/v1/payments"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "accounting/v1/payments"), params=jsonable_encoder( remove_none_from_dict( { @@ -487,8 +594,6 @@ async def create( - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- - import datetime - from merge.client import AsyncMerge from merge.resources.accounting import PaymentRequest @@ -497,18 +602,12 @@ async def create( api_key="YOUR_API_KEY", ) await client.accounting.payments.create( - model=PaymentRequest( - transaction_date=datetime.datetime.fromisoformat( - "2020-03-31 00:00:00+00:00", - ), - exchange_rate="2.9", - total_amount=50.0, - ), + model=PaymentRequest(), ) """ _response = await self._client_wrapper.httpx_client.request( "POST", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/accounting/v1/payments"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "accounting/v1/payments"), params=jsonable_encoder( remove_none_from_dict( { @@ -569,20 +668,18 @@ async def retrieve( - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from merge.client import AsyncMerge - from merge.resources.accounting import PaymentsRetrieveRequestExpand client = AsyncMerge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) await client.accounting.payments.retrieve( - id="string", - expand=PaymentsRetrieveRequestExpand.ACCOUNT, + id="id", ) """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"api/accounting/v1/payments/{id}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"accounting/v1/payments/{id}"), params=jsonable_encoder( remove_none_from_dict( { @@ -616,6 +713,130 @@ async def retrieve( raise ApiError(status_code=_response.status_code, body=_response.text) raise ApiError(status_code=_response.status_code, body=_response_json) + async def partial_update( + self, + id: str, + *, + is_debug_mode: typing.Optional[bool] = None, + run_async: typing.Optional[bool] = None, + model: PatchedPaymentRequest, + request_options: typing.Optional[RequestOptions] = None, + ) -> PaymentResponse: + """ + Updates a `Payment` object with the given `id`. + + Parameters: + - id: str. + + - is_debug_mode: typing.Optional[bool]. Whether to include debug fields (such as log file links) in the response. + + - run_async: typing.Optional[bool]. Whether or not third-party updates should be run asynchronously. + + - model: PatchedPaymentRequest. + + - request_options: typing.Optional[RequestOptions]. Request-specific configuration. + --- + from merge.client import AsyncMerge + from merge.resources.accounting import PatchedPaymentRequest + + client = AsyncMerge( + account_token="YOUR_ACCOUNT_TOKEN", + api_key="YOUR_API_KEY", + ) + await client.accounting.payments.partial_update( + id="id", + model=PatchedPaymentRequest(), + ) + """ + _response = await self._client_wrapper.httpx_client.request( + "PATCH", + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"accounting/v1/payments/{id}"), + params=jsonable_encoder( + remove_none_from_dict( + { + "is_debug_mode": is_debug_mode, + "run_async": run_async, + **( + request_options.get("additional_query_parameters", {}) + if request_options is not None + else {} + ), + } + ) + ), + json=jsonable_encoder({"model": model}) + if request_options is None or request_options.get("additional_body_parameters") is None + else { + **jsonable_encoder({"model": model}), + **(jsonable_encoder(remove_none_from_dict(request_options.get("additional_body_parameters", {})))), + }, + headers=jsonable_encoder( + remove_none_from_dict( + { + **self._client_wrapper.get_headers(), + **(request_options.get("additional_headers", {}) if request_options is not None else {}), + } + ) + ), + timeout=request_options.get("timeout_in_seconds") + if request_options is not None and request_options.get("timeout_in_seconds") is not None + else 60, + ) + if 200 <= _response.status_code < 300: + return pydantic.parse_obj_as(PaymentResponse, _response.json()) # type: ignore + try: + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) + + async def meta_patch_retrieve( + self, id: str, *, request_options: typing.Optional[RequestOptions] = None + ) -> MetaResponse: + """ + Returns metadata for `Payment` PATCHs. + + Parameters: + - id: str. + + - request_options: typing.Optional[RequestOptions]. Request-specific configuration. + --- + from merge.client import AsyncMerge + + client = AsyncMerge( + account_token="YOUR_ACCOUNT_TOKEN", + api_key="YOUR_API_KEY", + ) + await client.accounting.payments.meta_patch_retrieve( + id="id", + ) + """ + _response = await self._client_wrapper.httpx_client.request( + "GET", + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"accounting/v1/payments/meta/patch/{id}"), + params=jsonable_encoder( + request_options.get("additional_query_parameters") if request_options is not None else None + ), + headers=jsonable_encoder( + remove_none_from_dict( + { + **self._client_wrapper.get_headers(), + **(request_options.get("additional_headers", {}) if request_options is not None else {}), + } + ) + ), + timeout=request_options.get("timeout_in_seconds") + if request_options is not None and request_options.get("timeout_in_seconds") is not None + else 60, + ) + if 200 <= _response.status_code < 300: + return pydantic.parse_obj_as(MetaResponse, _response.json()) # type: ignore + try: + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) + async def meta_post_retrieve(self, *, request_options: typing.Optional[RequestOptions] = None) -> MetaResponse: """ Returns metadata for `Payment` POSTs. @@ -633,7 +854,7 @@ async def meta_post_retrieve(self, *, request_options: typing.Optional[RequestOp """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/accounting/v1/payments/meta/post"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "accounting/v1/payments/meta/post"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), diff --git a/src/merge/resources/accounting/resources/phone_numbers/client.py b/src/merge/resources/accounting/resources/phone_numbers/client.py index c6190503..42bf15f2 100644 --- a/src/merge/resources/accounting/resources/phone_numbers/client.py +++ b/src/merge/resources/accounting/resources/phone_numbers/client.py @@ -45,12 +45,12 @@ def retrieve( api_key="YOUR_API_KEY", ) client.accounting.phone_numbers.retrieve( - id="string", + id="id", ) """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"api/accounting/v1/phone-numbers/{id}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"accounting/v1/phone-numbers/{id}"), params=jsonable_encoder( remove_none_from_dict( { @@ -112,12 +112,12 @@ async def retrieve( api_key="YOUR_API_KEY", ) await client.accounting.phone_numbers.retrieve( - id="string", + id="id", ) """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"api/accounting/v1/phone-numbers/{id}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"accounting/v1/phone-numbers/{id}"), params=jsonable_encoder( remove_none_from_dict( { diff --git a/src/merge/resources/accounting/resources/purchase_orders/client.py b/src/merge/resources/accounting/resources/purchase_orders/client.py index 57f3cbf5..5309772c 100644 --- a/src/merge/resources/accounting/resources/purchase_orders/client.py +++ b/src/merge/resources/accounting/resources/purchase_orders/client.py @@ -84,26 +84,21 @@ def list( - remote_id: typing.Optional[str]. The API provider's ID for the given object. - - show_enum_origins: typing.Optional[typing.Literal["status"]]. Which fields should be returned in non-normalized form. + - show_enum_origins: typing.Optional[typing.Literal["status"]]. A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from merge.client import Merge - from merge.resources.accounting import PurchaseOrdersListRequestExpand client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) - client.accounting.purchase_orders.list( - expand=PurchaseOrdersListRequestExpand.ACCOUNTING_PERIOD, - remote_fields="status", - show_enum_origins="status", - ) + client.accounting.purchase_orders.list() """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/accounting/v1/purchase-orders"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "accounting/v1/purchase-orders"), params=jsonable_encoder( remove_none_from_dict( { @@ -187,7 +182,7 @@ def create( """ _response = self._client_wrapper.httpx_client.request( "POST", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/accounting/v1/purchase-orders"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "accounting/v1/purchase-orders"), params=jsonable_encoder( remove_none_from_dict( { @@ -249,27 +244,23 @@ def retrieve( - remote_fields: typing.Optional[typing.Literal["status"]]. Deprecated. Use show_enum_origins. - - show_enum_origins: typing.Optional[typing.Literal["status"]]. Which fields should be returned in non-normalized form. + - show_enum_origins: typing.Optional[typing.Literal["status"]]. A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from merge.client import Merge - from merge.resources.accounting import PurchaseOrdersRetrieveRequestExpand client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) client.accounting.purchase_orders.retrieve( - id="string", - expand=PurchaseOrdersRetrieveRequestExpand.ACCOUNTING_PERIOD, - remote_fields="status", - show_enum_origins="status", + id="id", ) """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"api/accounting/v1/purchase-orders/{id}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"accounting/v1/purchase-orders/{id}"), params=jsonable_encoder( remove_none_from_dict( { @@ -322,9 +313,7 @@ def meta_post_retrieve(self, *, request_options: typing.Optional[RequestOptions] """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin( - f"{self._client_wrapper.get_base_url()}/", "api/accounting/v1/purchase-orders/meta/post" - ), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "accounting/v1/purchase-orders/meta/post"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -405,26 +394,21 @@ async def list( - remote_id: typing.Optional[str]. The API provider's ID for the given object. - - show_enum_origins: typing.Optional[typing.Literal["status"]]. Which fields should be returned in non-normalized form. + - show_enum_origins: typing.Optional[typing.Literal["status"]]. A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from merge.client import AsyncMerge - from merge.resources.accounting import PurchaseOrdersListRequestExpand client = AsyncMerge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) - await client.accounting.purchase_orders.list( - expand=PurchaseOrdersListRequestExpand.ACCOUNTING_PERIOD, - remote_fields="status", - show_enum_origins="status", - ) + await client.accounting.purchase_orders.list() """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/accounting/v1/purchase-orders"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "accounting/v1/purchase-orders"), params=jsonable_encoder( remove_none_from_dict( { @@ -508,7 +492,7 @@ async def create( """ _response = await self._client_wrapper.httpx_client.request( "POST", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/accounting/v1/purchase-orders"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "accounting/v1/purchase-orders"), params=jsonable_encoder( remove_none_from_dict( { @@ -570,27 +554,23 @@ async def retrieve( - remote_fields: typing.Optional[typing.Literal["status"]]. Deprecated. Use show_enum_origins. - - show_enum_origins: typing.Optional[typing.Literal["status"]]. Which fields should be returned in non-normalized form. + - show_enum_origins: typing.Optional[typing.Literal["status"]]. A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from merge.client import AsyncMerge - from merge.resources.accounting import PurchaseOrdersRetrieveRequestExpand client = AsyncMerge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) await client.accounting.purchase_orders.retrieve( - id="string", - expand=PurchaseOrdersRetrieveRequestExpand.ACCOUNTING_PERIOD, - remote_fields="status", - show_enum_origins="status", + id="id", ) """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"api/accounting/v1/purchase-orders/{id}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"accounting/v1/purchase-orders/{id}"), params=jsonable_encoder( remove_none_from_dict( { @@ -643,9 +623,7 @@ async def meta_post_retrieve(self, *, request_options: typing.Optional[RequestOp """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin( - f"{self._client_wrapper.get_base_url()}/", "api/accounting/v1/purchase-orders/meta/post" - ), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "accounting/v1/purchase-orders/meta/post"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), diff --git a/src/merge/resources/accounting/resources/regenerate_key/client.py b/src/merge/resources/accounting/resources/regenerate_key/client.py index b0226275..2f9d3545 100644 --- a/src/merge/resources/accounting/resources/regenerate_key/client.py +++ b/src/merge/resources/accounting/resources/regenerate_key/client.py @@ -29,7 +29,7 @@ def create(self, *, name: str, request_options: typing.Optional[RequestOptions] Exchange remote keys. Parameters: - - name: str. + - name: str. The name of the remote key - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- @@ -45,7 +45,7 @@ def create(self, *, name: str, request_options: typing.Optional[RequestOptions] """ _response = self._client_wrapper.httpx_client.request( "POST", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/accounting/v1/regenerate-key"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "accounting/v1/regenerate-key"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -85,7 +85,7 @@ async def create(self, *, name: str, request_options: typing.Optional[RequestOpt Exchange remote keys. Parameters: - - name: str. + - name: str. The name of the remote key - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- @@ -101,7 +101,7 @@ async def create(self, *, name: str, request_options: typing.Optional[RequestOpt """ _response = await self._client_wrapper.httpx_client.request( "POST", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/accounting/v1/regenerate-key"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "accounting/v1/regenerate-key"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), diff --git a/src/merge/resources/accounting/resources/scopes/client.py b/src/merge/resources/accounting/resources/scopes/client.py index 12d5420d..bcd1b969 100644 --- a/src/merge/resources/accounting/resources/scopes/client.py +++ b/src/merge/resources/accounting/resources/scopes/client.py @@ -29,7 +29,7 @@ def default_scopes_retrieve( self, *, request_options: typing.Optional[RequestOptions] = None ) -> CommonModelScopeApi: """ - Get the default permissions for Merge Common Models and fields across all Linked Accounts of a given category. [Learn More](https://help.merge.dev/en/articles/8828211-common-model-and-field-scopes). + Get the default permissions for Merge Common Models and fields across all Linked Accounts of a given category. [Learn more](https://help.merge.dev/en/articles/8828211-common-model-and-field-scopes). Parameters: - request_options: typing.Optional[RequestOptions]. Request-specific configuration. @@ -44,7 +44,7 @@ def default_scopes_retrieve( """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/accounting/v1/default-scopes"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "accounting/v1/default-scopes"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -72,7 +72,7 @@ def linked_account_scopes_retrieve( self, *, request_options: typing.Optional[RequestOptions] = None ) -> CommonModelScopeApi: """ - Get all available permissions for Merge Common Models and fields for a single Linked Account. [Learn More](https://help.merge.dev/en/articles/8828211-common-model-and-field-scopes). + Get all available permissions for Merge Common Models and fields for a single Linked Account. [Learn more](https://help.merge.dev/en/articles/8828211-common-model-and-field-scopes). Parameters: - request_options: typing.Optional[RequestOptions]. Request-specific configuration. @@ -87,7 +87,7 @@ def linked_account_scopes_retrieve( """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/accounting/v1/linked-account-scopes"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "accounting/v1/linked-account-scopes"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -118,7 +118,7 @@ def linked_account_scopes_create( request_options: typing.Optional[RequestOptions] = None, ) -> CommonModelScopeApi: """ - Update permissions for any Common Model or field for a single Linked Account. Any Scopes not set in this POST request will inherit the default Scopes. [Learn More](https://help.merge.dev/en/articles/8828211-common-model-and-field-scopes) + Update permissions for any Common Model or field for a single Linked Account. Any Scopes not set in this POST request will inherit the default Scopes. [Learn more](https://help.merge.dev/en/articles/8828211-common-model-and-field-scopes) Parameters: - common_models: typing.List[IndividualCommonModelScopeDeserializerRequest]. The common models you want to update the scopes for @@ -126,18 +126,25 @@ def linked_account_scopes_create( - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from merge.client import Merge + from merge.resources.accounting import ( + IndividualCommonModelScopeDeserializerRequest, + ) client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) client.accounting.scopes.linked_account_scopes_create( - common_models=[], + common_models=[ + IndividualCommonModelScopeDeserializerRequest( + model_name="model_name", + ) + ], ) """ _response = self._client_wrapper.httpx_client.request( "POST", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/accounting/v1/linked-account-scopes"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "accounting/v1/linked-account-scopes"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -176,7 +183,7 @@ async def default_scopes_retrieve( self, *, request_options: typing.Optional[RequestOptions] = None ) -> CommonModelScopeApi: """ - Get the default permissions for Merge Common Models and fields across all Linked Accounts of a given category. [Learn More](https://help.merge.dev/en/articles/8828211-common-model-and-field-scopes). + Get the default permissions for Merge Common Models and fields across all Linked Accounts of a given category. [Learn more](https://help.merge.dev/en/articles/8828211-common-model-and-field-scopes). Parameters: - request_options: typing.Optional[RequestOptions]. Request-specific configuration. @@ -191,7 +198,7 @@ async def default_scopes_retrieve( """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/accounting/v1/default-scopes"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "accounting/v1/default-scopes"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -219,7 +226,7 @@ async def linked_account_scopes_retrieve( self, *, request_options: typing.Optional[RequestOptions] = None ) -> CommonModelScopeApi: """ - Get all available permissions for Merge Common Models and fields for a single Linked Account. [Learn More](https://help.merge.dev/en/articles/8828211-common-model-and-field-scopes). + Get all available permissions for Merge Common Models and fields for a single Linked Account. [Learn more](https://help.merge.dev/en/articles/8828211-common-model-and-field-scopes). Parameters: - request_options: typing.Optional[RequestOptions]. Request-specific configuration. @@ -234,7 +241,7 @@ async def linked_account_scopes_retrieve( """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/accounting/v1/linked-account-scopes"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "accounting/v1/linked-account-scopes"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -265,7 +272,7 @@ async def linked_account_scopes_create( request_options: typing.Optional[RequestOptions] = None, ) -> CommonModelScopeApi: """ - Update permissions for any Common Model or field for a single Linked Account. Any Scopes not set in this POST request will inherit the default Scopes. [Learn More](https://help.merge.dev/en/articles/8828211-common-model-and-field-scopes) + Update permissions for any Common Model or field for a single Linked Account. Any Scopes not set in this POST request will inherit the default Scopes. [Learn more](https://help.merge.dev/en/articles/8828211-common-model-and-field-scopes) Parameters: - common_models: typing.List[IndividualCommonModelScopeDeserializerRequest]. The common models you want to update the scopes for @@ -273,18 +280,25 @@ async def linked_account_scopes_create( - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from merge.client import AsyncMerge + from merge.resources.accounting import ( + IndividualCommonModelScopeDeserializerRequest, + ) client = AsyncMerge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) await client.accounting.scopes.linked_account_scopes_create( - common_models=[], + common_models=[ + IndividualCommonModelScopeDeserializerRequest( + model_name="model_name", + ) + ], ) """ _response = await self._client_wrapper.httpx_client.request( "POST", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/accounting/v1/linked-account-scopes"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "accounting/v1/linked-account-scopes"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), diff --git a/src/merge/resources/accounting/resources/selective_sync/client.py b/src/merge/resources/accounting/resources/selective_sync/client.py index c483af25..55a0e3bf 100644 --- a/src/merge/resources/accounting/resources/selective_sync/client.py +++ b/src/merge/resources/accounting/resources/selective_sync/client.py @@ -46,7 +46,7 @@ def configurations_list( _response = self._client_wrapper.httpx_client.request( "GET", urllib.parse.urljoin( - f"{self._client_wrapper.get_base_url()}/", "api/accounting/v1/selective-sync/configurations" + f"{self._client_wrapper.get_base_url()}/", "accounting/v1/selective-sync/configurations" ), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None @@ -86,19 +86,26 @@ def configurations_update( - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from merge.client import Merge + from merge.resources.accounting import ( + LinkedAccountSelectiveSyncConfigurationRequest, + ) client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) client.accounting.selective_sync.configurations_update( - sync_configurations=[], + sync_configurations=[ + LinkedAccountSelectiveSyncConfigurationRequest( + linked_account_conditions=[], + ) + ], ) """ _response = self._client_wrapper.httpx_client.request( "PUT", urllib.parse.urljoin( - f"{self._client_wrapper.get_base_url()}/", "api/accounting/v1/selective-sync/configurations" + f"{self._client_wrapper.get_base_url()}/", "accounting/v1/selective-sync/configurations" ), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None @@ -159,7 +166,7 @@ def meta_list( """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/accounting/v1/selective-sync/meta"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "accounting/v1/selective-sync/meta"), params=jsonable_encoder( remove_none_from_dict( { @@ -219,7 +226,7 @@ async def configurations_list( _response = await self._client_wrapper.httpx_client.request( "GET", urllib.parse.urljoin( - f"{self._client_wrapper.get_base_url()}/", "api/accounting/v1/selective-sync/configurations" + f"{self._client_wrapper.get_base_url()}/", "accounting/v1/selective-sync/configurations" ), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None @@ -259,19 +266,26 @@ async def configurations_update( - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from merge.client import AsyncMerge + from merge.resources.accounting import ( + LinkedAccountSelectiveSyncConfigurationRequest, + ) client = AsyncMerge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) await client.accounting.selective_sync.configurations_update( - sync_configurations=[], + sync_configurations=[ + LinkedAccountSelectiveSyncConfigurationRequest( + linked_account_conditions=[], + ) + ], ) """ _response = await self._client_wrapper.httpx_client.request( "PUT", urllib.parse.urljoin( - f"{self._client_wrapper.get_base_url()}/", "api/accounting/v1/selective-sync/configurations" + f"{self._client_wrapper.get_base_url()}/", "accounting/v1/selective-sync/configurations" ), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None @@ -332,7 +346,7 @@ async def meta_list( """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/accounting/v1/selective-sync/meta"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "accounting/v1/selective-sync/meta"), params=jsonable_encoder( remove_none_from_dict( { diff --git a/src/merge/resources/accounting/resources/sync_status/client.py b/src/merge/resources/accounting/resources/sync_status/client.py index 662c21b6..f07c153a 100644 --- a/src/merge/resources/accounting/resources/sync_status/client.py +++ b/src/merge/resources/accounting/resources/sync_status/client.py @@ -48,7 +48,7 @@ def list( """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/accounting/v1/sync-status"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "accounting/v1/sync-status"), params=jsonable_encoder( remove_none_from_dict( { @@ -114,7 +114,7 @@ async def list( """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/accounting/v1/sync-status"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "accounting/v1/sync-status"), params=jsonable_encoder( remove_none_from_dict( { diff --git a/src/merge/resources/accounting/resources/tax_rates/client.py b/src/merge/resources/accounting/resources/tax_rates/client.py index 1fb072f0..671604e5 100644 --- a/src/merge/resources/accounting/resources/tax_rates/client.py +++ b/src/merge/resources/accounting/resources/tax_rates/client.py @@ -74,13 +74,11 @@ def list( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) - client.accounting.tax_rates.list( - expand="company", - ) + client.accounting.tax_rates.list() """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/accounting/v1/tax-rates"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "accounting/v1/tax-rates"), params=jsonable_encoder( remove_none_from_dict( { @@ -150,13 +148,12 @@ def retrieve( api_key="YOUR_API_KEY", ) client.accounting.tax_rates.retrieve( - id="string", - expand="company", + id="id", ) """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"api/accounting/v1/tax-rates/{id}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"accounting/v1/tax-rates/{id}"), params=jsonable_encoder( remove_none_from_dict( { @@ -245,13 +242,11 @@ async def list( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) - await client.accounting.tax_rates.list( - expand="company", - ) + await client.accounting.tax_rates.list() """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/accounting/v1/tax-rates"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "accounting/v1/tax-rates"), params=jsonable_encoder( remove_none_from_dict( { @@ -321,13 +316,12 @@ async def retrieve( api_key="YOUR_API_KEY", ) await client.accounting.tax_rates.retrieve( - id="string", - expand="company", + id="id", ) """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"api/accounting/v1/tax-rates/{id}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"accounting/v1/tax-rates/{id}"), params=jsonable_encoder( remove_none_from_dict( { diff --git a/src/merge/resources/accounting/resources/tracking_categories/client.py b/src/merge/resources/accounting/resources/tracking_categories/client.py index 2697b2f3..79eefc4d 100644 --- a/src/merge/resources/accounting/resources/tracking_categories/client.py +++ b/src/merge/resources/accounting/resources/tracking_categories/client.py @@ -70,7 +70,7 @@ def list( - remote_id: typing.Optional[str]. The API provider's ID for the given object. - - show_enum_origins: typing.Optional[typing.Literal["status"]]. Which fields should be returned in non-normalized form. + - show_enum_origins: typing.Optional[typing.Literal["status"]]. A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- @@ -80,15 +80,11 @@ def list( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) - client.accounting.tracking_categories.list( - expand="company", - remote_fields="status", - show_enum_origins="status", - ) + client.accounting.tracking_categories.list() """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/accounting/v1/tracking-categories"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "accounting/v1/tracking-categories"), params=jsonable_encoder( remove_none_from_dict( { @@ -155,7 +151,7 @@ def retrieve( - remote_fields: typing.Optional[typing.Literal["status"]]. Deprecated. Use show_enum_origins. - - show_enum_origins: typing.Optional[typing.Literal["status"]]. Which fields should be returned in non-normalized form. + - show_enum_origins: typing.Optional[typing.Literal["status"]]. A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- @@ -166,17 +162,12 @@ def retrieve( api_key="YOUR_API_KEY", ) client.accounting.tracking_categories.retrieve( - id="string", - expand="company", - remote_fields="status", - show_enum_origins="status", + id="id", ) """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin( - f"{self._client_wrapper.get_base_url()}/", f"api/accounting/v1/tracking-categories/{id}" - ), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"accounting/v1/tracking-categories/{id}"), params=jsonable_encoder( remove_none_from_dict( { @@ -263,7 +254,7 @@ async def list( - remote_id: typing.Optional[str]. The API provider's ID for the given object. - - show_enum_origins: typing.Optional[typing.Literal["status"]]. Which fields should be returned in non-normalized form. + - show_enum_origins: typing.Optional[typing.Literal["status"]]. A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- @@ -273,15 +264,11 @@ async def list( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) - await client.accounting.tracking_categories.list( - expand="company", - remote_fields="status", - show_enum_origins="status", - ) + await client.accounting.tracking_categories.list() """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/accounting/v1/tracking-categories"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "accounting/v1/tracking-categories"), params=jsonable_encoder( remove_none_from_dict( { @@ -348,7 +335,7 @@ async def retrieve( - remote_fields: typing.Optional[typing.Literal["status"]]. Deprecated. Use show_enum_origins. - - show_enum_origins: typing.Optional[typing.Literal["status"]]. Which fields should be returned in non-normalized form. + - show_enum_origins: typing.Optional[typing.Literal["status"]]. A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- @@ -359,17 +346,12 @@ async def retrieve( api_key="YOUR_API_KEY", ) await client.accounting.tracking_categories.retrieve( - id="string", - expand="company", - remote_fields="status", - show_enum_origins="status", + id="id", ) """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin( - f"{self._client_wrapper.get_base_url()}/", f"api/accounting/v1/tracking-categories/{id}" - ), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"accounting/v1/tracking-categories/{id}"), params=jsonable_encoder( remove_none_from_dict( { diff --git a/src/merge/resources/accounting/resources/transactions/client.py b/src/merge/resources/accounting/resources/transactions/client.py index 3c30e3d2..e835fa55 100644 --- a/src/merge/resources/accounting/resources/transactions/client.py +++ b/src/merge/resources/accounting/resources/transactions/client.py @@ -77,19 +77,16 @@ def list( - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from merge.client import Merge - from merge.resources.accounting import TransactionsListRequestExpand client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) - client.accounting.transactions.list( - expand=TransactionsListRequestExpand.ACCOUNT, - ) + client.accounting.transactions.list() """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/accounting/v1/transactions"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "accounting/v1/transactions"), params=jsonable_encoder( remove_none_from_dict( { @@ -159,20 +156,18 @@ def retrieve( - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from merge.client import Merge - from merge.resources.accounting import TransactionsRetrieveRequestExpand client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) client.accounting.transactions.retrieve( - id="string", - expand=TransactionsRetrieveRequestExpand.ACCOUNT, + id="id", ) """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"api/accounting/v1/transactions/{id}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"accounting/v1/transactions/{id}"), params=jsonable_encoder( remove_none_from_dict( { @@ -262,19 +257,16 @@ async def list( - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from merge.client import AsyncMerge - from merge.resources.accounting import TransactionsListRequestExpand client = AsyncMerge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) - await client.accounting.transactions.list( - expand=TransactionsListRequestExpand.ACCOUNT, - ) + await client.accounting.transactions.list() """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/accounting/v1/transactions"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "accounting/v1/transactions"), params=jsonable_encoder( remove_none_from_dict( { @@ -344,20 +336,18 @@ async def retrieve( - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from merge.client import AsyncMerge - from merge.resources.accounting import TransactionsRetrieveRequestExpand client = AsyncMerge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) await client.accounting.transactions.retrieve( - id="string", - expand=TransactionsRetrieveRequestExpand.ACCOUNT, + id="id", ) """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"api/accounting/v1/transactions/{id}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"accounting/v1/transactions/{id}"), params=jsonable_encoder( remove_none_from_dict( { diff --git a/src/merge/resources/accounting/resources/vendor_credits/client.py b/src/merge/resources/accounting/resources/vendor_credits/client.py index fd6913e3..99af3e2a 100644 --- a/src/merge/resources/accounting/resources/vendor_credits/client.py +++ b/src/merge/resources/accounting/resources/vendor_credits/client.py @@ -77,19 +77,16 @@ def list( - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from merge.client import Merge - from merge.resources.accounting import VendorCreditsListRequestExpand client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) - client.accounting.vendor_credits.list( - expand=VendorCreditsListRequestExpand.ACCOUNTING_PERIOD, - ) + client.accounting.vendor_credits.list() """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/accounting/v1/vendor-credits"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "accounting/v1/vendor-credits"), params=jsonable_encoder( remove_none_from_dict( { @@ -159,20 +156,18 @@ def retrieve( - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from merge.client import Merge - from merge.resources.accounting import VendorCreditsRetrieveRequestExpand client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) client.accounting.vendor_credits.retrieve( - id="string", - expand=VendorCreditsRetrieveRequestExpand.ACCOUNTING_PERIOD, + id="id", ) """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"api/accounting/v1/vendor-credits/{id}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"accounting/v1/vendor-credits/{id}"), params=jsonable_encoder( remove_none_from_dict( { @@ -262,19 +257,16 @@ async def list( - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from merge.client import AsyncMerge - from merge.resources.accounting import VendorCreditsListRequestExpand client = AsyncMerge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) - await client.accounting.vendor_credits.list( - expand=VendorCreditsListRequestExpand.ACCOUNTING_PERIOD, - ) + await client.accounting.vendor_credits.list() """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/accounting/v1/vendor-credits"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "accounting/v1/vendor-credits"), params=jsonable_encoder( remove_none_from_dict( { @@ -344,20 +336,18 @@ async def retrieve( - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from merge.client import AsyncMerge - from merge.resources.accounting import VendorCreditsRetrieveRequestExpand client = AsyncMerge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) await client.accounting.vendor_credits.retrieve( - id="string", - expand=VendorCreditsRetrieveRequestExpand.ACCOUNTING_PERIOD, + id="id", ) """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"api/accounting/v1/vendor-credits/{id}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"accounting/v1/vendor-credits/{id}"), params=jsonable_encoder( remove_none_from_dict( { diff --git a/src/merge/resources/accounting/resources/webhook_receivers/client.py b/src/merge/resources/accounting/resources/webhook_receivers/client.py index 1c402a78..e741204b 100644 --- a/src/merge/resources/accounting/resources/webhook_receivers/client.py +++ b/src/merge/resources/accounting/resources/webhook_receivers/client.py @@ -41,7 +41,7 @@ def list(self, *, request_options: typing.Optional[RequestOptions] = None) -> ty """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/accounting/v1/webhook-receivers"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "accounting/v1/webhook-receivers"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -92,7 +92,7 @@ def create( api_key="YOUR_API_KEY", ) client.accounting.webhook_receivers.create( - event="string", + event="event", is_active=True, ) """ @@ -101,7 +101,7 @@ def create( _request["key"] = key _response = self._client_wrapper.httpx_client.request( "POST", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/accounting/v1/webhook-receivers"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "accounting/v1/webhook-receivers"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -153,7 +153,7 @@ async def list(self, *, request_options: typing.Optional[RequestOptions] = None) """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/accounting/v1/webhook-receivers"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "accounting/v1/webhook-receivers"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -204,7 +204,7 @@ async def create( api_key="YOUR_API_KEY", ) await client.accounting.webhook_receivers.create( - event="string", + event="event", is_active=True, ) """ @@ -213,7 +213,7 @@ async def create( _request["key"] = key _response = await self._client_wrapper.httpx_client.request( "POST", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/accounting/v1/webhook-receivers"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "accounting/v1/webhook-receivers"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), diff --git a/src/merge/resources/accounting/types/__init__.py b/src/merge/resources/accounting/types/__init__.py index 9cfb380a..b0e1da76 100644 --- a/src/merge/resources/accounting/types/__init__.py +++ b/src/merge/resources/accounting/types/__init__.py @@ -235,6 +235,14 @@ from .paginated_tracking_category_list import PaginatedTrackingCategoryList from .paginated_transaction_list import PaginatedTransactionList from .paginated_vendor_credit_list import PaginatedVendorCreditList +from .patched_payment_request import PatchedPaymentRequest +from .patched_payment_request_account import PatchedPaymentRequestAccount +from .patched_payment_request_accounting_period import PatchedPaymentRequestAccountingPeriod +from .patched_payment_request_applied_to_lines_item import PatchedPaymentRequestAppliedToLinesItem +from .patched_payment_request_company import PatchedPaymentRequestCompany +from .patched_payment_request_contact import PatchedPaymentRequestContact +from .patched_payment_request_currency import PatchedPaymentRequestCurrency +from .patched_payment_request_tracking_categories_item import PatchedPaymentRequestTrackingCategoriesItem from .payment import Payment from .payment_account import PaymentAccount from .payment_accounting_period import PaymentAccountingPeriod @@ -553,6 +561,14 @@ "PaginatedTrackingCategoryList", "PaginatedTransactionList", "PaginatedVendorCreditList", + "PatchedPaymentRequest", + "PatchedPaymentRequestAccount", + "PatchedPaymentRequestAccountingPeriod", + "PatchedPaymentRequestAppliedToLinesItem", + "PatchedPaymentRequestCompany", + "PatchedPaymentRequestContact", + "PatchedPaymentRequestCurrency", + "PatchedPaymentRequestTrackingCategoriesItem", "Payment", "PaymentAccount", "PaymentAccountingPeriod", diff --git a/src/merge/resources/accounting/types/account.py b/src/merge/resources/accounting/types/account.py index a66b3cee..0c443ebd 100644 --- a/src/merge/resources/accounting/types/account.py +++ b/src/merge/resources/accounting/types/account.py @@ -38,6 +38,10 @@ class Account(pydantic.BaseModel): id: typing.Optional[str] remote_id: typing.Optional[str] = pydantic.Field(description="The third-party API ID of the matching object.") + created_at: typing.Optional[dt.datetime] + modified_at: typing.Optional[dt.datetime] = pydantic.Field( + description="This is the datetime that this object was last updated by Merge" + ) name: typing.Optional[str] = pydantic.Field(description="The account's name.") description: typing.Optional[str] = pydantic.Field(description="The account's description.") classification: typing.Optional[AccountClassification] = pydantic.Field( @@ -378,10 +382,6 @@ class Account(pydantic.BaseModel): remote_was_deleted: typing.Optional[bool] = pydantic.Field( description="Indicates whether or not this object has been deleted in the third party platform." ) - created_at: typing.Optional[dt.datetime] - modified_at: typing.Optional[dt.datetime] = pydantic.Field( - description="This is the datetime that this object was last updated by Merge" - ) field_mappings: typing.Optional[typing.Dict[str, typing.Any]] remote_data: typing.Optional[typing.List[RemoteData]] diff --git a/src/merge/resources/accounting/types/account_details_and_actions.py b/src/merge/resources/accounting/types/account_details_and_actions.py index fda4a3a9..8141e146 100644 --- a/src/merge/resources/accounting/types/account_details_and_actions.py +++ b/src/merge/resources/accounting/types/account_details_and_actions.py @@ -34,6 +34,9 @@ class AccountDetailsAndActions(pydantic.BaseModel): end_user_origin_id: typing.Optional[str] end_user_organization_name: str end_user_email_address: str + subdomain: typing.Optional[str] = pydantic.Field( + description="The tenant or domain the customer has provided access to." + ) webhook_listener_url: str is_duplicate: typing.Optional[bool] = pydantic.Field( description="Whether a Production Linked Account's credentials match another existing Production Linked Account. This field is `null` for Test Linked Accounts, incomplete Production Linked Accounts, and ignored duplicate Production Linked Account sets." diff --git a/src/merge/resources/accounting/types/accounting_attachment.py b/src/merge/resources/accounting/types/accounting_attachment.py index 80792a8c..159fd3cb 100644 --- a/src/merge/resources/accounting/types/accounting_attachment.py +++ b/src/merge/resources/accounting/types/accounting_attachment.py @@ -27,16 +27,16 @@ class AccountingAttachment(pydantic.BaseModel): id: typing.Optional[str] remote_id: typing.Optional[str] = pydantic.Field(description="The third-party API ID of the matching object.") + created_at: typing.Optional[dt.datetime] + modified_at: typing.Optional[dt.datetime] = pydantic.Field( + description="This is the datetime that this object was last updated by Merge" + ) file_name: typing.Optional[str] = pydantic.Field(description="The attachment's name.") file_url: typing.Optional[str] = pydantic.Field(description="The attachment's url.") company: typing.Optional[str] = pydantic.Field(description="The company the accounting attachment belongs to.") remote_was_deleted: typing.Optional[bool] = pydantic.Field( description="Indicates whether or not this object has been deleted in the third party platform." ) - created_at: typing.Optional[dt.datetime] - modified_at: typing.Optional[dt.datetime] = pydantic.Field( - description="This is the datetime that this object was last updated by Merge" - ) field_mappings: typing.Optional[typing.Dict[str, typing.Any]] remote_data: typing.Optional[typing.List[RemoteData]] diff --git a/src/merge/resources/accounting/types/accounting_period.py b/src/merge/resources/accounting/types/accounting_period.py index 950f7ddf..ad5b8e15 100644 --- a/src/merge/resources/accounting/types/accounting_period.py +++ b/src/merge/resources/accounting/types/accounting_period.py @@ -25,15 +25,15 @@ class AccountingPeriod(pydantic.BaseModel): Common models like `Invoice` and `Transaction` will have `AccountingPeriod` objects which will denote when they occurred. """ - start_date: typing.Optional[dt.datetime] = pydantic.Field(description="Beginning date of the period") - end_date: typing.Optional[dt.datetime] = pydantic.Field(description="End date of the period") - status: typing.Optional[AccountingPeriodStatus] - name: typing.Optional[str] = pydantic.Field(description="Name of the accounting period.") id: typing.Optional[str] created_at: typing.Optional[dt.datetime] modified_at: typing.Optional[dt.datetime] = pydantic.Field( description="This is the datetime that this object was last updated by Merge" ) + start_date: typing.Optional[dt.datetime] = pydantic.Field(description="Beginning date of the period") + end_date: typing.Optional[dt.datetime] = pydantic.Field(description="End date of the period") + status: typing.Optional[AccountingPeriodStatus] + name: typing.Optional[str] = pydantic.Field(description="Name of the accounting period.") def json(self, **kwargs: typing.Any) -> str: kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs} diff --git a/src/merge/resources/accounting/types/accounting_phone_number.py b/src/merge/resources/accounting/types/accounting_phone_number.py index ad5f0599..3efa9d8c 100644 --- a/src/merge/resources/accounting/types/accounting_phone_number.py +++ b/src/merge/resources/accounting/types/accounting_phone_number.py @@ -24,12 +24,12 @@ class AccountingPhoneNumber(pydantic.BaseModel): Fetch from the `GET CompanyInfo` endpoint and view the company's phone numbers. """ - number: typing.Optional[str] = pydantic.Field(description="The phone number.") - type: typing.Optional[str] = pydantic.Field(description="The phone number's type.") created_at: typing.Optional[dt.datetime] modified_at: typing.Optional[dt.datetime] = pydantic.Field( description="This is the datetime that this object was last updated by Merge" ) + number: typing.Optional[str] = pydantic.Field(description="The phone number.") + type: typing.Optional[str] = pydantic.Field(description="The phone number's type.") def json(self, **kwargs: typing.Any) -> str: kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs} diff --git a/src/merge/resources/accounting/types/address.py b/src/merge/resources/accounting/types/address.py index 1f4db7ac..e5fc365f 100644 --- a/src/merge/resources/accounting/types/address.py +++ b/src/merge/resources/accounting/types/address.py @@ -26,6 +26,10 @@ class Address(pydantic.BaseModel): Fetch from the `GET CompanyInfo` endpoint and view the company's addresses. """ + created_at: typing.Optional[dt.datetime] + modified_at: typing.Optional[dt.datetime] = pydantic.Field( + description="This is the datetime that this object was last updated by Merge" + ) type: typing.Optional[AddressType] = pydantic.Field( description=("The address type.\n" "\n" "- `BILLING` - BILLING\n" "- `SHIPPING` - SHIPPING\n") ) @@ -290,10 +294,6 @@ class Address(pydantic.BaseModel): ) ) zip_code: typing.Optional[str] = pydantic.Field(description="The address's zip code.") - created_at: typing.Optional[dt.datetime] - modified_at: typing.Optional[dt.datetime] = pydantic.Field( - description="This is the datetime that this object was last updated by Merge" - ) def json(self, **kwargs: typing.Any) -> str: kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs} diff --git a/src/merge/resources/accounting/types/audit_log_event.py b/src/merge/resources/accounting/types/audit_log_event.py index 7bb2d3c6..131ad94b 100644 --- a/src/merge/resources/accounting/types/audit_log_event.py +++ b/src/merge/resources/accounting/types/audit_log_event.py @@ -69,6 +69,9 @@ class AuditLogEvent(pydantic.BaseModel): "- `CHANGED_LINKED_ACCOUNT_FIELD_MAPPING` - CHANGED_LINKED_ACCOUNT_FIELD_MAPPING\n" "- `DELETED_INTEGRATION_WIDE_FIELD_MAPPING` - DELETED_INTEGRATION_WIDE_FIELD_MAPPING\n" "- `DELETED_LINKED_ACCOUNT_FIELD_MAPPING` - DELETED_LINKED_ACCOUNT_FIELD_MAPPING\n" + "- `FORCED_LINKED_ACCOUNT_RESYNC` - FORCED_LINKED_ACCOUNT_RESYNC\n" + "- `MUTED_ISSUE` - MUTED_ISSUE\n" + "- `GENERATED_MAGIC_LINK` - GENERATED_MAGIC_LINK\n" ) ) event_description: str diff --git a/src/merge/resources/accounting/types/balance_sheet.py b/src/merge/resources/accounting/types/balance_sheet.py index 1e24a9cd..f11774b8 100644 --- a/src/merge/resources/accounting/types/balance_sheet.py +++ b/src/merge/resources/accounting/types/balance_sheet.py @@ -30,6 +30,10 @@ class BalanceSheet(pydantic.BaseModel): id: typing.Optional[str] remote_id: typing.Optional[str] = pydantic.Field(description="The third-party API ID of the matching object.") + created_at: typing.Optional[dt.datetime] + modified_at: typing.Optional[dt.datetime] = pydantic.Field( + description="This is the datetime that this object was last updated by Merge" + ) name: typing.Optional[str] = pydantic.Field(description="The balance sheet's name.") currency: typing.Optional[BalanceSheetCurrency] = pydantic.Field( description=( @@ -359,10 +363,6 @@ class BalanceSheet(pydantic.BaseModel): remote_was_deleted: typing.Optional[bool] = pydantic.Field( description="Indicates whether or not this object has been deleted in the third party platform." ) - created_at: typing.Optional[dt.datetime] - modified_at: typing.Optional[dt.datetime] = pydantic.Field( - description="This is the datetime that this object was last updated by Merge" - ) field_mappings: typing.Optional[typing.Dict[str, typing.Any]] remote_data: typing.Optional[typing.List[RemoteData]] diff --git a/src/merge/resources/accounting/types/cash_flow_statement.py b/src/merge/resources/accounting/types/cash_flow_statement.py index 26f196c7..5688723c 100644 --- a/src/merge/resources/accounting/types/cash_flow_statement.py +++ b/src/merge/resources/accounting/types/cash_flow_statement.py @@ -30,6 +30,10 @@ class CashFlowStatement(pydantic.BaseModel): id: typing.Optional[str] remote_id: typing.Optional[str] = pydantic.Field(description="The third-party API ID of the matching object.") + created_at: typing.Optional[dt.datetime] + modified_at: typing.Optional[dt.datetime] = pydantic.Field( + description="This is the datetime that this object was last updated by Merge" + ) name: typing.Optional[str] = pydantic.Field(description="The cash flow statement's name.") currency: typing.Optional[CashFlowStatementCurrency] = pydantic.Field( description=( @@ -363,10 +367,6 @@ class CashFlowStatement(pydantic.BaseModel): remote_was_deleted: typing.Optional[bool] = pydantic.Field( description="Indicates whether or not this object has been deleted in the third party platform." ) - created_at: typing.Optional[dt.datetime] - modified_at: typing.Optional[dt.datetime] = pydantic.Field( - description="This is the datetime that this object was last updated by Merge" - ) field_mappings: typing.Optional[typing.Dict[str, typing.Any]] remote_data: typing.Optional[typing.List[RemoteData]] diff --git a/src/merge/resources/accounting/types/company_info.py b/src/merge/resources/accounting/types/company_info.py index 36477d88..60fd050d 100644 --- a/src/merge/resources/accounting/types/company_info.py +++ b/src/merge/resources/accounting/types/company_info.py @@ -30,6 +30,10 @@ class CompanyInfo(pydantic.BaseModel): id: typing.Optional[str] remote_id: typing.Optional[str] = pydantic.Field(description="The third-party API ID of the matching object.") + created_at: typing.Optional[dt.datetime] + modified_at: typing.Optional[dt.datetime] = pydantic.Field( + description="This is the datetime that this object was last updated by Merge" + ) name: typing.Optional[str] = pydantic.Field(description="The company's name.") legal_name: typing.Optional[str] = pydantic.Field(description="The company's legal name.") tax_number: typing.Optional[str] = pydantic.Field(description="The company's tax number.") @@ -356,10 +360,6 @@ class CompanyInfo(pydantic.BaseModel): remote_was_deleted: typing.Optional[bool] = pydantic.Field( description="Indicates whether or not this object has been deleted in the third party platform." ) - created_at: typing.Optional[dt.datetime] - modified_at: typing.Optional[dt.datetime] = pydantic.Field( - description="This is the datetime that this object was last updated by Merge" - ) field_mappings: typing.Optional[typing.Dict[str, typing.Any]] remote_data: typing.Optional[typing.List[RemoteData]] diff --git a/src/merge/resources/accounting/types/condition_schema.py b/src/merge/resources/accounting/types/condition_schema.py index 7ebf9534..c8aebb68 100644 --- a/src/merge/resources/accounting/types/condition_schema.py +++ b/src/merge/resources/accounting/types/condition_schema.py @@ -20,12 +20,8 @@ class ConditionSchema(pydantic.BaseModel): common_model: typing.Optional[str] = pydantic.Field( description="The common model for which a condition schema is defined." ) - native_name: typing.Optional[str] = pydantic.Field( - description='User-facing _native condition_ name. e.g. "Skip Manager".' - ) - field_name: typing.Optional[str] = pydantic.Field( - description='The name of the field on the common model that this condition corresponds to, if they conceptually match. e.g. "location_type".' - ) + native_name: typing.Optional[str] + field_name: typing.Optional[str] is_unique: typing.Optional[bool] = pydantic.Field( description="Whether this condition can only be applied once. If false, the condition can be AND'd together multiple times." ) diff --git a/src/merge/resources/accounting/types/contact.py b/src/merge/resources/accounting/types/contact.py index b4c6ba11..ddda7c31 100644 --- a/src/merge/resources/accounting/types/contact.py +++ b/src/merge/resources/accounting/types/contact.py @@ -33,6 +33,10 @@ class Contact(pydantic.BaseModel): id: typing.Optional[str] remote_id: typing.Optional[str] = pydantic.Field(description="The third-party API ID of the matching object.") + created_at: typing.Optional[dt.datetime] + modified_at: typing.Optional[dt.datetime] = pydantic.Field( + description="This is the datetime that this object was last updated by Merge" + ) name: typing.Optional[str] = pydantic.Field(description="The contact's name.") is_supplier: typing.Optional[bool] = pydantic.Field(description="Whether the contact is a supplier.") is_customer: typing.Optional[bool] = pydantic.Field(description="Whether the contact is a customer.") @@ -55,10 +59,6 @@ class Contact(pydantic.BaseModel): remote_was_deleted: typing.Optional[bool] = pydantic.Field( description="Indicates whether or not this object has been deleted in the third party platform." ) - created_at: typing.Optional[dt.datetime] - modified_at: typing.Optional[dt.datetime] = pydantic.Field( - description="This is the datetime that this object was last updated by Merge" - ) field_mappings: typing.Optional[typing.Dict[str, typing.Any]] remote_data: typing.Optional[typing.List[RemoteData]] diff --git a/src/merge/resources/accounting/types/credit_note.py b/src/merge/resources/accounting/types/credit_note.py index bdd6d984..76ca8533 100644 --- a/src/merge/resources/accounting/types/credit_note.py +++ b/src/merge/resources/accounting/types/credit_note.py @@ -36,6 +36,10 @@ class CreditNote(pydantic.BaseModel): id: typing.Optional[str] remote_id: typing.Optional[str] = pydantic.Field(description="The third-party API ID of the matching object.") + created_at: typing.Optional[dt.datetime] + modified_at: typing.Optional[dt.datetime] = pydantic.Field( + description="This is the datetime that this object was last updated by Merge" + ) transaction_date: typing.Optional[dt.datetime] = pydantic.Field(description="The credit note's transaction date.") status: typing.Optional[CreditNoteStatus] = pydantic.Field( description=( @@ -386,10 +390,6 @@ class CreditNote(pydantic.BaseModel): accounting_period: typing.Optional[CreditNoteAccountingPeriod] = pydantic.Field( description="The accounting period that the CreditNote was generated in." ) - created_at: typing.Optional[dt.datetime] - modified_at: typing.Optional[dt.datetime] = pydantic.Field( - description="This is the datetime that this object was last updated by Merge" - ) field_mappings: typing.Optional[typing.Dict[str, typing.Any]] remote_data: typing.Optional[typing.List[RemoteData]] diff --git a/src/merge/resources/accounting/types/credit_note_line_item.py b/src/merge/resources/accounting/types/credit_note_line_item.py index feb29944..c067fe9d 100644 --- a/src/merge/resources/accounting/types/credit_note_line_item.py +++ b/src/merge/resources/accounting/types/credit_note_line_item.py @@ -14,6 +14,12 @@ class CreditNoteLineItem(pydantic.BaseModel): + id: typing.Optional[str] + remote_id: typing.Optional[str] = pydantic.Field(description="The third-party API ID of the matching object.") + created_at: typing.Optional[dt.datetime] + modified_at: typing.Optional[dt.datetime] = pydantic.Field( + description="This is the datetime that this object was last updated by Merge" + ) item: typing.Optional[CreditNoteLineItemItem] name: typing.Optional[str] = pydantic.Field(description="The credit note line item's name.") description: typing.Optional[str] = pydantic.Field(description="The description of the item that is owed.") @@ -32,15 +38,9 @@ class CreditNoteLineItem(pydantic.BaseModel): company: typing.Optional[CreditNoteLineItemCompany] = pydantic.Field( description="The company the credit note belongs to." ) - remote_id: typing.Optional[str] = pydantic.Field(description="The third-party API ID of the matching object.") remote_was_deleted: typing.Optional[bool] = pydantic.Field( description="Indicates whether or not this object has been deleted in the third party platform." ) - id: typing.Optional[str] - created_at: typing.Optional[dt.datetime] - modified_at: typing.Optional[dt.datetime] = pydantic.Field( - description="This is the datetime that this object was last updated by Merge" - ) def json(self, **kwargs: typing.Any) -> str: kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs} diff --git a/src/merge/resources/accounting/types/data_passthrough_request.py b/src/merge/resources/accounting/types/data_passthrough_request.py index 3acebedd..def5b5c2 100644 --- a/src/merge/resources/accounting/types/data_passthrough_request.py +++ b/src/merge/resources/accounting/types/data_passthrough_request.py @@ -28,9 +28,13 @@ class DataPassthroughRequest(pydantic.BaseModel): """ method: MethodEnum - path: str - base_url_override: typing.Optional[str] - data: typing.Optional[str] + path: str = pydantic.Field(description="The path of the request in the third party's platform.") + base_url_override: typing.Optional[str] = pydantic.Field( + description="An optional override of the third party's base url for the request." + ) + data: typing.Optional[str] = pydantic.Field( + description="The data with the request. You must include a `request_format` parameter matching the data's format" + ) multipart_form_data: typing.Optional[typing.List[MultipartFormFieldRequest]] = pydantic.Field( description="Pass an array of `MultipartFormField` objects in here instead of using the `data` param if `request_format` is set to `MULTIPART`." ) diff --git a/src/merge/resources/accounting/types/event_type_enum.py b/src/merge/resources/accounting/types/event_type_enum.py index 5ed5b7f1..434539c7 100644 --- a/src/merge/resources/accounting/types/event_type_enum.py +++ b/src/merge/resources/accounting/types/event_type_enum.py @@ -39,6 +39,9 @@ class EventTypeEnum(str, enum.Enum): - `CHANGED_LINKED_ACCOUNT_FIELD_MAPPING` - CHANGED_LINKED_ACCOUNT_FIELD_MAPPING - `DELETED_INTEGRATION_WIDE_FIELD_MAPPING` - DELETED_INTEGRATION_WIDE_FIELD_MAPPING - `DELETED_LINKED_ACCOUNT_FIELD_MAPPING` - DELETED_LINKED_ACCOUNT_FIELD_MAPPING + - `FORCED_LINKED_ACCOUNT_RESYNC` - FORCED_LINKED_ACCOUNT_RESYNC + - `MUTED_ISSUE` - MUTED_ISSUE + - `GENERATED_MAGIC_LINK` - GENERATED_MAGIC_LINK """ CREATED_REMOTE_PRODUCTION_API_KEY = "CREATED_REMOTE_PRODUCTION_API_KEY" @@ -72,6 +75,9 @@ class EventTypeEnum(str, enum.Enum): CHANGED_LINKED_ACCOUNT_FIELD_MAPPING = "CHANGED_LINKED_ACCOUNT_FIELD_MAPPING" DELETED_INTEGRATION_WIDE_FIELD_MAPPING = "DELETED_INTEGRATION_WIDE_FIELD_MAPPING" DELETED_LINKED_ACCOUNT_FIELD_MAPPING = "DELETED_LINKED_ACCOUNT_FIELD_MAPPING" + FORCED_LINKED_ACCOUNT_RESYNC = "FORCED_LINKED_ACCOUNT_RESYNC" + MUTED_ISSUE = "MUTED_ISSUE" + GENERATED_MAGIC_LINK = "GENERATED_MAGIC_LINK" def visit( self, @@ -106,6 +112,9 @@ def visit( changed_linked_account_field_mapping: typing.Callable[[], T_Result], deleted_integration_wide_field_mapping: typing.Callable[[], T_Result], deleted_linked_account_field_mapping: typing.Callable[[], T_Result], + forced_linked_account_resync: typing.Callable[[], T_Result], + muted_issue: typing.Callable[[], T_Result], + generated_magic_link: typing.Callable[[], T_Result], ) -> T_Result: if self is EventTypeEnum.CREATED_REMOTE_PRODUCTION_API_KEY: return created_remote_production_api_key() @@ -169,3 +178,9 @@ def visit( return deleted_integration_wide_field_mapping() if self is EventTypeEnum.DELETED_LINKED_ACCOUNT_FIELD_MAPPING: return deleted_linked_account_field_mapping() + if self is EventTypeEnum.FORCED_LINKED_ACCOUNT_RESYNC: + return forced_linked_account_resync() + if self is EventTypeEnum.MUTED_ISSUE: + return muted_issue() + if self is EventTypeEnum.GENERATED_MAGIC_LINK: + return generated_magic_link() diff --git a/src/merge/resources/accounting/types/expense.py b/src/merge/resources/accounting/types/expense.py index 4856204f..a1b9d505 100644 --- a/src/merge/resources/accounting/types/expense.py +++ b/src/merge/resources/accounting/types/expense.py @@ -34,6 +34,12 @@ class Expense(pydantic.BaseModel): Fetch from the `GET Expense` endpoint and view a company's expense. """ + id: typing.Optional[str] + remote_id: typing.Optional[str] = pydantic.Field(description="The third-party API ID of the matching object.") + created_at: typing.Optional[dt.datetime] + modified_at: typing.Optional[dt.datetime] = pydantic.Field( + description="This is the datetime that this object was last updated by Merge" + ) transaction_date: typing.Optional[dt.datetime] = pydantic.Field(description="When the transaction occurred.") remote_created_at: typing.Optional[dt.datetime] = pydantic.Field(description="When the expense was created.") account: typing.Optional[ExpenseAccount] = pydantic.Field(description="The expense's payment account.") @@ -364,12 +370,6 @@ class Expense(pydantic.BaseModel): accounting_period: typing.Optional[ExpenseAccountingPeriod] = pydantic.Field( description="The accounting period that the Expense was generated in." ) - id: typing.Optional[str] - remote_id: typing.Optional[str] = pydantic.Field(description="The third-party API ID of the matching object.") - created_at: typing.Optional[dt.datetime] - modified_at: typing.Optional[dt.datetime] = pydantic.Field( - description="This is the datetime that this object was last updated by Merge" - ) field_mappings: typing.Optional[typing.Dict[str, typing.Any]] remote_data: typing.Optional[typing.List[RemoteData]] diff --git a/src/merge/resources/accounting/types/expense_line.py b/src/merge/resources/accounting/types/expense_line.py index b675e92e..d6c08367 100644 --- a/src/merge/resources/accounting/types/expense_line.py +++ b/src/merge/resources/accounting/types/expense_line.py @@ -30,7 +30,12 @@ class ExpenseLine(pydantic.BaseModel): Fetch from the `GET Expense` endpoint and view the expense's line items. """ + id: typing.Optional[str] remote_id: typing.Optional[str] = pydantic.Field(description="The third-party API ID of the matching object.") + created_at: typing.Optional[dt.datetime] + modified_at: typing.Optional[dt.datetime] = pydantic.Field( + description="This is the datetime that this object was last updated by Merge" + ) item: typing.Optional[ExpenseLineItem] = pydantic.Field(description="The line's item.") net_amount: typing.Optional[float] = pydantic.Field(description="The line's net amount.") tracking_category: typing.Optional[ExpenseLineTrackingCategory] @@ -357,11 +362,6 @@ class ExpenseLine(pydantic.BaseModel): remote_was_deleted: typing.Optional[bool] = pydantic.Field( description="Indicates whether or not this object has been deleted in the third party platform." ) - id: typing.Optional[str] - created_at: typing.Optional[dt.datetime] - modified_at: typing.Optional[dt.datetime] = pydantic.Field( - description="This is the datetime that this object was last updated by Merge" - ) def json(self, **kwargs: typing.Any) -> str: kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs} diff --git a/src/merge/resources/accounting/types/income_statement.py b/src/merge/resources/accounting/types/income_statement.py index 7e9e1290..62c40600 100644 --- a/src/merge/resources/accounting/types/income_statement.py +++ b/src/merge/resources/accounting/types/income_statement.py @@ -30,6 +30,10 @@ class IncomeStatement(pydantic.BaseModel): id: typing.Optional[str] remote_id: typing.Optional[str] = pydantic.Field(description="The third-party API ID of the matching object.") + created_at: typing.Optional[dt.datetime] + modified_at: typing.Optional[dt.datetime] = pydantic.Field( + description="This is the datetime that this object was last updated by Merge" + ) name: typing.Optional[str] = pydantic.Field(description="The income statement's name.") currency: typing.Optional[IncomeStatementCurrency] = pydantic.Field( description=( @@ -360,10 +364,6 @@ class IncomeStatement(pydantic.BaseModel): remote_was_deleted: typing.Optional[bool] = pydantic.Field( description="Indicates whether or not this object has been deleted in the third party platform." ) - created_at: typing.Optional[dt.datetime] - modified_at: typing.Optional[dt.datetime] = pydantic.Field( - description="This is the datetime that this object was last updated by Merge" - ) field_mappings: typing.Optional[typing.Dict[str, typing.Any]] remote_data: typing.Optional[typing.List[RemoteData]] diff --git a/src/merge/resources/accounting/types/invoice.py b/src/merge/resources/accounting/types/invoice.py index 3c80fc01..d4cb808e 100644 --- a/src/merge/resources/accounting/types/invoice.py +++ b/src/merge/resources/accounting/types/invoice.py @@ -37,6 +37,11 @@ class Invoice(pydantic.BaseModel): """ id: typing.Optional[str] + remote_id: typing.Optional[str] = pydantic.Field(description="The third-party API ID of the matching object.") + created_at: typing.Optional[dt.datetime] + modified_at: typing.Optional[dt.datetime] = pydantic.Field( + description="This is the datetime that this object was last updated by Merge" + ) type: typing.Optional[InvoiceType] = pydantic.Field( description=( "Whether the invoice is an accounts receivable or accounts payable. If `type` is `ACCOUNTS_PAYABLE`, the invoice is a bill. If `type` is `ACCOUNTS_RECEIVABLE`, it is an invoice.\n" @@ -400,11 +405,6 @@ class Invoice(pydantic.BaseModel): description="The accounting period that the Invoice was generated in." ) purchase_orders: typing.Optional[typing.List[typing.Optional[InvoicePurchaseOrdersItem]]] - remote_id: typing.Optional[str] = pydantic.Field(description="The third-party API ID of the matching object.") - created_at: typing.Optional[dt.datetime] - modified_at: typing.Optional[dt.datetime] = pydantic.Field( - description="This is the datetime that this object was last updated by Merge" - ) field_mappings: typing.Optional[typing.Dict[str, typing.Any]] remote_data: typing.Optional[typing.List[RemoteData]] diff --git a/src/merge/resources/accounting/types/invoice_line_item.py b/src/merge/resources/accounting/types/invoice_line_item.py index 20e01bb2..e7fe3c08 100644 --- a/src/merge/resources/accounting/types/invoice_line_item.py +++ b/src/merge/resources/accounting/types/invoice_line_item.py @@ -29,7 +29,12 @@ class InvoiceLineItem(pydantic.BaseModel): Fetch from the `GET Invoice` endpoint and view the invoice's line items. """ + id: typing.Optional[str] remote_id: typing.Optional[str] = pydantic.Field(description="The third-party API ID of the matching object.") + created_at: typing.Optional[dt.datetime] + modified_at: typing.Optional[dt.datetime] = pydantic.Field( + description="This is the datetime that this object was last updated by Merge" + ) description: typing.Optional[str] = pydantic.Field(description="The line item's description.") unit_price: typing.Optional[float] = pydantic.Field(description="The line item's unit price.") quantity: typing.Optional[float] = pydantic.Field(description="The line item's quantity.") @@ -355,11 +360,6 @@ class InvoiceLineItem(pydantic.BaseModel): remote_was_deleted: typing.Optional[bool] = pydantic.Field( description="Indicates whether or not this object has been deleted in the third party platform." ) - id: typing.Optional[str] - created_at: typing.Optional[dt.datetime] - modified_at: typing.Optional[dt.datetime] = pydantic.Field( - description="This is the datetime that this object was last updated by Merge" - ) field_mappings: typing.Optional[typing.Dict[str, typing.Any]] def json(self, **kwargs: typing.Any) -> str: diff --git a/src/merge/resources/accounting/types/item.py b/src/merge/resources/accounting/types/item.py index 0a030da2..0f18a843 100644 --- a/src/merge/resources/accounting/types/item.py +++ b/src/merge/resources/accounting/types/item.py @@ -31,6 +31,10 @@ class Item(pydantic.BaseModel): id: typing.Optional[str] remote_id: typing.Optional[str] = pydantic.Field(description="The third-party API ID of the matching object.") + created_at: typing.Optional[dt.datetime] + modified_at: typing.Optional[dt.datetime] = pydantic.Field( + description="This is the datetime that this object was last updated by Merge" + ) name: typing.Optional[str] = pydantic.Field(description="The item's name.") status: typing.Optional[ItemStatus] = pydantic.Field( description=("The item's status.\n" "\n" "- `ACTIVE` - ACTIVE\n" "- `ARCHIVED` - ARCHIVED\n") @@ -52,10 +56,6 @@ class Item(pydantic.BaseModel): remote_was_deleted: typing.Optional[bool] = pydantic.Field( description="Indicates whether or not this object has been deleted in the third party platform." ) - created_at: typing.Optional[dt.datetime] - modified_at: typing.Optional[dt.datetime] = pydantic.Field( - description="This is the datetime that this object was last updated by Merge" - ) field_mappings: typing.Optional[typing.Dict[str, typing.Any]] remote_data: typing.Optional[typing.List[RemoteData]] diff --git a/src/merge/resources/accounting/types/journal_entry.py b/src/merge/resources/accounting/types/journal_entry.py index 6d6bc175..607f996b 100644 --- a/src/merge/resources/accounting/types/journal_entry.py +++ b/src/merge/resources/accounting/types/journal_entry.py @@ -37,6 +37,12 @@ class JournalEntry(pydantic.BaseModel): Fetch from the `GET JournalEntry` endpoint and view a company's journey entry. """ + id: typing.Optional[str] + remote_id: typing.Optional[str] = pydantic.Field(description="The third-party API ID of the matching object.") + created_at: typing.Optional[dt.datetime] + modified_at: typing.Optional[dt.datetime] = pydantic.Field( + description="This is the datetime that this object was last updated by Merge" + ) transaction_date: typing.Optional[dt.datetime] = pydantic.Field(description="The journal entry's transaction date.") remote_created_at: typing.Optional[dt.datetime] = pydantic.Field( description="When the third party's journal entry was created." @@ -379,12 +385,6 @@ class JournalEntry(pydantic.BaseModel): accounting_period: typing.Optional[JournalEntryAccountingPeriod] = pydantic.Field( description="The accounting period that the JournalEntry was generated in." ) - id: typing.Optional[str] - remote_id: typing.Optional[str] = pydantic.Field(description="The third-party API ID of the matching object.") - created_at: typing.Optional[dt.datetime] - modified_at: typing.Optional[dt.datetime] = pydantic.Field( - description="This is the datetime that this object was last updated by Merge" - ) field_mappings: typing.Optional[typing.Dict[str, typing.Any]] remote_data: typing.Optional[typing.List[RemoteData]] diff --git a/src/merge/resources/accounting/types/journal_line.py b/src/merge/resources/accounting/types/journal_line.py index 45decd20..4009877c 100644 --- a/src/merge/resources/accounting/types/journal_line.py +++ b/src/merge/resources/accounting/types/journal_line.py @@ -28,7 +28,12 @@ class JournalLine(pydantic.BaseModel): Fetch from the `GET JournalEntry` endpoint and view the journal entry's line items. """ + id: typing.Optional[str] remote_id: typing.Optional[str] = pydantic.Field(description="The third-party API ID of the matching object.") + created_at: typing.Optional[dt.datetime] + modified_at: typing.Optional[dt.datetime] = pydantic.Field( + description="This is the datetime that this object was last updated by Merge" + ) account: typing.Optional[JournalLineAccount] net_amount: typing.Optional[float] = pydantic.Field( description="The value of the line item including taxes and other fees." @@ -354,11 +359,6 @@ class JournalLine(pydantic.BaseModel): remote_was_deleted: typing.Optional[bool] = pydantic.Field( description="Indicates whether or not this object has been deleted in the third party platform." ) - id: typing.Optional[str] - created_at: typing.Optional[dt.datetime] - modified_at: typing.Optional[dt.datetime] = pydantic.Field( - description="This is the datetime that this object was last updated by Merge" - ) def json(self, **kwargs: typing.Any) -> str: kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs} diff --git a/src/merge/resources/accounting/types/linked_account_condition.py b/src/merge/resources/accounting/types/linked_account_condition.py index 430adc00..f13ef90d 100644 --- a/src/merge/resources/accounting/types/linked_account_condition.py +++ b/src/merge/resources/accounting/types/linked_account_condition.py @@ -16,14 +16,10 @@ class LinkedAccountCondition(pydantic.BaseModel): description="The ID indicating which condition schema to use for a specific condition." ) common_model: typing.Optional[str] = pydantic.Field(description="The common model for a specific condition.") - native_name: typing.Optional[str] = pydantic.Field( - description='User-facing _native condition_ name. e.g. "Skip Manager".' - ) + native_name: typing.Optional[str] operator: str = pydantic.Field(description="The operator for a specific condition.") value: typing.Optional[typing.Any] - field_name: typing.Optional[str] = pydantic.Field( - description='The name of the field on the common model that this condition corresponds to, if they conceptually match. e.g. "location_type".' - ) + field_name: typing.Optional[str] def json(self, **kwargs: typing.Any) -> str: kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs} diff --git a/src/merge/resources/accounting/types/linked_account_condition_request.py b/src/merge/resources/accounting/types/linked_account_condition_request.py index 23ff21f1..ce36a27f 100644 --- a/src/merge/resources/accounting/types/linked_account_condition_request.py +++ b/src/merge/resources/accounting/types/linked_account_condition_request.py @@ -12,6 +12,7 @@ class LinkedAccountConditionRequest(pydantic.BaseModel): + id: typing.Optional[str] = pydantic.Field(description="The ID indicating which Linked Account Condition this is.") condition_schema_id: str = pydantic.Field( description="The ID indicating which condition schema to use for a specific condition." ) diff --git a/src/merge/resources/accounting/types/patched_payment_request.py b/src/merge/resources/accounting/types/patched_payment_request.py new file mode 100644 index 00000000..63a54ab5 --- /dev/null +++ b/src/merge/resources/accounting/types/patched_payment_request.py @@ -0,0 +1,381 @@ +# This file was auto-generated by Fern from our API Definition. + +import datetime as dt +import typing + +from ....core.datetime_utils import serialize_datetime +from .patched_payment_request_account import PatchedPaymentRequestAccount +from .patched_payment_request_accounting_period import PatchedPaymentRequestAccountingPeriod +from .patched_payment_request_applied_to_lines_item import PatchedPaymentRequestAppliedToLinesItem +from .patched_payment_request_company import PatchedPaymentRequestCompany +from .patched_payment_request_contact import PatchedPaymentRequestContact +from .patched_payment_request_currency import PatchedPaymentRequestCurrency +from .patched_payment_request_tracking_categories_item import PatchedPaymentRequestTrackingCategoriesItem + +try: + import pydantic.v1 as pydantic # type: ignore +except ImportError: + import pydantic # type: ignore + + +class PatchedPaymentRequest(pydantic.BaseModel): + """ + # The Payment Object + + ### Description + + The `Payment` object represents general payments made towards a specific transaction. + + ### Usage Example + + Fetch from the `GET Payment` endpoint and view an invoice's payment. + """ + + transaction_date: typing.Optional[dt.datetime] = pydantic.Field(description="The payment's transaction date.") + contact: typing.Optional[PatchedPaymentRequestContact] = pydantic.Field( + description="The supplier, or customer involved in the payment." + ) + account: typing.Optional[PatchedPaymentRequestAccount] = pydantic.Field( + description="The supplier’s or customer’s account in which the payment is made." + ) + currency: typing.Optional[PatchedPaymentRequestCurrency] = pydantic.Field( + description=( + "The payment's currency.\n" + "\n" + "- `XUA` - ADB Unit of Account\n" + "- `AFN` - Afghan Afghani\n" + "- `AFA` - Afghan Afghani (1927–2002)\n" + "- `ALL` - Albanian Lek\n" + "- `ALK` - Albanian Lek (1946–1965)\n" + "- `DZD` - Algerian Dinar\n" + "- `ADP` - Andorran Peseta\n" + "- `AOA` - Angolan Kwanza\n" + "- `AOK` - Angolan Kwanza (1977–1991)\n" + "- `AON` - Angolan New Kwanza (1990–2000)\n" + "- `AOR` - Angolan Readjusted Kwanza (1995–1999)\n" + "- `ARA` - Argentine Austral\n" + "- `ARS` - Argentine Peso\n" + "- `ARM` - Argentine Peso (1881–1970)\n" + "- `ARP` - Argentine Peso (1983–1985)\n" + "- `ARL` - Argentine Peso Ley (1970–1983)\n" + "- `AMD` - Armenian Dram\n" + "- `AWG` - Aruban Florin\n" + "- `AUD` - Australian Dollar\n" + "- `ATS` - Austrian Schilling\n" + "- `AZN` - Azerbaijani Manat\n" + "- `AZM` - Azerbaijani Manat (1993–2006)\n" + "- `BSD` - Bahamian Dollar\n" + "- `BHD` - Bahraini Dinar\n" + "- `BDT` - Bangladeshi Taka\n" + "- `BBD` - Barbadian Dollar\n" + "- `BYN` - Belarusian Ruble\n" + "- `BYB` - Belarusian Ruble (1994–1999)\n" + "- `BYR` - Belarusian Ruble (2000–2016)\n" + "- `BEF` - Belgian Franc\n" + "- `BEC` - Belgian Franc (convertible)\n" + "- `BEL` - Belgian Franc (financial)\n" + "- `BZD` - Belize Dollar\n" + "- `BMD` - Bermudan Dollar\n" + "- `BTN` - Bhutanese Ngultrum\n" + "- `BOB` - Bolivian Boliviano\n" + "- `BOL` - Bolivian Boliviano (1863–1963)\n" + "- `BOV` - Bolivian Mvdol\n" + "- `BOP` - Bolivian Peso\n" + "- `BAM` - Bosnia-Herzegovina Convertible Mark\n" + "- `BAD` - Bosnia-Herzegovina Dinar (1992–1994)\n" + "- `BAN` - Bosnia-Herzegovina New Dinar (1994–1997)\n" + "- `BWP` - Botswanan Pula\n" + "- `BRC` - Brazilian Cruzado (1986–1989)\n" + "- `BRZ` - Brazilian Cruzeiro (1942–1967)\n" + "- `BRE` - Brazilian Cruzeiro (1990–1993)\n" + "- `BRR` - Brazilian Cruzeiro (1993–1994)\n" + "- `BRN` - Brazilian New Cruzado (1989–1990)\n" + "- `BRB` - Brazilian New Cruzeiro (1967–1986)\n" + "- `BRL` - Brazilian Real\n" + "- `GBP` - British Pound\n" + "- `BND` - Brunei Dollar\n" + "- `BGL` - Bulgarian Hard Lev\n" + "- `BGN` - Bulgarian Lev\n" + "- `BGO` - Bulgarian Lev (1879–1952)\n" + "- `BGM` - Bulgarian Socialist Lev\n" + "- `BUK` - Burmese Kyat\n" + "- `BIF` - Burundian Franc\n" + "- `XPF` - CFP Franc\n" + "- `KHR` - Cambodian Riel\n" + "- `CAD` - Canadian Dollar\n" + "- `CVE` - Cape Verdean Escudo\n" + "- `KYD` - Cayman Islands Dollar\n" + "- `XAF` - Central African CFA Franc\n" + "- `CLE` - Chilean Escudo\n" + "- `CLP` - Chilean Peso\n" + "- `CLF` - Chilean Unit of Account (UF)\n" + "- `CNX` - Chinese People’s Bank Dollar\n" + "- `CNY` - Chinese Yuan\n" + "- `CNH` - Chinese Yuan (offshore)\n" + "- `COP` - Colombian Peso\n" + "- `COU` - Colombian Real Value Unit\n" + "- `KMF` - Comorian Franc\n" + "- `CDF` - Congolese Franc\n" + "- `CRC` - Costa Rican Colón\n" + "- `HRD` - Croatian Dinar\n" + "- `HRK` - Croatian Kuna\n" + "- `CUC` - Cuban Convertible Peso\n" + "- `CUP` - Cuban Peso\n" + "- `CYP` - Cypriot Pound\n" + "- `CZK` - Czech Koruna\n" + "- `CSK` - Czechoslovak Hard Koruna\n" + "- `DKK` - Danish Krone\n" + "- `DJF` - Djiboutian Franc\n" + "- `DOP` - Dominican Peso\n" + "- `NLG` - Dutch Guilder\n" + "- `XCD` - East Caribbean Dollar\n" + "- `DDM` - East German Mark\n" + "- `ECS` - Ecuadorian Sucre\n" + "- `ECV` - Ecuadorian Unit of Constant Value\n" + "- `EGP` - Egyptian Pound\n" + "- `GQE` - Equatorial Guinean Ekwele\n" + "- `ERN` - Eritrean Nakfa\n" + "- `EEK` - Estonian Kroon\n" + "- `ETB` - Ethiopian Birr\n" + "- `EUR` - Euro\n" + "- `XBA` - European Composite Unit\n" + "- `XEU` - European Currency Unit\n" + "- `XBB` - European Monetary Unit\n" + "- `XBC` - European Unit of Account (XBC)\n" + "- `XBD` - European Unit of Account (XBD)\n" + "- `FKP` - Falkland Islands Pound\n" + "- `FJD` - Fijian Dollar\n" + "- `FIM` - Finnish Markka\n" + "- `FRF` - French Franc\n" + "- `XFO` - French Gold Franc\n" + "- `XFU` - French UIC-Franc\n" + "- `GMD` - Gambian Dalasi\n" + "- `GEK` - Georgian Kupon Larit\n" + "- `GEL` - Georgian Lari\n" + "- `DEM` - German Mark\n" + "- `GHS` - Ghanaian Cedi\n" + "- `GHC` - Ghanaian Cedi (1979–2007)\n" + "- `GIP` - Gibraltar Pound\n" + "- `XAU` - Gold\n" + "- `GRD` - Greek Drachma\n" + "- `GTQ` - Guatemalan Quetzal\n" + "- `GWP` - Guinea-Bissau Peso\n" + "- `GNF` - Guinean Franc\n" + "- `GNS` - Guinean Syli\n" + "- `GYD` - Guyanaese Dollar\n" + "- `HTG` - Haitian Gourde\n" + "- `HNL` - Honduran Lempira\n" + "- `HKD` - Hong Kong Dollar\n" + "- `HUF` - Hungarian Forint\n" + "- `IMP` - IMP\n" + "- `ISK` - Icelandic Króna\n" + "- `ISJ` - Icelandic Króna (1918–1981)\n" + "- `INR` - Indian Rupee\n" + "- `IDR` - Indonesian Rupiah\n" + "- `IRR` - Iranian Rial\n" + "- `IQD` - Iraqi Dinar\n" + "- `IEP` - Irish Pound\n" + "- `ILS` - Israeli New Shekel\n" + "- `ILP` - Israeli Pound\n" + "- `ILR` - Israeli Shekel (1980–1985)\n" + "- `ITL` - Italian Lira\n" + "- `JMD` - Jamaican Dollar\n" + "- `JPY` - Japanese Yen\n" + "- `JOD` - Jordanian Dinar\n" + "- `KZT` - Kazakhstani Tenge\n" + "- `KES` - Kenyan Shilling\n" + "- `KWD` - Kuwaiti Dinar\n" + "- `KGS` - Kyrgystani Som\n" + "- `LAK` - Laotian Kip\n" + "- `LVL` - Latvian Lats\n" + "- `LVR` - Latvian Ruble\n" + "- `LBP` - Lebanese Pound\n" + "- `LSL` - Lesotho Loti\n" + "- `LRD` - Liberian Dollar\n" + "- `LYD` - Libyan Dinar\n" + "- `LTL` - Lithuanian Litas\n" + "- `LTT` - Lithuanian Talonas\n" + "- `LUL` - Luxembourg Financial Franc\n" + "- `LUC` - Luxembourgian Convertible Franc\n" + "- `LUF` - Luxembourgian Franc\n" + "- `MOP` - Macanese Pataca\n" + "- `MKD` - Macedonian Denar\n" + "- `MKN` - Macedonian Denar (1992–1993)\n" + "- `MGA` - Malagasy Ariary\n" + "- `MGF` - Malagasy Franc\n" + "- `MWK` - Malawian Kwacha\n" + "- `MYR` - Malaysian Ringgit\n" + "- `MVR` - Maldivian Rufiyaa\n" + "- `MVP` - Maldivian Rupee (1947–1981)\n" + "- `MLF` - Malian Franc\n" + "- `MTL` - Maltese Lira\n" + "- `MTP` - Maltese Pound\n" + "- `MRU` - Mauritanian Ouguiya\n" + "- `MRO` - Mauritanian Ouguiya (1973–2017)\n" + "- `MUR` - Mauritian Rupee\n" + "- `MXV` - Mexican Investment Unit\n" + "- `MXN` - Mexican Peso\n" + "- `MXP` - Mexican Silver Peso (1861–1992)\n" + "- `MDC` - Moldovan Cupon\n" + "- `MDL` - Moldovan Leu\n" + "- `MCF` - Monegasque Franc\n" + "- `MNT` - Mongolian Tugrik\n" + "- `MAD` - Moroccan Dirham\n" + "- `MAF` - Moroccan Franc\n" + "- `MZE` - Mozambican Escudo\n" + "- `MZN` - Mozambican Metical\n" + "- `MZM` - Mozambican Metical (1980–2006)\n" + "- `MMK` - Myanmar Kyat\n" + "- `NAD` - Namibian Dollar\n" + "- `NPR` - Nepalese Rupee\n" + "- `ANG` - Netherlands Antillean Guilder\n" + "- `TWD` - New Taiwan Dollar\n" + "- `NZD` - New Zealand Dollar\n" + "- `NIO` - Nicaraguan Córdoba\n" + "- `NIC` - Nicaraguan Córdoba (1988–1991)\n" + "- `NGN` - Nigerian Naira\n" + "- `KPW` - North Korean Won\n" + "- `NOK` - Norwegian Krone\n" + "- `OMR` - Omani Rial\n" + "- `PKR` - Pakistani Rupee\n" + "- `XPD` - Palladium\n" + "- `PAB` - Panamanian Balboa\n" + "- `PGK` - Papua New Guinean Kina\n" + "- `PYG` - Paraguayan Guarani\n" + "- `PEI` - Peruvian Inti\n" + "- `PEN` - Peruvian Sol\n" + "- `PES` - Peruvian Sol (1863–1965)\n" + "- `PHP` - Philippine Peso\n" + "- `XPT` - Platinum\n" + "- `PLN` - Polish Zloty\n" + "- `PLZ` - Polish Zloty (1950–1995)\n" + "- `PTE` - Portuguese Escudo\n" + "- `GWE` - Portuguese Guinea Escudo\n" + "- `QAR` - Qatari Rial\n" + "- `XRE` - RINET Funds\n" + "- `RHD` - Rhodesian Dollar\n" + "- `RON` - Romanian Leu\n" + "- `ROL` - Romanian Leu (1952–2006)\n" + "- `RUB` - Russian Ruble\n" + "- `RUR` - Russian Ruble (1991–1998)\n" + "- `RWF` - Rwandan Franc\n" + "- `SVC` - Salvadoran Colón\n" + "- `WST` - Samoan Tala\n" + "- `SAR` - Saudi Riyal\n" + "- `RSD` - Serbian Dinar\n" + "- `CSD` - Serbian Dinar (2002–2006)\n" + "- `SCR` - Seychellois Rupee\n" + "- `SLL` - Sierra Leonean Leone\n" + "- `XAG` - Silver\n" + "- `SGD` - Singapore Dollar\n" + "- `SKK` - Slovak Koruna\n" + "- `SIT` - Slovenian Tolar\n" + "- `SBD` - Solomon Islands Dollar\n" + "- `SOS` - Somali Shilling\n" + "- `ZAR` - South African Rand\n" + "- `ZAL` - South African Rand (financial)\n" + "- `KRH` - South Korean Hwan (1953–1962)\n" + "- `KRW` - South Korean Won\n" + "- `KRO` - South Korean Won (1945–1953)\n" + "- `SSP` - South Sudanese Pound\n" + "- `SUR` - Soviet Rouble\n" + "- `ESP` - Spanish Peseta\n" + "- `ESA` - Spanish Peseta (A account)\n" + "- `ESB` - Spanish Peseta (convertible account)\n" + "- `XDR` - Special Drawing Rights\n" + "- `LKR` - Sri Lankan Rupee\n" + "- `SHP` - St. Helena Pound\n" + "- `XSU` - Sucre\n" + "- `SDD` - Sudanese Dinar (1992–2007)\n" + "- `SDG` - Sudanese Pound\n" + "- `SDP` - Sudanese Pound (1957–1998)\n" + "- `SRD` - Surinamese Dollar\n" + "- `SRG` - Surinamese Guilder\n" + "- `SZL` - Swazi Lilangeni\n" + "- `SEK` - Swedish Krona\n" + "- `CHF` - Swiss Franc\n" + "- `SYP` - Syrian Pound\n" + "- `STN` - São Tomé & Príncipe Dobra\n" + "- `STD` - São Tomé & Príncipe Dobra (1977–2017)\n" + "- `TVD` - TVD\n" + "- `TJR` - Tajikistani Ruble\n" + "- `TJS` - Tajikistani Somoni\n" + "- `TZS` - Tanzanian Shilling\n" + "- `XTS` - Testing Currency Code\n" + "- `THB` - Thai Baht\n" + "- `XXX` - The codes assigned for transactions where no currency is involved\n" + "- `TPE` - Timorese Escudo\n" + "- `TOP` - Tongan Paʻanga\n" + "- `TTD` - Trinidad & Tobago Dollar\n" + "- `TND` - Tunisian Dinar\n" + "- `TRY` - Turkish Lira\n" + "- `TRL` - Turkish Lira (1922–2005)\n" + "- `TMT` - Turkmenistani Manat\n" + "- `TMM` - Turkmenistani Manat (1993–2009)\n" + "- `USD` - US Dollar\n" + "- `USN` - US Dollar (Next day)\n" + "- `USS` - US Dollar (Same day)\n" + "- `UGX` - Ugandan Shilling\n" + "- `UGS` - Ugandan Shilling (1966–1987)\n" + "- `UAH` - Ukrainian Hryvnia\n" + "- `UAK` - Ukrainian Karbovanets\n" + "- `AED` - United Arab Emirates Dirham\n" + "- `UYW` - Uruguayan Nominal Wage Index Unit\n" + "- `UYU` - Uruguayan Peso\n" + "- `UYP` - Uruguayan Peso (1975–1993)\n" + "- `UYI` - Uruguayan Peso (Indexed Units)\n" + "- `UZS` - Uzbekistani Som\n" + "- `VUV` - Vanuatu Vatu\n" + "- `VES` - Venezuelan Bolívar\n" + "- `VEB` - Venezuelan Bolívar (1871–2008)\n" + "- `VEF` - Venezuelan Bolívar (2008–2018)\n" + "- `VND` - Vietnamese Dong\n" + "- `VNN` - Vietnamese Dong (1978–1985)\n" + "- `CHE` - WIR Euro\n" + "- `CHW` - WIR Franc\n" + "- `XOF` - West African CFA Franc\n" + "- `YDD` - Yemeni Dinar\n" + "- `YER` - Yemeni Rial\n" + "- `YUN` - Yugoslavian Convertible Dinar (1990–1992)\n" + "- `YUD` - Yugoslavian Hard Dinar (1966–1990)\n" + "- `YUM` - Yugoslavian New Dinar (1994–2002)\n" + "- `YUR` - Yugoslavian Reformed Dinar (1992–1993)\n" + "- `ZWN` - ZWN\n" + "- `ZRN` - Zairean New Zaire (1993–1998)\n" + "- `ZRZ` - Zairean Zaire (1971–1993)\n" + "- `ZMW` - Zambian Kwacha\n" + "- `ZMK` - Zambian Kwacha (1968–2012)\n" + "- `ZWD` - Zimbabwean Dollar (1980–2008)\n" + "- `ZWR` - Zimbabwean Dollar (2008)\n" + "- `ZWL` - Zimbabwean Dollar (2009)\n" + ) + ) + exchange_rate: typing.Optional[str] = pydantic.Field(description="The payment's exchange rate.") + company: typing.Optional[PatchedPaymentRequestCompany] = pydantic.Field( + description="The company the payment belongs to." + ) + total_amount: typing.Optional[float] = pydantic.Field( + description="The total amount of money being paid to the supplier, or customer, after taxes." + ) + tracking_categories: typing.Optional[typing.List[typing.Optional[PatchedPaymentRequestTrackingCategoriesItem]]] + accounting_period: typing.Optional[PatchedPaymentRequestAccountingPeriod] = pydantic.Field( + description="The accounting period that the Payment was generated in." + ) + applied_to_lines: typing.Optional[typing.List[PatchedPaymentRequestAppliedToLinesItem]] = pydantic.Field( + description="A list of “Payment Applied to Lines” objects." + ) + integration_params: typing.Optional[typing.Dict[str, typing.Any]] + linked_account_params: typing.Optional[typing.Dict[str, typing.Any]] + + def json(self, **kwargs: typing.Any) -> str: + kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs} + return super().json(**kwargs_with_defaults) + + def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]: + kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs} + return super().dict(**kwargs_with_defaults) + + class Config: + frozen = True + smart_union = True + json_encoders = {dt.datetime: serialize_datetime} diff --git a/src/merge/resources/accounting/types/patched_payment_request_account.py b/src/merge/resources/accounting/types/patched_payment_request_account.py new file mode 100644 index 00000000..f051a194 --- /dev/null +++ b/src/merge/resources/accounting/types/patched_payment_request_account.py @@ -0,0 +1,7 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +from .account import Account + +PatchedPaymentRequestAccount = typing.Union[str, Account] diff --git a/src/merge/resources/accounting/types/patched_payment_request_accounting_period.py b/src/merge/resources/accounting/types/patched_payment_request_accounting_period.py new file mode 100644 index 00000000..bfd131d4 --- /dev/null +++ b/src/merge/resources/accounting/types/patched_payment_request_accounting_period.py @@ -0,0 +1,7 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +from .accounting_period import AccountingPeriod + +PatchedPaymentRequestAccountingPeriod = typing.Union[str, AccountingPeriod] diff --git a/src/merge/resources/accounting/types/patched_payment_request_applied_to_lines_item.py b/src/merge/resources/accounting/types/patched_payment_request_applied_to_lines_item.py new file mode 100644 index 00000000..f613b16c --- /dev/null +++ b/src/merge/resources/accounting/types/patched_payment_request_applied_to_lines_item.py @@ -0,0 +1,7 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +from .payment_line_item import PaymentLineItem + +PatchedPaymentRequestAppliedToLinesItem = typing.Union[str, PaymentLineItem] diff --git a/src/merge/resources/accounting/types/patched_payment_request_company.py b/src/merge/resources/accounting/types/patched_payment_request_company.py new file mode 100644 index 00000000..46869369 --- /dev/null +++ b/src/merge/resources/accounting/types/patched_payment_request_company.py @@ -0,0 +1,7 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +from .company_info import CompanyInfo + +PatchedPaymentRequestCompany = typing.Union[str, CompanyInfo] diff --git a/src/merge/resources/accounting/types/patched_payment_request_contact.py b/src/merge/resources/accounting/types/patched_payment_request_contact.py new file mode 100644 index 00000000..1478828a --- /dev/null +++ b/src/merge/resources/accounting/types/patched_payment_request_contact.py @@ -0,0 +1,7 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +from .contact import Contact + +PatchedPaymentRequestContact = typing.Union[str, Contact] diff --git a/src/merge/resources/accounting/types/patched_payment_request_currency.py b/src/merge/resources/accounting/types/patched_payment_request_currency.py new file mode 100644 index 00000000..70cbe104 --- /dev/null +++ b/src/merge/resources/accounting/types/patched_payment_request_currency.py @@ -0,0 +1,7 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +from .currency_enum import CurrencyEnum + +PatchedPaymentRequestCurrency = typing.Union[CurrencyEnum, str] diff --git a/src/merge/resources/accounting/types/patched_payment_request_tracking_categories_item.py b/src/merge/resources/accounting/types/patched_payment_request_tracking_categories_item.py new file mode 100644 index 00000000..5ec2c8f9 --- /dev/null +++ b/src/merge/resources/accounting/types/patched_payment_request_tracking_categories_item.py @@ -0,0 +1,7 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +from .tracking_category import TrackingCategory + +PatchedPaymentRequestTrackingCategoriesItem = typing.Union[str, TrackingCategory] diff --git a/src/merge/resources/accounting/types/payment.py b/src/merge/resources/accounting/types/payment.py index ef53d4ce..65f2b316 100644 --- a/src/merge/resources/accounting/types/payment.py +++ b/src/merge/resources/accounting/types/payment.py @@ -34,6 +34,10 @@ class Payment(pydantic.BaseModel): id: typing.Optional[str] remote_id: typing.Optional[str] = pydantic.Field(description="The third-party API ID of the matching object.") + created_at: typing.Optional[dt.datetime] + modified_at: typing.Optional[dt.datetime] = pydantic.Field( + description="This is the datetime that this object was last updated by Merge" + ) transaction_date: typing.Optional[dt.datetime] = pydantic.Field(description="The payment's transaction date.") contact: typing.Optional[PaymentContact] = pydantic.Field( description="The supplier, or customer involved in the payment." @@ -371,10 +375,6 @@ class Payment(pydantic.BaseModel): applied_to_lines: typing.Optional[typing.List[PaymentAppliedToLinesItem]] = pydantic.Field( description="A list of “Payment Applied to Lines” objects." ) - created_at: typing.Optional[dt.datetime] - modified_at: typing.Optional[dt.datetime] = pydantic.Field( - description="This is the datetime that this object was last updated by Merge" - ) field_mappings: typing.Optional[typing.Dict[str, typing.Any]] remote_data: typing.Optional[typing.List[RemoteData]] diff --git a/src/merge/resources/accounting/types/payment_line_item.py b/src/merge/resources/accounting/types/payment_line_item.py index 8dd259c8..53cb4eca 100644 --- a/src/merge/resources/accounting/types/payment_line_item.py +++ b/src/merge/resources/accounting/types/payment_line_item.py @@ -24,20 +24,20 @@ class PaymentLineItem(pydantic.BaseModel): `Payment` will have a field called `applied-to-lines` which will be an array of `PaymentLineItemInternalMappingSerializer` objects that can either be a `Invoice`, `CreditNote`, or `JournalEntry`. """ + id: typing.Optional[str] + remote_id: typing.Optional[str] = pydantic.Field(description="The third-party API ID of the matching object.") + created_at: typing.Optional[dt.datetime] + modified_at: typing.Optional[dt.datetime] = pydantic.Field( + description="This is the datetime that this object was last updated by Merge" + ) applied_amount: typing.Optional[str] = pydantic.Field(description="The amount being applied to the transaction.") applied_date: typing.Optional[dt.datetime] = pydantic.Field(description="The date the payment portion is applied.") - remote_id: typing.Optional[str] = pydantic.Field(description="The third-party API ID of the matching object.") related_object_id: typing.Optional[str] = pydantic.Field( description="The Merge ID of the transaction the payment portion is being applied to." ) related_object_type: typing.Optional[str] = pydantic.Field( description="The type of transaction the payment portion is being applied to. Possible values include: INVOICE, JOURNAL_ENTRY, or CREDIT_NOTE." ) - id: typing.Optional[str] - created_at: typing.Optional[dt.datetime] - modified_at: typing.Optional[dt.datetime] = pydantic.Field( - description="This is the datetime that this object was last updated by Merge" - ) def json(self, **kwargs: typing.Any) -> str: kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs} diff --git a/src/merge/resources/accounting/types/payment_line_item_request.py b/src/merge/resources/accounting/types/payment_line_item_request.py index 52bdb7b1..428358c6 100644 --- a/src/merge/resources/accounting/types/payment_line_item_request.py +++ b/src/merge/resources/accounting/types/payment_line_item_request.py @@ -24,9 +24,9 @@ class PaymentLineItemRequest(pydantic.BaseModel): `Payment` will have a field called `applied-to-lines` which will be an array of `PaymentLineItemInternalMappingSerializer` objects that can either be a `Invoice`, `CreditNote`, or `JournalEntry`. """ + remote_id: typing.Optional[str] = pydantic.Field(description="The third-party API ID of the matching object.") applied_amount: typing.Optional[str] = pydantic.Field(description="The amount being applied to the transaction.") applied_date: typing.Optional[dt.datetime] = pydantic.Field(description="The date the payment portion is applied.") - remote_id: typing.Optional[str] = pydantic.Field(description="The third-party API ID of the matching object.") related_object_id: typing.Optional[str] = pydantic.Field( description="The Merge ID of the transaction the payment portion is being applied to." ) diff --git a/src/merge/resources/accounting/types/purchase_order.py b/src/merge/resources/accounting/types/purchase_order.py index 0ab19663..c66a2164 100644 --- a/src/merge/resources/accounting/types/purchase_order.py +++ b/src/merge/resources/accounting/types/purchase_order.py @@ -35,6 +35,12 @@ class PurchaseOrder(pydantic.BaseModel): Fetch from the `LIST PurchaseOrders` endpoint and view a company's purchase orders. """ + id: typing.Optional[str] + remote_id: typing.Optional[str] = pydantic.Field(description="The third-party API ID of the matching object.") + created_at: typing.Optional[dt.datetime] + modified_at: typing.Optional[dt.datetime] = pydantic.Field( + description="This is the datetime that this object was last updated by Merge" + ) status: typing.Optional[PurchaseOrderStatus] = pydantic.Field( description=( "The purchase order's status.\n" @@ -390,12 +396,6 @@ class PurchaseOrder(pydantic.BaseModel): accounting_period: typing.Optional[PurchaseOrderAccountingPeriod] = pydantic.Field( description="The accounting period that the PurchaseOrder was generated in." ) - id: typing.Optional[str] - remote_id: typing.Optional[str] = pydantic.Field(description="The third-party API ID of the matching object.") - created_at: typing.Optional[dt.datetime] - modified_at: typing.Optional[dt.datetime] = pydantic.Field( - description="This is the datetime that this object was last updated by Merge" - ) field_mappings: typing.Optional[typing.Dict[str, typing.Any]] remote_data: typing.Optional[typing.List[RemoteData]] diff --git a/src/merge/resources/accounting/types/purchase_order_line_item.py b/src/merge/resources/accounting/types/purchase_order_line_item.py index 38b4b2b7..e14b0dc3 100644 --- a/src/merge/resources/accounting/types/purchase_order_line_item.py +++ b/src/merge/resources/accounting/types/purchase_order_line_item.py @@ -26,7 +26,12 @@ class PurchaseOrderLineItem(pydantic.BaseModel): Fetch from the `GET PurchaseOrder` endpoint and view a company's purchase orders. """ + id: typing.Optional[str] remote_id: typing.Optional[str] = pydantic.Field(description="The third-party API ID of the matching object.") + created_at: typing.Optional[dt.datetime] + modified_at: typing.Optional[dt.datetime] = pydantic.Field( + description="This is the datetime that this object was last updated by Merge" + ) description: typing.Optional[str] = pydantic.Field(description="A description of the good being purchased.") unit_price: typing.Optional[float] = pydantic.Field(description="The line item's unit price.") quantity: typing.Optional[float] = pydantic.Field(description="The line item's quantity.") @@ -357,11 +362,6 @@ class PurchaseOrderLineItem(pydantic.BaseModel): remote_was_deleted: typing.Optional[bool] = pydantic.Field( description="Indicates whether or not this object has been deleted in the third party platform." ) - id: typing.Optional[str] - created_at: typing.Optional[dt.datetime] - modified_at: typing.Optional[dt.datetime] = pydantic.Field( - description="This is the datetime that this object was last updated by Merge" - ) def json(self, **kwargs: typing.Any) -> str: kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs} diff --git a/src/merge/resources/accounting/types/report_item.py b/src/merge/resources/accounting/types/report_item.py index 67abd5be..59053762 100644 --- a/src/merge/resources/accounting/types/report_item.py +++ b/src/merge/resources/accounting/types/report_item.py @@ -25,14 +25,14 @@ class ReportItem(pydantic.BaseModel): """ remote_id: typing.Optional[str] = pydantic.Field(description="The third-party API ID of the matching object.") - name: typing.Optional[str] = pydantic.Field(description="The report item's name.") - value: typing.Optional[float] = pydantic.Field(description="The report item's value.") - sub_items: typing.Optional[typing.List[typing.Dict[str, typing.Any]]] - company: typing.Optional[str] = pydantic.Field(description="The company the report item belongs to.") created_at: typing.Optional[dt.datetime] modified_at: typing.Optional[dt.datetime] = pydantic.Field( description="This is the datetime that this object was last updated by Merge" ) + name: typing.Optional[str] = pydantic.Field(description="The report item's name.") + value: typing.Optional[float] = pydantic.Field(description="The report item's value.") + sub_items: typing.Optional[typing.List[typing.Dict[str, typing.Any]]] + company: typing.Optional[str] = pydantic.Field(description="The company the report item belongs to.") def json(self, **kwargs: typing.Any) -> str: kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs} diff --git a/src/merge/resources/accounting/types/tax_rate.py b/src/merge/resources/accounting/types/tax_rate.py index 9716a33d..4595fed3 100644 --- a/src/merge/resources/accounting/types/tax_rate.py +++ b/src/merge/resources/accounting/types/tax_rate.py @@ -26,6 +26,12 @@ class TaxRate(pydantic.BaseModel): Fetch from the `LIST TaxRates` endpoint and view tax rates relevant to a company. """ + id: typing.Optional[str] + remote_id: typing.Optional[str] = pydantic.Field(description="The third-party API ID of the matching object.") + created_at: typing.Optional[dt.datetime] + modified_at: typing.Optional[dt.datetime] = pydantic.Field( + description="This is the datetime that this object was last updated by Merge" + ) description: typing.Optional[str] = pydantic.Field(description="The tax rate's description.") total_tax_rate: typing.Optional[float] = pydantic.Field(description="The tax rate's total tax rate.") effective_tax_rate: typing.Optional[float] = pydantic.Field(description="The tax rate's effective tax rate.") @@ -33,12 +39,6 @@ class TaxRate(pydantic.BaseModel): remote_was_deleted: typing.Optional[bool] = pydantic.Field( description="Indicates whether or not this object has been deleted in the third party platform." ) - id: typing.Optional[str] - remote_id: typing.Optional[str] = pydantic.Field(description="The third-party API ID of the matching object.") - created_at: typing.Optional[dt.datetime] - modified_at: typing.Optional[dt.datetime] = pydantic.Field( - description="This is the datetime that this object was last updated by Merge" - ) field_mappings: typing.Optional[typing.Dict[str, typing.Any]] remote_data: typing.Optional[typing.List[RemoteData]] diff --git a/src/merge/resources/accounting/types/tracking_category.py b/src/merge/resources/accounting/types/tracking_category.py index f9d723bb..aabbd4f1 100644 --- a/src/merge/resources/accounting/types/tracking_category.py +++ b/src/merge/resources/accounting/types/tracking_category.py @@ -28,6 +28,12 @@ class TrackingCategory(pydantic.BaseModel): Fetch from the `GET TrackingCategory` endpoint and view a company's tracking category. """ + id: typing.Optional[str] + remote_id: typing.Optional[str] = pydantic.Field(description="The third-party API ID of the matching object.") + created_at: typing.Optional[dt.datetime] + modified_at: typing.Optional[dt.datetime] = pydantic.Field( + description="This is the datetime that this object was last updated by Merge" + ) name: typing.Optional[str] = pydantic.Field(description="The tracking category's name.") status: typing.Optional[TrackingCategoryStatus] = pydantic.Field( description=("The tracking category's status.\n" "\n" "- `ACTIVE` - ACTIVE\n" "- `ARCHIVED` - ARCHIVED\n") @@ -42,12 +48,6 @@ class TrackingCategory(pydantic.BaseModel): remote_was_deleted: typing.Optional[bool] = pydantic.Field( description="Indicates whether or not this object has been deleted in the third party platform." ) - id: typing.Optional[str] - remote_id: typing.Optional[str] = pydantic.Field(description="The third-party API ID of the matching object.") - created_at: typing.Optional[dt.datetime] - modified_at: typing.Optional[dt.datetime] = pydantic.Field( - description="This is the datetime that this object was last updated by Merge" - ) field_mappings: typing.Optional[typing.Dict[str, typing.Any]] remote_data: typing.Optional[typing.List[RemoteData]] diff --git a/src/merge/resources/accounting/types/transaction.py b/src/merge/resources/accounting/types/transaction.py index 531c0020..c373ce6a 100644 --- a/src/merge/resources/accounting/types/transaction.py +++ b/src/merge/resources/accounting/types/transaction.py @@ -39,6 +39,12 @@ class Transaction(pydantic.BaseModel): Fetch from the `GET Transaction` endpoint and view a company's transactions. """ + id: typing.Optional[str] + remote_id: typing.Optional[str] = pydantic.Field(description="The third-party API ID of the matching object.") + created_at: typing.Optional[dt.datetime] + modified_at: typing.Optional[dt.datetime] = pydantic.Field( + description="This is the datetime that this object was last updated by Merge" + ) transaction_type: typing.Optional[str] = pydantic.Field( description="The type of transaction, which can by any transaction object not already included in Merge’s common model." ) @@ -373,12 +379,6 @@ class Transaction(pydantic.BaseModel): accounting_period: typing.Optional[TransactionAccountingPeriod] = pydantic.Field( description="The accounting period that the Transaction was generated in." ) - id: typing.Optional[str] - remote_id: typing.Optional[str] = pydantic.Field(description="The third-party API ID of the matching object.") - created_at: typing.Optional[dt.datetime] - modified_at: typing.Optional[dt.datetime] = pydantic.Field( - description="This is the datetime that this object was last updated by Merge" - ) field_mappings: typing.Optional[typing.Dict[str, typing.Any]] remote_data: typing.Optional[typing.List[RemoteData]] diff --git a/src/merge/resources/accounting/types/transaction_line_item.py b/src/merge/resources/accounting/types/transaction_line_item.py index 5e7fe1b0..3dba2597 100644 --- a/src/merge/resources/accounting/types/transaction_line_item.py +++ b/src/merge/resources/accounting/types/transaction_line_item.py @@ -26,7 +26,12 @@ class TransactionLineItem(pydantic.BaseModel): Fetch from the `GET TransactionLineItem` endpoint and view the transaction's line items. """ + id: typing.Optional[str] remote_id: typing.Optional[str] = pydantic.Field(description="The third-party API ID of the matching object.") + created_at: typing.Optional[dt.datetime] + modified_at: typing.Optional[dt.datetime] = pydantic.Field( + description="This is the datetime that this object was last updated by Merge" + ) memo: typing.Optional[str] = pydantic.Field( description="An internal note used by the business to clarify purpose of the transaction." ) @@ -355,11 +360,6 @@ class TransactionLineItem(pydantic.BaseModel): remote_was_deleted: typing.Optional[bool] = pydantic.Field( description="Indicates whether or not this object has been deleted in the third party platform." ) - id: typing.Optional[str] - created_at: typing.Optional[dt.datetime] - modified_at: typing.Optional[dt.datetime] = pydantic.Field( - description="This is the datetime that this object was last updated by Merge" - ) def json(self, **kwargs: typing.Any) -> str: kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs} diff --git a/src/merge/resources/accounting/types/vendor_credit.py b/src/merge/resources/accounting/types/vendor_credit.py index 69d718e3..2a5d79fb 100644 --- a/src/merge/resources/accounting/types/vendor_credit.py +++ b/src/merge/resources/accounting/types/vendor_credit.py @@ -33,6 +33,10 @@ class VendorCredit(pydantic.BaseModel): id: typing.Optional[str] remote_id: typing.Optional[str] = pydantic.Field(description="The third-party API ID of the matching object.") + created_at: typing.Optional[dt.datetime] + modified_at: typing.Optional[dt.datetime] = pydantic.Field( + description="This is the datetime that this object was last updated by Merge" + ) number: typing.Optional[str] = pydantic.Field(description="The vendor credit's number.") transaction_date: typing.Optional[dt.datetime] = pydantic.Field(description="The vendor credit's transaction date.") vendor: typing.Optional[VendorCreditVendor] = pydantic.Field(description="The vendor that owes the gift or refund.") @@ -361,10 +365,6 @@ class VendorCredit(pydantic.BaseModel): accounting_period: typing.Optional[VendorCreditAccountingPeriod] = pydantic.Field( description="The accounting period that the VendorCredit was generated in." ) - created_at: typing.Optional[dt.datetime] - modified_at: typing.Optional[dt.datetime] = pydantic.Field( - description="This is the datetime that this object was last updated by Merge" - ) field_mappings: typing.Optional[typing.Dict[str, typing.Any]] remote_data: typing.Optional[typing.List[RemoteData]] diff --git a/src/merge/resources/accounting/types/vendor_credit_line.py b/src/merge/resources/accounting/types/vendor_credit_line.py index c3602c25..b29c6963 100644 --- a/src/merge/resources/accounting/types/vendor_credit_line.py +++ b/src/merge/resources/accounting/types/vendor_credit_line.py @@ -25,7 +25,12 @@ class VendorCreditLine(pydantic.BaseModel): Fetch from the `GET VendorCredit` endpoint and view the vendor credit's line items. """ + id: typing.Optional[str] remote_id: typing.Optional[str] = pydantic.Field(description="The third-party API ID of the matching object.") + created_at: typing.Optional[dt.datetime] + modified_at: typing.Optional[dt.datetime] = pydantic.Field( + description="This is the datetime that this object was last updated by Merge" + ) net_amount: typing.Optional[float] = pydantic.Field(description="The full value of the credit.") tracking_category: typing.Optional[str] = pydantic.Field(description="The line's associated tracking category.") tracking_categories: typing.List[str] = pydantic.Field(description="The line's associated tracking categories.") @@ -36,11 +41,6 @@ class VendorCreditLine(pydantic.BaseModel): remote_was_deleted: typing.Optional[bool] = pydantic.Field( description="Indicates whether or not this object has been deleted in the third party platform." ) - id: typing.Optional[str] - created_at: typing.Optional[dt.datetime] - modified_at: typing.Optional[dt.datetime] = pydantic.Field( - description="This is the datetime that this object was last updated by Merge" - ) def json(self, **kwargs: typing.Any) -> str: kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs} diff --git a/src/merge/resources/ats/__init__.py b/src/merge/resources/ats/__init__.py index da8a4da6..86efce94 100644 --- a/src/merge/resources/ats/__init__.py +++ b/src/merge/resources/ats/__init__.py @@ -24,12 +24,14 @@ ApplicationCreditedTo, ApplicationCurrentStage, ApplicationJob, + ApplicationOffersItem, ApplicationRejectReason, ApplicationRequest, ApplicationRequestCandidate, ApplicationRequestCreditedTo, ApplicationRequestCurrentStage, ApplicationRequestJob, + ApplicationRequestOffersItem, ApplicationRequestRejectReason, ApplicationResponse, AsyncPassthroughReciept, @@ -99,9 +101,14 @@ JobInterviewStage, JobInterviewStageJob, JobOfficesItem, + JobPosting, + JobPostingJob, + JobPostingJobPostingUrlsItem, + JobPostingStatusEnum, JobRecruitersItem, JobStatus, JobStatusEnum, + JobTypeEnum, LinkToken, LinkedAccountCondition, LinkedAccountConditionRequest, @@ -135,6 +142,7 @@ PaginatedIssueList, PaginatedJobInterviewStageList, PaginatedJobList, + PaginatedJobPostingList, PaginatedOfferList, PaginatedOfficeList, PaginatedRejectReasonList, @@ -188,11 +196,11 @@ ScreeningQuestionJob, ScreeningQuestionOption, ScreeningQuestionType, + ScreeningQuestionTypeEnum, SelectiveSyncConfigurationsUsageEnum, SyncStatus, SyncStatusStatusEnum, Tag, - TypeEnum, Url, UrlRequest, UrlRequestUrlType, @@ -220,6 +228,7 @@ InterviewsListRequestExpand, InterviewsRetrieveRequestExpand, IssuesListRequestStatus, + JobPostingsListRequestStatus, JobsListRequestExpand, JobsListRequestStatus, JobsRetrieveRequestExpand, @@ -247,6 +256,7 @@ interviews, issues, job_interview_stages, + job_postings, jobs, link_token, linked_accounts, @@ -292,12 +302,14 @@ "ApplicationCreditedTo", "ApplicationCurrentStage", "ApplicationJob", + "ApplicationOffersItem", "ApplicationRejectReason", "ApplicationRequest", "ApplicationRequestCandidate", "ApplicationRequestCreditedTo", "ApplicationRequestCurrentStage", "ApplicationRequestJob", + "ApplicationRequestOffersItem", "ApplicationRequestRejectReason", "ApplicationResponse", "ApplicationsListRequestExpand", @@ -378,9 +390,15 @@ "JobInterviewStage", "JobInterviewStageJob", "JobOfficesItem", + "JobPosting", + "JobPostingJob", + "JobPostingJobPostingUrlsItem", + "JobPostingStatusEnum", + "JobPostingsListRequestStatus", "JobRecruitersItem", "JobStatus", "JobStatusEnum", + "JobTypeEnum", "JobsListRequestExpand", "JobsListRequestStatus", "JobsRetrieveRequestExpand", @@ -421,6 +439,7 @@ "PaginatedIssueList", "PaginatedJobInterviewStageList", "PaginatedJobList", + "PaginatedJobPostingList", "PaginatedOfferList", "PaginatedOfficeList", "PaginatedRejectReasonList", @@ -476,11 +495,11 @@ "ScreeningQuestionJob", "ScreeningQuestionOption", "ScreeningQuestionType", + "ScreeningQuestionTypeEnum", "SelectiveSyncConfigurationsUsageEnum", "SyncStatus", "SyncStatusStatusEnum", "Tag", - "TypeEnum", "Url", "UrlRequest", "UrlRequestUrlType", @@ -509,6 +528,7 @@ "interviews", "issues", "job_interview_stages", + "job_postings", "jobs", "link_token", "linked_accounts", diff --git a/src/merge/resources/ats/client.py b/src/merge/resources/ats/client.py index a26aab59..01e2b2b9 100644 --- a/src/merge/resources/ats/client.py +++ b/src/merge/resources/ats/client.py @@ -22,6 +22,7 @@ from .resources.interviews.client import AsyncInterviewsClient, InterviewsClient from .resources.issues.client import AsyncIssuesClient, IssuesClient from .resources.job_interview_stages.client import AsyncJobInterviewStagesClient, JobInterviewStagesClient +from .resources.job_postings.client import AsyncJobPostingsClient, JobPostingsClient from .resources.jobs.client import AsyncJobsClient, JobsClient from .resources.link_token.client import AsyncLinkTokenClient, LinkTokenClient from .resources.linked_accounts.client import AsyncLinkedAccountsClient, LinkedAccountsClient @@ -65,6 +66,7 @@ def __init__(self, *, client_wrapper: SyncClientWrapper): self.interviews = InterviewsClient(client_wrapper=self._client_wrapper) self.issues = IssuesClient(client_wrapper=self._client_wrapper) self.job_interview_stages = JobInterviewStagesClient(client_wrapper=self._client_wrapper) + self.job_postings = JobPostingsClient(client_wrapper=self._client_wrapper) self.jobs = JobsClient(client_wrapper=self._client_wrapper) self.link_token = LinkTokenClient(client_wrapper=self._client_wrapper) self.linked_accounts = LinkedAccountsClient(client_wrapper=self._client_wrapper) @@ -103,6 +105,7 @@ def __init__(self, *, client_wrapper: AsyncClientWrapper): self.interviews = AsyncInterviewsClient(client_wrapper=self._client_wrapper) self.issues = AsyncIssuesClient(client_wrapper=self._client_wrapper) self.job_interview_stages = AsyncJobInterviewStagesClient(client_wrapper=self._client_wrapper) + self.job_postings = AsyncJobPostingsClient(client_wrapper=self._client_wrapper) self.jobs = AsyncJobsClient(client_wrapper=self._client_wrapper) self.link_token = AsyncLinkTokenClient(client_wrapper=self._client_wrapper) self.linked_accounts = AsyncLinkedAccountsClient(client_wrapper=self._client_wrapper) diff --git a/src/merge/resources/ats/resources/__init__.py b/src/merge/resources/ats/resources/__init__.py index 4884bedf..28de2300 100644 --- a/src/merge/resources/ats/resources/__init__.py +++ b/src/merge/resources/ats/resources/__init__.py @@ -19,6 +19,7 @@ interviews, issues, job_interview_stages, + job_postings, jobs, link_token, linked_accounts, @@ -51,6 +52,7 @@ ) from .interviews import InterviewsListRequestExpand, InterviewsRetrieveRequestExpand from .issues import IssuesListRequestStatus +from .job_postings import JobPostingsListRequestStatus from .jobs import ( JobsListRequestExpand, JobsListRequestStatus, @@ -77,6 +79,7 @@ "InterviewsListRequestExpand", "InterviewsRetrieveRequestExpand", "IssuesListRequestStatus", + "JobPostingsListRequestStatus", "JobsListRequestExpand", "JobsListRequestStatus", "JobsRetrieveRequestExpand", @@ -104,6 +107,7 @@ "interviews", "issues", "job_interview_stages", + "job_postings", "jobs", "link_token", "linked_accounts", diff --git a/src/merge/resources/ats/resources/account_details/client.py b/src/merge/resources/ats/resources/account_details/client.py index b25ea42b..54de75b3 100644 --- a/src/merge/resources/ats/resources/account_details/client.py +++ b/src/merge/resources/ats/resources/account_details/client.py @@ -38,7 +38,7 @@ def retrieve(self, *, request_options: typing.Optional[RequestOptions] = None) - """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/ats/v1/account-details"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "ats/v1/account-details"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -84,7 +84,7 @@ async def retrieve(self, *, request_options: typing.Optional[RequestOptions] = N """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/ats/v1/account-details"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "ats/v1/account-details"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), diff --git a/src/merge/resources/ats/resources/account_token/client.py b/src/merge/resources/ats/resources/account_token/client.py index f7326e33..a551fbaa 100644 --- a/src/merge/resources/ats/resources/account_token/client.py +++ b/src/merge/resources/ats/resources/account_token/client.py @@ -37,12 +37,12 @@ def retrieve(self, public_token: str, *, request_options: typing.Optional[Reques api_key="YOUR_API_KEY", ) client.ats.account_token.retrieve( - public_token="string", + public_token="public_token", ) """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"api/ats/v1/account-token/{public_token}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"ats/v1/account-token/{public_token}"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -89,12 +89,12 @@ async def retrieve( api_key="YOUR_API_KEY", ) await client.ats.account_token.retrieve( - public_token="string", + public_token="public_token", ) """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"api/ats/v1/account-token/{public_token}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"ats/v1/account-token/{public_token}"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), diff --git a/src/merge/resources/ats/resources/activities/client.py b/src/merge/resources/ats/resources/activities/client.py index d326d1f3..f04e8744 100644 --- a/src/merge/resources/ats/resources/activities/client.py +++ b/src/merge/resources/ats/resources/activities/client.py @@ -78,31 +78,23 @@ def list( - remote_id: typing.Optional[str]. The API provider's ID for the given object. - - show_enum_origins: typing.Optional[ActivitiesListRequestShowEnumOrigins]. Which fields should be returned in non-normalized form. + - show_enum_origins: typing.Optional[ActivitiesListRequestShowEnumOrigins]. A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) - user_id: typing.Optional[str]. If provided, will only return activities done by this user. - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from merge.client import Merge - from merge.resources.ats import ( - ActivitiesListRequestRemoteFields, - ActivitiesListRequestShowEnumOrigins, - ) client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) - client.ats.activities.list( - expand="user", - remote_fields=ActivitiesListRequestRemoteFields.ACTIVITY_TYPE, - show_enum_origins=ActivitiesListRequestShowEnumOrigins.ACTIVITY_TYPE, - ) + client.ats.activities.list() """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/ats/v1/activities"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "ats/v1/activities"), params=jsonable_encoder( remove_none_from_dict( { @@ -178,17 +170,13 @@ def create( api_key="YOUR_API_KEY", ) client.ats.activities.create( - model=ActivityRequest( - subject="Gil Feig's interview", - body="Candidate loves integrations!", - candidate="550e8400-e29b-41d4-a716-446655440000", - ), - remote_user_id="string", + model=ActivityRequest(), + remote_user_id="remote_user_id", ) """ _response = self._client_wrapper.httpx_client.request( "POST", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/ats/v1/activities"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "ats/v1/activities"), params=jsonable_encoder( remove_none_from_dict( { @@ -250,30 +238,23 @@ def retrieve( - remote_fields: typing.Optional[ActivitiesRetrieveRequestRemoteFields]. Deprecated. Use show_enum_origins. - - show_enum_origins: typing.Optional[ActivitiesRetrieveRequestShowEnumOrigins]. Which fields should be returned in non-normalized form. + - show_enum_origins: typing.Optional[ActivitiesRetrieveRequestShowEnumOrigins]. A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from merge.client import Merge - from merge.resources.ats import ( - ActivitiesRetrieveRequestRemoteFields, - ActivitiesRetrieveRequestShowEnumOrigins, - ) client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) client.ats.activities.retrieve( - id="string", - expand="user", - remote_fields=ActivitiesRetrieveRequestRemoteFields.ACTIVITY_TYPE, - show_enum_origins=ActivitiesRetrieveRequestShowEnumOrigins.ACTIVITY_TYPE, + id="id", ) """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"api/ats/v1/activities/{id}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"ats/v1/activities/{id}"), params=jsonable_encoder( remove_none_from_dict( { @@ -326,7 +307,7 @@ def meta_post_retrieve(self, *, request_options: typing.Optional[RequestOptions] """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/ats/v1/activities/meta/post"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "ats/v1/activities/meta/post"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -399,31 +380,23 @@ async def list( - remote_id: typing.Optional[str]. The API provider's ID for the given object. - - show_enum_origins: typing.Optional[ActivitiesListRequestShowEnumOrigins]. Which fields should be returned in non-normalized form. + - show_enum_origins: typing.Optional[ActivitiesListRequestShowEnumOrigins]. A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) - user_id: typing.Optional[str]. If provided, will only return activities done by this user. - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from merge.client import AsyncMerge - from merge.resources.ats import ( - ActivitiesListRequestRemoteFields, - ActivitiesListRequestShowEnumOrigins, - ) client = AsyncMerge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) - await client.ats.activities.list( - expand="user", - remote_fields=ActivitiesListRequestRemoteFields.ACTIVITY_TYPE, - show_enum_origins=ActivitiesListRequestShowEnumOrigins.ACTIVITY_TYPE, - ) + await client.ats.activities.list() """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/ats/v1/activities"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "ats/v1/activities"), params=jsonable_encoder( remove_none_from_dict( { @@ -499,17 +472,13 @@ async def create( api_key="YOUR_API_KEY", ) await client.ats.activities.create( - model=ActivityRequest( - subject="Gil Feig's interview", - body="Candidate loves integrations!", - candidate="550e8400-e29b-41d4-a716-446655440000", - ), - remote_user_id="string", + model=ActivityRequest(), + remote_user_id="remote_user_id", ) """ _response = await self._client_wrapper.httpx_client.request( "POST", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/ats/v1/activities"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "ats/v1/activities"), params=jsonable_encoder( remove_none_from_dict( { @@ -571,30 +540,23 @@ async def retrieve( - remote_fields: typing.Optional[ActivitiesRetrieveRequestRemoteFields]. Deprecated. Use show_enum_origins. - - show_enum_origins: typing.Optional[ActivitiesRetrieveRequestShowEnumOrigins]. Which fields should be returned in non-normalized form. + - show_enum_origins: typing.Optional[ActivitiesRetrieveRequestShowEnumOrigins]. A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from merge.client import AsyncMerge - from merge.resources.ats import ( - ActivitiesRetrieveRequestRemoteFields, - ActivitiesRetrieveRequestShowEnumOrigins, - ) client = AsyncMerge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) await client.ats.activities.retrieve( - id="string", - expand="user", - remote_fields=ActivitiesRetrieveRequestRemoteFields.ACTIVITY_TYPE, - show_enum_origins=ActivitiesRetrieveRequestShowEnumOrigins.ACTIVITY_TYPE, + id="id", ) """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"api/ats/v1/activities/{id}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"ats/v1/activities/{id}"), params=jsonable_encoder( remove_none_from_dict( { @@ -647,7 +609,7 @@ async def meta_post_retrieve(self, *, request_options: typing.Optional[RequestOp """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/ats/v1/activities/meta/post"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "ats/v1/activities/meta/post"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), diff --git a/src/merge/resources/ats/resources/applications/client.py b/src/merge/resources/ats/resources/applications/client.py index 44bdd482..90c6e944 100644 --- a/src/merge/resources/ats/resources/applications/client.py +++ b/src/merge/resources/ats/resources/applications/client.py @@ -92,19 +92,16 @@ def list( - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from merge.client import Merge - from merge.resources.ats import ApplicationsListRequestExpand client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) - client.ats.applications.list( - expand=ApplicationsListRequestExpand.CANDIDATE, - ) + client.ats.applications.list() """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/ats/v1/applications"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "ats/v1/applications"), params=jsonable_encoder( remove_none_from_dict( { @@ -175,8 +172,6 @@ def create( - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- - import datetime - from merge.client import Merge from merge.resources.ats import ApplicationRequest @@ -185,22 +180,13 @@ def create( api_key="YOUR_API_KEY", ) client.ats.applications.create( - model=ApplicationRequest( - applied_at=datetime.datetime.fromisoformat( - "2021-10-15 00:00:00+00:00", - ), - rejected_at=datetime.datetime.fromisoformat( - "2021-11-15 00:00:00+00:00", - ), - source="Campus recruiting event", - remote_template_id="92830948203", - ), - remote_user_id="string", + model=ApplicationRequest(), + remote_user_id="remote_user_id", ) """ _response = self._client_wrapper.httpx_client.request( "POST", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/ats/v1/applications"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "ats/v1/applications"), params=jsonable_encoder( remove_none_from_dict( { @@ -261,20 +247,18 @@ def retrieve( - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from merge.client import Merge - from merge.resources.ats import ApplicationsRetrieveRequestExpand client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) client.ats.applications.retrieve( - id="string", - expand=ApplicationsRetrieveRequestExpand.CANDIDATE, + id="id", ) """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"api/ats/v1/applications/{id}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"ats/v1/applications/{id}"), params=jsonable_encoder( remove_none_from_dict( { @@ -341,7 +325,7 @@ def change_stage_create( api_key="YOUR_API_KEY", ) client.ats.applications.change_stage_create( - id="string", + id="id", ) """ _request: typing.Dict[str, typing.Any] = {} @@ -351,9 +335,7 @@ def change_stage_create( _request["remote_user_id"] = remote_user_id _response = self._client_wrapper.httpx_client.request( "POST", - urllib.parse.urljoin( - f"{self._client_wrapper.get_base_url()}/", f"api/ats/v1/applications/{id}/change-stage" - ), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"ats/v1/applications/{id}/change-stage"), params=jsonable_encoder( remove_none_from_dict( { @@ -417,7 +399,7 @@ def meta_post_retrieve( """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/ats/v1/applications/meta/post"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "ats/v1/applications/meta/post"), params=jsonable_encoder( remove_none_from_dict( { @@ -515,19 +497,16 @@ async def list( - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from merge.client import AsyncMerge - from merge.resources.ats import ApplicationsListRequestExpand client = AsyncMerge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) - await client.ats.applications.list( - expand=ApplicationsListRequestExpand.CANDIDATE, - ) + await client.ats.applications.list() """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/ats/v1/applications"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "ats/v1/applications"), params=jsonable_encoder( remove_none_from_dict( { @@ -598,8 +577,6 @@ async def create( - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- - import datetime - from merge.client import AsyncMerge from merge.resources.ats import ApplicationRequest @@ -608,22 +585,13 @@ async def create( api_key="YOUR_API_KEY", ) await client.ats.applications.create( - model=ApplicationRequest( - applied_at=datetime.datetime.fromisoformat( - "2021-10-15 00:00:00+00:00", - ), - rejected_at=datetime.datetime.fromisoformat( - "2021-11-15 00:00:00+00:00", - ), - source="Campus recruiting event", - remote_template_id="92830948203", - ), - remote_user_id="string", + model=ApplicationRequest(), + remote_user_id="remote_user_id", ) """ _response = await self._client_wrapper.httpx_client.request( "POST", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/ats/v1/applications"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "ats/v1/applications"), params=jsonable_encoder( remove_none_from_dict( { @@ -684,20 +652,18 @@ async def retrieve( - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from merge.client import AsyncMerge - from merge.resources.ats import ApplicationsRetrieveRequestExpand client = AsyncMerge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) await client.ats.applications.retrieve( - id="string", - expand=ApplicationsRetrieveRequestExpand.CANDIDATE, + id="id", ) """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"api/ats/v1/applications/{id}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"ats/v1/applications/{id}"), params=jsonable_encoder( remove_none_from_dict( { @@ -764,7 +730,7 @@ async def change_stage_create( api_key="YOUR_API_KEY", ) await client.ats.applications.change_stage_create( - id="string", + id="id", ) """ _request: typing.Dict[str, typing.Any] = {} @@ -774,9 +740,7 @@ async def change_stage_create( _request["remote_user_id"] = remote_user_id _response = await self._client_wrapper.httpx_client.request( "POST", - urllib.parse.urljoin( - f"{self._client_wrapper.get_base_url()}/", f"api/ats/v1/applications/{id}/change-stage" - ), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"ats/v1/applications/{id}/change-stage"), params=jsonable_encoder( remove_none_from_dict( { @@ -840,7 +804,7 @@ async def meta_post_retrieve( """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/ats/v1/applications/meta/post"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "ats/v1/applications/meta/post"), params=jsonable_encoder( remove_none_from_dict( { diff --git a/src/merge/resources/ats/resources/applications/types/applications_list_request_expand.py b/src/merge/resources/ats/resources/applications/types/applications_list_request_expand.py index 5caa2cb9..da3764b6 100644 --- a/src/merge/resources/ats/resources/applications/types/applications_list_request_expand.py +++ b/src/merge/resources/ats/resources/applications/types/applications_list_request_expand.py @@ -37,6 +37,42 @@ class ApplicationsListRequestExpand(str, enum.Enum): JOB_CURRENT_STAGE = "job,current_stage" JOB_CURRENT_STAGE_REJECT_REASON = "job,current_stage,reject_reason" JOB_REJECT_REASON = "job,reject_reason" + OFFERS = "offers" + OFFERS_CANDIDATE = "offers,candidate" + OFFERS_CANDIDATE_CREDITED_TO = "offers,candidate,credited_to" + OFFERS_CANDIDATE_CREDITED_TO_CURRENT_STAGE = "offers,candidate,credited_to,current_stage" + OFFERS_CANDIDATE_CREDITED_TO_CURRENT_STAGE_REJECT_REASON = ( + "offers,candidate,credited_to,current_stage,reject_reason" + ) + OFFERS_CANDIDATE_CREDITED_TO_REJECT_REASON = "offers,candidate,credited_to,reject_reason" + OFFERS_CANDIDATE_CURRENT_STAGE = "offers,candidate,current_stage" + OFFERS_CANDIDATE_CURRENT_STAGE_REJECT_REASON = "offers,candidate,current_stage,reject_reason" + OFFERS_CANDIDATE_JOB = "offers,candidate,job" + OFFERS_CANDIDATE_JOB_CREDITED_TO = "offers,candidate,job,credited_to" + OFFERS_CANDIDATE_JOB_CREDITED_TO_CURRENT_STAGE = "offers,candidate,job,credited_to,current_stage" + OFFERS_CANDIDATE_JOB_CREDITED_TO_CURRENT_STAGE_REJECT_REASON = ( + "offers,candidate,job,credited_to,current_stage,reject_reason" + ) + OFFERS_CANDIDATE_JOB_CREDITED_TO_REJECT_REASON = "offers,candidate,job,credited_to,reject_reason" + OFFERS_CANDIDATE_JOB_CURRENT_STAGE = "offers,candidate,job,current_stage" + OFFERS_CANDIDATE_JOB_CURRENT_STAGE_REJECT_REASON = "offers,candidate,job,current_stage,reject_reason" + OFFERS_CANDIDATE_JOB_REJECT_REASON = "offers,candidate,job,reject_reason" + OFFERS_CANDIDATE_REJECT_REASON = "offers,candidate,reject_reason" + OFFERS_CREDITED_TO = "offers,credited_to" + OFFERS_CREDITED_TO_CURRENT_STAGE = "offers,credited_to,current_stage" + OFFERS_CREDITED_TO_CURRENT_STAGE_REJECT_REASON = "offers,credited_to,current_stage,reject_reason" + OFFERS_CREDITED_TO_REJECT_REASON = "offers,credited_to,reject_reason" + OFFERS_CURRENT_STAGE = "offers,current_stage" + OFFERS_CURRENT_STAGE_REJECT_REASON = "offers,current_stage,reject_reason" + OFFERS_JOB = "offers,job" + OFFERS_JOB_CREDITED_TO = "offers,job,credited_to" + OFFERS_JOB_CREDITED_TO_CURRENT_STAGE = "offers,job,credited_to,current_stage" + OFFERS_JOB_CREDITED_TO_CURRENT_STAGE_REJECT_REASON = "offers,job,credited_to,current_stage,reject_reason" + OFFERS_JOB_CREDITED_TO_REJECT_REASON = "offers,job,credited_to,reject_reason" + OFFERS_JOB_CURRENT_STAGE = "offers,job,current_stage" + OFFERS_JOB_CURRENT_STAGE_REJECT_REASON = "offers,job,current_stage,reject_reason" + OFFERS_JOB_REJECT_REASON = "offers,job,reject_reason" + OFFERS_REJECT_REASON = "offers,reject_reason" REJECT_REASON = "reject_reason" def visit( @@ -71,6 +107,38 @@ def visit( job_current_stage: typing.Callable[[], T_Result], job_current_stage_reject_reason: typing.Callable[[], T_Result], job_reject_reason: typing.Callable[[], T_Result], + offers: typing.Callable[[], T_Result], + offers_candidate: typing.Callable[[], T_Result], + offers_candidate_credited_to: typing.Callable[[], T_Result], + offers_candidate_credited_to_current_stage: typing.Callable[[], T_Result], + offers_candidate_credited_to_current_stage_reject_reason: typing.Callable[[], T_Result], + offers_candidate_credited_to_reject_reason: typing.Callable[[], T_Result], + offers_candidate_current_stage: typing.Callable[[], T_Result], + offers_candidate_current_stage_reject_reason: typing.Callable[[], T_Result], + offers_candidate_job: typing.Callable[[], T_Result], + offers_candidate_job_credited_to: typing.Callable[[], T_Result], + offers_candidate_job_credited_to_current_stage: typing.Callable[[], T_Result], + offers_candidate_job_credited_to_current_stage_reject_reason: typing.Callable[[], T_Result], + offers_candidate_job_credited_to_reject_reason: typing.Callable[[], T_Result], + offers_candidate_job_current_stage: typing.Callable[[], T_Result], + offers_candidate_job_current_stage_reject_reason: typing.Callable[[], T_Result], + offers_candidate_job_reject_reason: typing.Callable[[], T_Result], + offers_candidate_reject_reason: typing.Callable[[], T_Result], + offers_credited_to: typing.Callable[[], T_Result], + offers_credited_to_current_stage: typing.Callable[[], T_Result], + offers_credited_to_current_stage_reject_reason: typing.Callable[[], T_Result], + offers_credited_to_reject_reason: typing.Callable[[], T_Result], + offers_current_stage: typing.Callable[[], T_Result], + offers_current_stage_reject_reason: typing.Callable[[], T_Result], + offers_job: typing.Callable[[], T_Result], + offers_job_credited_to: typing.Callable[[], T_Result], + offers_job_credited_to_current_stage: typing.Callable[[], T_Result], + offers_job_credited_to_current_stage_reject_reason: typing.Callable[[], T_Result], + offers_job_credited_to_reject_reason: typing.Callable[[], T_Result], + offers_job_current_stage: typing.Callable[[], T_Result], + offers_job_current_stage_reject_reason: typing.Callable[[], T_Result], + offers_job_reject_reason: typing.Callable[[], T_Result], + offers_reject_reason: typing.Callable[[], T_Result], reject_reason: typing.Callable[[], T_Result], ) -> T_Result: if self is ApplicationsListRequestExpand.CANDIDATE: @@ -133,5 +201,69 @@ def visit( return job_current_stage_reject_reason() if self is ApplicationsListRequestExpand.JOB_REJECT_REASON: return job_reject_reason() + if self is ApplicationsListRequestExpand.OFFERS: + return offers() + if self is ApplicationsListRequestExpand.OFFERS_CANDIDATE: + return offers_candidate() + if self is ApplicationsListRequestExpand.OFFERS_CANDIDATE_CREDITED_TO: + return offers_candidate_credited_to() + if self is ApplicationsListRequestExpand.OFFERS_CANDIDATE_CREDITED_TO_CURRENT_STAGE: + return offers_candidate_credited_to_current_stage() + if self is ApplicationsListRequestExpand.OFFERS_CANDIDATE_CREDITED_TO_CURRENT_STAGE_REJECT_REASON: + return offers_candidate_credited_to_current_stage_reject_reason() + if self is ApplicationsListRequestExpand.OFFERS_CANDIDATE_CREDITED_TO_REJECT_REASON: + return offers_candidate_credited_to_reject_reason() + if self is ApplicationsListRequestExpand.OFFERS_CANDIDATE_CURRENT_STAGE: + return offers_candidate_current_stage() + if self is ApplicationsListRequestExpand.OFFERS_CANDIDATE_CURRENT_STAGE_REJECT_REASON: + return offers_candidate_current_stage_reject_reason() + if self is ApplicationsListRequestExpand.OFFERS_CANDIDATE_JOB: + return offers_candidate_job() + if self is ApplicationsListRequestExpand.OFFERS_CANDIDATE_JOB_CREDITED_TO: + return offers_candidate_job_credited_to() + if self is ApplicationsListRequestExpand.OFFERS_CANDIDATE_JOB_CREDITED_TO_CURRENT_STAGE: + return offers_candidate_job_credited_to_current_stage() + if self is ApplicationsListRequestExpand.OFFERS_CANDIDATE_JOB_CREDITED_TO_CURRENT_STAGE_REJECT_REASON: + return offers_candidate_job_credited_to_current_stage_reject_reason() + if self is ApplicationsListRequestExpand.OFFERS_CANDIDATE_JOB_CREDITED_TO_REJECT_REASON: + return offers_candidate_job_credited_to_reject_reason() + if self is ApplicationsListRequestExpand.OFFERS_CANDIDATE_JOB_CURRENT_STAGE: + return offers_candidate_job_current_stage() + if self is ApplicationsListRequestExpand.OFFERS_CANDIDATE_JOB_CURRENT_STAGE_REJECT_REASON: + return offers_candidate_job_current_stage_reject_reason() + if self is ApplicationsListRequestExpand.OFFERS_CANDIDATE_JOB_REJECT_REASON: + return offers_candidate_job_reject_reason() + if self is ApplicationsListRequestExpand.OFFERS_CANDIDATE_REJECT_REASON: + return offers_candidate_reject_reason() + if self is ApplicationsListRequestExpand.OFFERS_CREDITED_TO: + return offers_credited_to() + if self is ApplicationsListRequestExpand.OFFERS_CREDITED_TO_CURRENT_STAGE: + return offers_credited_to_current_stage() + if self is ApplicationsListRequestExpand.OFFERS_CREDITED_TO_CURRENT_STAGE_REJECT_REASON: + return offers_credited_to_current_stage_reject_reason() + if self is ApplicationsListRequestExpand.OFFERS_CREDITED_TO_REJECT_REASON: + return offers_credited_to_reject_reason() + if self is ApplicationsListRequestExpand.OFFERS_CURRENT_STAGE: + return offers_current_stage() + if self is ApplicationsListRequestExpand.OFFERS_CURRENT_STAGE_REJECT_REASON: + return offers_current_stage_reject_reason() + if self is ApplicationsListRequestExpand.OFFERS_JOB: + return offers_job() + if self is ApplicationsListRequestExpand.OFFERS_JOB_CREDITED_TO: + return offers_job_credited_to() + if self is ApplicationsListRequestExpand.OFFERS_JOB_CREDITED_TO_CURRENT_STAGE: + return offers_job_credited_to_current_stage() + if self is ApplicationsListRequestExpand.OFFERS_JOB_CREDITED_TO_CURRENT_STAGE_REJECT_REASON: + return offers_job_credited_to_current_stage_reject_reason() + if self is ApplicationsListRequestExpand.OFFERS_JOB_CREDITED_TO_REJECT_REASON: + return offers_job_credited_to_reject_reason() + if self is ApplicationsListRequestExpand.OFFERS_JOB_CURRENT_STAGE: + return offers_job_current_stage() + if self is ApplicationsListRequestExpand.OFFERS_JOB_CURRENT_STAGE_REJECT_REASON: + return offers_job_current_stage_reject_reason() + if self is ApplicationsListRequestExpand.OFFERS_JOB_REJECT_REASON: + return offers_job_reject_reason() + if self is ApplicationsListRequestExpand.OFFERS_REJECT_REASON: + return offers_reject_reason() if self is ApplicationsListRequestExpand.REJECT_REASON: return reject_reason() diff --git a/src/merge/resources/ats/resources/applications/types/applications_retrieve_request_expand.py b/src/merge/resources/ats/resources/applications/types/applications_retrieve_request_expand.py index 91e72ccf..ddba9a34 100644 --- a/src/merge/resources/ats/resources/applications/types/applications_retrieve_request_expand.py +++ b/src/merge/resources/ats/resources/applications/types/applications_retrieve_request_expand.py @@ -37,6 +37,42 @@ class ApplicationsRetrieveRequestExpand(str, enum.Enum): JOB_CURRENT_STAGE = "job,current_stage" JOB_CURRENT_STAGE_REJECT_REASON = "job,current_stage,reject_reason" JOB_REJECT_REASON = "job,reject_reason" + OFFERS = "offers" + OFFERS_CANDIDATE = "offers,candidate" + OFFERS_CANDIDATE_CREDITED_TO = "offers,candidate,credited_to" + OFFERS_CANDIDATE_CREDITED_TO_CURRENT_STAGE = "offers,candidate,credited_to,current_stage" + OFFERS_CANDIDATE_CREDITED_TO_CURRENT_STAGE_REJECT_REASON = ( + "offers,candidate,credited_to,current_stage,reject_reason" + ) + OFFERS_CANDIDATE_CREDITED_TO_REJECT_REASON = "offers,candidate,credited_to,reject_reason" + OFFERS_CANDIDATE_CURRENT_STAGE = "offers,candidate,current_stage" + OFFERS_CANDIDATE_CURRENT_STAGE_REJECT_REASON = "offers,candidate,current_stage,reject_reason" + OFFERS_CANDIDATE_JOB = "offers,candidate,job" + OFFERS_CANDIDATE_JOB_CREDITED_TO = "offers,candidate,job,credited_to" + OFFERS_CANDIDATE_JOB_CREDITED_TO_CURRENT_STAGE = "offers,candidate,job,credited_to,current_stage" + OFFERS_CANDIDATE_JOB_CREDITED_TO_CURRENT_STAGE_REJECT_REASON = ( + "offers,candidate,job,credited_to,current_stage,reject_reason" + ) + OFFERS_CANDIDATE_JOB_CREDITED_TO_REJECT_REASON = "offers,candidate,job,credited_to,reject_reason" + OFFERS_CANDIDATE_JOB_CURRENT_STAGE = "offers,candidate,job,current_stage" + OFFERS_CANDIDATE_JOB_CURRENT_STAGE_REJECT_REASON = "offers,candidate,job,current_stage,reject_reason" + OFFERS_CANDIDATE_JOB_REJECT_REASON = "offers,candidate,job,reject_reason" + OFFERS_CANDIDATE_REJECT_REASON = "offers,candidate,reject_reason" + OFFERS_CREDITED_TO = "offers,credited_to" + OFFERS_CREDITED_TO_CURRENT_STAGE = "offers,credited_to,current_stage" + OFFERS_CREDITED_TO_CURRENT_STAGE_REJECT_REASON = "offers,credited_to,current_stage,reject_reason" + OFFERS_CREDITED_TO_REJECT_REASON = "offers,credited_to,reject_reason" + OFFERS_CURRENT_STAGE = "offers,current_stage" + OFFERS_CURRENT_STAGE_REJECT_REASON = "offers,current_stage,reject_reason" + OFFERS_JOB = "offers,job" + OFFERS_JOB_CREDITED_TO = "offers,job,credited_to" + OFFERS_JOB_CREDITED_TO_CURRENT_STAGE = "offers,job,credited_to,current_stage" + OFFERS_JOB_CREDITED_TO_CURRENT_STAGE_REJECT_REASON = "offers,job,credited_to,current_stage,reject_reason" + OFFERS_JOB_CREDITED_TO_REJECT_REASON = "offers,job,credited_to,reject_reason" + OFFERS_JOB_CURRENT_STAGE = "offers,job,current_stage" + OFFERS_JOB_CURRENT_STAGE_REJECT_REASON = "offers,job,current_stage,reject_reason" + OFFERS_JOB_REJECT_REASON = "offers,job,reject_reason" + OFFERS_REJECT_REASON = "offers,reject_reason" REJECT_REASON = "reject_reason" def visit( @@ -71,6 +107,38 @@ def visit( job_current_stage: typing.Callable[[], T_Result], job_current_stage_reject_reason: typing.Callable[[], T_Result], job_reject_reason: typing.Callable[[], T_Result], + offers: typing.Callable[[], T_Result], + offers_candidate: typing.Callable[[], T_Result], + offers_candidate_credited_to: typing.Callable[[], T_Result], + offers_candidate_credited_to_current_stage: typing.Callable[[], T_Result], + offers_candidate_credited_to_current_stage_reject_reason: typing.Callable[[], T_Result], + offers_candidate_credited_to_reject_reason: typing.Callable[[], T_Result], + offers_candidate_current_stage: typing.Callable[[], T_Result], + offers_candidate_current_stage_reject_reason: typing.Callable[[], T_Result], + offers_candidate_job: typing.Callable[[], T_Result], + offers_candidate_job_credited_to: typing.Callable[[], T_Result], + offers_candidate_job_credited_to_current_stage: typing.Callable[[], T_Result], + offers_candidate_job_credited_to_current_stage_reject_reason: typing.Callable[[], T_Result], + offers_candidate_job_credited_to_reject_reason: typing.Callable[[], T_Result], + offers_candidate_job_current_stage: typing.Callable[[], T_Result], + offers_candidate_job_current_stage_reject_reason: typing.Callable[[], T_Result], + offers_candidate_job_reject_reason: typing.Callable[[], T_Result], + offers_candidate_reject_reason: typing.Callable[[], T_Result], + offers_credited_to: typing.Callable[[], T_Result], + offers_credited_to_current_stage: typing.Callable[[], T_Result], + offers_credited_to_current_stage_reject_reason: typing.Callable[[], T_Result], + offers_credited_to_reject_reason: typing.Callable[[], T_Result], + offers_current_stage: typing.Callable[[], T_Result], + offers_current_stage_reject_reason: typing.Callable[[], T_Result], + offers_job: typing.Callable[[], T_Result], + offers_job_credited_to: typing.Callable[[], T_Result], + offers_job_credited_to_current_stage: typing.Callable[[], T_Result], + offers_job_credited_to_current_stage_reject_reason: typing.Callable[[], T_Result], + offers_job_credited_to_reject_reason: typing.Callable[[], T_Result], + offers_job_current_stage: typing.Callable[[], T_Result], + offers_job_current_stage_reject_reason: typing.Callable[[], T_Result], + offers_job_reject_reason: typing.Callable[[], T_Result], + offers_reject_reason: typing.Callable[[], T_Result], reject_reason: typing.Callable[[], T_Result], ) -> T_Result: if self is ApplicationsRetrieveRequestExpand.CANDIDATE: @@ -133,5 +201,69 @@ def visit( return job_current_stage_reject_reason() if self is ApplicationsRetrieveRequestExpand.JOB_REJECT_REASON: return job_reject_reason() + if self is ApplicationsRetrieveRequestExpand.OFFERS: + return offers() + if self is ApplicationsRetrieveRequestExpand.OFFERS_CANDIDATE: + return offers_candidate() + if self is ApplicationsRetrieveRequestExpand.OFFERS_CANDIDATE_CREDITED_TO: + return offers_candidate_credited_to() + if self is ApplicationsRetrieveRequestExpand.OFFERS_CANDIDATE_CREDITED_TO_CURRENT_STAGE: + return offers_candidate_credited_to_current_stage() + if self is ApplicationsRetrieveRequestExpand.OFFERS_CANDIDATE_CREDITED_TO_CURRENT_STAGE_REJECT_REASON: + return offers_candidate_credited_to_current_stage_reject_reason() + if self is ApplicationsRetrieveRequestExpand.OFFERS_CANDIDATE_CREDITED_TO_REJECT_REASON: + return offers_candidate_credited_to_reject_reason() + if self is ApplicationsRetrieveRequestExpand.OFFERS_CANDIDATE_CURRENT_STAGE: + return offers_candidate_current_stage() + if self is ApplicationsRetrieveRequestExpand.OFFERS_CANDIDATE_CURRENT_STAGE_REJECT_REASON: + return offers_candidate_current_stage_reject_reason() + if self is ApplicationsRetrieveRequestExpand.OFFERS_CANDIDATE_JOB: + return offers_candidate_job() + if self is ApplicationsRetrieveRequestExpand.OFFERS_CANDIDATE_JOB_CREDITED_TO: + return offers_candidate_job_credited_to() + if self is ApplicationsRetrieveRequestExpand.OFFERS_CANDIDATE_JOB_CREDITED_TO_CURRENT_STAGE: + return offers_candidate_job_credited_to_current_stage() + if self is ApplicationsRetrieveRequestExpand.OFFERS_CANDIDATE_JOB_CREDITED_TO_CURRENT_STAGE_REJECT_REASON: + return offers_candidate_job_credited_to_current_stage_reject_reason() + if self is ApplicationsRetrieveRequestExpand.OFFERS_CANDIDATE_JOB_CREDITED_TO_REJECT_REASON: + return offers_candidate_job_credited_to_reject_reason() + if self is ApplicationsRetrieveRequestExpand.OFFERS_CANDIDATE_JOB_CURRENT_STAGE: + return offers_candidate_job_current_stage() + if self is ApplicationsRetrieveRequestExpand.OFFERS_CANDIDATE_JOB_CURRENT_STAGE_REJECT_REASON: + return offers_candidate_job_current_stage_reject_reason() + if self is ApplicationsRetrieveRequestExpand.OFFERS_CANDIDATE_JOB_REJECT_REASON: + return offers_candidate_job_reject_reason() + if self is ApplicationsRetrieveRequestExpand.OFFERS_CANDIDATE_REJECT_REASON: + return offers_candidate_reject_reason() + if self is ApplicationsRetrieveRequestExpand.OFFERS_CREDITED_TO: + return offers_credited_to() + if self is ApplicationsRetrieveRequestExpand.OFFERS_CREDITED_TO_CURRENT_STAGE: + return offers_credited_to_current_stage() + if self is ApplicationsRetrieveRequestExpand.OFFERS_CREDITED_TO_CURRENT_STAGE_REJECT_REASON: + return offers_credited_to_current_stage_reject_reason() + if self is ApplicationsRetrieveRequestExpand.OFFERS_CREDITED_TO_REJECT_REASON: + return offers_credited_to_reject_reason() + if self is ApplicationsRetrieveRequestExpand.OFFERS_CURRENT_STAGE: + return offers_current_stage() + if self is ApplicationsRetrieveRequestExpand.OFFERS_CURRENT_STAGE_REJECT_REASON: + return offers_current_stage_reject_reason() + if self is ApplicationsRetrieveRequestExpand.OFFERS_JOB: + return offers_job() + if self is ApplicationsRetrieveRequestExpand.OFFERS_JOB_CREDITED_TO: + return offers_job_credited_to() + if self is ApplicationsRetrieveRequestExpand.OFFERS_JOB_CREDITED_TO_CURRENT_STAGE: + return offers_job_credited_to_current_stage() + if self is ApplicationsRetrieveRequestExpand.OFFERS_JOB_CREDITED_TO_CURRENT_STAGE_REJECT_REASON: + return offers_job_credited_to_current_stage_reject_reason() + if self is ApplicationsRetrieveRequestExpand.OFFERS_JOB_CREDITED_TO_REJECT_REASON: + return offers_job_credited_to_reject_reason() + if self is ApplicationsRetrieveRequestExpand.OFFERS_JOB_CURRENT_STAGE: + return offers_job_current_stage() + if self is ApplicationsRetrieveRequestExpand.OFFERS_JOB_CURRENT_STAGE_REJECT_REASON: + return offers_job_current_stage_reject_reason() + if self is ApplicationsRetrieveRequestExpand.OFFERS_JOB_REJECT_REASON: + return offers_job_reject_reason() + if self is ApplicationsRetrieveRequestExpand.OFFERS_REJECT_REASON: + return offers_reject_reason() if self is ApplicationsRetrieveRequestExpand.REJECT_REASON: return reject_reason() diff --git a/src/merge/resources/ats/resources/async_passthrough/client.py b/src/merge/resources/ats/resources/async_passthrough/client.py index f28e1cff..75721bcb 100644 --- a/src/merge/resources/ats/resources/async_passthrough/client.py +++ b/src/merge/resources/ats/resources/async_passthrough/client.py @@ -38,11 +38,7 @@ def create( - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from merge.client import Merge - from merge.resources.ats import ( - DataPassthroughRequest, - MethodEnum, - RequestFormatEnum, - ) + from merge.resources.ats import DataPassthroughRequest, MethodEnum client = Merge( account_token="YOUR_ACCOUNT_TOKEN", @@ -52,14 +48,12 @@ def create( request=DataPassthroughRequest( method=MethodEnum.GET, path="/scooters", - data='{"company": "Lime", "model": "Gen 2.5"}', - request_format=RequestFormatEnum.JSON, ), ) """ _response = self._client_wrapper.httpx_client.request( "POST", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/ats/v1/async-passthrough"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "ats/v1/async-passthrough"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -107,14 +101,13 @@ def retrieve( api_key="YOUR_API_KEY", ) client.ats.async_passthrough.retrieve( - async_passthrough_receipt_id="string", + async_passthrough_receipt_id="async_passthrough_receipt_id", ) """ _response = self._client_wrapper.httpx_client.request( "GET", urllib.parse.urljoin( - f"{self._client_wrapper.get_base_url()}/", - f"api/ats/v1/async-passthrough/{async_passthrough_receipt_id}", + f"{self._client_wrapper.get_base_url()}/", f"ats/v1/async-passthrough/{async_passthrough_receipt_id}" ), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None @@ -156,11 +149,7 @@ async def create( - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from merge.client import AsyncMerge - from merge.resources.ats import ( - DataPassthroughRequest, - MethodEnum, - RequestFormatEnum, - ) + from merge.resources.ats import DataPassthroughRequest, MethodEnum client = AsyncMerge( account_token="YOUR_ACCOUNT_TOKEN", @@ -170,14 +159,12 @@ async def create( request=DataPassthroughRequest( method=MethodEnum.GET, path="/scooters", - data='{"company": "Lime", "model": "Gen 2.5"}', - request_format=RequestFormatEnum.JSON, ), ) """ _response = await self._client_wrapper.httpx_client.request( "POST", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/ats/v1/async-passthrough"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "ats/v1/async-passthrough"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -225,14 +212,13 @@ async def retrieve( api_key="YOUR_API_KEY", ) await client.ats.async_passthrough.retrieve( - async_passthrough_receipt_id="string", + async_passthrough_receipt_id="async_passthrough_receipt_id", ) """ _response = await self._client_wrapper.httpx_client.request( "GET", urllib.parse.urljoin( - f"{self._client_wrapper.get_base_url()}/", - f"api/ats/v1/async-passthrough/{async_passthrough_receipt_id}", + f"{self._client_wrapper.get_base_url()}/", f"ats/v1/async-passthrough/{async_passthrough_receipt_id}" ), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None diff --git a/src/merge/resources/ats/resources/attachments/client.py b/src/merge/resources/ats/resources/attachments/client.py index 601e9ccb..85702fa6 100644 --- a/src/merge/resources/ats/resources/attachments/client.py +++ b/src/merge/resources/ats/resources/attachments/client.py @@ -76,7 +76,7 @@ def list( - remote_id: typing.Optional[str]. The API provider's ID for the given object. - - show_enum_origins: typing.Optional[typing.Literal["attachment_type"]]. Which fields should be returned in non-normalized form. + - show_enum_origins: typing.Optional[typing.Literal["attachment_type"]]. A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- @@ -86,15 +86,11 @@ def list( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) - client.ats.attachments.list( - expand="candidate", - remote_fields="attachment_type", - show_enum_origins="attachment_type", - ) + client.ats.attachments.list() """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/ats/v1/attachments"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "ats/v1/attachments"), params=jsonable_encoder( remove_none_from_dict( { @@ -170,17 +166,13 @@ def create( api_key="YOUR_API_KEY", ) client.ats.attachments.create( - model=AttachmentRequest( - file_name="Candidate Resume", - file_url="http://alturl.com/p749b", - candidate="2872ba14-4084-492b-be96-e5eee6fc33ef", - ), - remote_user_id="string", + model=AttachmentRequest(), + remote_user_id="remote_user_id", ) """ _response = self._client_wrapper.httpx_client.request( "POST", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/ats/v1/attachments"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "ats/v1/attachments"), params=jsonable_encoder( remove_none_from_dict( { @@ -242,7 +234,7 @@ def retrieve( - remote_fields: typing.Optional[typing.Literal["attachment_type"]]. Deprecated. Use show_enum_origins. - - show_enum_origins: typing.Optional[typing.Literal["attachment_type"]]. Which fields should be returned in non-normalized form. + - show_enum_origins: typing.Optional[typing.Literal["attachment_type"]]. A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- @@ -253,15 +245,12 @@ def retrieve( api_key="YOUR_API_KEY", ) client.ats.attachments.retrieve( - id="string", - expand="candidate", - remote_fields="attachment_type", - show_enum_origins="attachment_type", + id="id", ) """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"api/ats/v1/attachments/{id}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"ats/v1/attachments/{id}"), params=jsonable_encoder( remove_none_from_dict( { @@ -314,7 +303,7 @@ def meta_post_retrieve(self, *, request_options: typing.Optional[RequestOptions] """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/ats/v1/attachments/meta/post"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "ats/v1/attachments/meta/post"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -389,7 +378,7 @@ async def list( - remote_id: typing.Optional[str]. The API provider's ID for the given object. - - show_enum_origins: typing.Optional[typing.Literal["attachment_type"]]. Which fields should be returned in non-normalized form. + - show_enum_origins: typing.Optional[typing.Literal["attachment_type"]]. A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- @@ -399,15 +388,11 @@ async def list( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) - await client.ats.attachments.list( - expand="candidate", - remote_fields="attachment_type", - show_enum_origins="attachment_type", - ) + await client.ats.attachments.list() """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/ats/v1/attachments"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "ats/v1/attachments"), params=jsonable_encoder( remove_none_from_dict( { @@ -483,17 +468,13 @@ async def create( api_key="YOUR_API_KEY", ) await client.ats.attachments.create( - model=AttachmentRequest( - file_name="Candidate Resume", - file_url="http://alturl.com/p749b", - candidate="2872ba14-4084-492b-be96-e5eee6fc33ef", - ), - remote_user_id="string", + model=AttachmentRequest(), + remote_user_id="remote_user_id", ) """ _response = await self._client_wrapper.httpx_client.request( "POST", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/ats/v1/attachments"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "ats/v1/attachments"), params=jsonable_encoder( remove_none_from_dict( { @@ -555,7 +536,7 @@ async def retrieve( - remote_fields: typing.Optional[typing.Literal["attachment_type"]]. Deprecated. Use show_enum_origins. - - show_enum_origins: typing.Optional[typing.Literal["attachment_type"]]. Which fields should be returned in non-normalized form. + - show_enum_origins: typing.Optional[typing.Literal["attachment_type"]]. A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- @@ -566,15 +547,12 @@ async def retrieve( api_key="YOUR_API_KEY", ) await client.ats.attachments.retrieve( - id="string", - expand="candidate", - remote_fields="attachment_type", - show_enum_origins="attachment_type", + id="id", ) """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"api/ats/v1/attachments/{id}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"ats/v1/attachments/{id}"), params=jsonable_encoder( remove_none_from_dict( { @@ -627,7 +605,7 @@ async def meta_post_retrieve(self, *, request_options: typing.Optional[RequestOp """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/ats/v1/attachments/meta/post"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "ats/v1/attachments/meta/post"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), diff --git a/src/merge/resources/ats/resources/audit_trail/client.py b/src/merge/resources/ats/resources/audit_trail/client.py index 9f7294bd..c2bf0f61 100644 --- a/src/merge/resources/ats/resources/audit_trail/client.py +++ b/src/merge/resources/ats/resources/audit_trail/client.py @@ -40,7 +40,7 @@ def list( - end_date: typing.Optional[str]. If included, will only include audit trail events that occurred before this time - - event_type: typing.Optional[str]. If included, will only include events with the given event type. Possible values include: `CREATED_REMOTE_PRODUCTION_API_KEY`, `DELETED_REMOTE_PRODUCTION_API_KEY`, `CREATED_TEST_API_KEY`, `DELETED_TEST_API_KEY`, `REGENERATED_PRODUCTION_API_KEY`, `INVITED_USER`, `TWO_FACTOR_AUTH_ENABLED`, `TWO_FACTOR_AUTH_DISABLED`, `DELETED_LINKED_ACCOUNT`, `CREATED_DESTINATION`, `DELETED_DESTINATION`, `CHANGED_DESTINATION`, `CHANGED_SCOPES`, `CHANGED_PERSONAL_INFORMATION`, `CHANGED_ORGANIZATION_SETTINGS`, `ENABLED_INTEGRATION`, `DISABLED_INTEGRATION`, `ENABLED_CATEGORY`, `DISABLED_CATEGORY`, `CHANGED_PASSWORD`, `RESET_PASSWORD`, `ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION`, `ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT`, `DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION`, `DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT`, `CREATED_INTEGRATION_WIDE_FIELD_MAPPING`, `CREATED_LINKED_ACCOUNT_FIELD_MAPPING`, `CHANGED_INTEGRATION_WIDE_FIELD_MAPPING`, `CHANGED_LINKED_ACCOUNT_FIELD_MAPPING`, `DELETED_INTEGRATION_WIDE_FIELD_MAPPING`, `DELETED_LINKED_ACCOUNT_FIELD_MAPPING` + - event_type: typing.Optional[str]. If included, will only include events with the given event type. Possible values include: `CREATED_REMOTE_PRODUCTION_API_KEY`, `DELETED_REMOTE_PRODUCTION_API_KEY`, `CREATED_TEST_API_KEY`, `DELETED_TEST_API_KEY`, `REGENERATED_PRODUCTION_API_KEY`, `INVITED_USER`, `TWO_FACTOR_AUTH_ENABLED`, `TWO_FACTOR_AUTH_DISABLED`, `DELETED_LINKED_ACCOUNT`, `CREATED_DESTINATION`, `DELETED_DESTINATION`, `CHANGED_DESTINATION`, `CHANGED_SCOPES`, `CHANGED_PERSONAL_INFORMATION`, `CHANGED_ORGANIZATION_SETTINGS`, `ENABLED_INTEGRATION`, `DISABLED_INTEGRATION`, `ENABLED_CATEGORY`, `DISABLED_CATEGORY`, `CHANGED_PASSWORD`, `RESET_PASSWORD`, `ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION`, `ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT`, `DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION`, `DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT`, `CREATED_INTEGRATION_WIDE_FIELD_MAPPING`, `CREATED_LINKED_ACCOUNT_FIELD_MAPPING`, `CHANGED_INTEGRATION_WIDE_FIELD_MAPPING`, `CHANGED_LINKED_ACCOUNT_FIELD_MAPPING`, `DELETED_INTEGRATION_WIDE_FIELD_MAPPING`, `DELETED_LINKED_ACCOUNT_FIELD_MAPPING`, `FORCED_LINKED_ACCOUNT_RESYNC`, `MUTED_ISSUE`, `GENERATED_MAGIC_LINK` - page_size: typing.Optional[int]. Number of results to return per page. @@ -60,7 +60,7 @@ def list( """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/ats/v1/audit-trail"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "ats/v1/audit-trail"), params=jsonable_encoder( remove_none_from_dict( { @@ -122,7 +122,7 @@ async def list( - end_date: typing.Optional[str]. If included, will only include audit trail events that occurred before this time - - event_type: typing.Optional[str]. If included, will only include events with the given event type. Possible values include: `CREATED_REMOTE_PRODUCTION_API_KEY`, `DELETED_REMOTE_PRODUCTION_API_KEY`, `CREATED_TEST_API_KEY`, `DELETED_TEST_API_KEY`, `REGENERATED_PRODUCTION_API_KEY`, `INVITED_USER`, `TWO_FACTOR_AUTH_ENABLED`, `TWO_FACTOR_AUTH_DISABLED`, `DELETED_LINKED_ACCOUNT`, `CREATED_DESTINATION`, `DELETED_DESTINATION`, `CHANGED_DESTINATION`, `CHANGED_SCOPES`, `CHANGED_PERSONAL_INFORMATION`, `CHANGED_ORGANIZATION_SETTINGS`, `ENABLED_INTEGRATION`, `DISABLED_INTEGRATION`, `ENABLED_CATEGORY`, `DISABLED_CATEGORY`, `CHANGED_PASSWORD`, `RESET_PASSWORD`, `ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION`, `ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT`, `DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION`, `DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT`, `CREATED_INTEGRATION_WIDE_FIELD_MAPPING`, `CREATED_LINKED_ACCOUNT_FIELD_MAPPING`, `CHANGED_INTEGRATION_WIDE_FIELD_MAPPING`, `CHANGED_LINKED_ACCOUNT_FIELD_MAPPING`, `DELETED_INTEGRATION_WIDE_FIELD_MAPPING`, `DELETED_LINKED_ACCOUNT_FIELD_MAPPING` + - event_type: typing.Optional[str]. If included, will only include events with the given event type. Possible values include: `CREATED_REMOTE_PRODUCTION_API_KEY`, `DELETED_REMOTE_PRODUCTION_API_KEY`, `CREATED_TEST_API_KEY`, `DELETED_TEST_API_KEY`, `REGENERATED_PRODUCTION_API_KEY`, `INVITED_USER`, `TWO_FACTOR_AUTH_ENABLED`, `TWO_FACTOR_AUTH_DISABLED`, `DELETED_LINKED_ACCOUNT`, `CREATED_DESTINATION`, `DELETED_DESTINATION`, `CHANGED_DESTINATION`, `CHANGED_SCOPES`, `CHANGED_PERSONAL_INFORMATION`, `CHANGED_ORGANIZATION_SETTINGS`, `ENABLED_INTEGRATION`, `DISABLED_INTEGRATION`, `ENABLED_CATEGORY`, `DISABLED_CATEGORY`, `CHANGED_PASSWORD`, `RESET_PASSWORD`, `ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION`, `ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT`, `DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION`, `DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT`, `CREATED_INTEGRATION_WIDE_FIELD_MAPPING`, `CREATED_LINKED_ACCOUNT_FIELD_MAPPING`, `CHANGED_INTEGRATION_WIDE_FIELD_MAPPING`, `CHANGED_LINKED_ACCOUNT_FIELD_MAPPING`, `DELETED_INTEGRATION_WIDE_FIELD_MAPPING`, `DELETED_LINKED_ACCOUNT_FIELD_MAPPING`, `FORCED_LINKED_ACCOUNT_RESYNC`, `MUTED_ISSUE`, `GENERATED_MAGIC_LINK` - page_size: typing.Optional[int]. Number of results to return per page. @@ -142,7 +142,7 @@ async def list( """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/ats/v1/audit-trail"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "ats/v1/audit-trail"), params=jsonable_encoder( remove_none_from_dict( { diff --git a/src/merge/resources/ats/resources/available_actions/client.py b/src/merge/resources/ats/resources/available_actions/client.py index f01c6d39..3ed04abb 100644 --- a/src/merge/resources/ats/resources/available_actions/client.py +++ b/src/merge/resources/ats/resources/available_actions/client.py @@ -38,7 +38,7 @@ def retrieve(self, *, request_options: typing.Optional[RequestOptions] = None) - """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/ats/v1/available-actions"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "ats/v1/available-actions"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -84,7 +84,7 @@ async def retrieve(self, *, request_options: typing.Optional[RequestOptions] = N """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/ats/v1/available-actions"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "ats/v1/available-actions"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), diff --git a/src/merge/resources/ats/resources/candidates/client.py b/src/merge/resources/ats/resources/candidates/client.py index 9c26a69f..34ea9e15 100644 --- a/src/merge/resources/ats/resources/candidates/client.py +++ b/src/merge/resources/ats/resources/candidates/client.py @@ -88,19 +88,16 @@ def list( - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from merge.client import Merge - from merge.resources.ats import CandidatesListRequestExpand client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) - client.ats.candidates.list( - expand=CandidatesListRequestExpand.APPLICATIONS, - ) + client.ats.candidates.list() """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/ats/v1/candidates"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "ats/v1/candidates"), params=jsonable_encoder( remove_none_from_dict( { @@ -169,8 +166,6 @@ def create( - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- - import datetime - from merge.client import Merge from merge.resources.ats import CandidateRequest @@ -179,24 +174,13 @@ def create( api_key="YOUR_API_KEY", ) client.ats.candidates.create( - model=CandidateRequest( - first_name="Gil", - last_name="Feig", - company="Columbia Dining App.", - title="Software Engineer", - last_interaction_at=datetime.datetime.fromisoformat( - "2021-10-17 00:00:00+00:00", - ), - is_private=True, - can_email=True, - remote_template_id="92830948203", - ), - remote_user_id="string", + model=CandidateRequest(), + remote_user_id="remote_user_id", ) """ _response = self._client_wrapper.httpx_client.request( "POST", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/ats/v1/candidates"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "ats/v1/candidates"), params=jsonable_encoder( remove_none_from_dict( { @@ -257,20 +241,18 @@ def retrieve( - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from merge.client import Merge - from merge.resources.ats import CandidatesRetrieveRequestExpand client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) client.ats.candidates.retrieve( - id="string", - expand=CandidatesRetrieveRequestExpand.APPLICATIONS, + id="id", ) """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"api/ats/v1/candidates/{id}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"ats/v1/candidates/{id}"), params=jsonable_encoder( remove_none_from_dict( { @@ -330,8 +312,6 @@ def partial_update( - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- - import datetime - from merge.client import Merge from merge.resources.ats import PatchedCandidateRequest @@ -340,25 +320,14 @@ def partial_update( api_key="YOUR_API_KEY", ) client.ats.candidates.partial_update( - id="string", - model=PatchedCandidateRequest( - first_name="Gil", - last_name="Feig", - company="Columbia Dining App.", - title="Software Engineer", - last_interaction_at=datetime.datetime.fromisoformat( - "2021-10-17 00:00:00+00:00", - ), - is_private=True, - can_email=True, - remote_template_id="92830948203", - ), - remote_user_id="string", + id="id", + model=PatchedCandidateRequest(), + remote_user_id="remote_user_id", ) """ _response = self._client_wrapper.httpx_client.request( "PATCH", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"api/ats/v1/candidates/{id}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"ats/v1/candidates/{id}"), params=jsonable_encoder( remove_none_from_dict( { @@ -426,7 +395,7 @@ def ignore_create( api_key="YOUR_API_KEY", ) client.ats.candidates.ignore_create( - model_id="string", + model_id="model_id", reason=ReasonEnum.GENERAL_CUSTOMER_REQUEST, message="deletion request by user id 51903790-7dfe-4053-8d63-5a10cc4ffd39", ) @@ -436,7 +405,7 @@ def ignore_create( _request["message"] = message _response = self._client_wrapper.httpx_client.request( "POST", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"api/ats/v1/candidates/ignore/{model_id}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"ats/v1/candidates/ignore/{model_id}"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -482,12 +451,12 @@ def meta_patch_retrieve(self, id: str, *, request_options: typing.Optional[Reque api_key="YOUR_API_KEY", ) client.ats.candidates.meta_patch_retrieve( - id="string", + id="id", ) """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"api/ats/v1/candidates/meta/patch/{id}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"ats/v1/candidates/meta/patch/{id}"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -528,7 +497,7 @@ def meta_post_retrieve(self, *, request_options: typing.Optional[RequestOptions] """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/ats/v1/candidates/meta/post"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "ats/v1/candidates/meta/post"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -611,19 +580,16 @@ async def list( - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from merge.client import AsyncMerge - from merge.resources.ats import CandidatesListRequestExpand client = AsyncMerge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) - await client.ats.candidates.list( - expand=CandidatesListRequestExpand.APPLICATIONS, - ) + await client.ats.candidates.list() """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/ats/v1/candidates"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "ats/v1/candidates"), params=jsonable_encoder( remove_none_from_dict( { @@ -692,8 +658,6 @@ async def create( - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- - import datetime - from merge.client import AsyncMerge from merge.resources.ats import CandidateRequest @@ -702,24 +666,13 @@ async def create( api_key="YOUR_API_KEY", ) await client.ats.candidates.create( - model=CandidateRequest( - first_name="Gil", - last_name="Feig", - company="Columbia Dining App.", - title="Software Engineer", - last_interaction_at=datetime.datetime.fromisoformat( - "2021-10-17 00:00:00+00:00", - ), - is_private=True, - can_email=True, - remote_template_id="92830948203", - ), - remote_user_id="string", + model=CandidateRequest(), + remote_user_id="remote_user_id", ) """ _response = await self._client_wrapper.httpx_client.request( "POST", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/ats/v1/candidates"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "ats/v1/candidates"), params=jsonable_encoder( remove_none_from_dict( { @@ -780,20 +733,18 @@ async def retrieve( - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from merge.client import AsyncMerge - from merge.resources.ats import CandidatesRetrieveRequestExpand client = AsyncMerge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) await client.ats.candidates.retrieve( - id="string", - expand=CandidatesRetrieveRequestExpand.APPLICATIONS, + id="id", ) """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"api/ats/v1/candidates/{id}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"ats/v1/candidates/{id}"), params=jsonable_encoder( remove_none_from_dict( { @@ -853,8 +804,6 @@ async def partial_update( - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- - import datetime - from merge.client import AsyncMerge from merge.resources.ats import PatchedCandidateRequest @@ -863,25 +812,14 @@ async def partial_update( api_key="YOUR_API_KEY", ) await client.ats.candidates.partial_update( - id="string", - model=PatchedCandidateRequest( - first_name="Gil", - last_name="Feig", - company="Columbia Dining App.", - title="Software Engineer", - last_interaction_at=datetime.datetime.fromisoformat( - "2021-10-17 00:00:00+00:00", - ), - is_private=True, - can_email=True, - remote_template_id="92830948203", - ), - remote_user_id="string", + id="id", + model=PatchedCandidateRequest(), + remote_user_id="remote_user_id", ) """ _response = await self._client_wrapper.httpx_client.request( "PATCH", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"api/ats/v1/candidates/{id}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"ats/v1/candidates/{id}"), params=jsonable_encoder( remove_none_from_dict( { @@ -949,7 +887,7 @@ async def ignore_create( api_key="YOUR_API_KEY", ) await client.ats.candidates.ignore_create( - model_id="string", + model_id="model_id", reason=ReasonEnum.GENERAL_CUSTOMER_REQUEST, message="deletion request by user id 51903790-7dfe-4053-8d63-5a10cc4ffd39", ) @@ -959,7 +897,7 @@ async def ignore_create( _request["message"] = message _response = await self._client_wrapper.httpx_client.request( "POST", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"api/ats/v1/candidates/ignore/{model_id}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"ats/v1/candidates/ignore/{model_id}"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -1007,12 +945,12 @@ async def meta_patch_retrieve( api_key="YOUR_API_KEY", ) await client.ats.candidates.meta_patch_retrieve( - id="string", + id="id", ) """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"api/ats/v1/candidates/meta/patch/{id}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"ats/v1/candidates/meta/patch/{id}"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -1053,7 +991,7 @@ async def meta_post_retrieve(self, *, request_options: typing.Optional[RequestOp """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/ats/v1/candidates/meta/post"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "ats/v1/candidates/meta/post"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), diff --git a/src/merge/resources/ats/resources/delete_account/client.py b/src/merge/resources/ats/resources/delete_account/client.py index ce21ef59..525e6545 100644 --- a/src/merge/resources/ats/resources/delete_account/client.py +++ b/src/merge/resources/ats/resources/delete_account/client.py @@ -32,7 +32,7 @@ def delete(self, *, request_options: typing.Optional[RequestOptions] = None) -> """ _response = self._client_wrapper.httpx_client.request( "POST", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/ats/v1/delete-account"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "ats/v1/delete-account"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -81,7 +81,7 @@ async def delete(self, *, request_options: typing.Optional[RequestOptions] = Non """ _response = await self._client_wrapper.httpx_client.request( "POST", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/ats/v1/delete-account"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "ats/v1/delete-account"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), diff --git a/src/merge/resources/ats/resources/departments/client.py b/src/merge/resources/ats/resources/departments/client.py index 18251d76..07f5e1ac 100644 --- a/src/merge/resources/ats/resources/departments/client.py +++ b/src/merge/resources/ats/resources/departments/client.py @@ -72,7 +72,7 @@ def list( """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/ats/v1/departments"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "ats/v1/departments"), params=jsonable_encoder( remove_none_from_dict( { @@ -137,12 +137,12 @@ def retrieve( api_key="YOUR_API_KEY", ) client.ats.departments.retrieve( - id="string", + id="id", ) """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"api/ats/v1/departments/{id}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"ats/v1/departments/{id}"), params=jsonable_encoder( remove_none_from_dict( { @@ -228,7 +228,7 @@ async def list( """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/ats/v1/departments"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "ats/v1/departments"), params=jsonable_encoder( remove_none_from_dict( { @@ -293,12 +293,12 @@ async def retrieve( api_key="YOUR_API_KEY", ) await client.ats.departments.retrieve( - id="string", + id="id", ) """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"api/ats/v1/departments/{id}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"ats/v1/departments/{id}"), params=jsonable_encoder( remove_none_from_dict( { diff --git a/src/merge/resources/ats/resources/eeocs/client.py b/src/merge/resources/ats/resources/eeocs/client.py index 93e6d500..53d897e9 100644 --- a/src/merge/resources/ats/resources/eeocs/client.py +++ b/src/merge/resources/ats/resources/eeocs/client.py @@ -74,29 +74,21 @@ def list( - remote_id: typing.Optional[str]. The API provider's ID for the given object. - - show_enum_origins: typing.Optional[EeocsListRequestShowEnumOrigins]. Which fields should be returned in non-normalized form. + - show_enum_origins: typing.Optional[EeocsListRequestShowEnumOrigins]. A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from merge.client import Merge - from merge.resources.ats import ( - EeocsListRequestRemoteFields, - EeocsListRequestShowEnumOrigins, - ) client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) - client.ats.eeocs.list( - expand="candidate", - remote_fields=EeocsListRequestRemoteFields.DISABILITY_STATUS, - show_enum_origins=EeocsListRequestShowEnumOrigins.DISABILITY_STATUS, - ) + client.ats.eeocs.list() """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/ats/v1/eeocs"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "ats/v1/eeocs"), params=jsonable_encoder( remove_none_from_dict( { @@ -163,30 +155,23 @@ def retrieve( - remote_fields: typing.Optional[EeocsRetrieveRequestRemoteFields]. Deprecated. Use show_enum_origins. - - show_enum_origins: typing.Optional[EeocsRetrieveRequestShowEnumOrigins]. Which fields should be returned in non-normalized form. + - show_enum_origins: typing.Optional[EeocsRetrieveRequestShowEnumOrigins]. A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from merge.client import Merge - from merge.resources.ats import ( - EeocsRetrieveRequestRemoteFields, - EeocsRetrieveRequestShowEnumOrigins, - ) client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) client.ats.eeocs.retrieve( - id="string", - expand="candidate", - remote_fields=EeocsRetrieveRequestRemoteFields.DISABILITY_STATUS, - show_enum_origins=EeocsRetrieveRequestShowEnumOrigins.DISABILITY_STATUS, + id="id", ) """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"api/ats/v1/eeocs/{id}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"ats/v1/eeocs/{id}"), params=jsonable_encoder( remove_none_from_dict( { @@ -273,29 +258,21 @@ async def list( - remote_id: typing.Optional[str]. The API provider's ID for the given object. - - show_enum_origins: typing.Optional[EeocsListRequestShowEnumOrigins]. Which fields should be returned in non-normalized form. + - show_enum_origins: typing.Optional[EeocsListRequestShowEnumOrigins]. A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from merge.client import AsyncMerge - from merge.resources.ats import ( - EeocsListRequestRemoteFields, - EeocsListRequestShowEnumOrigins, - ) client = AsyncMerge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) - await client.ats.eeocs.list( - expand="candidate", - remote_fields=EeocsListRequestRemoteFields.DISABILITY_STATUS, - show_enum_origins=EeocsListRequestShowEnumOrigins.DISABILITY_STATUS, - ) + await client.ats.eeocs.list() """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/ats/v1/eeocs"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "ats/v1/eeocs"), params=jsonable_encoder( remove_none_from_dict( { @@ -362,30 +339,23 @@ async def retrieve( - remote_fields: typing.Optional[EeocsRetrieveRequestRemoteFields]. Deprecated. Use show_enum_origins. - - show_enum_origins: typing.Optional[EeocsRetrieveRequestShowEnumOrigins]. Which fields should be returned in non-normalized form. + - show_enum_origins: typing.Optional[EeocsRetrieveRequestShowEnumOrigins]. A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from merge.client import AsyncMerge - from merge.resources.ats import ( - EeocsRetrieveRequestRemoteFields, - EeocsRetrieveRequestShowEnumOrigins, - ) client = AsyncMerge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) await client.ats.eeocs.retrieve( - id="string", - expand="candidate", - remote_fields=EeocsRetrieveRequestRemoteFields.DISABILITY_STATUS, - show_enum_origins=EeocsRetrieveRequestShowEnumOrigins.DISABILITY_STATUS, + id="id", ) """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"api/ats/v1/eeocs/{id}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"ats/v1/eeocs/{id}"), params=jsonable_encoder( remove_none_from_dict( { diff --git a/src/merge/resources/ats/resources/field_mapping/client.py b/src/merge/resources/ats/resources/field_mapping/client.py index b7414e44..2b07d548 100644 --- a/src/merge/resources/ats/resources/field_mapping/client.py +++ b/src/merge/resources/ats/resources/field_mapping/client.py @@ -46,7 +46,7 @@ def field_mappings_retrieve( """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/ats/v1/field-mappings"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "ats/v1/field-mappings"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -116,7 +116,7 @@ def field_mappings_create( """ _response = self._client_wrapper.httpx_client.request( "POST", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/ats/v1/field-mappings"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "ats/v1/field-mappings"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -182,13 +182,13 @@ def field_mappings_destroy( api_key="YOUR_API_KEY", ) client.ats.field_mapping.field_mappings_destroy( - field_mapping_id="string", + field_mapping_id="field_mapping_id", ) """ _response = self._client_wrapper.httpx_client.request( "DELETE", urllib.parse.urljoin( - f"{self._client_wrapper.get_base_url()}/", f"api/ats/v1/field-mappings/{field_mapping_id}" + f"{self._client_wrapper.get_base_url()}/", f"ats/v1/field-mappings/{field_mapping_id}" ), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None @@ -243,7 +243,7 @@ def field_mappings_partial_update( api_key="YOUR_API_KEY", ) client.ats.field_mapping.field_mappings_partial_update( - field_mapping_id="string", + field_mapping_id="field_mapping_id", remote_method="GET", remote_url_path="/example-url-path", ) @@ -258,7 +258,7 @@ def field_mappings_partial_update( _response = self._client_wrapper.httpx_client.request( "PATCH", urllib.parse.urljoin( - f"{self._client_wrapper.get_base_url()}/", f"api/ats/v1/field-mappings/{field_mapping_id}" + f"{self._client_wrapper.get_base_url()}/", f"ats/v1/field-mappings/{field_mapping_id}" ), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None @@ -316,7 +316,7 @@ def remote_fields_retrieve( """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/ats/v1/remote-fields"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "ats/v1/remote-fields"), params=jsonable_encoder( remove_none_from_dict( { @@ -369,7 +369,7 @@ def target_fields_retrieve( """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/ats/v1/target-fields"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "ats/v1/target-fields"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -417,7 +417,7 @@ async def field_mappings_retrieve( """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/ats/v1/field-mappings"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "ats/v1/field-mappings"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -487,7 +487,7 @@ async def field_mappings_create( """ _response = await self._client_wrapper.httpx_client.request( "POST", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/ats/v1/field-mappings"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "ats/v1/field-mappings"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -553,13 +553,13 @@ async def field_mappings_destroy( api_key="YOUR_API_KEY", ) await client.ats.field_mapping.field_mappings_destroy( - field_mapping_id="string", + field_mapping_id="field_mapping_id", ) """ _response = await self._client_wrapper.httpx_client.request( "DELETE", urllib.parse.urljoin( - f"{self._client_wrapper.get_base_url()}/", f"api/ats/v1/field-mappings/{field_mapping_id}" + f"{self._client_wrapper.get_base_url()}/", f"ats/v1/field-mappings/{field_mapping_id}" ), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None @@ -614,7 +614,7 @@ async def field_mappings_partial_update( api_key="YOUR_API_KEY", ) await client.ats.field_mapping.field_mappings_partial_update( - field_mapping_id="string", + field_mapping_id="field_mapping_id", remote_method="GET", remote_url_path="/example-url-path", ) @@ -629,7 +629,7 @@ async def field_mappings_partial_update( _response = await self._client_wrapper.httpx_client.request( "PATCH", urllib.parse.urljoin( - f"{self._client_wrapper.get_base_url()}/", f"api/ats/v1/field-mappings/{field_mapping_id}" + f"{self._client_wrapper.get_base_url()}/", f"ats/v1/field-mappings/{field_mapping_id}" ), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None @@ -687,7 +687,7 @@ async def remote_fields_retrieve( """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/ats/v1/remote-fields"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "ats/v1/remote-fields"), params=jsonable_encoder( remove_none_from_dict( { @@ -740,7 +740,7 @@ async def target_fields_retrieve( """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/ats/v1/target-fields"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "ats/v1/target-fields"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), diff --git a/src/merge/resources/ats/resources/force_resync/client.py b/src/merge/resources/ats/resources/force_resync/client.py index 133cd1ee..c5fef45b 100644 --- a/src/merge/resources/ats/resources/force_resync/client.py +++ b/src/merge/resources/ats/resources/force_resync/client.py @@ -40,7 +40,7 @@ def sync_status_resync_create( """ _response = self._client_wrapper.httpx_client.request( "POST", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/ats/v1/sync-status/resync"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "ats/v1/sync-status/resync"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -91,7 +91,7 @@ async def sync_status_resync_create( """ _response = await self._client_wrapper.httpx_client.request( "POST", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/ats/v1/sync-status/resync"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "ats/v1/sync-status/resync"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), diff --git a/src/merge/resources/ats/resources/generate_key/client.py b/src/merge/resources/ats/resources/generate_key/client.py index cb300c70..83a3a668 100644 --- a/src/merge/resources/ats/resources/generate_key/client.py +++ b/src/merge/resources/ats/resources/generate_key/client.py @@ -29,7 +29,7 @@ def create(self, *, name: str, request_options: typing.Optional[RequestOptions] Create a remote key. Parameters: - - name: str. + - name: str. The name of the remote key - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- @@ -45,7 +45,7 @@ def create(self, *, name: str, request_options: typing.Optional[RequestOptions] """ _response = self._client_wrapper.httpx_client.request( "POST", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/ats/v1/generate-key"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "ats/v1/generate-key"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -85,7 +85,7 @@ async def create(self, *, name: str, request_options: typing.Optional[RequestOpt Create a remote key. Parameters: - - name: str. + - name: str. The name of the remote key - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- @@ -101,7 +101,7 @@ async def create(self, *, name: str, request_options: typing.Optional[RequestOpt """ _response = await self._client_wrapper.httpx_client.request( "POST", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/ats/v1/generate-key"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "ats/v1/generate-key"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), diff --git a/src/merge/resources/ats/resources/interviews/client.py b/src/merge/resources/ats/resources/interviews/client.py index eaa0c019..e69fc8b6 100644 --- a/src/merge/resources/ats/resources/interviews/client.py +++ b/src/merge/resources/ats/resources/interviews/client.py @@ -87,26 +87,21 @@ def list( - remote_id: typing.Optional[str]. The API provider's ID for the given object. - - show_enum_origins: typing.Optional[typing.Literal["status"]]. Which fields should be returned in non-normalized form. + - show_enum_origins: typing.Optional[typing.Literal["status"]]. A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from merge.client import Merge - from merge.resources.ats import InterviewsListRequestExpand client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) - client.ats.interviews.list( - expand=InterviewsListRequestExpand.APPLICATION, - remote_fields="status", - show_enum_origins="status", - ) + client.ats.interviews.list() """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/ats/v1/interviews"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "ats/v1/interviews"), params=jsonable_encoder( remove_none_from_dict( { @@ -177,8 +172,6 @@ def create( - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- - import datetime - from merge.client import Merge from merge.resources.ats import ScheduledInterviewRequest @@ -187,21 +180,13 @@ def create( api_key="YOUR_API_KEY", ) client.ats.interviews.create( - model=ScheduledInterviewRequest( - location="Embarcadero Center 2", - start_at=datetime.datetime.fromisoformat( - "2021-10-15 00:00:00+00:00", - ), - end_at=datetime.datetime.fromisoformat( - "2021-10-15 02:00:00+00:00", - ), - ), - remote_user_id="string", + model=ScheduledInterviewRequest(), + remote_user_id="remote_user_id", ) """ _response = self._client_wrapper.httpx_client.request( "POST", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/ats/v1/interviews"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "ats/v1/interviews"), params=jsonable_encoder( remove_none_from_dict( { @@ -263,27 +248,23 @@ def retrieve( - remote_fields: typing.Optional[typing.Literal["status"]]. Deprecated. Use show_enum_origins. - - show_enum_origins: typing.Optional[typing.Literal["status"]]. Which fields should be returned in non-normalized form. + - show_enum_origins: typing.Optional[typing.Literal["status"]]. A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from merge.client import Merge - from merge.resources.ats import InterviewsRetrieveRequestExpand client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) client.ats.interviews.retrieve( - id="string", - expand=InterviewsRetrieveRequestExpand.APPLICATION, - remote_fields="status", - show_enum_origins="status", + id="id", ) """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"api/ats/v1/interviews/{id}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"ats/v1/interviews/{id}"), params=jsonable_encoder( remove_none_from_dict( { @@ -336,7 +317,7 @@ def meta_post_retrieve(self, *, request_options: typing.Optional[RequestOptions] """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/ats/v1/interviews/meta/post"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "ats/v1/interviews/meta/post"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -420,26 +401,21 @@ async def list( - remote_id: typing.Optional[str]. The API provider's ID for the given object. - - show_enum_origins: typing.Optional[typing.Literal["status"]]. Which fields should be returned in non-normalized form. + - show_enum_origins: typing.Optional[typing.Literal["status"]]. A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from merge.client import AsyncMerge - from merge.resources.ats import InterviewsListRequestExpand client = AsyncMerge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) - await client.ats.interviews.list( - expand=InterviewsListRequestExpand.APPLICATION, - remote_fields="status", - show_enum_origins="status", - ) + await client.ats.interviews.list() """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/ats/v1/interviews"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "ats/v1/interviews"), params=jsonable_encoder( remove_none_from_dict( { @@ -510,8 +486,6 @@ async def create( - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- - import datetime - from merge.client import AsyncMerge from merge.resources.ats import ScheduledInterviewRequest @@ -520,21 +494,13 @@ async def create( api_key="YOUR_API_KEY", ) await client.ats.interviews.create( - model=ScheduledInterviewRequest( - location="Embarcadero Center 2", - start_at=datetime.datetime.fromisoformat( - "2021-10-15 00:00:00+00:00", - ), - end_at=datetime.datetime.fromisoformat( - "2021-10-15 02:00:00+00:00", - ), - ), - remote_user_id="string", + model=ScheduledInterviewRequest(), + remote_user_id="remote_user_id", ) """ _response = await self._client_wrapper.httpx_client.request( "POST", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/ats/v1/interviews"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "ats/v1/interviews"), params=jsonable_encoder( remove_none_from_dict( { @@ -596,27 +562,23 @@ async def retrieve( - remote_fields: typing.Optional[typing.Literal["status"]]. Deprecated. Use show_enum_origins. - - show_enum_origins: typing.Optional[typing.Literal["status"]]. Which fields should be returned in non-normalized form. + - show_enum_origins: typing.Optional[typing.Literal["status"]]. A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from merge.client import AsyncMerge - from merge.resources.ats import InterviewsRetrieveRequestExpand client = AsyncMerge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) await client.ats.interviews.retrieve( - id="string", - expand=InterviewsRetrieveRequestExpand.APPLICATION, - remote_fields="status", - show_enum_origins="status", + id="id", ) """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"api/ats/v1/interviews/{id}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"ats/v1/interviews/{id}"), params=jsonable_encoder( remove_none_from_dict( { @@ -669,7 +631,7 @@ async def meta_post_retrieve(self, *, request_options: typing.Optional[RequestOp """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/ats/v1/interviews/meta/post"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "ats/v1/interviews/meta/post"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), diff --git a/src/merge/resources/ats/resources/issues/client.py b/src/merge/resources/ats/resources/issues/client.py index 94973d73..ab762c57 100644 --- a/src/merge/resources/ats/resources/issues/client.py +++ b/src/merge/resources/ats/resources/issues/client.py @@ -78,19 +78,16 @@ def list( - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from merge.client import Merge - from merge.resources.ats import IssuesListRequestStatus client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) - client.ats.issues.list( - status=IssuesListRequestStatus.ONGOING, - ) + client.ats.issues.list() """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/ats/v1/issues"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "ats/v1/issues"), params=jsonable_encoder( remove_none_from_dict( { @@ -159,12 +156,12 @@ def retrieve(self, id: str, *, request_options: typing.Optional[RequestOptions] api_key="YOUR_API_KEY", ) client.ats.issues.retrieve( - id="string", + id="id", ) """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"api/ats/v1/issues/{id}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"ats/v1/issues/{id}"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -246,19 +243,16 @@ async def list( - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from merge.client import AsyncMerge - from merge.resources.ats import IssuesListRequestStatus client = AsyncMerge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) - await client.ats.issues.list( - status=IssuesListRequestStatus.ONGOING, - ) + await client.ats.issues.list() """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/ats/v1/issues"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "ats/v1/issues"), params=jsonable_encoder( remove_none_from_dict( { @@ -327,12 +321,12 @@ async def retrieve(self, id: str, *, request_options: typing.Optional[RequestOpt api_key="YOUR_API_KEY", ) await client.ats.issues.retrieve( - id="string", + id="id", ) """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"api/ats/v1/issues/{id}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"ats/v1/issues/{id}"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), diff --git a/src/merge/resources/ats/resources/job_interview_stages/client.py b/src/merge/resources/ats/resources/job_interview_stages/client.py index 3b4fae17..41cb4b5b 100644 --- a/src/merge/resources/ats/resources/job_interview_stages/client.py +++ b/src/merge/resources/ats/resources/job_interview_stages/client.py @@ -74,13 +74,11 @@ def list( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) - client.ats.job_interview_stages.list( - expand="job", - ) + client.ats.job_interview_stages.list() """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/ats/v1/job-interview-stages"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "ats/v1/job-interview-stages"), params=jsonable_encoder( remove_none_from_dict( { @@ -150,13 +148,12 @@ def retrieve( api_key="YOUR_API_KEY", ) client.ats.job_interview_stages.retrieve( - id="string", - expand="job", + id="id", ) """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"api/ats/v1/job-interview-stages/{id}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"ats/v1/job-interview-stages/{id}"), params=jsonable_encoder( remove_none_from_dict( { @@ -245,13 +242,11 @@ async def list( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) - await client.ats.job_interview_stages.list( - expand="job", - ) + await client.ats.job_interview_stages.list() """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/ats/v1/job-interview-stages"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "ats/v1/job-interview-stages"), params=jsonable_encoder( remove_none_from_dict( { @@ -321,13 +316,12 @@ async def retrieve( api_key="YOUR_API_KEY", ) await client.ats.job_interview_stages.retrieve( - id="string", - expand="job", + id="id", ) """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"api/ats/v1/job-interview-stages/{id}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"ats/v1/job-interview-stages/{id}"), params=jsonable_encoder( remove_none_from_dict( { diff --git a/src/merge/resources/ats/resources/job_postings/__init__.py b/src/merge/resources/ats/resources/job_postings/__init__.py new file mode 100644 index 00000000..d2e41380 --- /dev/null +++ b/src/merge/resources/ats/resources/job_postings/__init__.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +from .types import JobPostingsListRequestStatus + +__all__ = ["JobPostingsListRequestStatus"] diff --git a/src/merge/resources/ats/resources/job_postings/client.py b/src/merge/resources/ats/resources/job_postings/client.py new file mode 100644 index 00000000..26c77ec7 --- /dev/null +++ b/src/merge/resources/ats/resources/job_postings/client.py @@ -0,0 +1,351 @@ +# This file was auto-generated by Fern from our API Definition. + +import datetime as dt +import typing +import urllib.parse +from json.decoder import JSONDecodeError + +from .....core.api_error import ApiError +from .....core.client_wrapper import AsyncClientWrapper, SyncClientWrapper +from .....core.datetime_utils import serialize_datetime +from .....core.jsonable_encoder import jsonable_encoder +from .....core.remove_none_from_dict import remove_none_from_dict +from .....core.request_options import RequestOptions +from ...types.job_posting import JobPosting +from ...types.paginated_job_posting_list import PaginatedJobPostingList +from .types.job_postings_list_request_status import JobPostingsListRequestStatus + +try: + import pydantic.v1 as pydantic # type: ignore +except ImportError: + import pydantic # type: ignore + + +class JobPostingsClient: + def __init__(self, *, client_wrapper: SyncClientWrapper): + self._client_wrapper = client_wrapper + + def list( + self, + *, + created_after: typing.Optional[dt.datetime] = None, + created_before: typing.Optional[dt.datetime] = None, + cursor: typing.Optional[str] = None, + include_deleted_data: typing.Optional[bool] = None, + include_remote_data: typing.Optional[bool] = None, + modified_after: typing.Optional[dt.datetime] = None, + modified_before: typing.Optional[dt.datetime] = None, + page_size: typing.Optional[int] = None, + remote_id: typing.Optional[str] = None, + status: typing.Optional[JobPostingsListRequestStatus] = None, + request_options: typing.Optional[RequestOptions] = None, + ) -> PaginatedJobPostingList: + """ + Returns a list of `JobPosting` objects. + + Parameters: + - created_after: typing.Optional[dt.datetime]. If provided, will only return objects created after this datetime. + + - created_before: typing.Optional[dt.datetime]. If provided, will only return objects created before this datetime. + + - cursor: typing.Optional[str]. The pagination cursor value. + + - include_deleted_data: typing.Optional[bool]. Whether to include data that was marked as deleted by third party webhooks. + + - include_remote_data: typing.Optional[bool]. Whether to include the original data Merge fetched from the third-party to produce these models. + + - modified_after: typing.Optional[dt.datetime]. If provided, only objects synced by Merge after this date time will be returned. + + - modified_before: typing.Optional[dt.datetime]. If provided, only objects synced by Merge before this date time will be returned. + + - page_size: typing.Optional[int]. Number of results to return per page. + + - remote_id: typing.Optional[str]. The API provider's ID for the given object. + + - status: typing.Optional[JobPostingsListRequestStatus]. If provided, will only return Job Postings with this status. Options: ('PUBLISHED', 'CLOSED', 'DRAFT', 'INTERNAL', 'PENDING') + + - `PUBLISHED` - PUBLISHED + - `CLOSED` - CLOSED + - `DRAFT` - DRAFT + - `INTERNAL` - INTERNAL + - `PENDING` - PENDING + - request_options: typing.Optional[RequestOptions]. Request-specific configuration. + --- + from merge.client import Merge + + client = Merge( + account_token="YOUR_ACCOUNT_TOKEN", + api_key="YOUR_API_KEY", + ) + client.ats.job_postings.list() + """ + _response = self._client_wrapper.httpx_client.request( + "GET", + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "ats/v1/job-postings"), + params=jsonable_encoder( + remove_none_from_dict( + { + "created_after": serialize_datetime(created_after) if created_after is not None else None, + "created_before": serialize_datetime(created_before) if created_before is not None else None, + "cursor": cursor, + "include_deleted_data": include_deleted_data, + "include_remote_data": include_remote_data, + "modified_after": serialize_datetime(modified_after) if modified_after is not None else None, + "modified_before": serialize_datetime(modified_before) if modified_before is not None else None, + "page_size": page_size, + "remote_id": remote_id, + "status": status, + **( + request_options.get("additional_query_parameters", {}) + if request_options is not None + else {} + ), + } + ) + ), + headers=jsonable_encoder( + remove_none_from_dict( + { + **self._client_wrapper.get_headers(), + **(request_options.get("additional_headers", {}) if request_options is not None else {}), + } + ) + ), + timeout=request_options.get("timeout_in_seconds") + if request_options is not None and request_options.get("timeout_in_seconds") is not None + else 60, + ) + if 200 <= _response.status_code < 300: + return pydantic.parse_obj_as(PaginatedJobPostingList, _response.json()) # type: ignore + try: + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) + + def retrieve( + self, + id: str, + *, + include_remote_data: typing.Optional[bool] = None, + request_options: typing.Optional[RequestOptions] = None, + ) -> JobPosting: + """ + Returns a `JobPosting` object with the given `id`. + + Parameters: + - id: str. + + - include_remote_data: typing.Optional[bool]. Whether to include the original data Merge fetched from the third-party to produce these models. + + - request_options: typing.Optional[RequestOptions]. Request-specific configuration. + --- + from merge.client import Merge + + client = Merge( + account_token="YOUR_ACCOUNT_TOKEN", + api_key="YOUR_API_KEY", + ) + client.ats.job_postings.retrieve( + id="id", + ) + """ + _response = self._client_wrapper.httpx_client.request( + "GET", + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"ats/v1/job-postings/{id}"), + params=jsonable_encoder( + remove_none_from_dict( + { + "include_remote_data": include_remote_data, + **( + request_options.get("additional_query_parameters", {}) + if request_options is not None + else {} + ), + } + ) + ), + headers=jsonable_encoder( + remove_none_from_dict( + { + **self._client_wrapper.get_headers(), + **(request_options.get("additional_headers", {}) if request_options is not None else {}), + } + ) + ), + timeout=request_options.get("timeout_in_seconds") + if request_options is not None and request_options.get("timeout_in_seconds") is not None + else 60, + ) + if 200 <= _response.status_code < 300: + return pydantic.parse_obj_as(JobPosting, _response.json()) # type: ignore + try: + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) + + +class AsyncJobPostingsClient: + def __init__(self, *, client_wrapper: AsyncClientWrapper): + self._client_wrapper = client_wrapper + + async def list( + self, + *, + created_after: typing.Optional[dt.datetime] = None, + created_before: typing.Optional[dt.datetime] = None, + cursor: typing.Optional[str] = None, + include_deleted_data: typing.Optional[bool] = None, + include_remote_data: typing.Optional[bool] = None, + modified_after: typing.Optional[dt.datetime] = None, + modified_before: typing.Optional[dt.datetime] = None, + page_size: typing.Optional[int] = None, + remote_id: typing.Optional[str] = None, + status: typing.Optional[JobPostingsListRequestStatus] = None, + request_options: typing.Optional[RequestOptions] = None, + ) -> PaginatedJobPostingList: + """ + Returns a list of `JobPosting` objects. + + Parameters: + - created_after: typing.Optional[dt.datetime]. If provided, will only return objects created after this datetime. + + - created_before: typing.Optional[dt.datetime]. If provided, will only return objects created before this datetime. + + - cursor: typing.Optional[str]. The pagination cursor value. + + - include_deleted_data: typing.Optional[bool]. Whether to include data that was marked as deleted by third party webhooks. + + - include_remote_data: typing.Optional[bool]. Whether to include the original data Merge fetched from the third-party to produce these models. + + - modified_after: typing.Optional[dt.datetime]. If provided, only objects synced by Merge after this date time will be returned. + + - modified_before: typing.Optional[dt.datetime]. If provided, only objects synced by Merge before this date time will be returned. + + - page_size: typing.Optional[int]. Number of results to return per page. + + - remote_id: typing.Optional[str]. The API provider's ID for the given object. + + - status: typing.Optional[JobPostingsListRequestStatus]. If provided, will only return Job Postings with this status. Options: ('PUBLISHED', 'CLOSED', 'DRAFT', 'INTERNAL', 'PENDING') + + - `PUBLISHED` - PUBLISHED + - `CLOSED` - CLOSED + - `DRAFT` - DRAFT + - `INTERNAL` - INTERNAL + - `PENDING` - PENDING + - request_options: typing.Optional[RequestOptions]. Request-specific configuration. + --- + from merge.client import AsyncMerge + + client = AsyncMerge( + account_token="YOUR_ACCOUNT_TOKEN", + api_key="YOUR_API_KEY", + ) + await client.ats.job_postings.list() + """ + _response = await self._client_wrapper.httpx_client.request( + "GET", + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "ats/v1/job-postings"), + params=jsonable_encoder( + remove_none_from_dict( + { + "created_after": serialize_datetime(created_after) if created_after is not None else None, + "created_before": serialize_datetime(created_before) if created_before is not None else None, + "cursor": cursor, + "include_deleted_data": include_deleted_data, + "include_remote_data": include_remote_data, + "modified_after": serialize_datetime(modified_after) if modified_after is not None else None, + "modified_before": serialize_datetime(modified_before) if modified_before is not None else None, + "page_size": page_size, + "remote_id": remote_id, + "status": status, + **( + request_options.get("additional_query_parameters", {}) + if request_options is not None + else {} + ), + } + ) + ), + headers=jsonable_encoder( + remove_none_from_dict( + { + **self._client_wrapper.get_headers(), + **(request_options.get("additional_headers", {}) if request_options is not None else {}), + } + ) + ), + timeout=request_options.get("timeout_in_seconds") + if request_options is not None and request_options.get("timeout_in_seconds") is not None + else 60, + ) + if 200 <= _response.status_code < 300: + return pydantic.parse_obj_as(PaginatedJobPostingList, _response.json()) # type: ignore + try: + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) + + async def retrieve( + self, + id: str, + *, + include_remote_data: typing.Optional[bool] = None, + request_options: typing.Optional[RequestOptions] = None, + ) -> JobPosting: + """ + Returns a `JobPosting` object with the given `id`. + + Parameters: + - id: str. + + - include_remote_data: typing.Optional[bool]. Whether to include the original data Merge fetched from the third-party to produce these models. + + - request_options: typing.Optional[RequestOptions]. Request-specific configuration. + --- + from merge.client import AsyncMerge + + client = AsyncMerge( + account_token="YOUR_ACCOUNT_TOKEN", + api_key="YOUR_API_KEY", + ) + await client.ats.job_postings.retrieve( + id="id", + ) + """ + _response = await self._client_wrapper.httpx_client.request( + "GET", + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"ats/v1/job-postings/{id}"), + params=jsonable_encoder( + remove_none_from_dict( + { + "include_remote_data": include_remote_data, + **( + request_options.get("additional_query_parameters", {}) + if request_options is not None + else {} + ), + } + ) + ), + headers=jsonable_encoder( + remove_none_from_dict( + { + **self._client_wrapper.get_headers(), + **(request_options.get("additional_headers", {}) if request_options is not None else {}), + } + ) + ), + timeout=request_options.get("timeout_in_seconds") + if request_options is not None and request_options.get("timeout_in_seconds") is not None + else 60, + ) + if 200 <= _response.status_code < 300: + return pydantic.parse_obj_as(JobPosting, _response.json()) # type: ignore + try: + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) diff --git a/src/merge/resources/ats/resources/job_postings/types/__init__.py b/src/merge/resources/ats/resources/job_postings/types/__init__.py new file mode 100644 index 00000000..4d5c3961 --- /dev/null +++ b/src/merge/resources/ats/resources/job_postings/types/__init__.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +from .job_postings_list_request_status import JobPostingsListRequestStatus + +__all__ = ["JobPostingsListRequestStatus"] diff --git a/src/merge/resources/ats/resources/job_postings/types/job_postings_list_request_status.py b/src/merge/resources/ats/resources/job_postings/types/job_postings_list_request_status.py new file mode 100644 index 00000000..adbba7ee --- /dev/null +++ b/src/merge/resources/ats/resources/job_postings/types/job_postings_list_request_status.py @@ -0,0 +1,33 @@ +# This file was auto-generated by Fern from our API Definition. + +import enum +import typing + +T_Result = typing.TypeVar("T_Result") + + +class JobPostingsListRequestStatus(str, enum.Enum): + CLOSED = "CLOSED" + DRAFT = "DRAFT" + INTERNAL = "INTERNAL" + PENDING = "PENDING" + PUBLISHED = "PUBLISHED" + + def visit( + self, + closed: typing.Callable[[], T_Result], + draft: typing.Callable[[], T_Result], + internal: typing.Callable[[], T_Result], + pending: typing.Callable[[], T_Result], + published: typing.Callable[[], T_Result], + ) -> T_Result: + if self is JobPostingsListRequestStatus.CLOSED: + return closed() + if self is JobPostingsListRequestStatus.DRAFT: + return draft() + if self is JobPostingsListRequestStatus.INTERNAL: + return internal() + if self is JobPostingsListRequestStatus.PENDING: + return pending() + if self is JobPostingsListRequestStatus.PUBLISHED: + return published() diff --git a/src/merge/resources/ats/resources/jobs/client.py b/src/merge/resources/ats/resources/jobs/client.py index 256742d4..6233b630 100644 --- a/src/merge/resources/ats/resources/jobs/client.py +++ b/src/merge/resources/ats/resources/jobs/client.py @@ -79,7 +79,7 @@ def list( - remote_id: typing.Optional[str]. The API provider's ID for the given object. - - show_enum_origins: typing.Optional[typing.Literal["status"]]. Which fields should be returned in non-normalized form. + - show_enum_origins: typing.Optional[typing.Literal["status"]]. A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) - status: typing.Optional[JobsListRequestStatus]. If provided, will only return jobs with this status. Options: ('OPEN', 'CLOSED', 'DRAFT', 'ARCHIVED', 'PENDING') @@ -91,22 +91,16 @@ def list( - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from merge.client import Merge - from merge.resources.ats import JobsListRequestExpand, JobsListRequestStatus client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) - client.ats.jobs.list( - expand=JobsListRequestExpand.DEPARTMENTS, - remote_fields="status", - show_enum_origins="status", - status=JobsListRequestStatus.ARCHIVED, - ) + client.ats.jobs.list() """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/ats/v1/jobs"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "ats/v1/jobs"), params=jsonable_encoder( remove_none_from_dict( { @@ -175,27 +169,23 @@ def retrieve( - remote_fields: typing.Optional[typing.Literal["status"]]. Deprecated. Use show_enum_origins. - - show_enum_origins: typing.Optional[typing.Literal["status"]]. Which fields should be returned in non-normalized form. + - show_enum_origins: typing.Optional[typing.Literal["status"]]. A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from merge.client import Merge - from merge.resources.ats import JobsRetrieveRequestExpand client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) client.ats.jobs.retrieve( - id="string", - expand=JobsRetrieveRequestExpand.DEPARTMENTS, - remote_fields="status", - show_enum_origins="status", + id="id", ) """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"api/ats/v1/jobs/{id}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"ats/v1/jobs/{id}"), params=jsonable_encoder( remove_none_from_dict( { @@ -261,21 +251,19 @@ def screening_questions_list( - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from merge.client import Merge - from merge.resources.ats import JobsScreeningQuestionsListRequestExpand client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) client.ats.jobs.screening_questions_list( - job_id="string", - expand=JobsScreeningQuestionsListRequestExpand.JOB, + job_id="job_id", ) """ _response = self._client_wrapper.httpx_client.request( "GET", urllib.parse.urljoin( - f"{self._client_wrapper.get_base_url()}/", f"api/ats/v1/jobs/{job_id}/screening-questions" + f"{self._client_wrapper.get_base_url()}/", f"ats/v1/jobs/{job_id}/screening-questions" ), params=jsonable_encoder( remove_none_from_dict( @@ -368,7 +356,7 @@ async def list( - remote_id: typing.Optional[str]. The API provider's ID for the given object. - - show_enum_origins: typing.Optional[typing.Literal["status"]]. Which fields should be returned in non-normalized form. + - show_enum_origins: typing.Optional[typing.Literal["status"]]. A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) - status: typing.Optional[JobsListRequestStatus]. If provided, will only return jobs with this status. Options: ('OPEN', 'CLOSED', 'DRAFT', 'ARCHIVED', 'PENDING') @@ -380,22 +368,16 @@ async def list( - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from merge.client import AsyncMerge - from merge.resources.ats import JobsListRequestExpand, JobsListRequestStatus client = AsyncMerge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) - await client.ats.jobs.list( - expand=JobsListRequestExpand.DEPARTMENTS, - remote_fields="status", - show_enum_origins="status", - status=JobsListRequestStatus.ARCHIVED, - ) + await client.ats.jobs.list() """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/ats/v1/jobs"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "ats/v1/jobs"), params=jsonable_encoder( remove_none_from_dict( { @@ -464,27 +446,23 @@ async def retrieve( - remote_fields: typing.Optional[typing.Literal["status"]]. Deprecated. Use show_enum_origins. - - show_enum_origins: typing.Optional[typing.Literal["status"]]. Which fields should be returned in non-normalized form. + - show_enum_origins: typing.Optional[typing.Literal["status"]]. A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from merge.client import AsyncMerge - from merge.resources.ats import JobsRetrieveRequestExpand client = AsyncMerge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) await client.ats.jobs.retrieve( - id="string", - expand=JobsRetrieveRequestExpand.DEPARTMENTS, - remote_fields="status", - show_enum_origins="status", + id="id", ) """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"api/ats/v1/jobs/{id}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"ats/v1/jobs/{id}"), params=jsonable_encoder( remove_none_from_dict( { @@ -550,21 +528,19 @@ async def screening_questions_list( - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from merge.client import AsyncMerge - from merge.resources.ats import JobsScreeningQuestionsListRequestExpand client = AsyncMerge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) await client.ats.jobs.screening_questions_list( - job_id="string", - expand=JobsScreeningQuestionsListRequestExpand.JOB, + job_id="job_id", ) """ _response = await self._client_wrapper.httpx_client.request( "GET", urllib.parse.urljoin( - f"{self._client_wrapper.get_base_url()}/", f"api/ats/v1/jobs/{job_id}/screening-questions" + f"{self._client_wrapper.get_base_url()}/", f"ats/v1/jobs/{job_id}/screening-questions" ), params=jsonable_encoder( remove_none_from_dict( diff --git a/src/merge/resources/ats/resources/jobs/types/jobs_list_request_expand.py b/src/merge/resources/ats/resources/jobs/types/jobs_list_request_expand.py index 2a63f011..c6d97321 100644 --- a/src/merge/resources/ats/resources/jobs/types/jobs_list_request_expand.py +++ b/src/merge/resources/ats/resources/jobs/types/jobs_list_request_expand.py @@ -9,17 +9,35 @@ class JobsListRequestExpand(str, enum.Enum): DEPARTMENTS = "departments" DEPARTMENTS_HIRING_MANAGERS = "departments,hiring_managers" + DEPARTMENTS_HIRING_MANAGERS_JOB_POSTINGS = "departments,hiring_managers,job_postings" + DEPARTMENTS_HIRING_MANAGERS_JOB_POSTINGS_RECRUITERS = "departments,hiring_managers,job_postings,recruiters" DEPARTMENTS_HIRING_MANAGERS_RECRUITERS = "departments,hiring_managers,recruiters" + DEPARTMENTS_JOB_POSTINGS = "departments,job_postings" + DEPARTMENTS_JOB_POSTINGS_RECRUITERS = "departments,job_postings,recruiters" DEPARTMENTS_OFFICES = "departments,offices" DEPARTMENTS_OFFICES_HIRING_MANAGERS = "departments,offices,hiring_managers" + DEPARTMENTS_OFFICES_HIRING_MANAGERS_JOB_POSTINGS = "departments,offices,hiring_managers,job_postings" + DEPARTMENTS_OFFICES_HIRING_MANAGERS_JOB_POSTINGS_RECRUITERS = ( + "departments,offices,hiring_managers,job_postings,recruiters" + ) DEPARTMENTS_OFFICES_HIRING_MANAGERS_RECRUITERS = "departments,offices,hiring_managers,recruiters" + DEPARTMENTS_OFFICES_JOB_POSTINGS = "departments,offices,job_postings" + DEPARTMENTS_OFFICES_JOB_POSTINGS_RECRUITERS = "departments,offices,job_postings,recruiters" DEPARTMENTS_OFFICES_RECRUITERS = "departments,offices,recruiters" DEPARTMENTS_RECRUITERS = "departments,recruiters" HIRING_MANAGERS = "hiring_managers" + HIRING_MANAGERS_JOB_POSTINGS = "hiring_managers,job_postings" + HIRING_MANAGERS_JOB_POSTINGS_RECRUITERS = "hiring_managers,job_postings,recruiters" HIRING_MANAGERS_RECRUITERS = "hiring_managers,recruiters" + JOB_POSTINGS = "job_postings" + JOB_POSTINGS_RECRUITERS = "job_postings,recruiters" OFFICES = "offices" OFFICES_HIRING_MANAGERS = "offices,hiring_managers" + OFFICES_HIRING_MANAGERS_JOB_POSTINGS = "offices,hiring_managers,job_postings" + OFFICES_HIRING_MANAGERS_JOB_POSTINGS_RECRUITERS = "offices,hiring_managers,job_postings,recruiters" OFFICES_HIRING_MANAGERS_RECRUITERS = "offices,hiring_managers,recruiters" + OFFICES_JOB_POSTINGS = "offices,job_postings" + OFFICES_JOB_POSTINGS_RECRUITERS = "offices,job_postings,recruiters" OFFICES_RECRUITERS = "offices,recruiters" RECRUITERS = "recruiters" @@ -27,17 +45,33 @@ def visit( self, departments: typing.Callable[[], T_Result], departments_hiring_managers: typing.Callable[[], T_Result], + departments_hiring_managers_job_postings: typing.Callable[[], T_Result], + departments_hiring_managers_job_postings_recruiters: typing.Callable[[], T_Result], departments_hiring_managers_recruiters: typing.Callable[[], T_Result], + departments_job_postings: typing.Callable[[], T_Result], + departments_job_postings_recruiters: typing.Callable[[], T_Result], departments_offices: typing.Callable[[], T_Result], departments_offices_hiring_managers: typing.Callable[[], T_Result], + departments_offices_hiring_managers_job_postings: typing.Callable[[], T_Result], + departments_offices_hiring_managers_job_postings_recruiters: typing.Callable[[], T_Result], departments_offices_hiring_managers_recruiters: typing.Callable[[], T_Result], + departments_offices_job_postings: typing.Callable[[], T_Result], + departments_offices_job_postings_recruiters: typing.Callable[[], T_Result], departments_offices_recruiters: typing.Callable[[], T_Result], departments_recruiters: typing.Callable[[], T_Result], hiring_managers: typing.Callable[[], T_Result], + hiring_managers_job_postings: typing.Callable[[], T_Result], + hiring_managers_job_postings_recruiters: typing.Callable[[], T_Result], hiring_managers_recruiters: typing.Callable[[], T_Result], + job_postings: typing.Callable[[], T_Result], + job_postings_recruiters: typing.Callable[[], T_Result], offices: typing.Callable[[], T_Result], offices_hiring_managers: typing.Callable[[], T_Result], + offices_hiring_managers_job_postings: typing.Callable[[], T_Result], + offices_hiring_managers_job_postings_recruiters: typing.Callable[[], T_Result], offices_hiring_managers_recruiters: typing.Callable[[], T_Result], + offices_job_postings: typing.Callable[[], T_Result], + offices_job_postings_recruiters: typing.Callable[[], T_Result], offices_recruiters: typing.Callable[[], T_Result], recruiters: typing.Callable[[], T_Result], ) -> T_Result: @@ -45,28 +79,60 @@ def visit( return departments() if self is JobsListRequestExpand.DEPARTMENTS_HIRING_MANAGERS: return departments_hiring_managers() + if self is JobsListRequestExpand.DEPARTMENTS_HIRING_MANAGERS_JOB_POSTINGS: + return departments_hiring_managers_job_postings() + if self is JobsListRequestExpand.DEPARTMENTS_HIRING_MANAGERS_JOB_POSTINGS_RECRUITERS: + return departments_hiring_managers_job_postings_recruiters() if self is JobsListRequestExpand.DEPARTMENTS_HIRING_MANAGERS_RECRUITERS: return departments_hiring_managers_recruiters() + if self is JobsListRequestExpand.DEPARTMENTS_JOB_POSTINGS: + return departments_job_postings() + if self is JobsListRequestExpand.DEPARTMENTS_JOB_POSTINGS_RECRUITERS: + return departments_job_postings_recruiters() if self is JobsListRequestExpand.DEPARTMENTS_OFFICES: return departments_offices() if self is JobsListRequestExpand.DEPARTMENTS_OFFICES_HIRING_MANAGERS: return departments_offices_hiring_managers() + if self is JobsListRequestExpand.DEPARTMENTS_OFFICES_HIRING_MANAGERS_JOB_POSTINGS: + return departments_offices_hiring_managers_job_postings() + if self is JobsListRequestExpand.DEPARTMENTS_OFFICES_HIRING_MANAGERS_JOB_POSTINGS_RECRUITERS: + return departments_offices_hiring_managers_job_postings_recruiters() if self is JobsListRequestExpand.DEPARTMENTS_OFFICES_HIRING_MANAGERS_RECRUITERS: return departments_offices_hiring_managers_recruiters() + if self is JobsListRequestExpand.DEPARTMENTS_OFFICES_JOB_POSTINGS: + return departments_offices_job_postings() + if self is JobsListRequestExpand.DEPARTMENTS_OFFICES_JOB_POSTINGS_RECRUITERS: + return departments_offices_job_postings_recruiters() if self is JobsListRequestExpand.DEPARTMENTS_OFFICES_RECRUITERS: return departments_offices_recruiters() if self is JobsListRequestExpand.DEPARTMENTS_RECRUITERS: return departments_recruiters() if self is JobsListRequestExpand.HIRING_MANAGERS: return hiring_managers() + if self is JobsListRequestExpand.HIRING_MANAGERS_JOB_POSTINGS: + return hiring_managers_job_postings() + if self is JobsListRequestExpand.HIRING_MANAGERS_JOB_POSTINGS_RECRUITERS: + return hiring_managers_job_postings_recruiters() if self is JobsListRequestExpand.HIRING_MANAGERS_RECRUITERS: return hiring_managers_recruiters() + if self is JobsListRequestExpand.JOB_POSTINGS: + return job_postings() + if self is JobsListRequestExpand.JOB_POSTINGS_RECRUITERS: + return job_postings_recruiters() if self is JobsListRequestExpand.OFFICES: return offices() if self is JobsListRequestExpand.OFFICES_HIRING_MANAGERS: return offices_hiring_managers() + if self is JobsListRequestExpand.OFFICES_HIRING_MANAGERS_JOB_POSTINGS: + return offices_hiring_managers_job_postings() + if self is JobsListRequestExpand.OFFICES_HIRING_MANAGERS_JOB_POSTINGS_RECRUITERS: + return offices_hiring_managers_job_postings_recruiters() if self is JobsListRequestExpand.OFFICES_HIRING_MANAGERS_RECRUITERS: return offices_hiring_managers_recruiters() + if self is JobsListRequestExpand.OFFICES_JOB_POSTINGS: + return offices_job_postings() + if self is JobsListRequestExpand.OFFICES_JOB_POSTINGS_RECRUITERS: + return offices_job_postings_recruiters() if self is JobsListRequestExpand.OFFICES_RECRUITERS: return offices_recruiters() if self is JobsListRequestExpand.RECRUITERS: diff --git a/src/merge/resources/ats/resources/jobs/types/jobs_retrieve_request_expand.py b/src/merge/resources/ats/resources/jobs/types/jobs_retrieve_request_expand.py index 33209c1f..8075a8c9 100644 --- a/src/merge/resources/ats/resources/jobs/types/jobs_retrieve_request_expand.py +++ b/src/merge/resources/ats/resources/jobs/types/jobs_retrieve_request_expand.py @@ -9,17 +9,35 @@ class JobsRetrieveRequestExpand(str, enum.Enum): DEPARTMENTS = "departments" DEPARTMENTS_HIRING_MANAGERS = "departments,hiring_managers" + DEPARTMENTS_HIRING_MANAGERS_JOB_POSTINGS = "departments,hiring_managers,job_postings" + DEPARTMENTS_HIRING_MANAGERS_JOB_POSTINGS_RECRUITERS = "departments,hiring_managers,job_postings,recruiters" DEPARTMENTS_HIRING_MANAGERS_RECRUITERS = "departments,hiring_managers,recruiters" + DEPARTMENTS_JOB_POSTINGS = "departments,job_postings" + DEPARTMENTS_JOB_POSTINGS_RECRUITERS = "departments,job_postings,recruiters" DEPARTMENTS_OFFICES = "departments,offices" DEPARTMENTS_OFFICES_HIRING_MANAGERS = "departments,offices,hiring_managers" + DEPARTMENTS_OFFICES_HIRING_MANAGERS_JOB_POSTINGS = "departments,offices,hiring_managers,job_postings" + DEPARTMENTS_OFFICES_HIRING_MANAGERS_JOB_POSTINGS_RECRUITERS = ( + "departments,offices,hiring_managers,job_postings,recruiters" + ) DEPARTMENTS_OFFICES_HIRING_MANAGERS_RECRUITERS = "departments,offices,hiring_managers,recruiters" + DEPARTMENTS_OFFICES_JOB_POSTINGS = "departments,offices,job_postings" + DEPARTMENTS_OFFICES_JOB_POSTINGS_RECRUITERS = "departments,offices,job_postings,recruiters" DEPARTMENTS_OFFICES_RECRUITERS = "departments,offices,recruiters" DEPARTMENTS_RECRUITERS = "departments,recruiters" HIRING_MANAGERS = "hiring_managers" + HIRING_MANAGERS_JOB_POSTINGS = "hiring_managers,job_postings" + HIRING_MANAGERS_JOB_POSTINGS_RECRUITERS = "hiring_managers,job_postings,recruiters" HIRING_MANAGERS_RECRUITERS = "hiring_managers,recruiters" + JOB_POSTINGS = "job_postings" + JOB_POSTINGS_RECRUITERS = "job_postings,recruiters" OFFICES = "offices" OFFICES_HIRING_MANAGERS = "offices,hiring_managers" + OFFICES_HIRING_MANAGERS_JOB_POSTINGS = "offices,hiring_managers,job_postings" + OFFICES_HIRING_MANAGERS_JOB_POSTINGS_RECRUITERS = "offices,hiring_managers,job_postings,recruiters" OFFICES_HIRING_MANAGERS_RECRUITERS = "offices,hiring_managers,recruiters" + OFFICES_JOB_POSTINGS = "offices,job_postings" + OFFICES_JOB_POSTINGS_RECRUITERS = "offices,job_postings,recruiters" OFFICES_RECRUITERS = "offices,recruiters" RECRUITERS = "recruiters" @@ -27,17 +45,33 @@ def visit( self, departments: typing.Callable[[], T_Result], departments_hiring_managers: typing.Callable[[], T_Result], + departments_hiring_managers_job_postings: typing.Callable[[], T_Result], + departments_hiring_managers_job_postings_recruiters: typing.Callable[[], T_Result], departments_hiring_managers_recruiters: typing.Callable[[], T_Result], + departments_job_postings: typing.Callable[[], T_Result], + departments_job_postings_recruiters: typing.Callable[[], T_Result], departments_offices: typing.Callable[[], T_Result], departments_offices_hiring_managers: typing.Callable[[], T_Result], + departments_offices_hiring_managers_job_postings: typing.Callable[[], T_Result], + departments_offices_hiring_managers_job_postings_recruiters: typing.Callable[[], T_Result], departments_offices_hiring_managers_recruiters: typing.Callable[[], T_Result], + departments_offices_job_postings: typing.Callable[[], T_Result], + departments_offices_job_postings_recruiters: typing.Callable[[], T_Result], departments_offices_recruiters: typing.Callable[[], T_Result], departments_recruiters: typing.Callable[[], T_Result], hiring_managers: typing.Callable[[], T_Result], + hiring_managers_job_postings: typing.Callable[[], T_Result], + hiring_managers_job_postings_recruiters: typing.Callable[[], T_Result], hiring_managers_recruiters: typing.Callable[[], T_Result], + job_postings: typing.Callable[[], T_Result], + job_postings_recruiters: typing.Callable[[], T_Result], offices: typing.Callable[[], T_Result], offices_hiring_managers: typing.Callable[[], T_Result], + offices_hiring_managers_job_postings: typing.Callable[[], T_Result], + offices_hiring_managers_job_postings_recruiters: typing.Callable[[], T_Result], offices_hiring_managers_recruiters: typing.Callable[[], T_Result], + offices_job_postings: typing.Callable[[], T_Result], + offices_job_postings_recruiters: typing.Callable[[], T_Result], offices_recruiters: typing.Callable[[], T_Result], recruiters: typing.Callable[[], T_Result], ) -> T_Result: @@ -45,28 +79,60 @@ def visit( return departments() if self is JobsRetrieveRequestExpand.DEPARTMENTS_HIRING_MANAGERS: return departments_hiring_managers() + if self is JobsRetrieveRequestExpand.DEPARTMENTS_HIRING_MANAGERS_JOB_POSTINGS: + return departments_hiring_managers_job_postings() + if self is JobsRetrieveRequestExpand.DEPARTMENTS_HIRING_MANAGERS_JOB_POSTINGS_RECRUITERS: + return departments_hiring_managers_job_postings_recruiters() if self is JobsRetrieveRequestExpand.DEPARTMENTS_HIRING_MANAGERS_RECRUITERS: return departments_hiring_managers_recruiters() + if self is JobsRetrieveRequestExpand.DEPARTMENTS_JOB_POSTINGS: + return departments_job_postings() + if self is JobsRetrieveRequestExpand.DEPARTMENTS_JOB_POSTINGS_RECRUITERS: + return departments_job_postings_recruiters() if self is JobsRetrieveRequestExpand.DEPARTMENTS_OFFICES: return departments_offices() if self is JobsRetrieveRequestExpand.DEPARTMENTS_OFFICES_HIRING_MANAGERS: return departments_offices_hiring_managers() + if self is JobsRetrieveRequestExpand.DEPARTMENTS_OFFICES_HIRING_MANAGERS_JOB_POSTINGS: + return departments_offices_hiring_managers_job_postings() + if self is JobsRetrieveRequestExpand.DEPARTMENTS_OFFICES_HIRING_MANAGERS_JOB_POSTINGS_RECRUITERS: + return departments_offices_hiring_managers_job_postings_recruiters() if self is JobsRetrieveRequestExpand.DEPARTMENTS_OFFICES_HIRING_MANAGERS_RECRUITERS: return departments_offices_hiring_managers_recruiters() + if self is JobsRetrieveRequestExpand.DEPARTMENTS_OFFICES_JOB_POSTINGS: + return departments_offices_job_postings() + if self is JobsRetrieveRequestExpand.DEPARTMENTS_OFFICES_JOB_POSTINGS_RECRUITERS: + return departments_offices_job_postings_recruiters() if self is JobsRetrieveRequestExpand.DEPARTMENTS_OFFICES_RECRUITERS: return departments_offices_recruiters() if self is JobsRetrieveRequestExpand.DEPARTMENTS_RECRUITERS: return departments_recruiters() if self is JobsRetrieveRequestExpand.HIRING_MANAGERS: return hiring_managers() + if self is JobsRetrieveRequestExpand.HIRING_MANAGERS_JOB_POSTINGS: + return hiring_managers_job_postings() + if self is JobsRetrieveRequestExpand.HIRING_MANAGERS_JOB_POSTINGS_RECRUITERS: + return hiring_managers_job_postings_recruiters() if self is JobsRetrieveRequestExpand.HIRING_MANAGERS_RECRUITERS: return hiring_managers_recruiters() + if self is JobsRetrieveRequestExpand.JOB_POSTINGS: + return job_postings() + if self is JobsRetrieveRequestExpand.JOB_POSTINGS_RECRUITERS: + return job_postings_recruiters() if self is JobsRetrieveRequestExpand.OFFICES: return offices() if self is JobsRetrieveRequestExpand.OFFICES_HIRING_MANAGERS: return offices_hiring_managers() + if self is JobsRetrieveRequestExpand.OFFICES_HIRING_MANAGERS_JOB_POSTINGS: + return offices_hiring_managers_job_postings() + if self is JobsRetrieveRequestExpand.OFFICES_HIRING_MANAGERS_JOB_POSTINGS_RECRUITERS: + return offices_hiring_managers_job_postings_recruiters() if self is JobsRetrieveRequestExpand.OFFICES_HIRING_MANAGERS_RECRUITERS: return offices_hiring_managers_recruiters() + if self is JobsRetrieveRequestExpand.OFFICES_JOB_POSTINGS: + return offices_job_postings() + if self is JobsRetrieveRequestExpand.OFFICES_JOB_POSTINGS_RECRUITERS: + return offices_job_postings_recruiters() if self is JobsRetrieveRequestExpand.OFFICES_RECRUITERS: return offices_recruiters() if self is JobsRetrieveRequestExpand.RECRUITERS: diff --git a/src/merge/resources/ats/resources/link_token/client.py b/src/merge/resources/ats/resources/link_token/client.py index 5de48517..7aac697e 100644 --- a/src/merge/resources/ats/resources/link_token/client.py +++ b/src/merge/resources/ats/resources/link_token/client.py @@ -41,6 +41,7 @@ def create( category_common_model_scopes: typing.Optional[ typing.Dict[str, typing.Optional[typing.List[IndividualCommonModelScopeDeserializerRequest]]] ] = OMIT, + language: typing.Optional[str] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> LinkToken: """ @@ -65,9 +66,12 @@ def create( - category_common_model_scopes: typing.Optional[typing.Dict[str, typing.Optional[typing.List[IndividualCommonModelScopeDeserializerRequest]]]]. When creating a Link Token, you can set permissions for Common Models that will apply to the account that is going to be linked. Any model or field not specified in link token payload will default to existing settings. + - language: typing.Optional[str]. The language code for the language to localize Merge Link to. + - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from merge.client import Merge + from merge.resources.ats import CategoriesEnum client = Merge( account_token="YOUR_ACCOUNT_TOKEN", @@ -77,8 +81,7 @@ def create( end_user_email_address="example@gmail.com", end_user_organization_name="Test Organization", end_user_origin_id="12345", - categories=[], - integration="bamboohr", + categories=[CategoriesEnum.HRIS], ) """ _request: typing.Dict[str, typing.Any] = { @@ -97,9 +100,11 @@ def create( _request["common_models"] = common_models if category_common_model_scopes is not OMIT: _request["category_common_model_scopes"] = category_common_model_scopes + if language is not OMIT: + _request["language"] = language _response = self._client_wrapper.httpx_client.request( "POST", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/ats/v1/link-token"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "ats/v1/link-token"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -148,6 +153,7 @@ async def create( category_common_model_scopes: typing.Optional[ typing.Dict[str, typing.Optional[typing.List[IndividualCommonModelScopeDeserializerRequest]]] ] = OMIT, + language: typing.Optional[str] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> LinkToken: """ @@ -172,9 +178,12 @@ async def create( - category_common_model_scopes: typing.Optional[typing.Dict[str, typing.Optional[typing.List[IndividualCommonModelScopeDeserializerRequest]]]]. When creating a Link Token, you can set permissions for Common Models that will apply to the account that is going to be linked. Any model or field not specified in link token payload will default to existing settings. + - language: typing.Optional[str]. The language code for the language to localize Merge Link to. + - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from merge.client import AsyncMerge + from merge.resources.ats import CategoriesEnum client = AsyncMerge( account_token="YOUR_ACCOUNT_TOKEN", @@ -184,8 +193,7 @@ async def create( end_user_email_address="example@gmail.com", end_user_organization_name="Test Organization", end_user_origin_id="12345", - categories=[], - integration="bamboohr", + categories=[CategoriesEnum.HRIS], ) """ _request: typing.Dict[str, typing.Any] = { @@ -204,9 +212,11 @@ async def create( _request["common_models"] = common_models if category_common_model_scopes is not OMIT: _request["category_common_model_scopes"] = category_common_model_scopes + if language is not OMIT: + _request["language"] = language _response = await self._client_wrapper.httpx_client.request( "POST", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/ats/v1/link-token"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "ats/v1/link-token"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), diff --git a/src/merge/resources/ats/resources/linked_accounts/client.py b/src/merge/resources/ats/resources/linked_accounts/client.py index d38142b1..30e206bb 100644 --- a/src/merge/resources/ats/resources/linked_accounts/client.py +++ b/src/merge/resources/ats/resources/linked_accounts/client.py @@ -44,7 +44,7 @@ def list( List linked accounts for your organization. Parameters: - - category: typing.Optional[LinkedAccountsListRequestCategory]. Options: ('hris', 'ats', 'accounting', 'ticketing', 'crm', 'mktg', 'filestorage') + - category: typing.Optional[LinkedAccountsListRequestCategory]. Options: `accounting`, `ats`, `crm`, `filestorage`, `hris`, `mktg`, `ticketing` - `hris` - hris - `ats` - ats @@ -80,19 +80,16 @@ def list( - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from merge.client import Merge - from merge.resources.ats import LinkedAccountsListRequestCategory client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) - client.ats.linked_accounts.list( - category=LinkedAccountsListRequestCategory.ACCOUNTING, - ) + client.ats.linked_accounts.list() """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/ats/v1/linked-accounts"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "ats/v1/linked-accounts"), params=jsonable_encoder( remove_none_from_dict( { @@ -164,7 +161,7 @@ async def list( List linked accounts for your organization. Parameters: - - category: typing.Optional[LinkedAccountsListRequestCategory]. Options: ('hris', 'ats', 'accounting', 'ticketing', 'crm', 'mktg', 'filestorage') + - category: typing.Optional[LinkedAccountsListRequestCategory]. Options: `accounting`, `ats`, `crm`, `filestorage`, `hris`, `mktg`, `ticketing` - `hris` - hris - `ats` - ats @@ -200,19 +197,16 @@ async def list( - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from merge.client import AsyncMerge - from merge.resources.ats import LinkedAccountsListRequestCategory client = AsyncMerge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) - await client.ats.linked_accounts.list( - category=LinkedAccountsListRequestCategory.ACCOUNTING, - ) + await client.ats.linked_accounts.list() """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/ats/v1/linked-accounts"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "ats/v1/linked-accounts"), params=jsonable_encoder( remove_none_from_dict( { diff --git a/src/merge/resources/ats/resources/offers/client.py b/src/merge/resources/ats/resources/offers/client.py index adf7314c..4f364503 100644 --- a/src/merge/resources/ats/resources/offers/client.py +++ b/src/merge/resources/ats/resources/offers/client.py @@ -75,26 +75,21 @@ def list( - remote_id: typing.Optional[str]. The API provider's ID for the given object. - - show_enum_origins: typing.Optional[typing.Literal["status"]]. Which fields should be returned in non-normalized form. + - show_enum_origins: typing.Optional[typing.Literal["status"]]. A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from merge.client import Merge - from merge.resources.ats import OffersListRequestExpand client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) - client.ats.offers.list( - expand=OffersListRequestExpand.APPLICATION, - remote_fields="status", - show_enum_origins="status", - ) + client.ats.offers.list() """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/ats/v1/offers"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "ats/v1/offers"), params=jsonable_encoder( remove_none_from_dict( { @@ -162,27 +157,23 @@ def retrieve( - remote_fields: typing.Optional[typing.Literal["status"]]. Deprecated. Use show_enum_origins. - - show_enum_origins: typing.Optional[typing.Literal["status"]]. Which fields should be returned in non-normalized form. + - show_enum_origins: typing.Optional[typing.Literal["status"]]. A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from merge.client import Merge - from merge.resources.ats import OffersRetrieveRequestExpand client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) client.ats.offers.retrieve( - id="string", - expand=OffersRetrieveRequestExpand.APPLICATION, - remote_fields="status", - show_enum_origins="status", + id="id", ) """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"api/ats/v1/offers/{id}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"ats/v1/offers/{id}"), params=jsonable_encoder( remove_none_from_dict( { @@ -272,26 +263,21 @@ async def list( - remote_id: typing.Optional[str]. The API provider's ID for the given object. - - show_enum_origins: typing.Optional[typing.Literal["status"]]. Which fields should be returned in non-normalized form. + - show_enum_origins: typing.Optional[typing.Literal["status"]]. A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from merge.client import AsyncMerge - from merge.resources.ats import OffersListRequestExpand client = AsyncMerge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) - await client.ats.offers.list( - expand=OffersListRequestExpand.APPLICATION, - remote_fields="status", - show_enum_origins="status", - ) + await client.ats.offers.list() """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/ats/v1/offers"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "ats/v1/offers"), params=jsonable_encoder( remove_none_from_dict( { @@ -359,27 +345,23 @@ async def retrieve( - remote_fields: typing.Optional[typing.Literal["status"]]. Deprecated. Use show_enum_origins. - - show_enum_origins: typing.Optional[typing.Literal["status"]]. Which fields should be returned in non-normalized form. + - show_enum_origins: typing.Optional[typing.Literal["status"]]. A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from merge.client import AsyncMerge - from merge.resources.ats import OffersRetrieveRequestExpand client = AsyncMerge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) await client.ats.offers.retrieve( - id="string", - expand=OffersRetrieveRequestExpand.APPLICATION, - remote_fields="status", - show_enum_origins="status", + id="id", ) """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"api/ats/v1/offers/{id}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"ats/v1/offers/{id}"), params=jsonable_encoder( remove_none_from_dict( { diff --git a/src/merge/resources/ats/resources/offices/client.py b/src/merge/resources/ats/resources/offices/client.py index e9ee35ec..cff4e5dc 100644 --- a/src/merge/resources/ats/resources/offices/client.py +++ b/src/merge/resources/ats/resources/offices/client.py @@ -72,7 +72,7 @@ def list( """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/ats/v1/offices"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "ats/v1/offices"), params=jsonable_encoder( remove_none_from_dict( { @@ -137,12 +137,12 @@ def retrieve( api_key="YOUR_API_KEY", ) client.ats.offices.retrieve( - id="string", + id="id", ) """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"api/ats/v1/offices/{id}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"ats/v1/offices/{id}"), params=jsonable_encoder( remove_none_from_dict( { @@ -228,7 +228,7 @@ async def list( """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/ats/v1/offices"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "ats/v1/offices"), params=jsonable_encoder( remove_none_from_dict( { @@ -293,12 +293,12 @@ async def retrieve( api_key="YOUR_API_KEY", ) await client.ats.offices.retrieve( - id="string", + id="id", ) """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"api/ats/v1/offices/{id}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"ats/v1/offices/{id}"), params=jsonable_encoder( remove_none_from_dict( { diff --git a/src/merge/resources/ats/resources/passthrough/client.py b/src/merge/resources/ats/resources/passthrough/client.py index d0c8237c..e8e4d359 100644 --- a/src/merge/resources/ats/resources/passthrough/client.py +++ b/src/merge/resources/ats/resources/passthrough/client.py @@ -37,11 +37,7 @@ def create( - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from merge.client import Merge - from merge.resources.ats import ( - DataPassthroughRequest, - MethodEnum, - RequestFormatEnum, - ) + from merge.resources.ats import DataPassthroughRequest, MethodEnum client = Merge( account_token="YOUR_ACCOUNT_TOKEN", @@ -51,14 +47,12 @@ def create( request=DataPassthroughRequest( method=MethodEnum.GET, path="/scooters", - data='{"company": "Lime", "model": "Gen 2.5"}', - request_format=RequestFormatEnum.JSON, ), ) """ _response = self._client_wrapper.httpx_client.request( "POST", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/ats/v1/passthrough"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "ats/v1/passthrough"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -105,11 +99,7 @@ async def create( - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from merge.client import AsyncMerge - from merge.resources.ats import ( - DataPassthroughRequest, - MethodEnum, - RequestFormatEnum, - ) + from merge.resources.ats import DataPassthroughRequest, MethodEnum client = AsyncMerge( account_token="YOUR_ACCOUNT_TOKEN", @@ -119,14 +109,12 @@ async def create( request=DataPassthroughRequest( method=MethodEnum.GET, path="/scooters", - data='{"company": "Lime", "model": "Gen 2.5"}', - request_format=RequestFormatEnum.JSON, ), ) """ _response = await self._client_wrapper.httpx_client.request( "POST", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/ats/v1/passthrough"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "ats/v1/passthrough"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), diff --git a/src/merge/resources/ats/resources/regenerate_key/client.py b/src/merge/resources/ats/resources/regenerate_key/client.py index 8eb61651..be351e28 100644 --- a/src/merge/resources/ats/resources/regenerate_key/client.py +++ b/src/merge/resources/ats/resources/regenerate_key/client.py @@ -29,7 +29,7 @@ def create(self, *, name: str, request_options: typing.Optional[RequestOptions] Exchange remote keys. Parameters: - - name: str. + - name: str. The name of the remote key - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- @@ -45,7 +45,7 @@ def create(self, *, name: str, request_options: typing.Optional[RequestOptions] """ _response = self._client_wrapper.httpx_client.request( "POST", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/ats/v1/regenerate-key"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "ats/v1/regenerate-key"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -85,7 +85,7 @@ async def create(self, *, name: str, request_options: typing.Optional[RequestOpt Exchange remote keys. Parameters: - - name: str. + - name: str. The name of the remote key - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- @@ -101,7 +101,7 @@ async def create(self, *, name: str, request_options: typing.Optional[RequestOpt """ _response = await self._client_wrapper.httpx_client.request( "POST", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/ats/v1/regenerate-key"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "ats/v1/regenerate-key"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), diff --git a/src/merge/resources/ats/resources/reject_reasons/client.py b/src/merge/resources/ats/resources/reject_reasons/client.py index c96255cf..0fe2c3ef 100644 --- a/src/merge/resources/ats/resources/reject_reasons/client.py +++ b/src/merge/resources/ats/resources/reject_reasons/client.py @@ -72,7 +72,7 @@ def list( """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/ats/v1/reject-reasons"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "ats/v1/reject-reasons"), params=jsonable_encoder( remove_none_from_dict( { @@ -137,12 +137,12 @@ def retrieve( api_key="YOUR_API_KEY", ) client.ats.reject_reasons.retrieve( - id="string", + id="id", ) """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"api/ats/v1/reject-reasons/{id}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"ats/v1/reject-reasons/{id}"), params=jsonable_encoder( remove_none_from_dict( { @@ -228,7 +228,7 @@ async def list( """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/ats/v1/reject-reasons"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "ats/v1/reject-reasons"), params=jsonable_encoder( remove_none_from_dict( { @@ -293,12 +293,12 @@ async def retrieve( api_key="YOUR_API_KEY", ) await client.ats.reject_reasons.retrieve( - id="string", + id="id", ) """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"api/ats/v1/reject-reasons/{id}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"ats/v1/reject-reasons/{id}"), params=jsonable_encoder( remove_none_from_dict( { diff --git a/src/merge/resources/ats/resources/scopes/client.py b/src/merge/resources/ats/resources/scopes/client.py index 4c4f7e79..b4dd7085 100644 --- a/src/merge/resources/ats/resources/scopes/client.py +++ b/src/merge/resources/ats/resources/scopes/client.py @@ -29,7 +29,7 @@ def default_scopes_retrieve( self, *, request_options: typing.Optional[RequestOptions] = None ) -> CommonModelScopeApi: """ - Get the default permissions for Merge Common Models and fields across all Linked Accounts of a given category. [Learn More](https://help.merge.dev/en/articles/8828211-common-model-and-field-scopes). + Get the default permissions for Merge Common Models and fields across all Linked Accounts of a given category. [Learn more](https://help.merge.dev/en/articles/8828211-common-model-and-field-scopes). Parameters: - request_options: typing.Optional[RequestOptions]. Request-specific configuration. @@ -44,7 +44,7 @@ def default_scopes_retrieve( """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/ats/v1/default-scopes"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "ats/v1/default-scopes"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -72,7 +72,7 @@ def linked_account_scopes_retrieve( self, *, request_options: typing.Optional[RequestOptions] = None ) -> CommonModelScopeApi: """ - Get all available permissions for Merge Common Models and fields for a single Linked Account. [Learn More](https://help.merge.dev/en/articles/8828211-common-model-and-field-scopes). + Get all available permissions for Merge Common Models and fields for a single Linked Account. [Learn more](https://help.merge.dev/en/articles/8828211-common-model-and-field-scopes). Parameters: - request_options: typing.Optional[RequestOptions]. Request-specific configuration. @@ -87,7 +87,7 @@ def linked_account_scopes_retrieve( """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/ats/v1/linked-account-scopes"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "ats/v1/linked-account-scopes"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -118,7 +118,7 @@ def linked_account_scopes_create( request_options: typing.Optional[RequestOptions] = None, ) -> CommonModelScopeApi: """ - Update permissions for any Common Model or field for a single Linked Account. Any Scopes not set in this POST request will inherit the default Scopes. [Learn More](https://help.merge.dev/en/articles/8828211-common-model-and-field-scopes) + Update permissions for any Common Model or field for a single Linked Account. Any Scopes not set in this POST request will inherit the default Scopes. [Learn more](https://help.merge.dev/en/articles/8828211-common-model-and-field-scopes) Parameters: - common_models: typing.List[IndividualCommonModelScopeDeserializerRequest]. The common models you want to update the scopes for @@ -126,18 +126,23 @@ def linked_account_scopes_create( - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from merge.client import Merge + from merge.resources.ats import IndividualCommonModelScopeDeserializerRequest client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) client.ats.scopes.linked_account_scopes_create( - common_models=[], + common_models=[ + IndividualCommonModelScopeDeserializerRequest( + model_name="model_name", + ) + ], ) """ _response = self._client_wrapper.httpx_client.request( "POST", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/ats/v1/linked-account-scopes"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "ats/v1/linked-account-scopes"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -176,7 +181,7 @@ async def default_scopes_retrieve( self, *, request_options: typing.Optional[RequestOptions] = None ) -> CommonModelScopeApi: """ - Get the default permissions for Merge Common Models and fields across all Linked Accounts of a given category. [Learn More](https://help.merge.dev/en/articles/8828211-common-model-and-field-scopes). + Get the default permissions for Merge Common Models and fields across all Linked Accounts of a given category. [Learn more](https://help.merge.dev/en/articles/8828211-common-model-and-field-scopes). Parameters: - request_options: typing.Optional[RequestOptions]. Request-specific configuration. @@ -191,7 +196,7 @@ async def default_scopes_retrieve( """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/ats/v1/default-scopes"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "ats/v1/default-scopes"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -219,7 +224,7 @@ async def linked_account_scopes_retrieve( self, *, request_options: typing.Optional[RequestOptions] = None ) -> CommonModelScopeApi: """ - Get all available permissions for Merge Common Models and fields for a single Linked Account. [Learn More](https://help.merge.dev/en/articles/8828211-common-model-and-field-scopes). + Get all available permissions for Merge Common Models and fields for a single Linked Account. [Learn more](https://help.merge.dev/en/articles/8828211-common-model-and-field-scopes). Parameters: - request_options: typing.Optional[RequestOptions]. Request-specific configuration. @@ -234,7 +239,7 @@ async def linked_account_scopes_retrieve( """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/ats/v1/linked-account-scopes"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "ats/v1/linked-account-scopes"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -265,7 +270,7 @@ async def linked_account_scopes_create( request_options: typing.Optional[RequestOptions] = None, ) -> CommonModelScopeApi: """ - Update permissions for any Common Model or field for a single Linked Account. Any Scopes not set in this POST request will inherit the default Scopes. [Learn More](https://help.merge.dev/en/articles/8828211-common-model-and-field-scopes) + Update permissions for any Common Model or field for a single Linked Account. Any Scopes not set in this POST request will inherit the default Scopes. [Learn more](https://help.merge.dev/en/articles/8828211-common-model-and-field-scopes) Parameters: - common_models: typing.List[IndividualCommonModelScopeDeserializerRequest]. The common models you want to update the scopes for @@ -273,18 +278,23 @@ async def linked_account_scopes_create( - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from merge.client import AsyncMerge + from merge.resources.ats import IndividualCommonModelScopeDeserializerRequest client = AsyncMerge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) await client.ats.scopes.linked_account_scopes_create( - common_models=[], + common_models=[ + IndividualCommonModelScopeDeserializerRequest( + model_name="model_name", + ) + ], ) """ _response = await self._client_wrapper.httpx_client.request( "POST", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/ats/v1/linked-account-scopes"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "ats/v1/linked-account-scopes"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), diff --git a/src/merge/resources/ats/resources/scorecards/client.py b/src/merge/resources/ats/resources/scorecards/client.py index 42572fc7..4e94e362 100644 --- a/src/merge/resources/ats/resources/scorecards/client.py +++ b/src/merge/resources/ats/resources/scorecards/client.py @@ -78,26 +78,21 @@ def list( - remote_id: typing.Optional[str]. The API provider's ID for the given object. - - show_enum_origins: typing.Optional[typing.Literal["overall_recommendation"]]. Which fields should be returned in non-normalized form. + - show_enum_origins: typing.Optional[typing.Literal["overall_recommendation"]]. A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from merge.client import Merge - from merge.resources.ats import ScorecardsListRequestExpand client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) - client.ats.scorecards.list( - expand=ScorecardsListRequestExpand.APPLICATION, - remote_fields="overall_recommendation", - show_enum_origins="overall_recommendation", - ) + client.ats.scorecards.list() """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/ats/v1/scorecards"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "ats/v1/scorecards"), params=jsonable_encoder( remove_none_from_dict( { @@ -166,27 +161,23 @@ def retrieve( - remote_fields: typing.Optional[typing.Literal["overall_recommendation"]]. Deprecated. Use show_enum_origins. - - show_enum_origins: typing.Optional[typing.Literal["overall_recommendation"]]. Which fields should be returned in non-normalized form. + - show_enum_origins: typing.Optional[typing.Literal["overall_recommendation"]]. A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from merge.client import Merge - from merge.resources.ats import ScorecardsRetrieveRequestExpand client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) client.ats.scorecards.retrieve( - id="string", - expand=ScorecardsRetrieveRequestExpand.APPLICATION, - remote_fields="overall_recommendation", - show_enum_origins="overall_recommendation", + id="id", ) """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"api/ats/v1/scorecards/{id}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"ats/v1/scorecards/{id}"), params=jsonable_encoder( remove_none_from_dict( { @@ -279,26 +270,21 @@ async def list( - remote_id: typing.Optional[str]. The API provider's ID for the given object. - - show_enum_origins: typing.Optional[typing.Literal["overall_recommendation"]]. Which fields should be returned in non-normalized form. + - show_enum_origins: typing.Optional[typing.Literal["overall_recommendation"]]. A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from merge.client import AsyncMerge - from merge.resources.ats import ScorecardsListRequestExpand client = AsyncMerge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) - await client.ats.scorecards.list( - expand=ScorecardsListRequestExpand.APPLICATION, - remote_fields="overall_recommendation", - show_enum_origins="overall_recommendation", - ) + await client.ats.scorecards.list() """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/ats/v1/scorecards"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "ats/v1/scorecards"), params=jsonable_encoder( remove_none_from_dict( { @@ -367,27 +353,23 @@ async def retrieve( - remote_fields: typing.Optional[typing.Literal["overall_recommendation"]]. Deprecated. Use show_enum_origins. - - show_enum_origins: typing.Optional[typing.Literal["overall_recommendation"]]. Which fields should be returned in non-normalized form. + - show_enum_origins: typing.Optional[typing.Literal["overall_recommendation"]]. A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from merge.client import AsyncMerge - from merge.resources.ats import ScorecardsRetrieveRequestExpand client = AsyncMerge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) await client.ats.scorecards.retrieve( - id="string", - expand=ScorecardsRetrieveRequestExpand.APPLICATION, - remote_fields="overall_recommendation", - show_enum_origins="overall_recommendation", + id="id", ) """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"api/ats/v1/scorecards/{id}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"ats/v1/scorecards/{id}"), params=jsonable_encoder( remove_none_from_dict( { diff --git a/src/merge/resources/ats/resources/selective_sync/client.py b/src/merge/resources/ats/resources/selective_sync/client.py index 09459d36..cbfa8b82 100644 --- a/src/merge/resources/ats/resources/selective_sync/client.py +++ b/src/merge/resources/ats/resources/selective_sync/client.py @@ -45,7 +45,7 @@ def configurations_list( """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/ats/v1/selective-sync/configurations"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "ats/v1/selective-sync/configurations"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -84,18 +84,23 @@ def configurations_update( - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from merge.client import Merge + from merge.resources.ats import LinkedAccountSelectiveSyncConfigurationRequest client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) client.ats.selective_sync.configurations_update( - sync_configurations=[], + sync_configurations=[ + LinkedAccountSelectiveSyncConfigurationRequest( + linked_account_conditions=[], + ) + ], ) """ _response = self._client_wrapper.httpx_client.request( "PUT", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/ats/v1/selective-sync/configurations"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "ats/v1/selective-sync/configurations"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -155,7 +160,7 @@ def meta_list( """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/ats/v1/selective-sync/meta"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "ats/v1/selective-sync/meta"), params=jsonable_encoder( remove_none_from_dict( { @@ -214,7 +219,7 @@ async def configurations_list( """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/ats/v1/selective-sync/configurations"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "ats/v1/selective-sync/configurations"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -253,18 +258,23 @@ async def configurations_update( - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from merge.client import AsyncMerge + from merge.resources.ats import LinkedAccountSelectiveSyncConfigurationRequest client = AsyncMerge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) await client.ats.selective_sync.configurations_update( - sync_configurations=[], + sync_configurations=[ + LinkedAccountSelectiveSyncConfigurationRequest( + linked_account_conditions=[], + ) + ], ) """ _response = await self._client_wrapper.httpx_client.request( "PUT", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/ats/v1/selective-sync/configurations"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "ats/v1/selective-sync/configurations"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -324,7 +334,7 @@ async def meta_list( """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/ats/v1/selective-sync/meta"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "ats/v1/selective-sync/meta"), params=jsonable_encoder( remove_none_from_dict( { diff --git a/src/merge/resources/ats/resources/sync_status/client.py b/src/merge/resources/ats/resources/sync_status/client.py index 0c037958..461b6a8f 100644 --- a/src/merge/resources/ats/resources/sync_status/client.py +++ b/src/merge/resources/ats/resources/sync_status/client.py @@ -48,7 +48,7 @@ def list( """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/ats/v1/sync-status"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "ats/v1/sync-status"), params=jsonable_encoder( remove_none_from_dict( { @@ -114,7 +114,7 @@ async def list( """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/ats/v1/sync-status"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "ats/v1/sync-status"), params=jsonable_encoder( remove_none_from_dict( { diff --git a/src/merge/resources/ats/resources/tags/client.py b/src/merge/resources/ats/resources/tags/client.py index 911c0ece..1316f5f7 100644 --- a/src/merge/resources/ats/resources/tags/client.py +++ b/src/merge/resources/ats/resources/tags/client.py @@ -71,7 +71,7 @@ def list( """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/ats/v1/tags"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "ats/v1/tags"), params=jsonable_encoder( remove_none_from_dict( { @@ -165,7 +165,7 @@ async def list( """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/ats/v1/tags"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "ats/v1/tags"), params=jsonable_encoder( remove_none_from_dict( { diff --git a/src/merge/resources/ats/resources/users/client.py b/src/merge/resources/ats/resources/users/client.py index ef443d67..daf5a58a 100644 --- a/src/merge/resources/ats/resources/users/client.py +++ b/src/merge/resources/ats/resources/users/client.py @@ -67,7 +67,7 @@ def list( - remote_id: typing.Optional[str]. The API provider's ID for the given object. - - show_enum_origins: typing.Optional[typing.Literal["access_role"]]. Which fields should be returned in non-normalized form. + - show_enum_origins: typing.Optional[typing.Literal["access_role"]]. A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- @@ -77,14 +77,11 @@ def list( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) - client.ats.users.list( - remote_fields="access_role", - show_enum_origins="access_role", - ) + client.ats.users.list() """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/ats/v1/users"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "ats/v1/users"), params=jsonable_encoder( remove_none_from_dict( { @@ -147,7 +144,7 @@ def retrieve( - remote_fields: typing.Optional[typing.Literal["access_role"]]. Deprecated. Use show_enum_origins. - - show_enum_origins: typing.Optional[typing.Literal["access_role"]]. Which fields should be returned in non-normalized form. + - show_enum_origins: typing.Optional[typing.Literal["access_role"]]. A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- @@ -158,14 +155,12 @@ def retrieve( api_key="YOUR_API_KEY", ) client.ats.users.retrieve( - id="string", - remote_fields="access_role", - show_enum_origins="access_role", + id="id", ) """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"api/ats/v1/users/{id}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"ats/v1/users/{id}"), params=jsonable_encoder( remove_none_from_dict( { @@ -248,7 +243,7 @@ async def list( - remote_id: typing.Optional[str]. The API provider's ID for the given object. - - show_enum_origins: typing.Optional[typing.Literal["access_role"]]. Which fields should be returned in non-normalized form. + - show_enum_origins: typing.Optional[typing.Literal["access_role"]]. A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- @@ -258,14 +253,11 @@ async def list( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) - await client.ats.users.list( - remote_fields="access_role", - show_enum_origins="access_role", - ) + await client.ats.users.list() """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/ats/v1/users"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "ats/v1/users"), params=jsonable_encoder( remove_none_from_dict( { @@ -328,7 +320,7 @@ async def retrieve( - remote_fields: typing.Optional[typing.Literal["access_role"]]. Deprecated. Use show_enum_origins. - - show_enum_origins: typing.Optional[typing.Literal["access_role"]]. Which fields should be returned in non-normalized form. + - show_enum_origins: typing.Optional[typing.Literal["access_role"]]. A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- @@ -339,14 +331,12 @@ async def retrieve( api_key="YOUR_API_KEY", ) await client.ats.users.retrieve( - id="string", - remote_fields="access_role", - show_enum_origins="access_role", + id="id", ) """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"api/ats/v1/users/{id}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"ats/v1/users/{id}"), params=jsonable_encoder( remove_none_from_dict( { diff --git a/src/merge/resources/ats/resources/webhook_receivers/client.py b/src/merge/resources/ats/resources/webhook_receivers/client.py index e5cad5fc..31907a1f 100644 --- a/src/merge/resources/ats/resources/webhook_receivers/client.py +++ b/src/merge/resources/ats/resources/webhook_receivers/client.py @@ -41,7 +41,7 @@ def list(self, *, request_options: typing.Optional[RequestOptions] = None) -> ty """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/ats/v1/webhook-receivers"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "ats/v1/webhook-receivers"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -92,7 +92,7 @@ def create( api_key="YOUR_API_KEY", ) client.ats.webhook_receivers.create( - event="string", + event="event", is_active=True, ) """ @@ -101,7 +101,7 @@ def create( _request["key"] = key _response = self._client_wrapper.httpx_client.request( "POST", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/ats/v1/webhook-receivers"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "ats/v1/webhook-receivers"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -153,7 +153,7 @@ async def list(self, *, request_options: typing.Optional[RequestOptions] = None) """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/ats/v1/webhook-receivers"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "ats/v1/webhook-receivers"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -204,7 +204,7 @@ async def create( api_key="YOUR_API_KEY", ) await client.ats.webhook_receivers.create( - event="string", + event="event", is_active=True, ) """ @@ -213,7 +213,7 @@ async def create( _request["key"] = key _response = await self._client_wrapper.httpx_client.request( "POST", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/ats/v1/webhook-receivers"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "ats/v1/webhook-receivers"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), diff --git a/src/merge/resources/ats/types/__init__.py b/src/merge/resources/ats/types/__init__.py index 3111d862..fbfb4b8f 100644 --- a/src/merge/resources/ats/types/__init__.py +++ b/src/merge/resources/ats/types/__init__.py @@ -23,12 +23,14 @@ from .application_credited_to import ApplicationCreditedTo from .application_current_stage import ApplicationCurrentStage from .application_job import ApplicationJob +from .application_offers_item import ApplicationOffersItem from .application_reject_reason import ApplicationRejectReason from .application_request import ApplicationRequest from .application_request_candidate import ApplicationRequestCandidate from .application_request_credited_to import ApplicationRequestCreditedTo from .application_request_current_stage import ApplicationRequestCurrentStage from .application_request_job import ApplicationRequestJob +from .application_request_offers_item import ApplicationRequestOffersItem from .application_request_reject_reason import ApplicationRequestRejectReason from .application_response import ApplicationResponse from .async_passthrough_reciept import AsyncPassthroughReciept @@ -100,9 +102,14 @@ from .job_interview_stage import JobInterviewStage from .job_interview_stage_job import JobInterviewStageJob from .job_offices_item import JobOfficesItem +from .job_posting import JobPosting +from .job_posting_job import JobPostingJob +from .job_posting_job_posting_urls_item import JobPostingJobPostingUrlsItem +from .job_posting_status_enum import JobPostingStatusEnum from .job_recruiters_item import JobRecruitersItem from .job_status import JobStatus from .job_status_enum import JobStatusEnum +from .job_type_enum import JobTypeEnum from .link_token import LinkToken from .linked_account_condition import LinkedAccountCondition from .linked_account_condition_request import LinkedAccountConditionRequest @@ -136,6 +143,7 @@ from .paginated_issue_list import PaginatedIssueList from .paginated_job_interview_stage_list import PaginatedJobInterviewStageList from .paginated_job_list import PaginatedJobList +from .paginated_job_posting_list import PaginatedJobPostingList from .paginated_offer_list import PaginatedOfferList from .paginated_office_list import PaginatedOfficeList from .paginated_reject_reason_list import PaginatedRejectReasonList @@ -189,11 +197,11 @@ from .screening_question_job import ScreeningQuestionJob from .screening_question_option import ScreeningQuestionOption from .screening_question_type import ScreeningQuestionType +from .screening_question_type_enum import ScreeningQuestionTypeEnum from .selective_sync_configurations_usage_enum import SelectiveSyncConfigurationsUsageEnum from .sync_status import SyncStatus from .sync_status_status_enum import SyncStatusStatusEnum from .tag import Tag -from .type_enum import TypeEnum from .url import Url from .url_request import UrlRequest from .url_request_url_type import UrlRequestUrlType @@ -229,12 +237,14 @@ "ApplicationCreditedTo", "ApplicationCurrentStage", "ApplicationJob", + "ApplicationOffersItem", "ApplicationRejectReason", "ApplicationRequest", "ApplicationRequestCandidate", "ApplicationRequestCreditedTo", "ApplicationRequestCurrentStage", "ApplicationRequestJob", + "ApplicationRequestOffersItem", "ApplicationRequestRejectReason", "ApplicationResponse", "AsyncPassthroughReciept", @@ -304,9 +314,14 @@ "JobInterviewStage", "JobInterviewStageJob", "JobOfficesItem", + "JobPosting", + "JobPostingJob", + "JobPostingJobPostingUrlsItem", + "JobPostingStatusEnum", "JobRecruitersItem", "JobStatus", "JobStatusEnum", + "JobTypeEnum", "LinkToken", "LinkedAccountCondition", "LinkedAccountConditionRequest", @@ -340,6 +355,7 @@ "PaginatedIssueList", "PaginatedJobInterviewStageList", "PaginatedJobList", + "PaginatedJobPostingList", "PaginatedOfferList", "PaginatedOfficeList", "PaginatedRejectReasonList", @@ -393,11 +409,11 @@ "ScreeningQuestionJob", "ScreeningQuestionOption", "ScreeningQuestionType", + "ScreeningQuestionTypeEnum", "SelectiveSyncConfigurationsUsageEnum", "SyncStatus", "SyncStatusStatusEnum", "Tag", - "TypeEnum", "Url", "UrlRequest", "UrlRequestUrlType", diff --git a/src/merge/resources/ats/types/account_details_and_actions.py b/src/merge/resources/ats/types/account_details_and_actions.py index fda4a3a9..8141e146 100644 --- a/src/merge/resources/ats/types/account_details_and_actions.py +++ b/src/merge/resources/ats/types/account_details_and_actions.py @@ -34,6 +34,9 @@ class AccountDetailsAndActions(pydantic.BaseModel): end_user_origin_id: typing.Optional[str] end_user_organization_name: str end_user_email_address: str + subdomain: typing.Optional[str] = pydantic.Field( + description="The tenant or domain the customer has provided access to." + ) webhook_listener_url: str is_duplicate: typing.Optional[bool] = pydantic.Field( description="Whether a Production Linked Account's credentials match another existing Production Linked Account. This field is `null` for Test Linked Accounts, incomplete Production Linked Accounts, and ignored duplicate Production Linked Account sets." diff --git a/src/merge/resources/ats/types/activity.py b/src/merge/resources/ats/types/activity.py index c3781b2f..4d68016a 100644 --- a/src/merge/resources/ats/types/activity.py +++ b/src/merge/resources/ats/types/activity.py @@ -30,6 +30,10 @@ class Activity(pydantic.BaseModel): id: typing.Optional[str] remote_id: typing.Optional[str] = pydantic.Field(description="The third-party API ID of the matching object.") + created_at: typing.Optional[dt.datetime] + modified_at: typing.Optional[dt.datetime] = pydantic.Field( + description="This is the datetime that this object was last updated by Merge" + ) user: typing.Optional[ActivityUser] = pydantic.Field(description="The user that performed the action.") remote_created_at: typing.Optional[dt.datetime] = pydantic.Field( description="When the third party's activity was created." @@ -52,10 +56,6 @@ class Activity(pydantic.BaseModel): remote_was_deleted: typing.Optional[bool] = pydantic.Field( description="Indicates whether or not this object has been deleted in the third party platform." ) - created_at: typing.Optional[dt.datetime] - modified_at: typing.Optional[dt.datetime] = pydantic.Field( - description="This is the datetime that this object was last updated by Merge" - ) field_mappings: typing.Optional[typing.Dict[str, typing.Any]] remote_data: typing.Optional[typing.List[RemoteData]] diff --git a/src/merge/resources/ats/types/application.py b/src/merge/resources/ats/types/application.py index 5eadb333..81dd7026 100644 --- a/src/merge/resources/ats/types/application.py +++ b/src/merge/resources/ats/types/application.py @@ -33,10 +33,15 @@ class Application(pydantic.BaseModel): id: typing.Optional[str] remote_id: typing.Optional[str] = pydantic.Field(description="The third-party API ID of the matching object.") + created_at: typing.Optional[dt.datetime] + modified_at: typing.Optional[dt.datetime] = pydantic.Field( + description="This is the datetime that this object was last updated by Merge" + ) candidate: typing.Optional[ApplicationCandidate] = pydantic.Field(description="The candidate applying.") job: typing.Optional[ApplicationJob] = pydantic.Field(description="The job being applied for.") applied_at: typing.Optional[dt.datetime] = pydantic.Field(description="When the application was submitted.") rejected_at: typing.Optional[dt.datetime] = pydantic.Field(description="When the application was rejected.") + offers: typing.Optional[typing.List[typing.Optional[ApplicationOffersItem]]] source: typing.Optional[str] = pydantic.Field(description="The application's source.") credited_to: typing.Optional[ApplicationCreditedTo] = pydantic.Field( description="The user credited for this application." @@ -48,10 +53,6 @@ class Application(pydantic.BaseModel): description="The application's reason for rejection." ) remote_was_deleted: typing.Optional[bool] - created_at: typing.Optional[dt.datetime] - modified_at: typing.Optional[dt.datetime] = pydantic.Field( - description="This is the datetime that this object was last updated by Merge" - ) field_mappings: typing.Optional[typing.Dict[str, typing.Any]] remote_data: typing.Optional[typing.List[RemoteData]] @@ -70,5 +71,6 @@ class Config: from .application_candidate import ApplicationCandidate # noqa: E402 +from .application_offers_item import ApplicationOffersItem # noqa: E402 Application.update_forward_refs() diff --git a/src/merge/resources/ats/types/application_offers_item.py b/src/merge/resources/ats/types/application_offers_item.py new file mode 100644 index 00000000..2bc76f08 --- /dev/null +++ b/src/merge/resources/ats/types/application_offers_item.py @@ -0,0 +1,7 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +from .offer import Offer + +ApplicationOffersItem = typing.Union[str, Offer] diff --git a/src/merge/resources/ats/types/application_request.py b/src/merge/resources/ats/types/application_request.py index b591e9d7..2f44725d 100644 --- a/src/merge/resources/ats/types/application_request.py +++ b/src/merge/resources/ats/types/application_request.py @@ -8,6 +8,7 @@ from .application_request_credited_to import ApplicationRequestCreditedTo from .application_request_current_stage import ApplicationRequestCurrentStage from .application_request_job import ApplicationRequestJob +from .application_request_offers_item import ApplicationRequestOffersItem from .application_request_reject_reason import ApplicationRequestRejectReason try: @@ -33,6 +34,7 @@ class ApplicationRequest(pydantic.BaseModel): job: typing.Optional[ApplicationRequestJob] = pydantic.Field(description="The job being applied for.") applied_at: typing.Optional[dt.datetime] = pydantic.Field(description="When the application was submitted.") rejected_at: typing.Optional[dt.datetime] = pydantic.Field(description="When the application was rejected.") + offers: typing.Optional[typing.List[typing.Optional[ApplicationRequestOffersItem]]] source: typing.Optional[str] = pydantic.Field(description="The application's source.") credited_to: typing.Optional[ApplicationRequestCreditedTo] = pydantic.Field( description="The user credited for this application." diff --git a/src/merge/resources/ats/types/application_request_offers_item.py b/src/merge/resources/ats/types/application_request_offers_item.py new file mode 100644 index 00000000..1c727579 --- /dev/null +++ b/src/merge/resources/ats/types/application_request_offers_item.py @@ -0,0 +1,7 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +from .offer import Offer + +ApplicationRequestOffersItem = typing.Union[str, Offer] diff --git a/src/merge/resources/ats/types/attachment.py b/src/merge/resources/ats/types/attachment.py index 5d6de657..525e36e8 100644 --- a/src/merge/resources/ats/types/attachment.py +++ b/src/merge/resources/ats/types/attachment.py @@ -28,6 +28,10 @@ class Attachment(pydantic.BaseModel): id: typing.Optional[str] remote_id: typing.Optional[str] = pydantic.Field(description="The third-party API ID of the matching object.") + created_at: typing.Optional[dt.datetime] + modified_at: typing.Optional[dt.datetime] = pydantic.Field( + description="This is the datetime that this object was last updated by Merge" + ) file_name: typing.Optional[str] = pydantic.Field(description="The attachment's name.") file_url: typing.Optional[str] = pydantic.Field(description="The attachment's url.") candidate: typing.Optional[str] = pydantic.Field(description="") @@ -42,10 +46,6 @@ class Attachment(pydantic.BaseModel): ) ) remote_was_deleted: typing.Optional[bool] - created_at: typing.Optional[dt.datetime] - modified_at: typing.Optional[dt.datetime] = pydantic.Field( - description="This is the datetime that this object was last updated by Merge" - ) field_mappings: typing.Optional[typing.Dict[str, typing.Any]] remote_data: typing.Optional[typing.List[RemoteData]] diff --git a/src/merge/resources/ats/types/audit_log_event.py b/src/merge/resources/ats/types/audit_log_event.py index 7bb2d3c6..131ad94b 100644 --- a/src/merge/resources/ats/types/audit_log_event.py +++ b/src/merge/resources/ats/types/audit_log_event.py @@ -69,6 +69,9 @@ class AuditLogEvent(pydantic.BaseModel): "- `CHANGED_LINKED_ACCOUNT_FIELD_MAPPING` - CHANGED_LINKED_ACCOUNT_FIELD_MAPPING\n" "- `DELETED_INTEGRATION_WIDE_FIELD_MAPPING` - DELETED_INTEGRATION_WIDE_FIELD_MAPPING\n" "- `DELETED_LINKED_ACCOUNT_FIELD_MAPPING` - DELETED_LINKED_ACCOUNT_FIELD_MAPPING\n" + "- `FORCED_LINKED_ACCOUNT_RESYNC` - FORCED_LINKED_ACCOUNT_RESYNC\n" + "- `MUTED_ISSUE` - MUTED_ISSUE\n" + "- `GENERATED_MAGIC_LINK` - GENERATED_MAGIC_LINK\n" ) ) event_description: str diff --git a/src/merge/resources/ats/types/candidate.py b/src/merge/resources/ats/types/candidate.py index f20250f1..5202d2b2 100644 --- a/src/merge/resources/ats/types/candidate.py +++ b/src/merge/resources/ats/types/candidate.py @@ -33,6 +33,10 @@ class Candidate(pydantic.BaseModel): id: typing.Optional[str] remote_id: typing.Optional[str] = pydantic.Field(description="The third-party API ID of the matching object.") + created_at: typing.Optional[dt.datetime] + modified_at: typing.Optional[dt.datetime] = pydantic.Field( + description="This is the datetime that this object was last updated by Merge" + ) first_name: typing.Optional[str] = pydantic.Field(description="The candidate's first name.") last_name: typing.Optional[str] = pydantic.Field(description="The candidate's last name.") company: typing.Optional[str] = pydantic.Field(description="The candidate's current company.") @@ -64,10 +68,6 @@ class Candidate(pydantic.BaseModel): description="Array of `Attachment` object IDs." ) remote_was_deleted: typing.Optional[bool] - created_at: typing.Optional[dt.datetime] - modified_at: typing.Optional[dt.datetime] = pydantic.Field( - description="This is the datetime that this object was last updated by Merge" - ) field_mappings: typing.Optional[typing.Dict[str, typing.Any]] remote_data: typing.Optional[typing.List[RemoteData]] diff --git a/src/merge/resources/ats/types/condition_schema.py b/src/merge/resources/ats/types/condition_schema.py index 7ebf9534..c8aebb68 100644 --- a/src/merge/resources/ats/types/condition_schema.py +++ b/src/merge/resources/ats/types/condition_schema.py @@ -20,12 +20,8 @@ class ConditionSchema(pydantic.BaseModel): common_model: typing.Optional[str] = pydantic.Field( description="The common model for which a condition schema is defined." ) - native_name: typing.Optional[str] = pydantic.Field( - description='User-facing _native condition_ name. e.g. "Skip Manager".' - ) - field_name: typing.Optional[str] = pydantic.Field( - description='The name of the field on the common model that this condition corresponds to, if they conceptually match. e.g. "location_type".' - ) + native_name: typing.Optional[str] + field_name: typing.Optional[str] is_unique: typing.Optional[bool] = pydantic.Field( description="Whether this condition can only be applied once. If false, the condition can be AND'd together multiple times." ) diff --git a/src/merge/resources/ats/types/data_passthrough_request.py b/src/merge/resources/ats/types/data_passthrough_request.py index 3acebedd..def5b5c2 100644 --- a/src/merge/resources/ats/types/data_passthrough_request.py +++ b/src/merge/resources/ats/types/data_passthrough_request.py @@ -28,9 +28,13 @@ class DataPassthroughRequest(pydantic.BaseModel): """ method: MethodEnum - path: str - base_url_override: typing.Optional[str] - data: typing.Optional[str] + path: str = pydantic.Field(description="The path of the request in the third party's platform.") + base_url_override: typing.Optional[str] = pydantic.Field( + description="An optional override of the third party's base url for the request." + ) + data: typing.Optional[str] = pydantic.Field( + description="The data with the request. You must include a `request_format` parameter matching the data's format" + ) multipart_form_data: typing.Optional[typing.List[MultipartFormFieldRequest]] = pydantic.Field( description="Pass an array of `MultipartFormField` objects in here instead of using the `data` param if `request_format` is set to `MULTIPART`." ) diff --git a/src/merge/resources/ats/types/department.py b/src/merge/resources/ats/types/department.py index 27bbd22c..1d03cc63 100644 --- a/src/merge/resources/ats/types/department.py +++ b/src/merge/resources/ats/types/department.py @@ -27,14 +27,14 @@ class Department(pydantic.BaseModel): id: typing.Optional[str] remote_id: typing.Optional[str] = pydantic.Field(description="The third-party API ID of the matching object.") - name: typing.Optional[str] = pydantic.Field(description="The department's name.") - remote_was_deleted: typing.Optional[bool] = pydantic.Field( - description="Indicates whether or not this object has been deleted in the third party platform." - ) created_at: typing.Optional[dt.datetime] modified_at: typing.Optional[dt.datetime] = pydantic.Field( description="This is the datetime that this object was last updated by Merge" ) + name: typing.Optional[str] = pydantic.Field(description="The department's name.") + remote_was_deleted: typing.Optional[bool] = pydantic.Field( + description="Indicates whether or not this object has been deleted in the third party platform." + ) field_mappings: typing.Optional[typing.Dict[str, typing.Any]] remote_data: typing.Optional[typing.List[RemoteData]] diff --git a/src/merge/resources/ats/types/eeoc.py b/src/merge/resources/ats/types/eeoc.py index ed6b4a83..7110bbd2 100644 --- a/src/merge/resources/ats/types/eeoc.py +++ b/src/merge/resources/ats/types/eeoc.py @@ -32,6 +32,10 @@ class Eeoc(pydantic.BaseModel): id: typing.Optional[str] remote_id: typing.Optional[str] = pydantic.Field(description="The third-party API ID of the matching object.") + created_at: typing.Optional[dt.datetime] + modified_at: typing.Optional[dt.datetime] = pydantic.Field( + description="This is the datetime that this object was last updated by Merge" + ) candidate: typing.Optional[EeocCandidate] = pydantic.Field(description="The candidate being represented.") submitted_at: typing.Optional[dt.datetime] = pydantic.Field(description="When the information was submitted.") race: typing.Optional[EeocRace] = pydantic.Field( @@ -80,10 +84,6 @@ class Eeoc(pydantic.BaseModel): remote_was_deleted: typing.Optional[bool] = pydantic.Field( description="Indicates whether or not this object has been deleted in the third party platform." ) - created_at: typing.Optional[dt.datetime] - modified_at: typing.Optional[dt.datetime] = pydantic.Field( - description="This is the datetime that this object was last updated by Merge" - ) field_mappings: typing.Optional[typing.Dict[str, typing.Any]] remote_data: typing.Optional[typing.List[RemoteData]] diff --git a/src/merge/resources/ats/types/email_address.py b/src/merge/resources/ats/types/email_address.py index ffd27c63..1cdda6e7 100644 --- a/src/merge/resources/ats/types/email_address.py +++ b/src/merge/resources/ats/types/email_address.py @@ -25,16 +25,16 @@ class EmailAddress(pydantic.BaseModel): Fetch from the `GET Candidate` endpoint and view their email addresses. """ + created_at: typing.Optional[dt.datetime] + modified_at: typing.Optional[dt.datetime] = pydantic.Field( + description="This is the datetime that this object was last updated by Merge" + ) value: typing.Optional[str] = pydantic.Field(description="The email address.") email_address_type: typing.Optional[EmailAddressEmailAddressType] = pydantic.Field( description=( "The type of email address.\n" "\n" "- `PERSONAL` - PERSONAL\n" "- `WORK` - WORK\n" "- `OTHER` - OTHER\n" ) ) - created_at: typing.Optional[dt.datetime] - modified_at: typing.Optional[dt.datetime] = pydantic.Field( - description="This is the datetime that this object was last updated by Merge" - ) def json(self, **kwargs: typing.Any) -> str: kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs} diff --git a/src/merge/resources/ats/types/event_type_enum.py b/src/merge/resources/ats/types/event_type_enum.py index 5ed5b7f1..434539c7 100644 --- a/src/merge/resources/ats/types/event_type_enum.py +++ b/src/merge/resources/ats/types/event_type_enum.py @@ -39,6 +39,9 @@ class EventTypeEnum(str, enum.Enum): - `CHANGED_LINKED_ACCOUNT_FIELD_MAPPING` - CHANGED_LINKED_ACCOUNT_FIELD_MAPPING - `DELETED_INTEGRATION_WIDE_FIELD_MAPPING` - DELETED_INTEGRATION_WIDE_FIELD_MAPPING - `DELETED_LINKED_ACCOUNT_FIELD_MAPPING` - DELETED_LINKED_ACCOUNT_FIELD_MAPPING + - `FORCED_LINKED_ACCOUNT_RESYNC` - FORCED_LINKED_ACCOUNT_RESYNC + - `MUTED_ISSUE` - MUTED_ISSUE + - `GENERATED_MAGIC_LINK` - GENERATED_MAGIC_LINK """ CREATED_REMOTE_PRODUCTION_API_KEY = "CREATED_REMOTE_PRODUCTION_API_KEY" @@ -72,6 +75,9 @@ class EventTypeEnum(str, enum.Enum): CHANGED_LINKED_ACCOUNT_FIELD_MAPPING = "CHANGED_LINKED_ACCOUNT_FIELD_MAPPING" DELETED_INTEGRATION_WIDE_FIELD_MAPPING = "DELETED_INTEGRATION_WIDE_FIELD_MAPPING" DELETED_LINKED_ACCOUNT_FIELD_MAPPING = "DELETED_LINKED_ACCOUNT_FIELD_MAPPING" + FORCED_LINKED_ACCOUNT_RESYNC = "FORCED_LINKED_ACCOUNT_RESYNC" + MUTED_ISSUE = "MUTED_ISSUE" + GENERATED_MAGIC_LINK = "GENERATED_MAGIC_LINK" def visit( self, @@ -106,6 +112,9 @@ def visit( changed_linked_account_field_mapping: typing.Callable[[], T_Result], deleted_integration_wide_field_mapping: typing.Callable[[], T_Result], deleted_linked_account_field_mapping: typing.Callable[[], T_Result], + forced_linked_account_resync: typing.Callable[[], T_Result], + muted_issue: typing.Callable[[], T_Result], + generated_magic_link: typing.Callable[[], T_Result], ) -> T_Result: if self is EventTypeEnum.CREATED_REMOTE_PRODUCTION_API_KEY: return created_remote_production_api_key() @@ -169,3 +178,9 @@ def visit( return deleted_integration_wide_field_mapping() if self is EventTypeEnum.DELETED_LINKED_ACCOUNT_FIELD_MAPPING: return deleted_linked_account_field_mapping() + if self is EventTypeEnum.FORCED_LINKED_ACCOUNT_RESYNC: + return forced_linked_account_resync() + if self is EventTypeEnum.MUTED_ISSUE: + return muted_issue() + if self is EventTypeEnum.GENERATED_MAGIC_LINK: + return generated_magic_link() diff --git a/src/merge/resources/ats/types/external_target_field_api_response.py b/src/merge/resources/ats/types/external_target_field_api_response.py index 04dd40da..4e21aff3 100644 --- a/src/merge/resources/ats/types/external_target_field_api_response.py +++ b/src/merge/resources/ats/types/external_target_field_api_response.py @@ -23,6 +23,7 @@ class ExternalTargetFieldApiResponse(pydantic.BaseModel): alias="ScheduledInterview" ) job: typing.Optional[typing.List[ExternalTargetFieldApi]] = pydantic.Field(alias="Job") + job_posting: typing.Optional[typing.List[ExternalTargetFieldApi]] = pydantic.Field(alias="JobPosting") job_interview_stage: typing.Optional[typing.List[ExternalTargetFieldApi]] = pydantic.Field( alias="JobInterviewStage" ) diff --git a/src/merge/resources/ats/types/field_mapping_api_instance_response.py b/src/merge/resources/ats/types/field_mapping_api_instance_response.py index 37f37fee..fe6f2f13 100644 --- a/src/merge/resources/ats/types/field_mapping_api_instance_response.py +++ b/src/merge/resources/ats/types/field_mapping_api_instance_response.py @@ -23,6 +23,7 @@ class FieldMappingApiInstanceResponse(pydantic.BaseModel): alias="ScheduledInterview" ) job: typing.Optional[typing.List[FieldMappingApiInstance]] = pydantic.Field(alias="Job") + job_posting: typing.Optional[typing.List[FieldMappingApiInstance]] = pydantic.Field(alias="JobPosting") job_interview_stage: typing.Optional[typing.List[FieldMappingApiInstance]] = pydantic.Field( alias="JobInterviewStage" ) diff --git a/src/merge/resources/ats/types/job.py b/src/merge/resources/ats/types/job.py index b63c3589..85766a5d 100644 --- a/src/merge/resources/ats/types/job.py +++ b/src/merge/resources/ats/types/job.py @@ -9,6 +9,7 @@ from .job_offices_item import JobOfficesItem from .job_recruiters_item import JobRecruitersItem from .job_status import JobStatus +from .job_type_enum import JobTypeEnum from .remote_data import RemoteData from .url import Url @@ -33,6 +34,10 @@ class Job(pydantic.BaseModel): id: typing.Optional[str] remote_id: typing.Optional[str] = pydantic.Field(description="The third-party API ID of the matching object.") + created_at: typing.Optional[dt.datetime] + modified_at: typing.Optional[dt.datetime] = pydantic.Field( + description="This is the datetime that this object was last updated by Merge" + ) name: typing.Optional[str] = pydantic.Field(description="The job's name.") description: typing.Optional[str] = pydantic.Field(description="The job's description.") code: typing.Optional[str] = pydantic.Field( @@ -49,6 +54,18 @@ class Job(pydantic.BaseModel): "- `PENDING` - PENDING\n" ) ) + type: typing.Optional[JobTypeEnum] = pydantic.Field( + description=( + "The job's type.\n" + "\n" + "- `POSTING` - POSTING\n" + "- `REQUISITION` - REQUISITION\n" + "- `PROFILE` - PROFILE\n" + ) + ) + job_postings: typing.Optional[typing.List[typing.Optional[str]]] = pydantic.Field( + description="IDs of `JobPosting` objects that serve as job postings for this `Job`." + ) job_posting_urls: typing.Optional[typing.List[Url]] remote_created_at: typing.Optional[dt.datetime] = pydantic.Field( description="When the third party's job was created." @@ -72,10 +89,6 @@ class Job(pydantic.BaseModel): remote_was_deleted: typing.Optional[bool] = pydantic.Field( description="Indicates whether or not this object has been deleted in the third party platform." ) - created_at: typing.Optional[dt.datetime] - modified_at: typing.Optional[dt.datetime] = pydantic.Field( - description="This is the datetime that this object was last updated by Merge" - ) field_mappings: typing.Optional[typing.Dict[str, typing.Any]] remote_data: typing.Optional[typing.List[RemoteData]] diff --git a/src/merge/resources/ats/types/job_interview_stage.py b/src/merge/resources/ats/types/job_interview_stage.py index f4c9206a..e3d27e51 100644 --- a/src/merge/resources/ats/types/job_interview_stage.py +++ b/src/merge/resources/ats/types/job_interview_stage.py @@ -28,6 +28,10 @@ class JobInterviewStage(pydantic.BaseModel): id: typing.Optional[str] remote_id: typing.Optional[str] = pydantic.Field(description="The third-party API ID of the matching object.") + created_at: typing.Optional[dt.datetime] + modified_at: typing.Optional[dt.datetime] = pydantic.Field( + description="This is the datetime that this object was last updated by Merge" + ) name: typing.Optional[str] = pydantic.Field( description="Standard stage names are offered by ATS systems but can be modified by users." ) @@ -40,10 +44,6 @@ class JobInterviewStage(pydantic.BaseModel): remote_was_deleted: typing.Optional[bool] = pydantic.Field( description="Indicates whether or not this object has been deleted in the third party platform." ) - created_at: typing.Optional[dt.datetime] - modified_at: typing.Optional[dt.datetime] = pydantic.Field( - description="This is the datetime that this object was last updated by Merge" - ) field_mappings: typing.Optional[typing.Dict[str, typing.Any]] remote_data: typing.Optional[typing.List[RemoteData]] diff --git a/src/merge/resources/ats/types/job_posting.py b/src/merge/resources/ats/types/job_posting.py new file mode 100644 index 00000000..34fe2170 --- /dev/null +++ b/src/merge/resources/ats/types/job_posting.py @@ -0,0 +1,80 @@ +# This file was auto-generated by Fern from our API Definition. + +import datetime as dt +import typing + +from ....core.datetime_utils import serialize_datetime +from .job_posting_job import JobPostingJob +from .job_posting_job_posting_urls_item import JobPostingJobPostingUrlsItem +from .job_posting_status_enum import JobPostingStatusEnum +from .remote_data import RemoteData + +try: + import pydantic.v1 as pydantic # type: ignore +except ImportError: + import pydantic # type: ignore + + +class JobPosting(pydantic.BaseModel): + """ + # The JobPosting Object + + ### Description + + The `JobPosting` object represents an external announcement on a job board created by an organization to attract qualified candidates to apply for a specific `Job` opening + + ### Usage Example + + Fetch from the `LIST JobPostings` endpoint to show all job postings. + """ + + id: typing.Optional[str] + remote_id: typing.Optional[str] = pydantic.Field(description="The third-party API ID of the matching object.") + created_at: typing.Optional[dt.datetime] + modified_at: typing.Optional[dt.datetime] = pydantic.Field( + description="This is the datetime that this object was last updated by Merge" + ) + title: typing.Optional[str] = pydantic.Field(description="The job posting’s title.") + job_posting_urls: typing.Optional[typing.List[JobPostingJobPostingUrlsItem]] = pydantic.Field( + description="The Url object is used to represent hyperlinks for a candidate to apply to a given job." + ) + job: typing.Optional[JobPostingJob] = pydantic.Field(description="ID of `Job` object for this `JobPosting`.") + status: typing.Optional[JobPostingStatusEnum] = pydantic.Field( + description=( + "The job posting's status.\n" + "\n" + "- `PUBLISHED` - PUBLISHED\n" + "- `CLOSED` - CLOSED\n" + "- `DRAFT` - DRAFT\n" + "- `INTERNAL` - INTERNAL\n" + "- `PENDING` - PENDING\n" + ) + ) + content: typing.Optional[str] = pydantic.Field(description="The job posting’s content.") + remote_created_at: typing.Optional[dt.datetime] = pydantic.Field( + description="When the third party's job posting was created." + ) + remote_updated_at: typing.Optional[dt.datetime] = pydantic.Field( + description="When the third party's job posting was updated." + ) + is_internal: typing.Optional[bool] = pydantic.Field( + description="Indicates whether the job posting is internal or external." + ) + remote_was_deleted: typing.Optional[bool] = pydantic.Field( + description="Indicates whether or not this object has been deleted in the third party platform." + ) + field_mappings: typing.Optional[typing.Dict[str, typing.Any]] + remote_data: typing.Optional[typing.List[RemoteData]] + + def json(self, **kwargs: typing.Any) -> str: + kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs} + return super().json(**kwargs_with_defaults) + + def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]: + kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs} + return super().dict(**kwargs_with_defaults) + + class Config: + frozen = True + smart_union = True + json_encoders = {dt.datetime: serialize_datetime} diff --git a/src/merge/resources/ats/types/job_posting_job.py b/src/merge/resources/ats/types/job_posting_job.py new file mode 100644 index 00000000..764f306f --- /dev/null +++ b/src/merge/resources/ats/types/job_posting_job.py @@ -0,0 +1,7 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +from .job import Job + +JobPostingJob = typing.Union[str, Job] diff --git a/src/merge/resources/ats/types/job_posting_job_posting_urls_item.py b/src/merge/resources/ats/types/job_posting_job_posting_urls_item.py new file mode 100644 index 00000000..2bb3e7de --- /dev/null +++ b/src/merge/resources/ats/types/job_posting_job_posting_urls_item.py @@ -0,0 +1,7 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +from .url import Url + +JobPostingJobPostingUrlsItem = typing.Union[str, Url] diff --git a/src/merge/resources/ats/types/job_posting_status_enum.py b/src/merge/resources/ats/types/job_posting_status_enum.py new file mode 100644 index 00000000..1936aaa3 --- /dev/null +++ b/src/merge/resources/ats/types/job_posting_status_enum.py @@ -0,0 +1,41 @@ +# This file was auto-generated by Fern from our API Definition. + +import enum +import typing + +T_Result = typing.TypeVar("T_Result") + + +class JobPostingStatusEnum(str, enum.Enum): + """ + - `PUBLISHED` - PUBLISHED + - `CLOSED` - CLOSED + - `DRAFT` - DRAFT + - `INTERNAL` - INTERNAL + - `PENDING` - PENDING + """ + + PUBLISHED = "PUBLISHED" + CLOSED = "CLOSED" + DRAFT = "DRAFT" + INTERNAL = "INTERNAL" + PENDING = "PENDING" + + def visit( + self, + published: typing.Callable[[], T_Result], + closed: typing.Callable[[], T_Result], + draft: typing.Callable[[], T_Result], + internal: typing.Callable[[], T_Result], + pending: typing.Callable[[], T_Result], + ) -> T_Result: + if self is JobPostingStatusEnum.PUBLISHED: + return published() + if self is JobPostingStatusEnum.CLOSED: + return closed() + if self is JobPostingStatusEnum.DRAFT: + return draft() + if self is JobPostingStatusEnum.INTERNAL: + return internal() + if self is JobPostingStatusEnum.PENDING: + return pending() diff --git a/src/merge/resources/ats/types/job_type_enum.py b/src/merge/resources/ats/types/job_type_enum.py new file mode 100644 index 00000000..d98ee0d0 --- /dev/null +++ b/src/merge/resources/ats/types/job_type_enum.py @@ -0,0 +1,31 @@ +# This file was auto-generated by Fern from our API Definition. + +import enum +import typing + +T_Result = typing.TypeVar("T_Result") + + +class JobTypeEnum(str, enum.Enum): + """ + - `POSTING` - POSTING + - `REQUISITION` - REQUISITION + - `PROFILE` - PROFILE + """ + + POSTING = "POSTING" + REQUISITION = "REQUISITION" + PROFILE = "PROFILE" + + def visit( + self, + posting: typing.Callable[[], T_Result], + requisition: typing.Callable[[], T_Result], + profile: typing.Callable[[], T_Result], + ) -> T_Result: + if self is JobTypeEnum.POSTING: + return posting() + if self is JobTypeEnum.REQUISITION: + return requisition() + if self is JobTypeEnum.PROFILE: + return profile() diff --git a/src/merge/resources/ats/types/linked_account_condition.py b/src/merge/resources/ats/types/linked_account_condition.py index 430adc00..f13ef90d 100644 --- a/src/merge/resources/ats/types/linked_account_condition.py +++ b/src/merge/resources/ats/types/linked_account_condition.py @@ -16,14 +16,10 @@ class LinkedAccountCondition(pydantic.BaseModel): description="The ID indicating which condition schema to use for a specific condition." ) common_model: typing.Optional[str] = pydantic.Field(description="The common model for a specific condition.") - native_name: typing.Optional[str] = pydantic.Field( - description='User-facing _native condition_ name. e.g. "Skip Manager".' - ) + native_name: typing.Optional[str] operator: str = pydantic.Field(description="The operator for a specific condition.") value: typing.Optional[typing.Any] - field_name: typing.Optional[str] = pydantic.Field( - description='The name of the field on the common model that this condition corresponds to, if they conceptually match. e.g. "location_type".' - ) + field_name: typing.Optional[str] def json(self, **kwargs: typing.Any) -> str: kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs} diff --git a/src/merge/resources/ats/types/linked_account_condition_request.py b/src/merge/resources/ats/types/linked_account_condition_request.py index 23ff21f1..ce36a27f 100644 --- a/src/merge/resources/ats/types/linked_account_condition_request.py +++ b/src/merge/resources/ats/types/linked_account_condition_request.py @@ -12,6 +12,7 @@ class LinkedAccountConditionRequest(pydantic.BaseModel): + id: typing.Optional[str] = pydantic.Field(description="The ID indicating which Linked Account Condition this is.") condition_schema_id: str = pydantic.Field( description="The ID indicating which condition schema to use for a specific condition." ) diff --git a/src/merge/resources/ats/types/offer.py b/src/merge/resources/ats/types/offer.py index 43416b68..2cc07d81 100644 --- a/src/merge/resources/ats/types/offer.py +++ b/src/merge/resources/ats/types/offer.py @@ -1,10 +1,11 @@ # This file was auto-generated by Fern from our API Definition. +from __future__ import annotations + import datetime as dt import typing from ....core.datetime_utils import serialize_datetime -from .offer_application import OfferApplication from .offer_creator import OfferCreator from .offer_status import OfferStatus from .remote_data import RemoteData @@ -30,6 +31,10 @@ class Offer(pydantic.BaseModel): id: typing.Optional[str] remote_id: typing.Optional[str] = pydantic.Field(description="The third-party API ID of the matching object.") + created_at: typing.Optional[dt.datetime] + modified_at: typing.Optional[dt.datetime] = pydantic.Field( + description="This is the datetime that this object was last updated by Merge" + ) application: typing.Optional[OfferApplication] = pydantic.Field( description="The application who is receiving the offer." ) @@ -58,10 +63,6 @@ class Offer(pydantic.BaseModel): remote_was_deleted: typing.Optional[bool] = pydantic.Field( description="Indicates whether or not this object has been deleted in the third party platform." ) - created_at: typing.Optional[dt.datetime] - modified_at: typing.Optional[dt.datetime] = pydantic.Field( - description="This is the datetime that this object was last updated by Merge" - ) field_mappings: typing.Optional[typing.Dict[str, typing.Any]] remote_data: typing.Optional[typing.List[RemoteData]] @@ -77,3 +78,8 @@ class Config: frozen = True smart_union = True json_encoders = {dt.datetime: serialize_datetime} + + +from .offer_application import OfferApplication # noqa: E402 + +Offer.update_forward_refs() diff --git a/src/merge/resources/ats/types/office.py b/src/merge/resources/ats/types/office.py index 795ecdb6..a8749361 100644 --- a/src/merge/resources/ats/types/office.py +++ b/src/merge/resources/ats/types/office.py @@ -27,15 +27,15 @@ class Office(pydantic.BaseModel): id: typing.Optional[str] remote_id: typing.Optional[str] = pydantic.Field(description="The third-party API ID of the matching object.") + created_at: typing.Optional[dt.datetime] + modified_at: typing.Optional[dt.datetime] = pydantic.Field( + description="This is the datetime that this object was last updated by Merge" + ) name: typing.Optional[str] = pydantic.Field(description="The office's name.") location: typing.Optional[str] = pydantic.Field(description="The office's location.") remote_was_deleted: typing.Optional[bool] = pydantic.Field( description="Indicates whether or not this object has been deleted in the third party platform." ) - created_at: typing.Optional[dt.datetime] - modified_at: typing.Optional[dt.datetime] = pydantic.Field( - description="This is the datetime that this object was last updated by Merge" - ) field_mappings: typing.Optional[typing.Dict[str, typing.Any]] remote_data: typing.Optional[typing.List[RemoteData]] diff --git a/src/merge/resources/ats/types/paginated_job_posting_list.py b/src/merge/resources/ats/types/paginated_job_posting_list.py new file mode 100644 index 00000000..db011b46 --- /dev/null +++ b/src/merge/resources/ats/types/paginated_job_posting_list.py @@ -0,0 +1,31 @@ +# This file was auto-generated by Fern from our API Definition. + +import datetime as dt +import typing + +from ....core.datetime_utils import serialize_datetime +from .job_posting import JobPosting + +try: + import pydantic.v1 as pydantic # type: ignore +except ImportError: + import pydantic # type: ignore + + +class PaginatedJobPostingList(pydantic.BaseModel): + next: typing.Optional[str] + previous: typing.Optional[str] + results: typing.Optional[typing.List[JobPosting]] + + def json(self, **kwargs: typing.Any) -> str: + kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs} + return super().json(**kwargs_with_defaults) + + def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]: + kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs} + return super().dict(**kwargs_with_defaults) + + class Config: + frozen = True + smart_union = True + json_encoders = {dt.datetime: serialize_datetime} diff --git a/src/merge/resources/ats/types/phone_number.py b/src/merge/resources/ats/types/phone_number.py index 2c9de05f..d401c076 100644 --- a/src/merge/resources/ats/types/phone_number.py +++ b/src/merge/resources/ats/types/phone_number.py @@ -25,6 +25,10 @@ class PhoneNumber(pydantic.BaseModel): Fetch from the `GET Candidate` endpoint and view their phone numbers. """ + created_at: typing.Optional[dt.datetime] + modified_at: typing.Optional[dt.datetime] = pydantic.Field( + description="This is the datetime that this object was last updated by Merge" + ) value: typing.Optional[str] = pydantic.Field(description="The phone number.") phone_number_type: typing.Optional[PhoneNumberPhoneNumberType] = pydantic.Field( description=( @@ -37,10 +41,6 @@ class PhoneNumber(pydantic.BaseModel): "- `OTHER` - OTHER\n" ) ) - created_at: typing.Optional[dt.datetime] - modified_at: typing.Optional[dt.datetime] = pydantic.Field( - description="This is the datetime that this object was last updated by Merge" - ) def json(self, **kwargs: typing.Any) -> str: kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs} diff --git a/src/merge/resources/ats/types/reject_reason.py b/src/merge/resources/ats/types/reject_reason.py index f41fcb9f..7a32d83c 100644 --- a/src/merge/resources/ats/types/reject_reason.py +++ b/src/merge/resources/ats/types/reject_reason.py @@ -27,14 +27,14 @@ class RejectReason(pydantic.BaseModel): id: typing.Optional[str] remote_id: typing.Optional[str] = pydantic.Field(description="The third-party API ID of the matching object.") - name: typing.Optional[str] = pydantic.Field(description="The rejection reason’s name.") - remote_was_deleted: typing.Optional[bool] = pydantic.Field( - description="Indicates whether or not this object has been deleted in the third party platform." - ) created_at: typing.Optional[dt.datetime] modified_at: typing.Optional[dt.datetime] = pydantic.Field( description="This is the datetime that this object was last updated by Merge" ) + name: typing.Optional[str] = pydantic.Field(description="The rejection reason’s name.") + remote_was_deleted: typing.Optional[bool] = pydantic.Field( + description="Indicates whether or not this object has been deleted in the third party platform." + ) field_mappings: typing.Optional[typing.Dict[str, typing.Any]] remote_data: typing.Optional[typing.List[RemoteData]] diff --git a/src/merge/resources/ats/types/remote_field_api_response.py b/src/merge/resources/ats/types/remote_field_api_response.py index d0b83e04..c906ef14 100644 --- a/src/merge/resources/ats/types/remote_field_api_response.py +++ b/src/merge/resources/ats/types/remote_field_api_response.py @@ -21,6 +21,7 @@ class RemoteFieldApiResponse(pydantic.BaseModel): eeoc: typing.Optional[typing.List[RemoteFieldApi]] = pydantic.Field(alias="EEOC") scheduled_interview: typing.Optional[typing.List[RemoteFieldApi]] = pydantic.Field(alias="ScheduledInterview") job: typing.Optional[typing.List[RemoteFieldApi]] = pydantic.Field(alias="Job") + job_posting: typing.Optional[typing.List[RemoteFieldApi]] = pydantic.Field(alias="JobPosting") job_interview_stage: typing.Optional[typing.List[RemoteFieldApi]] = pydantic.Field(alias="JobInterviewStage") offer: typing.Optional[typing.List[RemoteFieldApi]] = pydantic.Field(alias="Offer") office: typing.Optional[typing.List[RemoteFieldApi]] = pydantic.Field(alias="Office") diff --git a/src/merge/resources/ats/types/remote_user.py b/src/merge/resources/ats/types/remote_user.py index 04e4281a..91a85ddb 100644 --- a/src/merge/resources/ats/types/remote_user.py +++ b/src/merge/resources/ats/types/remote_user.py @@ -28,6 +28,10 @@ class RemoteUser(pydantic.BaseModel): id: typing.Optional[str] remote_id: typing.Optional[str] = pydantic.Field(description="The third-party API ID of the matching object.") + created_at: typing.Optional[dt.datetime] + modified_at: typing.Optional[dt.datetime] = pydantic.Field( + description="This is the datetime that this object was last updated by Merge" + ) first_name: typing.Optional[str] = pydantic.Field(description="The user's first name.") last_name: typing.Optional[str] = pydantic.Field(description="The user's last name.") email: typing.Optional[str] = pydantic.Field(description="The user's email.") @@ -49,10 +53,6 @@ class RemoteUser(pydantic.BaseModel): remote_was_deleted: typing.Optional[bool] = pydantic.Field( description="Indicates whether or not this object has been deleted in the third party platform." ) - created_at: typing.Optional[dt.datetime] - modified_at: typing.Optional[dt.datetime] = pydantic.Field( - description="This is the datetime that this object was last updated by Merge" - ) field_mappings: typing.Optional[typing.Dict[str, typing.Any]] remote_data: typing.Optional[typing.List[RemoteData]] diff --git a/src/merge/resources/ats/types/scheduled_interview.py b/src/merge/resources/ats/types/scheduled_interview.py index d1a191a9..7f2645c9 100644 --- a/src/merge/resources/ats/types/scheduled_interview.py +++ b/src/merge/resources/ats/types/scheduled_interview.py @@ -32,6 +32,10 @@ class ScheduledInterview(pydantic.BaseModel): id: typing.Optional[str] remote_id: typing.Optional[str] = pydantic.Field(description="The third-party API ID of the matching object.") + created_at: typing.Optional[dt.datetime] + modified_at: typing.Optional[dt.datetime] = pydantic.Field( + description="This is the datetime that this object was last updated by Merge" + ) application: typing.Optional[ScheduledInterviewApplication] = pydantic.Field( description="The application being interviewed." ) @@ -65,10 +69,6 @@ class ScheduledInterview(pydantic.BaseModel): remote_was_deleted: typing.Optional[bool] = pydantic.Field( description="Indicates whether or not this object has been deleted in the third party platform." ) - created_at: typing.Optional[dt.datetime] - modified_at: typing.Optional[dt.datetime] = pydantic.Field( - description="This is the datetime that this object was last updated by Merge" - ) field_mappings: typing.Optional[typing.Dict[str, typing.Any]] remote_data: typing.Optional[typing.List[RemoteData]] diff --git a/src/merge/resources/ats/types/scorecard.py b/src/merge/resources/ats/types/scorecard.py index 20ad2c7e..e75946c9 100644 --- a/src/merge/resources/ats/types/scorecard.py +++ b/src/merge/resources/ats/types/scorecard.py @@ -31,6 +31,10 @@ class Scorecard(pydantic.BaseModel): id: typing.Optional[str] remote_id: typing.Optional[str] = pydantic.Field(description="The third-party API ID of the matching object.") + created_at: typing.Optional[dt.datetime] + modified_at: typing.Optional[dt.datetime] = pydantic.Field( + description="This is the datetime that this object was last updated by Merge" + ) application: typing.Optional[ScorecardApplication] = pydantic.Field(description="The application being scored.") interview: typing.Optional[ScorecardInterview] = pydantic.Field(description="The interview being scored.") interviewer: typing.Optional[ScorecardInterviewer] = pydantic.Field( @@ -54,10 +58,6 @@ class Scorecard(pydantic.BaseModel): remote_was_deleted: typing.Optional[bool] = pydantic.Field( description="Indicates whether or not this object has been deleted in the third party platform." ) - created_at: typing.Optional[dt.datetime] - modified_at: typing.Optional[dt.datetime] = pydantic.Field( - description="This is the datetime that this object was last updated by Merge" - ) field_mappings: typing.Optional[typing.Dict[str, typing.Any]] remote_data: typing.Optional[typing.List[RemoteData]] diff --git a/src/merge/resources/ats/types/screening_question.py b/src/merge/resources/ats/types/screening_question.py index f31bdfe3..0b3e6579 100644 --- a/src/merge/resources/ats/types/screening_question.py +++ b/src/merge/resources/ats/types/screening_question.py @@ -28,6 +28,10 @@ class ScreeningQuestion(pydantic.BaseModel): id: typing.Optional[str] remote_id: typing.Optional[str] = pydantic.Field(description="The third-party API ID of the matching object.") + created_at: typing.Optional[dt.datetime] + modified_at: typing.Optional[dt.datetime] = pydantic.Field( + description="This is the datetime that this object was last updated by Merge" + ) job: typing.Optional[ScreeningQuestionJob] = pydantic.Field( description="The job associated with the screening question." ) @@ -49,10 +53,6 @@ class ScreeningQuestion(pydantic.BaseModel): ) required: typing.Optional[bool] = pydantic.Field(description="Whether or not the screening question is required.") options: typing.Optional[typing.List[typing.Any]] - created_at: typing.Optional[dt.datetime] - modified_at: typing.Optional[dt.datetime] = pydantic.Field( - description="This is the datetime that this object was last updated by Merge" - ) def json(self, **kwargs: typing.Any) -> str: kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs} diff --git a/src/merge/resources/ats/types/screening_question_option.py b/src/merge/resources/ats/types/screening_question_option.py index 86fe9c89..e38e8434 100644 --- a/src/merge/resources/ats/types/screening_question_option.py +++ b/src/merge/resources/ats/types/screening_question_option.py @@ -24,13 +24,13 @@ class ScreeningQuestionOption(pydantic.BaseModel): TODO """ - remote_id: typing.Optional[str] = pydantic.Field(description="The third-party API ID of the matching object.") - label: typing.Optional[str] = pydantic.Field(description="Available response options") id: typing.Optional[str] + remote_id: typing.Optional[str] = pydantic.Field(description="The third-party API ID of the matching object.") created_at: typing.Optional[dt.datetime] modified_at: typing.Optional[dt.datetime] = pydantic.Field( description="This is the datetime that this object was last updated by Merge" ) + label: typing.Optional[str] = pydantic.Field(description="Available response options") def json(self, **kwargs: typing.Any) -> str: kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs} diff --git a/src/merge/resources/ats/types/screening_question_type.py b/src/merge/resources/ats/types/screening_question_type.py index 2ab817b4..de17251b 100644 --- a/src/merge/resources/ats/types/screening_question_type.py +++ b/src/merge/resources/ats/types/screening_question_type.py @@ -2,6 +2,6 @@ import typing -from .type_enum import TypeEnum +from .screening_question_type_enum import ScreeningQuestionTypeEnum -ScreeningQuestionType = typing.Union[TypeEnum, str] +ScreeningQuestionType = typing.Union[ScreeningQuestionTypeEnum, str] diff --git a/src/merge/resources/ats/types/type_enum.py b/src/merge/resources/ats/types/screening_question_type_enum.py similarity index 72% rename from src/merge/resources/ats/types/type_enum.py rename to src/merge/resources/ats/types/screening_question_type_enum.py index f804ecce..d0377338 100644 --- a/src/merge/resources/ats/types/type_enum.py +++ b/src/merge/resources/ats/types/screening_question_type_enum.py @@ -6,7 +6,7 @@ T_Result = typing.TypeVar("T_Result") -class TypeEnum(str, enum.Enum): +class ScreeningQuestionTypeEnum(str, enum.Enum): """ - `DATE` - DATE - `FILE` - FILE @@ -38,19 +38,19 @@ def visit( numeric: typing.Callable[[], T_Result], boolean: typing.Callable[[], T_Result], ) -> T_Result: - if self is TypeEnum.DATE: + if self is ScreeningQuestionTypeEnum.DATE: return date() - if self is TypeEnum.FILE: + if self is ScreeningQuestionTypeEnum.FILE: return file() - if self is TypeEnum.SINGLE_SELECT: + if self is ScreeningQuestionTypeEnum.SINGLE_SELECT: return single_select() - if self is TypeEnum.MULTI_SELECT: + if self is ScreeningQuestionTypeEnum.MULTI_SELECT: return multi_select() - if self is TypeEnum.SINGLE_LINE_TEXT: + if self is ScreeningQuestionTypeEnum.SINGLE_LINE_TEXT: return single_line_text() - if self is TypeEnum.MULTI_LINE_TEXT: + if self is ScreeningQuestionTypeEnum.MULTI_LINE_TEXT: return multi_line_text() - if self is TypeEnum.NUMERIC: + if self is ScreeningQuestionTypeEnum.NUMERIC: return numeric() - if self is TypeEnum.BOOLEAN: + if self is ScreeningQuestionTypeEnum.BOOLEAN: return boolean() diff --git a/src/merge/resources/ats/types/tag.py b/src/merge/resources/ats/types/tag.py index 093e6a42..f4891028 100644 --- a/src/merge/resources/ats/types/tag.py +++ b/src/merge/resources/ats/types/tag.py @@ -25,14 +25,14 @@ class Tag(pydantic.BaseModel): """ remote_id: typing.Optional[str] = pydantic.Field(description="The third-party API ID of the matching object.") - name: typing.Optional[str] = pydantic.Field(description="The tag's name.") - remote_was_deleted: typing.Optional[bool] = pydantic.Field( - description="Indicates whether or not this object has been deleted in the third party platform." - ) created_at: typing.Optional[dt.datetime] modified_at: typing.Optional[dt.datetime] = pydantic.Field( description="This is the datetime that this object was last updated by Merge" ) + name: typing.Optional[str] = pydantic.Field(description="The tag's name.") + remote_was_deleted: typing.Optional[bool] = pydantic.Field( + description="Indicates whether or not this object has been deleted in the third party platform." + ) field_mappings: typing.Optional[typing.Dict[str, typing.Any]] remote_data: typing.Optional[typing.List[typing.Optional[typing.Dict[str, typing.Any]]]] diff --git a/src/merge/resources/ats/types/url.py b/src/merge/resources/ats/types/url.py index 9d3a2457..c5c0ec01 100644 --- a/src/merge/resources/ats/types/url.py +++ b/src/merge/resources/ats/types/url.py @@ -25,6 +25,10 @@ class Url(pydantic.BaseModel): Fetch from the `GET Candidate` endpoint and view their website urls. """ + created_at: typing.Optional[dt.datetime] + modified_at: typing.Optional[dt.datetime] = pydantic.Field( + description="This is the datetime that this object was last updated by Merge" + ) value: typing.Optional[str] = pydantic.Field(description="The site's url.") url_type: typing.Optional[UrlUrlType] = pydantic.Field( description=( @@ -39,10 +43,6 @@ class Url(pydantic.BaseModel): "- `JOB_POSTING` - JOB_POSTING\n" ) ) - created_at: typing.Optional[dt.datetime] - modified_at: typing.Optional[dt.datetime] = pydantic.Field( - description="This is the datetime that this object was last updated by Merge" - ) def json(self, **kwargs: typing.Any) -> str: kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs} diff --git a/src/merge/resources/crm/resources/account_details/client.py b/src/merge/resources/crm/resources/account_details/client.py index 38e2f23f..d2d6e535 100644 --- a/src/merge/resources/crm/resources/account_details/client.py +++ b/src/merge/resources/crm/resources/account_details/client.py @@ -38,7 +38,7 @@ def retrieve(self, *, request_options: typing.Optional[RequestOptions] = None) - """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/crm/v1/account-details"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "crm/v1/account-details"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -84,7 +84,7 @@ async def retrieve(self, *, request_options: typing.Optional[RequestOptions] = N """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/crm/v1/account-details"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "crm/v1/account-details"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), diff --git a/src/merge/resources/crm/resources/account_token/client.py b/src/merge/resources/crm/resources/account_token/client.py index afcb3761..4e3e1e89 100644 --- a/src/merge/resources/crm/resources/account_token/client.py +++ b/src/merge/resources/crm/resources/account_token/client.py @@ -37,12 +37,12 @@ def retrieve(self, public_token: str, *, request_options: typing.Optional[Reques api_key="YOUR_API_KEY", ) client.crm.account_token.retrieve( - public_token="string", + public_token="public_token", ) """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"api/crm/v1/account-token/{public_token}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"crm/v1/account-token/{public_token}"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -89,12 +89,12 @@ async def retrieve( api_key="YOUR_API_KEY", ) await client.crm.account_token.retrieve( - public_token="string", + public_token="public_token", ) """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"api/crm/v1/account-token/{public_token}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"crm/v1/account-token/{public_token}"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), diff --git a/src/merge/resources/crm/resources/accounts/client.py b/src/merge/resources/crm/resources/accounts/client.py index 3f6a1aa8..74eb1dd5 100644 --- a/src/merge/resources/crm/resources/accounts/client.py +++ b/src/merge/resources/crm/resources/accounts/client.py @@ -88,13 +88,11 @@ def list( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) - client.crm.accounts.list( - expand="owner", - ) + client.crm.accounts.list() """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/crm/v1/accounts"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "crm/v1/accounts"), params=jsonable_encoder( remove_none_from_dict( { @@ -159,8 +157,6 @@ def create( - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- - import datetime - from merge.client import Merge from merge.resources.crm import AccountRequest @@ -169,21 +165,12 @@ def create( api_key="YOUR_API_KEY", ) client.crm.accounts.create( - model=AccountRequest( - name="Merge API", - description="One API for all integrations", - industry="API's", - website="https://merge.dev/", - number_of_employees=1, - last_activity_at=datetime.datetime.fromisoformat( - "2022-02-10 00:00:00+00:00", - ), - ), + model=AccountRequest(), ) """ _response = self._client_wrapper.httpx_client.request( "POST", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/crm/v1/accounts"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "crm/v1/accounts"), params=jsonable_encoder( remove_none_from_dict( { @@ -253,13 +240,12 @@ def retrieve( api_key="YOUR_API_KEY", ) client.crm.accounts.retrieve( - id="string", - expand="owner", + id="id", ) """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"api/crm/v1/accounts/{id}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"crm/v1/accounts/{id}"), params=jsonable_encoder( remove_none_from_dict( { @@ -317,8 +303,6 @@ def partial_update( - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- - import datetime - from merge.client import Merge from merge.resources.crm import PatchedAccountRequest @@ -327,23 +311,13 @@ def partial_update( api_key="YOUR_API_KEY", ) client.crm.accounts.partial_update( - id="string", - model=PatchedAccountRequest( - owner="0258cbc6-6020-430a-848e-aafacbadf4ae", - name="Merge API", - description="One API for all integrations", - industry="API's", - website="https://merge.dev/", - number_of_employees=1, - last_activity_at=datetime.datetime.fromisoformat( - "2022-02-10 00:00:00+00:00", - ), - ), + id="id", + model=PatchedAccountRequest(), ) """ _response = self._client_wrapper.httpx_client.request( "PATCH", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"api/crm/v1/accounts/{id}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"crm/v1/accounts/{id}"), params=jsonable_encoder( remove_none_from_dict( { @@ -399,12 +373,12 @@ def meta_patch_retrieve(self, id: str, *, request_options: typing.Optional[Reque api_key="YOUR_API_KEY", ) client.crm.accounts.meta_patch_retrieve( - id="string", + id="id", ) """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"api/crm/v1/accounts/meta/patch/{id}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"crm/v1/accounts/meta/patch/{id}"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -445,7 +419,7 @@ def meta_post_retrieve(self, *, request_options: typing.Optional[RequestOptions] """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/crm/v1/accounts/meta/post"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "crm/v1/accounts/meta/post"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -505,7 +479,7 @@ def remote_field_classes_list( """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/crm/v1/accounts/remote-field-classes"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "crm/v1/accounts/remote-field-classes"), params=jsonable_encoder( remove_none_from_dict( { @@ -603,13 +577,11 @@ async def list( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) - await client.crm.accounts.list( - expand="owner", - ) + await client.crm.accounts.list() """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/crm/v1/accounts"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "crm/v1/accounts"), params=jsonable_encoder( remove_none_from_dict( { @@ -674,8 +646,6 @@ async def create( - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- - import datetime - from merge.client import AsyncMerge from merge.resources.crm import AccountRequest @@ -684,21 +654,12 @@ async def create( api_key="YOUR_API_KEY", ) await client.crm.accounts.create( - model=AccountRequest( - name="Merge API", - description="One API for all integrations", - industry="API's", - website="https://merge.dev/", - number_of_employees=1, - last_activity_at=datetime.datetime.fromisoformat( - "2022-02-10 00:00:00+00:00", - ), - ), + model=AccountRequest(), ) """ _response = await self._client_wrapper.httpx_client.request( "POST", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/crm/v1/accounts"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "crm/v1/accounts"), params=jsonable_encoder( remove_none_from_dict( { @@ -768,13 +729,12 @@ async def retrieve( api_key="YOUR_API_KEY", ) await client.crm.accounts.retrieve( - id="string", - expand="owner", + id="id", ) """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"api/crm/v1/accounts/{id}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"crm/v1/accounts/{id}"), params=jsonable_encoder( remove_none_from_dict( { @@ -832,8 +792,6 @@ async def partial_update( - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- - import datetime - from merge.client import AsyncMerge from merge.resources.crm import PatchedAccountRequest @@ -842,23 +800,13 @@ async def partial_update( api_key="YOUR_API_KEY", ) await client.crm.accounts.partial_update( - id="string", - model=PatchedAccountRequest( - owner="0258cbc6-6020-430a-848e-aafacbadf4ae", - name="Merge API", - description="One API for all integrations", - industry="API's", - website="https://merge.dev/", - number_of_employees=1, - last_activity_at=datetime.datetime.fromisoformat( - "2022-02-10 00:00:00+00:00", - ), - ), + id="id", + model=PatchedAccountRequest(), ) """ _response = await self._client_wrapper.httpx_client.request( "PATCH", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"api/crm/v1/accounts/{id}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"crm/v1/accounts/{id}"), params=jsonable_encoder( remove_none_from_dict( { @@ -916,12 +864,12 @@ async def meta_patch_retrieve( api_key="YOUR_API_KEY", ) await client.crm.accounts.meta_patch_retrieve( - id="string", + id="id", ) """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"api/crm/v1/accounts/meta/patch/{id}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"crm/v1/accounts/meta/patch/{id}"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -962,7 +910,7 @@ async def meta_post_retrieve(self, *, request_options: typing.Optional[RequestOp """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/crm/v1/accounts/meta/post"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "crm/v1/accounts/meta/post"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -1022,7 +970,7 @@ async def remote_field_classes_list( """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/crm/v1/accounts/remote-field-classes"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "crm/v1/accounts/remote-field-classes"), params=jsonable_encoder( remove_none_from_dict( { diff --git a/src/merge/resources/crm/resources/association_types/client.py b/src/merge/resources/crm/resources/association_types/client.py index d2532431..e4074b0d 100644 --- a/src/merge/resources/crm/resources/association_types/client.py +++ b/src/merge/resources/crm/resources/association_types/client.py @@ -81,15 +81,14 @@ def custom_object_classes_association_types_list( api_key="YOUR_API_KEY", ) client.crm.association_types.custom_object_classes_association_types_list( - custom_object_class_id="string", - expand="target_object_classes", + custom_object_class_id="custom_object_class_id", ) """ _response = self._client_wrapper.httpx_client.request( "GET", urllib.parse.urljoin( f"{self._client_wrapper.get_base_url()}/", - f"api/crm/v1/custom-object-classes/{custom_object_class_id}/association-types", + f"crm/v1/custom-object-classes/{custom_object_class_id}/association-types", ), params=jsonable_encoder( remove_none_from_dict( @@ -158,7 +157,6 @@ def custom_object_classes_association_types_create( from merge.client import Merge from merge.resources.crm import ( AssociationTypeRequestRequest, - CardinalityEnum, ObjectClassDescriptionRequest, OriginTypeEnum, ) @@ -168,15 +166,19 @@ def custom_object_classes_association_types_create( api_key="YOUR_API_KEY", ) client.crm.association_types.custom_object_classes_association_types_create( - custom_object_class_id="string", + custom_object_class_id="custom_object_class_id", model=AssociationTypeRequestRequest( source_object_class=ObjectClassDescriptionRequest( - id="string", + id="id", origin_type=OriginTypeEnum.CUSTOM_OBJECT, ), - target_object_classes=[], - remote_key_name="string", - cardinality=CardinalityEnum.ONE_TO_ONE, + target_object_classes=[ + ObjectClassDescriptionRequest( + id="id", + origin_type=OriginTypeEnum.CUSTOM_OBJECT, + ) + ], + remote_key_name="remote_key_name", ), ) """ @@ -184,7 +186,7 @@ def custom_object_classes_association_types_create( "POST", urllib.parse.urljoin( f"{self._client_wrapper.get_base_url()}/", - f"api/crm/v1/custom-object-classes/{custom_object_class_id}/association-types", + f"crm/v1/custom-object-classes/{custom_object_class_id}/association-types", ), params=jsonable_encoder( remove_none_from_dict( @@ -255,16 +257,15 @@ def custom_object_classes_association_types_retrieve( api_key="YOUR_API_KEY", ) client.crm.association_types.custom_object_classes_association_types_retrieve( - custom_object_class_id="string", - id="string", - expand="target_object_classes", + custom_object_class_id="custom_object_class_id", + id="id", ) """ _response = self._client_wrapper.httpx_client.request( "GET", urllib.parse.urljoin( f"{self._client_wrapper.get_base_url()}/", - f"api/crm/v1/custom-object-classes/{custom_object_class_id}/association-types/{id}", + f"crm/v1/custom-object-classes/{custom_object_class_id}/association-types/{id}", ), params=jsonable_encoder( remove_none_from_dict( @@ -317,14 +318,14 @@ def custom_object_classes_association_types_meta_post_retrieve( api_key="YOUR_API_KEY", ) client.crm.association_types.custom_object_classes_association_types_meta_post_retrieve( - custom_object_class_id="string", + custom_object_class_id="custom_object_class_id", ) """ _response = self._client_wrapper.httpx_client.request( "GET", urllib.parse.urljoin( f"{self._client_wrapper.get_base_url()}/", - f"api/crm/v1/custom-object-classes/{custom_object_class_id}/association-types/meta/post", + f"crm/v1/custom-object-classes/{custom_object_class_id}/association-types/meta/post", ), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None @@ -405,15 +406,14 @@ async def custom_object_classes_association_types_list( api_key="YOUR_API_KEY", ) await client.crm.association_types.custom_object_classes_association_types_list( - custom_object_class_id="string", - expand="target_object_classes", + custom_object_class_id="custom_object_class_id", ) """ _response = await self._client_wrapper.httpx_client.request( "GET", urllib.parse.urljoin( f"{self._client_wrapper.get_base_url()}/", - f"api/crm/v1/custom-object-classes/{custom_object_class_id}/association-types", + f"crm/v1/custom-object-classes/{custom_object_class_id}/association-types", ), params=jsonable_encoder( remove_none_from_dict( @@ -482,7 +482,6 @@ async def custom_object_classes_association_types_create( from merge.client import AsyncMerge from merge.resources.crm import ( AssociationTypeRequestRequest, - CardinalityEnum, ObjectClassDescriptionRequest, OriginTypeEnum, ) @@ -492,15 +491,19 @@ async def custom_object_classes_association_types_create( api_key="YOUR_API_KEY", ) await client.crm.association_types.custom_object_classes_association_types_create( - custom_object_class_id="string", + custom_object_class_id="custom_object_class_id", model=AssociationTypeRequestRequest( source_object_class=ObjectClassDescriptionRequest( - id="string", + id="id", origin_type=OriginTypeEnum.CUSTOM_OBJECT, ), - target_object_classes=[], - remote_key_name="string", - cardinality=CardinalityEnum.ONE_TO_ONE, + target_object_classes=[ + ObjectClassDescriptionRequest( + id="id", + origin_type=OriginTypeEnum.CUSTOM_OBJECT, + ) + ], + remote_key_name="remote_key_name", ), ) """ @@ -508,7 +511,7 @@ async def custom_object_classes_association_types_create( "POST", urllib.parse.urljoin( f"{self._client_wrapper.get_base_url()}/", - f"api/crm/v1/custom-object-classes/{custom_object_class_id}/association-types", + f"crm/v1/custom-object-classes/{custom_object_class_id}/association-types", ), params=jsonable_encoder( remove_none_from_dict( @@ -579,16 +582,15 @@ async def custom_object_classes_association_types_retrieve( api_key="YOUR_API_KEY", ) await client.crm.association_types.custom_object_classes_association_types_retrieve( - custom_object_class_id="string", - id="string", - expand="target_object_classes", + custom_object_class_id="custom_object_class_id", + id="id", ) """ _response = await self._client_wrapper.httpx_client.request( "GET", urllib.parse.urljoin( f"{self._client_wrapper.get_base_url()}/", - f"api/crm/v1/custom-object-classes/{custom_object_class_id}/association-types/{id}", + f"crm/v1/custom-object-classes/{custom_object_class_id}/association-types/{id}", ), params=jsonable_encoder( remove_none_from_dict( @@ -641,14 +643,14 @@ async def custom_object_classes_association_types_meta_post_retrieve( api_key="YOUR_API_KEY", ) await client.crm.association_types.custom_object_classes_association_types_meta_post_retrieve( - custom_object_class_id="string", + custom_object_class_id="custom_object_class_id", ) """ _response = await self._client_wrapper.httpx_client.request( "GET", urllib.parse.urljoin( f"{self._client_wrapper.get_base_url()}/", - f"api/crm/v1/custom-object-classes/{custom_object_class_id}/association-types/meta/post", + f"crm/v1/custom-object-classes/{custom_object_class_id}/association-types/meta/post", ), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None diff --git a/src/merge/resources/crm/resources/associations/client.py b/src/merge/resources/crm/resources/associations/client.py index d02b41e8..03b97754 100644 --- a/src/merge/resources/crm/resources/associations/client.py +++ b/src/merge/resources/crm/resources/associations/client.py @@ -81,16 +81,15 @@ def custom_object_classes_custom_objects_associations_list( api_key="YOUR_API_KEY", ) client.crm.associations.custom_object_classes_custom_objects_associations_list( - custom_object_class_id="string", - object_id="string", - expand="association_type", + custom_object_class_id="custom_object_class_id", + object_id="object_id", ) """ _response = self._client_wrapper.httpx_client.request( "GET", urllib.parse.urljoin( f"{self._client_wrapper.get_base_url()}/", - f"api/crm/v1/custom-object-classes/{custom_object_class_id}/custom-objects/{object_id}/associations", + f"crm/v1/custom-object-classes/{custom_object_class_id}/custom-objects/{object_id}/associations", ), params=jsonable_encoder( remove_none_from_dict( @@ -173,18 +172,18 @@ def custom_object_classes_custom_objects_associations_update( api_key="YOUR_API_KEY", ) client.crm.associations.custom_object_classes_custom_objects_associations_update( - association_type_id="string", - source_class_id="string", - source_object_id="string", - target_class_id="string", - target_object_id="string", + association_type_id="association_type_id", + source_class_id="source_class_id", + source_object_id="source_object_id", + target_class_id="target_class_id", + target_object_id="target_object_id", ) """ _response = self._client_wrapper.httpx_client.request( "PUT", urllib.parse.urljoin( f"{self._client_wrapper.get_base_url()}/", - f"api/crm/v1/custom-object-classes/{source_class_id}/custom-objects/{source_object_id}/associations/{target_class_id}/{target_object_id}/{association_type_id}", + f"crm/v1/custom-object-classes/{source_class_id}/custom-objects/{source_object_id}/associations/{target_class_id}/{target_object_id}/{association_type_id}", ), params=jsonable_encoder( remove_none_from_dict( @@ -284,16 +283,15 @@ async def custom_object_classes_custom_objects_associations_list( api_key="YOUR_API_KEY", ) await client.crm.associations.custom_object_classes_custom_objects_associations_list( - custom_object_class_id="string", - object_id="string", - expand="association_type", + custom_object_class_id="custom_object_class_id", + object_id="object_id", ) """ _response = await self._client_wrapper.httpx_client.request( "GET", urllib.parse.urljoin( f"{self._client_wrapper.get_base_url()}/", - f"api/crm/v1/custom-object-classes/{custom_object_class_id}/custom-objects/{object_id}/associations", + f"crm/v1/custom-object-classes/{custom_object_class_id}/custom-objects/{object_id}/associations", ), params=jsonable_encoder( remove_none_from_dict( @@ -376,18 +374,18 @@ async def custom_object_classes_custom_objects_associations_update( api_key="YOUR_API_KEY", ) await client.crm.associations.custom_object_classes_custom_objects_associations_update( - association_type_id="string", - source_class_id="string", - source_object_id="string", - target_class_id="string", - target_object_id="string", + association_type_id="association_type_id", + source_class_id="source_class_id", + source_object_id="source_object_id", + target_class_id="target_class_id", + target_object_id="target_object_id", ) """ _response = await self._client_wrapper.httpx_client.request( "PUT", urllib.parse.urljoin( f"{self._client_wrapper.get_base_url()}/", - f"api/crm/v1/custom-object-classes/{source_class_id}/custom-objects/{source_object_id}/associations/{target_class_id}/{target_object_id}/{association_type_id}", + f"crm/v1/custom-object-classes/{source_class_id}/custom-objects/{source_object_id}/associations/{target_class_id}/{target_object_id}/{association_type_id}", ), params=jsonable_encoder( remove_none_from_dict( diff --git a/src/merge/resources/crm/resources/async_passthrough/client.py b/src/merge/resources/crm/resources/async_passthrough/client.py index 0d3abcef..89d554ca 100644 --- a/src/merge/resources/crm/resources/async_passthrough/client.py +++ b/src/merge/resources/crm/resources/async_passthrough/client.py @@ -38,11 +38,7 @@ def create( - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from merge.client import Merge - from merge.resources.crm import ( - DataPassthroughRequest, - MethodEnum, - RequestFormatEnum, - ) + from merge.resources.crm import DataPassthroughRequest, MethodEnum client = Merge( account_token="YOUR_ACCOUNT_TOKEN", @@ -52,14 +48,12 @@ def create( request=DataPassthroughRequest( method=MethodEnum.GET, path="/scooters", - data='{"company": "Lime", "model": "Gen 2.5"}', - request_format=RequestFormatEnum.JSON, ), ) """ _response = self._client_wrapper.httpx_client.request( "POST", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/crm/v1/async-passthrough"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "crm/v1/async-passthrough"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -107,14 +101,13 @@ def retrieve( api_key="YOUR_API_KEY", ) client.crm.async_passthrough.retrieve( - async_passthrough_receipt_id="string", + async_passthrough_receipt_id="async_passthrough_receipt_id", ) """ _response = self._client_wrapper.httpx_client.request( "GET", urllib.parse.urljoin( - f"{self._client_wrapper.get_base_url()}/", - f"api/crm/v1/async-passthrough/{async_passthrough_receipt_id}", + f"{self._client_wrapper.get_base_url()}/", f"crm/v1/async-passthrough/{async_passthrough_receipt_id}" ), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None @@ -156,11 +149,7 @@ async def create( - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from merge.client import AsyncMerge - from merge.resources.crm import ( - DataPassthroughRequest, - MethodEnum, - RequestFormatEnum, - ) + from merge.resources.crm import DataPassthroughRequest, MethodEnum client = AsyncMerge( account_token="YOUR_ACCOUNT_TOKEN", @@ -170,14 +159,12 @@ async def create( request=DataPassthroughRequest( method=MethodEnum.GET, path="/scooters", - data='{"company": "Lime", "model": "Gen 2.5"}', - request_format=RequestFormatEnum.JSON, ), ) """ _response = await self._client_wrapper.httpx_client.request( "POST", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/crm/v1/async-passthrough"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "crm/v1/async-passthrough"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -225,14 +212,13 @@ async def retrieve( api_key="YOUR_API_KEY", ) await client.crm.async_passthrough.retrieve( - async_passthrough_receipt_id="string", + async_passthrough_receipt_id="async_passthrough_receipt_id", ) """ _response = await self._client_wrapper.httpx_client.request( "GET", urllib.parse.urljoin( - f"{self._client_wrapper.get_base_url()}/", - f"api/crm/v1/async-passthrough/{async_passthrough_receipt_id}", + f"{self._client_wrapper.get_base_url()}/", f"crm/v1/async-passthrough/{async_passthrough_receipt_id}" ), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None diff --git a/src/merge/resources/crm/resources/audit_trail/client.py b/src/merge/resources/crm/resources/audit_trail/client.py index a97437ad..b9de0178 100644 --- a/src/merge/resources/crm/resources/audit_trail/client.py +++ b/src/merge/resources/crm/resources/audit_trail/client.py @@ -40,7 +40,7 @@ def list( - end_date: typing.Optional[str]. If included, will only include audit trail events that occurred before this time - - event_type: typing.Optional[str]. If included, will only include events with the given event type. Possible values include: `CREATED_REMOTE_PRODUCTION_API_KEY`, `DELETED_REMOTE_PRODUCTION_API_KEY`, `CREATED_TEST_API_KEY`, `DELETED_TEST_API_KEY`, `REGENERATED_PRODUCTION_API_KEY`, `INVITED_USER`, `TWO_FACTOR_AUTH_ENABLED`, `TWO_FACTOR_AUTH_DISABLED`, `DELETED_LINKED_ACCOUNT`, `CREATED_DESTINATION`, `DELETED_DESTINATION`, `CHANGED_DESTINATION`, `CHANGED_SCOPES`, `CHANGED_PERSONAL_INFORMATION`, `CHANGED_ORGANIZATION_SETTINGS`, `ENABLED_INTEGRATION`, `DISABLED_INTEGRATION`, `ENABLED_CATEGORY`, `DISABLED_CATEGORY`, `CHANGED_PASSWORD`, `RESET_PASSWORD`, `ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION`, `ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT`, `DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION`, `DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT`, `CREATED_INTEGRATION_WIDE_FIELD_MAPPING`, `CREATED_LINKED_ACCOUNT_FIELD_MAPPING`, `CHANGED_INTEGRATION_WIDE_FIELD_MAPPING`, `CHANGED_LINKED_ACCOUNT_FIELD_MAPPING`, `DELETED_INTEGRATION_WIDE_FIELD_MAPPING`, `DELETED_LINKED_ACCOUNT_FIELD_MAPPING` + - event_type: typing.Optional[str]. If included, will only include events with the given event type. Possible values include: `CREATED_REMOTE_PRODUCTION_API_KEY`, `DELETED_REMOTE_PRODUCTION_API_KEY`, `CREATED_TEST_API_KEY`, `DELETED_TEST_API_KEY`, `REGENERATED_PRODUCTION_API_KEY`, `INVITED_USER`, `TWO_FACTOR_AUTH_ENABLED`, `TWO_FACTOR_AUTH_DISABLED`, `DELETED_LINKED_ACCOUNT`, `CREATED_DESTINATION`, `DELETED_DESTINATION`, `CHANGED_DESTINATION`, `CHANGED_SCOPES`, `CHANGED_PERSONAL_INFORMATION`, `CHANGED_ORGANIZATION_SETTINGS`, `ENABLED_INTEGRATION`, `DISABLED_INTEGRATION`, `ENABLED_CATEGORY`, `DISABLED_CATEGORY`, `CHANGED_PASSWORD`, `RESET_PASSWORD`, `ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION`, `ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT`, `DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION`, `DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT`, `CREATED_INTEGRATION_WIDE_FIELD_MAPPING`, `CREATED_LINKED_ACCOUNT_FIELD_MAPPING`, `CHANGED_INTEGRATION_WIDE_FIELD_MAPPING`, `CHANGED_LINKED_ACCOUNT_FIELD_MAPPING`, `DELETED_INTEGRATION_WIDE_FIELD_MAPPING`, `DELETED_LINKED_ACCOUNT_FIELD_MAPPING`, `FORCED_LINKED_ACCOUNT_RESYNC`, `MUTED_ISSUE`, `GENERATED_MAGIC_LINK` - page_size: typing.Optional[int]. Number of results to return per page. @@ -60,7 +60,7 @@ def list( """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/crm/v1/audit-trail"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "crm/v1/audit-trail"), params=jsonable_encoder( remove_none_from_dict( { @@ -122,7 +122,7 @@ async def list( - end_date: typing.Optional[str]. If included, will only include audit trail events that occurred before this time - - event_type: typing.Optional[str]. If included, will only include events with the given event type. Possible values include: `CREATED_REMOTE_PRODUCTION_API_KEY`, `DELETED_REMOTE_PRODUCTION_API_KEY`, `CREATED_TEST_API_KEY`, `DELETED_TEST_API_KEY`, `REGENERATED_PRODUCTION_API_KEY`, `INVITED_USER`, `TWO_FACTOR_AUTH_ENABLED`, `TWO_FACTOR_AUTH_DISABLED`, `DELETED_LINKED_ACCOUNT`, `CREATED_DESTINATION`, `DELETED_DESTINATION`, `CHANGED_DESTINATION`, `CHANGED_SCOPES`, `CHANGED_PERSONAL_INFORMATION`, `CHANGED_ORGANIZATION_SETTINGS`, `ENABLED_INTEGRATION`, `DISABLED_INTEGRATION`, `ENABLED_CATEGORY`, `DISABLED_CATEGORY`, `CHANGED_PASSWORD`, `RESET_PASSWORD`, `ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION`, `ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT`, `DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION`, `DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT`, `CREATED_INTEGRATION_WIDE_FIELD_MAPPING`, `CREATED_LINKED_ACCOUNT_FIELD_MAPPING`, `CHANGED_INTEGRATION_WIDE_FIELD_MAPPING`, `CHANGED_LINKED_ACCOUNT_FIELD_MAPPING`, `DELETED_INTEGRATION_WIDE_FIELD_MAPPING`, `DELETED_LINKED_ACCOUNT_FIELD_MAPPING` + - event_type: typing.Optional[str]. If included, will only include events with the given event type. Possible values include: `CREATED_REMOTE_PRODUCTION_API_KEY`, `DELETED_REMOTE_PRODUCTION_API_KEY`, `CREATED_TEST_API_KEY`, `DELETED_TEST_API_KEY`, `REGENERATED_PRODUCTION_API_KEY`, `INVITED_USER`, `TWO_FACTOR_AUTH_ENABLED`, `TWO_FACTOR_AUTH_DISABLED`, `DELETED_LINKED_ACCOUNT`, `CREATED_DESTINATION`, `DELETED_DESTINATION`, `CHANGED_DESTINATION`, `CHANGED_SCOPES`, `CHANGED_PERSONAL_INFORMATION`, `CHANGED_ORGANIZATION_SETTINGS`, `ENABLED_INTEGRATION`, `DISABLED_INTEGRATION`, `ENABLED_CATEGORY`, `DISABLED_CATEGORY`, `CHANGED_PASSWORD`, `RESET_PASSWORD`, `ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION`, `ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT`, `DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION`, `DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT`, `CREATED_INTEGRATION_WIDE_FIELD_MAPPING`, `CREATED_LINKED_ACCOUNT_FIELD_MAPPING`, `CHANGED_INTEGRATION_WIDE_FIELD_MAPPING`, `CHANGED_LINKED_ACCOUNT_FIELD_MAPPING`, `DELETED_INTEGRATION_WIDE_FIELD_MAPPING`, `DELETED_LINKED_ACCOUNT_FIELD_MAPPING`, `FORCED_LINKED_ACCOUNT_RESYNC`, `MUTED_ISSUE`, `GENERATED_MAGIC_LINK` - page_size: typing.Optional[int]. Number of results to return per page. @@ -142,7 +142,7 @@ async def list( """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/crm/v1/audit-trail"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "crm/v1/audit-trail"), params=jsonable_encoder( remove_none_from_dict( { diff --git a/src/merge/resources/crm/resources/available_actions/client.py b/src/merge/resources/crm/resources/available_actions/client.py index 1f19daff..8b1aab56 100644 --- a/src/merge/resources/crm/resources/available_actions/client.py +++ b/src/merge/resources/crm/resources/available_actions/client.py @@ -38,7 +38,7 @@ def retrieve(self, *, request_options: typing.Optional[RequestOptions] = None) - """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/crm/v1/available-actions"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "crm/v1/available-actions"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -84,7 +84,7 @@ async def retrieve(self, *, request_options: typing.Optional[RequestOptions] = N """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/crm/v1/available-actions"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "crm/v1/available-actions"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), diff --git a/src/merge/resources/crm/resources/contacts/client.py b/src/merge/resources/crm/resources/contacts/client.py index 8205f99c..b9e4132f 100644 --- a/src/merge/resources/crm/resources/contacts/client.py +++ b/src/merge/resources/crm/resources/contacts/client.py @@ -89,19 +89,16 @@ def list( - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from merge.client import Merge - from merge.resources.crm import ContactsListRequestExpand client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) - client.crm.contacts.list( - expand=ContactsListRequestExpand.ACCOUNT, - ) + client.crm.contacts.list() """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/crm/v1/contacts"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "crm/v1/contacts"), params=jsonable_encoder( remove_none_from_dict( { @@ -167,8 +164,6 @@ def create( - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- - import datetime - from merge.client import Merge from merge.resources.crm import ContactRequest @@ -177,18 +172,12 @@ def create( api_key="YOUR_API_KEY", ) client.crm.contacts.create( - model=ContactRequest( - first_name="Gil", - last_name="Feig", - last_activity_at=datetime.datetime.fromisoformat( - "2022-02-10 00:00:00+00:00", - ), - ), + model=ContactRequest(), ) """ _response = self._client_wrapper.httpx_client.request( "POST", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/crm/v1/contacts"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "crm/v1/contacts"), params=jsonable_encoder( remove_none_from_dict( { @@ -252,20 +241,18 @@ def retrieve( - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from merge.client import Merge - from merge.resources.crm import ContactsRetrieveRequestExpand client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) client.crm.contacts.retrieve( - id="string", - expand=ContactsRetrieveRequestExpand.ACCOUNT, + id="id", ) """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"api/crm/v1/contacts/{id}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"crm/v1/contacts/{id}"), params=jsonable_encoder( remove_none_from_dict( { @@ -323,8 +310,6 @@ def partial_update( - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- - import datetime - from merge.client import Merge from merge.resources.crm import PatchedContactRequest @@ -333,20 +318,13 @@ def partial_update( api_key="YOUR_API_KEY", ) client.crm.contacts.partial_update( - id="string", - model=PatchedContactRequest( - first_name="Gil", - last_name="Feig", - account="0958cbc6-6040-430a-848e-aafacbadf4ae", - last_activity_at=datetime.datetime.fromisoformat( - "2022-02-10 00:00:00+00:00", - ), - ), + id="id", + model=PatchedContactRequest(), ) """ _response = self._client_wrapper.httpx_client.request( "PATCH", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"api/crm/v1/contacts/{id}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"crm/v1/contacts/{id}"), params=jsonable_encoder( remove_none_from_dict( { @@ -411,7 +389,7 @@ def ignore_create( api_key="YOUR_API_KEY", ) client.crm.contacts.ignore_create( - model_id="string", + model_id="model_id", request=IgnoreCommonModelRequest( reason=ReasonEnum.GENERAL_CUSTOMER_REQUEST, message="deletion request by user id 51903790-7dfe-4053-8d63-5a10cc4ffd39", @@ -420,7 +398,7 @@ def ignore_create( """ _response = self._client_wrapper.httpx_client.request( "POST", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"api/crm/v1/contacts/ignore/{model_id}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"crm/v1/contacts/ignore/{model_id}"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -466,12 +444,12 @@ def meta_patch_retrieve(self, id: str, *, request_options: typing.Optional[Reque api_key="YOUR_API_KEY", ) client.crm.contacts.meta_patch_retrieve( - id="string", + id="id", ) """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"api/crm/v1/contacts/meta/patch/{id}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"crm/v1/contacts/meta/patch/{id}"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -512,7 +490,7 @@ def meta_post_retrieve(self, *, request_options: typing.Optional[RequestOptions] """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/crm/v1/contacts/meta/post"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "crm/v1/contacts/meta/post"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -572,7 +550,7 @@ def remote_field_classes_list( """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/crm/v1/contacts/remote-field-classes"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "crm/v1/contacts/remote-field-classes"), params=jsonable_encoder( remove_none_from_dict( { @@ -668,19 +646,16 @@ async def list( - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from merge.client import AsyncMerge - from merge.resources.crm import ContactsListRequestExpand client = AsyncMerge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) - await client.crm.contacts.list( - expand=ContactsListRequestExpand.ACCOUNT, - ) + await client.crm.contacts.list() """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/crm/v1/contacts"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "crm/v1/contacts"), params=jsonable_encoder( remove_none_from_dict( { @@ -746,8 +721,6 @@ async def create( - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- - import datetime - from merge.client import AsyncMerge from merge.resources.crm import ContactRequest @@ -756,18 +729,12 @@ async def create( api_key="YOUR_API_KEY", ) await client.crm.contacts.create( - model=ContactRequest( - first_name="Gil", - last_name="Feig", - last_activity_at=datetime.datetime.fromisoformat( - "2022-02-10 00:00:00+00:00", - ), - ), + model=ContactRequest(), ) """ _response = await self._client_wrapper.httpx_client.request( "POST", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/crm/v1/contacts"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "crm/v1/contacts"), params=jsonable_encoder( remove_none_from_dict( { @@ -831,20 +798,18 @@ async def retrieve( - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from merge.client import AsyncMerge - from merge.resources.crm import ContactsRetrieveRequestExpand client = AsyncMerge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) await client.crm.contacts.retrieve( - id="string", - expand=ContactsRetrieveRequestExpand.ACCOUNT, + id="id", ) """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"api/crm/v1/contacts/{id}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"crm/v1/contacts/{id}"), params=jsonable_encoder( remove_none_from_dict( { @@ -902,8 +867,6 @@ async def partial_update( - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- - import datetime - from merge.client import AsyncMerge from merge.resources.crm import PatchedContactRequest @@ -912,20 +875,13 @@ async def partial_update( api_key="YOUR_API_KEY", ) await client.crm.contacts.partial_update( - id="string", - model=PatchedContactRequest( - first_name="Gil", - last_name="Feig", - account="0958cbc6-6040-430a-848e-aafacbadf4ae", - last_activity_at=datetime.datetime.fromisoformat( - "2022-02-10 00:00:00+00:00", - ), - ), + id="id", + model=PatchedContactRequest(), ) """ _response = await self._client_wrapper.httpx_client.request( "PATCH", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"api/crm/v1/contacts/{id}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"crm/v1/contacts/{id}"), params=jsonable_encoder( remove_none_from_dict( { @@ -990,7 +946,7 @@ async def ignore_create( api_key="YOUR_API_KEY", ) await client.crm.contacts.ignore_create( - model_id="string", + model_id="model_id", request=IgnoreCommonModelRequest( reason=ReasonEnum.GENERAL_CUSTOMER_REQUEST, message="deletion request by user id 51903790-7dfe-4053-8d63-5a10cc4ffd39", @@ -999,7 +955,7 @@ async def ignore_create( """ _response = await self._client_wrapper.httpx_client.request( "POST", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"api/crm/v1/contacts/ignore/{model_id}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"crm/v1/contacts/ignore/{model_id}"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -1047,12 +1003,12 @@ async def meta_patch_retrieve( api_key="YOUR_API_KEY", ) await client.crm.contacts.meta_patch_retrieve( - id="string", + id="id", ) """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"api/crm/v1/contacts/meta/patch/{id}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"crm/v1/contacts/meta/patch/{id}"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -1093,7 +1049,7 @@ async def meta_post_retrieve(self, *, request_options: typing.Optional[RequestOp """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/crm/v1/contacts/meta/post"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "crm/v1/contacts/meta/post"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -1153,7 +1109,7 @@ async def remote_field_classes_list( """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/crm/v1/contacts/remote-field-classes"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "crm/v1/contacts/remote-field-classes"), params=jsonable_encoder( remove_none_from_dict( { diff --git a/src/merge/resources/crm/resources/custom_object_classes/client.py b/src/merge/resources/crm/resources/custom_object_classes/client.py index b3c2a82d..67553d11 100644 --- a/src/merge/resources/crm/resources/custom_object_classes/client.py +++ b/src/merge/resources/crm/resources/custom_object_classes/client.py @@ -71,13 +71,11 @@ def list( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) - client.crm.custom_object_classes.list( - expand="fields", - ) + client.crm.custom_object_classes.list() """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/crm/v1/custom-object-classes"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "crm/v1/custom-object-classes"), params=jsonable_encoder( remove_none_from_dict( { @@ -146,13 +144,12 @@ def retrieve( api_key="YOUR_API_KEY", ) client.crm.custom_object_classes.retrieve( - id="string", - expand="fields", + id="id", ) """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"api/crm/v1/custom-object-classes/{id}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"crm/v1/custom-object-classes/{id}"), params=jsonable_encoder( remove_none_from_dict( { @@ -238,13 +235,11 @@ async def list( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) - await client.crm.custom_object_classes.list( - expand="fields", - ) + await client.crm.custom_object_classes.list() """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/crm/v1/custom-object-classes"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "crm/v1/custom-object-classes"), params=jsonable_encoder( remove_none_from_dict( { @@ -313,13 +308,12 @@ async def retrieve( api_key="YOUR_API_KEY", ) await client.crm.custom_object_classes.retrieve( - id="string", - expand="fields", + id="id", ) """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"api/crm/v1/custom-object-classes/{id}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"crm/v1/custom-object-classes/{id}"), params=jsonable_encoder( remove_none_from_dict( { diff --git a/src/merge/resources/crm/resources/custom_objects/client.py b/src/merge/resources/crm/resources/custom_objects/client.py index 0f2239e4..db499bb8 100644 --- a/src/merge/resources/crm/resources/custom_objects/client.py +++ b/src/merge/resources/crm/resources/custom_objects/client.py @@ -81,14 +81,14 @@ def custom_object_classes_custom_objects_list( api_key="YOUR_API_KEY", ) client.crm.custom_objects.custom_object_classes_custom_objects_list( - custom_object_class_id="string", + custom_object_class_id="custom_object_class_id", ) """ _response = self._client_wrapper.httpx_client.request( "GET", urllib.parse.urljoin( f"{self._client_wrapper.get_base_url()}/", - f"api/crm/v1/custom-object-classes/{custom_object_class_id}/custom-objects", + f"crm/v1/custom-object-classes/{custom_object_class_id}/custom-objects", ), params=jsonable_encoder( remove_none_from_dict( @@ -162,9 +162,9 @@ def custom_object_classes_custom_objects_create( api_key="YOUR_API_KEY", ) client.crm.custom_objects.custom_object_classes_custom_objects_create( - custom_object_class_id="string", + custom_object_class_id="custom_object_class_id", model=CustomObjectRequest( - fields={"string": {}}, + fields={}, ), ) """ @@ -172,7 +172,7 @@ def custom_object_classes_custom_objects_create( "POST", urllib.parse.urljoin( f"{self._client_wrapper.get_base_url()}/", - f"api/crm/v1/custom-object-classes/{custom_object_class_id}/custom-objects", + f"crm/v1/custom-object-classes/{custom_object_class_id}/custom-objects", ), params=jsonable_encoder( remove_none_from_dict( @@ -243,15 +243,15 @@ def custom_object_classes_custom_objects_retrieve( api_key="YOUR_API_KEY", ) client.crm.custom_objects.custom_object_classes_custom_objects_retrieve( - custom_object_class_id="string", - id="string", + custom_object_class_id="custom_object_class_id", + id="id", ) """ _response = self._client_wrapper.httpx_client.request( "GET", urllib.parse.urljoin( f"{self._client_wrapper.get_base_url()}/", - f"api/crm/v1/custom-object-classes/{custom_object_class_id}/custom-objects/{id}", + f"crm/v1/custom-object-classes/{custom_object_class_id}/custom-objects/{id}", ), params=jsonable_encoder( remove_none_from_dict( @@ -286,59 +286,6 @@ def custom_object_classes_custom_objects_retrieve( raise ApiError(status_code=_response.status_code, body=_response.text) raise ApiError(status_code=_response.status_code, body=_response_json) - def custom_object_classes_custom_objects_meta_patch_retrieve( - self, custom_object_class_id: str, id: str, *, request_options: typing.Optional[RequestOptions] = None - ) -> MetaResponse: - """ - Returns metadata for `CRMCustomObject` PATCHs. - - Parameters: - - custom_object_class_id: str. - - - id: str. - - - request_options: typing.Optional[RequestOptions]. Request-specific configuration. - --- - from merge.client import Merge - - client = Merge( - account_token="YOUR_ACCOUNT_TOKEN", - api_key="YOUR_API_KEY", - ) - client.crm.custom_objects.custom_object_classes_custom_objects_meta_patch_retrieve( - custom_object_class_id="string", - id="string", - ) - """ - _response = self._client_wrapper.httpx_client.request( - "GET", - urllib.parse.urljoin( - f"{self._client_wrapper.get_base_url()}/", - f"api/crm/v1/custom-object-classes/{custom_object_class_id}/custom-objects/meta/patch/{id}", - ), - params=jsonable_encoder( - request_options.get("additional_query_parameters") if request_options is not None else None - ), - headers=jsonable_encoder( - remove_none_from_dict( - { - **self._client_wrapper.get_headers(), - **(request_options.get("additional_headers", {}) if request_options is not None else {}), - } - ) - ), - timeout=request_options.get("timeout_in_seconds") - if request_options is not None and request_options.get("timeout_in_seconds") is not None - else 60, - ) - if 200 <= _response.status_code < 300: - return pydantic.parse_obj_as(MetaResponse, _response.json()) # type: ignore - try: - _response_json = _response.json() - except JSONDecodeError: - raise ApiError(status_code=_response.status_code, body=_response.text) - raise ApiError(status_code=_response.status_code, body=_response_json) - def custom_object_classes_custom_objects_meta_post_retrieve( self, custom_object_class_id: str, *, request_options: typing.Optional[RequestOptions] = None ) -> MetaResponse: @@ -357,14 +304,14 @@ def custom_object_classes_custom_objects_meta_post_retrieve( api_key="YOUR_API_KEY", ) client.crm.custom_objects.custom_object_classes_custom_objects_meta_post_retrieve( - custom_object_class_id="string", + custom_object_class_id="custom_object_class_id", ) """ _response = self._client_wrapper.httpx_client.request( "GET", urllib.parse.urljoin( f"{self._client_wrapper.get_base_url()}/", - f"api/crm/v1/custom-object-classes/{custom_object_class_id}/custom-objects/meta/post", + f"crm/v1/custom-object-classes/{custom_object_class_id}/custom-objects/meta/post", ), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None @@ -445,14 +392,14 @@ async def custom_object_classes_custom_objects_list( api_key="YOUR_API_KEY", ) await client.crm.custom_objects.custom_object_classes_custom_objects_list( - custom_object_class_id="string", + custom_object_class_id="custom_object_class_id", ) """ _response = await self._client_wrapper.httpx_client.request( "GET", urllib.parse.urljoin( f"{self._client_wrapper.get_base_url()}/", - f"api/crm/v1/custom-object-classes/{custom_object_class_id}/custom-objects", + f"crm/v1/custom-object-classes/{custom_object_class_id}/custom-objects", ), params=jsonable_encoder( remove_none_from_dict( @@ -526,9 +473,9 @@ async def custom_object_classes_custom_objects_create( api_key="YOUR_API_KEY", ) await client.crm.custom_objects.custom_object_classes_custom_objects_create( - custom_object_class_id="string", + custom_object_class_id="custom_object_class_id", model=CustomObjectRequest( - fields={"string": {}}, + fields={}, ), ) """ @@ -536,7 +483,7 @@ async def custom_object_classes_custom_objects_create( "POST", urllib.parse.urljoin( f"{self._client_wrapper.get_base_url()}/", - f"api/crm/v1/custom-object-classes/{custom_object_class_id}/custom-objects", + f"crm/v1/custom-object-classes/{custom_object_class_id}/custom-objects", ), params=jsonable_encoder( remove_none_from_dict( @@ -607,15 +554,15 @@ async def custom_object_classes_custom_objects_retrieve( api_key="YOUR_API_KEY", ) await client.crm.custom_objects.custom_object_classes_custom_objects_retrieve( - custom_object_class_id="string", - id="string", + custom_object_class_id="custom_object_class_id", + id="id", ) """ _response = await self._client_wrapper.httpx_client.request( "GET", urllib.parse.urljoin( f"{self._client_wrapper.get_base_url()}/", - f"api/crm/v1/custom-object-classes/{custom_object_class_id}/custom-objects/{id}", + f"crm/v1/custom-object-classes/{custom_object_class_id}/custom-objects/{id}", ), params=jsonable_encoder( remove_none_from_dict( @@ -650,59 +597,6 @@ async def custom_object_classes_custom_objects_retrieve( raise ApiError(status_code=_response.status_code, body=_response.text) raise ApiError(status_code=_response.status_code, body=_response_json) - async def custom_object_classes_custom_objects_meta_patch_retrieve( - self, custom_object_class_id: str, id: str, *, request_options: typing.Optional[RequestOptions] = None - ) -> MetaResponse: - """ - Returns metadata for `CRMCustomObject` PATCHs. - - Parameters: - - custom_object_class_id: str. - - - id: str. - - - request_options: typing.Optional[RequestOptions]. Request-specific configuration. - --- - from merge.client import AsyncMerge - - client = AsyncMerge( - account_token="YOUR_ACCOUNT_TOKEN", - api_key="YOUR_API_KEY", - ) - await client.crm.custom_objects.custom_object_classes_custom_objects_meta_patch_retrieve( - custom_object_class_id="string", - id="string", - ) - """ - _response = await self._client_wrapper.httpx_client.request( - "GET", - urllib.parse.urljoin( - f"{self._client_wrapper.get_base_url()}/", - f"api/crm/v1/custom-object-classes/{custom_object_class_id}/custom-objects/meta/patch/{id}", - ), - params=jsonable_encoder( - request_options.get("additional_query_parameters") if request_options is not None else None - ), - headers=jsonable_encoder( - remove_none_from_dict( - { - **self._client_wrapper.get_headers(), - **(request_options.get("additional_headers", {}) if request_options is not None else {}), - } - ) - ), - timeout=request_options.get("timeout_in_seconds") - if request_options is not None and request_options.get("timeout_in_seconds") is not None - else 60, - ) - if 200 <= _response.status_code < 300: - return pydantic.parse_obj_as(MetaResponse, _response.json()) # type: ignore - try: - _response_json = _response.json() - except JSONDecodeError: - raise ApiError(status_code=_response.status_code, body=_response.text) - raise ApiError(status_code=_response.status_code, body=_response_json) - async def custom_object_classes_custom_objects_meta_post_retrieve( self, custom_object_class_id: str, *, request_options: typing.Optional[RequestOptions] = None ) -> MetaResponse: @@ -721,14 +615,14 @@ async def custom_object_classes_custom_objects_meta_post_retrieve( api_key="YOUR_API_KEY", ) await client.crm.custom_objects.custom_object_classes_custom_objects_meta_post_retrieve( - custom_object_class_id="string", + custom_object_class_id="custom_object_class_id", ) """ _response = await self._client_wrapper.httpx_client.request( "GET", urllib.parse.urljoin( f"{self._client_wrapper.get_base_url()}/", - f"api/crm/v1/custom-object-classes/{custom_object_class_id}/custom-objects/meta/post", + f"crm/v1/custom-object-classes/{custom_object_class_id}/custom-objects/meta/post", ), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None diff --git a/src/merge/resources/crm/resources/delete_account/client.py b/src/merge/resources/crm/resources/delete_account/client.py index de84e6fe..f6bce78b 100644 --- a/src/merge/resources/crm/resources/delete_account/client.py +++ b/src/merge/resources/crm/resources/delete_account/client.py @@ -32,7 +32,7 @@ def delete(self, *, request_options: typing.Optional[RequestOptions] = None) -> """ _response = self._client_wrapper.httpx_client.request( "POST", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/crm/v1/delete-account"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "crm/v1/delete-account"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -81,7 +81,7 @@ async def delete(self, *, request_options: typing.Optional[RequestOptions] = Non """ _response = await self._client_wrapper.httpx_client.request( "POST", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/crm/v1/delete-account"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "crm/v1/delete-account"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), diff --git a/src/merge/resources/crm/resources/engagement_types/client.py b/src/merge/resources/crm/resources/engagement_types/client.py index 603ea60d..0f47bbf3 100644 --- a/src/merge/resources/crm/resources/engagement_types/client.py +++ b/src/merge/resources/crm/resources/engagement_types/client.py @@ -76,7 +76,7 @@ def list( """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/crm/v1/engagement-types"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "crm/v1/engagement-types"), params=jsonable_encoder( remove_none_from_dict( { @@ -145,12 +145,12 @@ def retrieve( api_key="YOUR_API_KEY", ) client.crm.engagement_types.retrieve( - id="string", + id="id", ) """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"api/crm/v1/engagement-types/{id}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"crm/v1/engagement-types/{id}"), params=jsonable_encoder( remove_none_from_dict( { @@ -221,7 +221,7 @@ def remote_field_classes_list( _response = self._client_wrapper.httpx_client.request( "GET", urllib.parse.urljoin( - f"{self._client_wrapper.get_base_url()}/", "api/crm/v1/engagement-types/remote-field-classes" + f"{self._client_wrapper.get_base_url()}/", "crm/v1/engagement-types/remote-field-classes" ), params=jsonable_encoder( remove_none_from_dict( @@ -315,7 +315,7 @@ async def list( """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/crm/v1/engagement-types"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "crm/v1/engagement-types"), params=jsonable_encoder( remove_none_from_dict( { @@ -384,12 +384,12 @@ async def retrieve( api_key="YOUR_API_KEY", ) await client.crm.engagement_types.retrieve( - id="string", + id="id", ) """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"api/crm/v1/engagement-types/{id}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"crm/v1/engagement-types/{id}"), params=jsonable_encoder( remove_none_from_dict( { @@ -460,7 +460,7 @@ async def remote_field_classes_list( _response = await self._client_wrapper.httpx_client.request( "GET", urllib.parse.urljoin( - f"{self._client_wrapper.get_base_url()}/", "api/crm/v1/engagement-types/remote-field-classes" + f"{self._client_wrapper.get_base_url()}/", "crm/v1/engagement-types/remote-field-classes" ), params=jsonable_encoder( remove_none_from_dict( diff --git a/src/merge/resources/crm/resources/engagements/client.py b/src/merge/resources/crm/resources/engagements/client.py index b811f90a..a1ec23e3 100644 --- a/src/merge/resources/crm/resources/engagements/client.py +++ b/src/merge/resources/crm/resources/engagements/client.py @@ -85,19 +85,16 @@ def list( - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from merge.client import Merge - from merge.resources.crm import EngagementsListRequestExpand client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) - client.crm.engagements.list( - expand=EngagementsListRequestExpand.ACCOUNT, - ) + client.crm.engagements.list() """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/crm/v1/engagements"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "crm/v1/engagements"), params=jsonable_encoder( remove_none_from_dict( { @@ -162,8 +159,6 @@ def create( - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- - import datetime - from merge.client import Merge from merge.resources.crm import EngagementRequest @@ -172,21 +167,12 @@ def create( api_key="YOUR_API_KEY", ) client.crm.engagements.create( - model=EngagementRequest( - content="Call for negotiation", - subject="Call from customer", - start_time=datetime.datetime.fromisoformat( - "2022-02-10 00:00:00+00:00", - ), - end_time=datetime.datetime.fromisoformat( - "2022-02-10 00:05:00+00:00", - ), - ), + model=EngagementRequest(), ) """ _response = self._client_wrapper.httpx_client.request( "POST", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/crm/v1/engagements"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "crm/v1/engagements"), params=jsonable_encoder( remove_none_from_dict( { @@ -250,20 +236,18 @@ def retrieve( - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from merge.client import Merge - from merge.resources.crm import EngagementsRetrieveRequestExpand client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) client.crm.engagements.retrieve( - id="string", - expand=EngagementsRetrieveRequestExpand.ACCOUNT, + id="id", ) """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"api/crm/v1/engagements/{id}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"crm/v1/engagements/{id}"), params=jsonable_encoder( remove_none_from_dict( { @@ -321,8 +305,6 @@ def partial_update( - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- - import datetime - from merge.client import Merge from merge.resources.crm import PatchedEngagementRequest @@ -331,25 +313,13 @@ def partial_update( api_key="YOUR_API_KEY", ) client.crm.engagements.partial_update( - id="string", - model=PatchedEngagementRequest( - owner="0358cbc6-2040-430a-848e-aafacbadf3aa", - content="Call for negotiation", - subject="Call from customer", - engagement_type="0358cbc6-2040-430a-848e-aafacbadf3aa", - start_time=datetime.datetime.fromisoformat( - "2022-02-10 00:00:00+00:00", - ), - end_time=datetime.datetime.fromisoformat( - "2022-02-10 00:05:00+00:00", - ), - account="025fjlc6-6000-430a-848e-aafacbadf4fe", - ), + id="id", + model=PatchedEngagementRequest(), ) """ _response = self._client_wrapper.httpx_client.request( "PATCH", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"api/crm/v1/engagements/{id}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"crm/v1/engagements/{id}"), params=jsonable_encoder( remove_none_from_dict( { @@ -405,12 +375,12 @@ def meta_patch_retrieve(self, id: str, *, request_options: typing.Optional[Reque api_key="YOUR_API_KEY", ) client.crm.engagements.meta_patch_retrieve( - id="string", + id="id", ) """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"api/crm/v1/engagements/meta/patch/{id}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"crm/v1/engagements/meta/patch/{id}"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -451,7 +421,7 @@ def meta_post_retrieve(self, *, request_options: typing.Optional[RequestOptions] """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/crm/v1/engagements/meta/post"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "crm/v1/engagements/meta/post"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -511,9 +481,7 @@ def remote_field_classes_list( """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin( - f"{self._client_wrapper.get_base_url()}/", "api/crm/v1/engagements/remote-field-classes" - ), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "crm/v1/engagements/remote-field-classes"), params=jsonable_encoder( remove_none_from_dict( { @@ -606,19 +574,16 @@ async def list( - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from merge.client import AsyncMerge - from merge.resources.crm import EngagementsListRequestExpand client = AsyncMerge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) - await client.crm.engagements.list( - expand=EngagementsListRequestExpand.ACCOUNT, - ) + await client.crm.engagements.list() """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/crm/v1/engagements"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "crm/v1/engagements"), params=jsonable_encoder( remove_none_from_dict( { @@ -683,8 +648,6 @@ async def create( - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- - import datetime - from merge.client import AsyncMerge from merge.resources.crm import EngagementRequest @@ -693,21 +656,12 @@ async def create( api_key="YOUR_API_KEY", ) await client.crm.engagements.create( - model=EngagementRequest( - content="Call for negotiation", - subject="Call from customer", - start_time=datetime.datetime.fromisoformat( - "2022-02-10 00:00:00+00:00", - ), - end_time=datetime.datetime.fromisoformat( - "2022-02-10 00:05:00+00:00", - ), - ), + model=EngagementRequest(), ) """ _response = await self._client_wrapper.httpx_client.request( "POST", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/crm/v1/engagements"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "crm/v1/engagements"), params=jsonable_encoder( remove_none_from_dict( { @@ -771,20 +725,18 @@ async def retrieve( - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from merge.client import AsyncMerge - from merge.resources.crm import EngagementsRetrieveRequestExpand client = AsyncMerge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) await client.crm.engagements.retrieve( - id="string", - expand=EngagementsRetrieveRequestExpand.ACCOUNT, + id="id", ) """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"api/crm/v1/engagements/{id}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"crm/v1/engagements/{id}"), params=jsonable_encoder( remove_none_from_dict( { @@ -842,8 +794,6 @@ async def partial_update( - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- - import datetime - from merge.client import AsyncMerge from merge.resources.crm import PatchedEngagementRequest @@ -852,25 +802,13 @@ async def partial_update( api_key="YOUR_API_KEY", ) await client.crm.engagements.partial_update( - id="string", - model=PatchedEngagementRequest( - owner="0358cbc6-2040-430a-848e-aafacbadf3aa", - content="Call for negotiation", - subject="Call from customer", - engagement_type="0358cbc6-2040-430a-848e-aafacbadf3aa", - start_time=datetime.datetime.fromisoformat( - "2022-02-10 00:00:00+00:00", - ), - end_time=datetime.datetime.fromisoformat( - "2022-02-10 00:05:00+00:00", - ), - account="025fjlc6-6000-430a-848e-aafacbadf4fe", - ), + id="id", + model=PatchedEngagementRequest(), ) """ _response = await self._client_wrapper.httpx_client.request( "PATCH", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"api/crm/v1/engagements/{id}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"crm/v1/engagements/{id}"), params=jsonable_encoder( remove_none_from_dict( { @@ -928,12 +866,12 @@ async def meta_patch_retrieve( api_key="YOUR_API_KEY", ) await client.crm.engagements.meta_patch_retrieve( - id="string", + id="id", ) """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"api/crm/v1/engagements/meta/patch/{id}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"crm/v1/engagements/meta/patch/{id}"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -974,7 +912,7 @@ async def meta_post_retrieve(self, *, request_options: typing.Optional[RequestOp """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/crm/v1/engagements/meta/post"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "crm/v1/engagements/meta/post"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -1034,9 +972,7 @@ async def remote_field_classes_list( """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin( - f"{self._client_wrapper.get_base_url()}/", "api/crm/v1/engagements/remote-field-classes" - ), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "crm/v1/engagements/remote-field-classes"), params=jsonable_encoder( remove_none_from_dict( { diff --git a/src/merge/resources/crm/resources/field_mapping/client.py b/src/merge/resources/crm/resources/field_mapping/client.py index 1576595f..7155e917 100644 --- a/src/merge/resources/crm/resources/field_mapping/client.py +++ b/src/merge/resources/crm/resources/field_mapping/client.py @@ -46,7 +46,7 @@ def field_mappings_retrieve( """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/crm/v1/field-mappings"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "crm/v1/field-mappings"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -116,7 +116,7 @@ def field_mappings_create( """ _response = self._client_wrapper.httpx_client.request( "POST", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/crm/v1/field-mappings"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "crm/v1/field-mappings"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -182,13 +182,13 @@ def field_mappings_destroy( api_key="YOUR_API_KEY", ) client.crm.field_mapping.field_mappings_destroy( - field_mapping_id="string", + field_mapping_id="field_mapping_id", ) """ _response = self._client_wrapper.httpx_client.request( "DELETE", urllib.parse.urljoin( - f"{self._client_wrapper.get_base_url()}/", f"api/crm/v1/field-mappings/{field_mapping_id}" + f"{self._client_wrapper.get_base_url()}/", f"crm/v1/field-mappings/{field_mapping_id}" ), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None @@ -243,7 +243,7 @@ def field_mappings_partial_update( api_key="YOUR_API_KEY", ) client.crm.field_mapping.field_mappings_partial_update( - field_mapping_id="string", + field_mapping_id="field_mapping_id", remote_method="GET", remote_url_path="/example-url-path", ) @@ -258,7 +258,7 @@ def field_mappings_partial_update( _response = self._client_wrapper.httpx_client.request( "PATCH", urllib.parse.urljoin( - f"{self._client_wrapper.get_base_url()}/", f"api/crm/v1/field-mappings/{field_mapping_id}" + f"{self._client_wrapper.get_base_url()}/", f"crm/v1/field-mappings/{field_mapping_id}" ), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None @@ -316,7 +316,7 @@ def remote_fields_retrieve( """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/crm/v1/remote-fields"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "crm/v1/remote-fields"), params=jsonable_encoder( remove_none_from_dict( { @@ -369,7 +369,7 @@ def target_fields_retrieve( """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/crm/v1/target-fields"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "crm/v1/target-fields"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -417,7 +417,7 @@ async def field_mappings_retrieve( """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/crm/v1/field-mappings"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "crm/v1/field-mappings"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -487,7 +487,7 @@ async def field_mappings_create( """ _response = await self._client_wrapper.httpx_client.request( "POST", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/crm/v1/field-mappings"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "crm/v1/field-mappings"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -553,13 +553,13 @@ async def field_mappings_destroy( api_key="YOUR_API_KEY", ) await client.crm.field_mapping.field_mappings_destroy( - field_mapping_id="string", + field_mapping_id="field_mapping_id", ) """ _response = await self._client_wrapper.httpx_client.request( "DELETE", urllib.parse.urljoin( - f"{self._client_wrapper.get_base_url()}/", f"api/crm/v1/field-mappings/{field_mapping_id}" + f"{self._client_wrapper.get_base_url()}/", f"crm/v1/field-mappings/{field_mapping_id}" ), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None @@ -614,7 +614,7 @@ async def field_mappings_partial_update( api_key="YOUR_API_KEY", ) await client.crm.field_mapping.field_mappings_partial_update( - field_mapping_id="string", + field_mapping_id="field_mapping_id", remote_method="GET", remote_url_path="/example-url-path", ) @@ -629,7 +629,7 @@ async def field_mappings_partial_update( _response = await self._client_wrapper.httpx_client.request( "PATCH", urllib.parse.urljoin( - f"{self._client_wrapper.get_base_url()}/", f"api/crm/v1/field-mappings/{field_mapping_id}" + f"{self._client_wrapper.get_base_url()}/", f"crm/v1/field-mappings/{field_mapping_id}" ), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None @@ -687,7 +687,7 @@ async def remote_fields_retrieve( """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/crm/v1/remote-fields"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "crm/v1/remote-fields"), params=jsonable_encoder( remove_none_from_dict( { @@ -740,7 +740,7 @@ async def target_fields_retrieve( """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/crm/v1/target-fields"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "crm/v1/target-fields"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), diff --git a/src/merge/resources/crm/resources/force_resync/client.py b/src/merge/resources/crm/resources/force_resync/client.py index e5596f64..11d425e7 100644 --- a/src/merge/resources/crm/resources/force_resync/client.py +++ b/src/merge/resources/crm/resources/force_resync/client.py @@ -40,7 +40,7 @@ def sync_status_resync_create( """ _response = self._client_wrapper.httpx_client.request( "POST", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/crm/v1/sync-status/resync"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "crm/v1/sync-status/resync"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -91,7 +91,7 @@ async def sync_status_resync_create( """ _response = await self._client_wrapper.httpx_client.request( "POST", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/crm/v1/sync-status/resync"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "crm/v1/sync-status/resync"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), diff --git a/src/merge/resources/crm/resources/generate_key/client.py b/src/merge/resources/crm/resources/generate_key/client.py index 09851a61..2f4fe3db 100644 --- a/src/merge/resources/crm/resources/generate_key/client.py +++ b/src/merge/resources/crm/resources/generate_key/client.py @@ -29,7 +29,7 @@ def create(self, *, name: str, request_options: typing.Optional[RequestOptions] Create a remote key. Parameters: - - name: str. + - name: str. The name of the remote key - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- @@ -45,7 +45,7 @@ def create(self, *, name: str, request_options: typing.Optional[RequestOptions] """ _response = self._client_wrapper.httpx_client.request( "POST", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/crm/v1/generate-key"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "crm/v1/generate-key"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -85,7 +85,7 @@ async def create(self, *, name: str, request_options: typing.Optional[RequestOpt Create a remote key. Parameters: - - name: str. + - name: str. The name of the remote key - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- @@ -101,7 +101,7 @@ async def create(self, *, name: str, request_options: typing.Optional[RequestOpt """ _response = await self._client_wrapper.httpx_client.request( "POST", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/crm/v1/generate-key"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "crm/v1/generate-key"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), diff --git a/src/merge/resources/crm/resources/issues/client.py b/src/merge/resources/crm/resources/issues/client.py index 1d95a7b4..83052b93 100644 --- a/src/merge/resources/crm/resources/issues/client.py +++ b/src/merge/resources/crm/resources/issues/client.py @@ -78,19 +78,16 @@ def list( - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from merge.client import Merge - from merge.resources.crm import IssuesListRequestStatus client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) - client.crm.issues.list( - status=IssuesListRequestStatus.ONGOING, - ) + client.crm.issues.list() """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/crm/v1/issues"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "crm/v1/issues"), params=jsonable_encoder( remove_none_from_dict( { @@ -159,12 +156,12 @@ def retrieve(self, id: str, *, request_options: typing.Optional[RequestOptions] api_key="YOUR_API_KEY", ) client.crm.issues.retrieve( - id="string", + id="id", ) """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"api/crm/v1/issues/{id}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"crm/v1/issues/{id}"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -246,19 +243,16 @@ async def list( - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from merge.client import AsyncMerge - from merge.resources.crm import IssuesListRequestStatus client = AsyncMerge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) - await client.crm.issues.list( - status=IssuesListRequestStatus.ONGOING, - ) + await client.crm.issues.list() """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/crm/v1/issues"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "crm/v1/issues"), params=jsonable_encoder( remove_none_from_dict( { @@ -327,12 +321,12 @@ async def retrieve(self, id: str, *, request_options: typing.Optional[RequestOpt api_key="YOUR_API_KEY", ) await client.crm.issues.retrieve( - id="string", + id="id", ) """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"api/crm/v1/issues/{id}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"crm/v1/issues/{id}"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), diff --git a/src/merge/resources/crm/resources/leads/client.py b/src/merge/resources/crm/resources/leads/client.py index 84a1f65d..89ec2fae 100644 --- a/src/merge/resources/crm/resources/leads/client.py +++ b/src/merge/resources/crm/resources/leads/client.py @@ -93,19 +93,16 @@ def list( - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from merge.client import Merge - from merge.resources.crm import LeadsListRequestExpand client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) - client.crm.leads.list( - expand=LeadsListRequestExpand.CONVERTED_ACCOUNT, - ) + client.crm.leads.list() """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/crm/v1/leads"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "crm/v1/leads"), params=jsonable_encoder( remove_none_from_dict( { @@ -173,8 +170,6 @@ def create( - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- - import datetime - from merge.client import Merge from merge.resources.crm import LeadRequest @@ -183,21 +178,12 @@ def create( api_key="YOUR_API_KEY", ) client.crm.leads.create( - model=LeadRequest( - lead_source="API Blogger", - title="Co-Founder", - company="Merge API", - first_name="Gil", - last_name="Feig", - converted_date=datetime.datetime.fromisoformat( - "2022-03-10 00:00:00+00:00", - ), - ), + model=LeadRequest(), ) """ _response = self._client_wrapper.httpx_client.request( "POST", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/crm/v1/leads"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "crm/v1/leads"), params=jsonable_encoder( remove_none_from_dict( { @@ -261,20 +247,18 @@ def retrieve( - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from merge.client import Merge - from merge.resources.crm import LeadsRetrieveRequestExpand client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) client.crm.leads.retrieve( - id="string", - expand=LeadsRetrieveRequestExpand.CONVERTED_ACCOUNT, + id="id", ) """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"api/crm/v1/leads/{id}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"crm/v1/leads/{id}"), params=jsonable_encoder( remove_none_from_dict( { @@ -326,7 +310,7 @@ def meta_post_retrieve(self, *, request_options: typing.Optional[RequestOptions] """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/crm/v1/leads/meta/post"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "crm/v1/leads/meta/post"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -386,7 +370,7 @@ def remote_field_classes_list( """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/crm/v1/leads/remote-field-classes"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "crm/v1/leads/remote-field-classes"), params=jsonable_encoder( remove_none_from_dict( { @@ -488,19 +472,16 @@ async def list( - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from merge.client import AsyncMerge - from merge.resources.crm import LeadsListRequestExpand client = AsyncMerge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) - await client.crm.leads.list( - expand=LeadsListRequestExpand.CONVERTED_ACCOUNT, - ) + await client.crm.leads.list() """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/crm/v1/leads"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "crm/v1/leads"), params=jsonable_encoder( remove_none_from_dict( { @@ -568,8 +549,6 @@ async def create( - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- - import datetime - from merge.client import AsyncMerge from merge.resources.crm import LeadRequest @@ -578,21 +557,12 @@ async def create( api_key="YOUR_API_KEY", ) await client.crm.leads.create( - model=LeadRequest( - lead_source="API Blogger", - title="Co-Founder", - company="Merge API", - first_name="Gil", - last_name="Feig", - converted_date=datetime.datetime.fromisoformat( - "2022-03-10 00:00:00+00:00", - ), - ), + model=LeadRequest(), ) """ _response = await self._client_wrapper.httpx_client.request( "POST", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/crm/v1/leads"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "crm/v1/leads"), params=jsonable_encoder( remove_none_from_dict( { @@ -656,20 +626,18 @@ async def retrieve( - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from merge.client import AsyncMerge - from merge.resources.crm import LeadsRetrieveRequestExpand client = AsyncMerge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) await client.crm.leads.retrieve( - id="string", - expand=LeadsRetrieveRequestExpand.CONVERTED_ACCOUNT, + id="id", ) """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"api/crm/v1/leads/{id}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"crm/v1/leads/{id}"), params=jsonable_encoder( remove_none_from_dict( { @@ -721,7 +689,7 @@ async def meta_post_retrieve(self, *, request_options: typing.Optional[RequestOp """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/crm/v1/leads/meta/post"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "crm/v1/leads/meta/post"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -781,7 +749,7 @@ async def remote_field_classes_list( """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/crm/v1/leads/remote-field-classes"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "crm/v1/leads/remote-field-classes"), params=jsonable_encoder( remove_none_from_dict( { diff --git a/src/merge/resources/crm/resources/link_token/client.py b/src/merge/resources/crm/resources/link_token/client.py index c371521c..24427c27 100644 --- a/src/merge/resources/crm/resources/link_token/client.py +++ b/src/merge/resources/crm/resources/link_token/client.py @@ -41,6 +41,7 @@ def create( category_common_model_scopes: typing.Optional[ typing.Dict[str, typing.Optional[typing.List[IndividualCommonModelScopeDeserializerRequest]]] ] = OMIT, + language: typing.Optional[str] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> LinkToken: """ @@ -65,9 +66,12 @@ def create( - category_common_model_scopes: typing.Optional[typing.Dict[str, typing.Optional[typing.List[IndividualCommonModelScopeDeserializerRequest]]]]. When creating a Link Token, you can set permissions for Common Models that will apply to the account that is going to be linked. Any model or field not specified in link token payload will default to existing settings. + - language: typing.Optional[str]. The language code for the language to localize Merge Link to. + - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from merge.client import Merge + from merge.resources.crm import CategoriesEnum client = Merge( account_token="YOUR_ACCOUNT_TOKEN", @@ -77,8 +81,7 @@ def create( end_user_email_address="example@gmail.com", end_user_organization_name="Test Organization", end_user_origin_id="12345", - categories=[], - integration="bamboohr", + categories=[CategoriesEnum.HRIS], ) """ _request: typing.Dict[str, typing.Any] = { @@ -97,9 +100,11 @@ def create( _request["common_models"] = common_models if category_common_model_scopes is not OMIT: _request["category_common_model_scopes"] = category_common_model_scopes + if language is not OMIT: + _request["language"] = language _response = self._client_wrapper.httpx_client.request( "POST", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/crm/v1/link-token"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "crm/v1/link-token"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -148,6 +153,7 @@ async def create( category_common_model_scopes: typing.Optional[ typing.Dict[str, typing.Optional[typing.List[IndividualCommonModelScopeDeserializerRequest]]] ] = OMIT, + language: typing.Optional[str] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> LinkToken: """ @@ -172,9 +178,12 @@ async def create( - category_common_model_scopes: typing.Optional[typing.Dict[str, typing.Optional[typing.List[IndividualCommonModelScopeDeserializerRequest]]]]. When creating a Link Token, you can set permissions for Common Models that will apply to the account that is going to be linked. Any model or field not specified in link token payload will default to existing settings. + - language: typing.Optional[str]. The language code for the language to localize Merge Link to. + - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from merge.client import AsyncMerge + from merge.resources.crm import CategoriesEnum client = AsyncMerge( account_token="YOUR_ACCOUNT_TOKEN", @@ -184,8 +193,7 @@ async def create( end_user_email_address="example@gmail.com", end_user_organization_name="Test Organization", end_user_origin_id="12345", - categories=[], - integration="bamboohr", + categories=[CategoriesEnum.HRIS], ) """ _request: typing.Dict[str, typing.Any] = { @@ -204,9 +212,11 @@ async def create( _request["common_models"] = common_models if category_common_model_scopes is not OMIT: _request["category_common_model_scopes"] = category_common_model_scopes + if language is not OMIT: + _request["language"] = language _response = await self._client_wrapper.httpx_client.request( "POST", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/crm/v1/link-token"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "crm/v1/link-token"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), diff --git a/src/merge/resources/crm/resources/linked_accounts/client.py b/src/merge/resources/crm/resources/linked_accounts/client.py index 3a18316f..f43edc87 100644 --- a/src/merge/resources/crm/resources/linked_accounts/client.py +++ b/src/merge/resources/crm/resources/linked_accounts/client.py @@ -44,7 +44,7 @@ def list( List linked accounts for your organization. Parameters: - - category: typing.Optional[LinkedAccountsListRequestCategory]. Options: ('hris', 'ats', 'accounting', 'ticketing', 'crm', 'mktg', 'filestorage') + - category: typing.Optional[LinkedAccountsListRequestCategory]. Options: `accounting`, `ats`, `crm`, `filestorage`, `hris`, `mktg`, `ticketing` - `hris` - hris - `ats` - ats @@ -80,19 +80,16 @@ def list( - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from merge.client import Merge - from merge.resources.crm import LinkedAccountsListRequestCategory client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) - client.crm.linked_accounts.list( - category=LinkedAccountsListRequestCategory.ACCOUNTING, - ) + client.crm.linked_accounts.list() """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/crm/v1/linked-accounts"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "crm/v1/linked-accounts"), params=jsonable_encoder( remove_none_from_dict( { @@ -164,7 +161,7 @@ async def list( List linked accounts for your organization. Parameters: - - category: typing.Optional[LinkedAccountsListRequestCategory]. Options: ('hris', 'ats', 'accounting', 'ticketing', 'crm', 'mktg', 'filestorage') + - category: typing.Optional[LinkedAccountsListRequestCategory]. Options: `accounting`, `ats`, `crm`, `filestorage`, `hris`, `mktg`, `ticketing` - `hris` - hris - `ats` - ats @@ -200,19 +197,16 @@ async def list( - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from merge.client import AsyncMerge - from merge.resources.crm import LinkedAccountsListRequestCategory client = AsyncMerge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) - await client.crm.linked_accounts.list( - category=LinkedAccountsListRequestCategory.ACCOUNTING, - ) + await client.crm.linked_accounts.list() """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/crm/v1/linked-accounts"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "crm/v1/linked-accounts"), params=jsonable_encoder( remove_none_from_dict( { diff --git a/src/merge/resources/crm/resources/notes/client.py b/src/merge/resources/crm/resources/notes/client.py index 30a17953..8e9d6e24 100644 --- a/src/merge/resources/crm/resources/notes/client.py +++ b/src/merge/resources/crm/resources/notes/client.py @@ -90,19 +90,16 @@ def list( - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from merge.client import Merge - from merge.resources.crm import NotesListRequestExpand client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) - client.crm.notes.list( - expand=NotesListRequestExpand.ACCOUNT, - ) + client.crm.notes.list() """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/crm/v1/notes"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "crm/v1/notes"), params=jsonable_encoder( remove_none_from_dict( { @@ -177,14 +174,12 @@ def create( api_key="YOUR_API_KEY", ) client.crm.notes.create( - model=NoteRequest( - content="Merge is hiring!", - ), + model=NoteRequest(), ) """ _response = self._client_wrapper.httpx_client.request( "POST", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/crm/v1/notes"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "crm/v1/notes"), params=jsonable_encoder( remove_none_from_dict( { @@ -248,20 +243,18 @@ def retrieve( - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from merge.client import Merge - from merge.resources.crm import NotesRetrieveRequestExpand client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) client.crm.notes.retrieve( - id="string", - expand=NotesRetrieveRequestExpand.ACCOUNT, + id="id", ) """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"api/crm/v1/notes/{id}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"crm/v1/notes/{id}"), params=jsonable_encoder( remove_none_from_dict( { @@ -313,7 +306,7 @@ def meta_post_retrieve(self, *, request_options: typing.Optional[RequestOptions] """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/crm/v1/notes/meta/post"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "crm/v1/notes/meta/post"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -373,7 +366,7 @@ def remote_field_classes_list( """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/crm/v1/notes/remote-field-classes"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "crm/v1/notes/remote-field-classes"), params=jsonable_encoder( remove_none_from_dict( { @@ -472,19 +465,16 @@ async def list( - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from merge.client import AsyncMerge - from merge.resources.crm import NotesListRequestExpand client = AsyncMerge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) - await client.crm.notes.list( - expand=NotesListRequestExpand.ACCOUNT, - ) + await client.crm.notes.list() """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/crm/v1/notes"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "crm/v1/notes"), params=jsonable_encoder( remove_none_from_dict( { @@ -559,14 +549,12 @@ async def create( api_key="YOUR_API_KEY", ) await client.crm.notes.create( - model=NoteRequest( - content="Merge is hiring!", - ), + model=NoteRequest(), ) """ _response = await self._client_wrapper.httpx_client.request( "POST", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/crm/v1/notes"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "crm/v1/notes"), params=jsonable_encoder( remove_none_from_dict( { @@ -630,20 +618,18 @@ async def retrieve( - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from merge.client import AsyncMerge - from merge.resources.crm import NotesRetrieveRequestExpand client = AsyncMerge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) await client.crm.notes.retrieve( - id="string", - expand=NotesRetrieveRequestExpand.ACCOUNT, + id="id", ) """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"api/crm/v1/notes/{id}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"crm/v1/notes/{id}"), params=jsonable_encoder( remove_none_from_dict( { @@ -695,7 +681,7 @@ async def meta_post_retrieve(self, *, request_options: typing.Optional[RequestOp """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/crm/v1/notes/meta/post"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "crm/v1/notes/meta/post"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -755,7 +741,7 @@ async def remote_field_classes_list( """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/crm/v1/notes/remote-field-classes"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "crm/v1/notes/remote-field-classes"), params=jsonable_encoder( remove_none_from_dict( { diff --git a/src/merge/resources/crm/resources/opportunities/client.py b/src/merge/resources/crm/resources/opportunities/client.py index 2728ecf4..0fd4a450 100644 --- a/src/merge/resources/crm/resources/opportunities/client.py +++ b/src/merge/resources/crm/resources/opportunities/client.py @@ -89,7 +89,7 @@ def list( - remote_id: typing.Optional[str]. The API provider's ID for the given object. - - show_enum_origins: typing.Optional[typing.Literal["status"]]. Which fields should be returned in non-normalized form. + - show_enum_origins: typing.Optional[typing.Literal["status"]]. A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) - stage_id: typing.Optional[str]. If provided, will only return opportunities with this stage. @@ -101,25 +101,16 @@ def list( - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from merge.client import Merge - from merge.resources.crm import ( - OpportunitiesListRequestExpand, - OpportunitiesListRequestStatus, - ) client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) - client.crm.opportunities.list( - expand=OpportunitiesListRequestExpand.ACCOUNT, - remote_fields="status", - show_enum_origins="status", - status=OpportunitiesListRequestStatus.LOST, - ) + client.crm.opportunities.list() """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/crm/v1/opportunities"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "crm/v1/opportunities"), params=jsonable_encoder( remove_none_from_dict( { @@ -188,8 +179,6 @@ def create( - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- - import datetime - from merge.client import Merge from merge.resources.crm import OpportunityRequest @@ -198,22 +187,12 @@ def create( api_key="YOUR_API_KEY", ) client.crm.opportunities.create( - model=OpportunityRequest( - name="Needs Integrations", - description="Needs a Unified API for Integrations!", - amount=1, - last_activity_at=datetime.datetime.fromisoformat( - "2022-02-10 00:00:00+00:00", - ), - close_date=datetime.datetime.fromisoformat( - "2022-02-10 00:00:00+00:00", - ), - ), + model=OpportunityRequest(), ) """ _response = self._client_wrapper.httpx_client.request( "POST", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/crm/v1/opportunities"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "crm/v1/opportunities"), params=jsonable_encoder( remove_none_from_dict( { @@ -278,27 +257,23 @@ def retrieve( - remote_fields: typing.Optional[typing.Literal["status"]]. Deprecated. Use show_enum_origins. - - show_enum_origins: typing.Optional[typing.Literal["status"]]. Which fields should be returned in non-normalized form. + - show_enum_origins: typing.Optional[typing.Literal["status"]]. A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from merge.client import Merge - from merge.resources.crm import OpportunitiesRetrieveRequestExpand client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) client.crm.opportunities.retrieve( - id="string", - expand=OpportunitiesRetrieveRequestExpand.ACCOUNT, - remote_fields="status", - show_enum_origins="status", + id="id", ) """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"api/crm/v1/opportunities/{id}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"crm/v1/opportunities/{id}"), params=jsonable_encoder( remove_none_from_dict( { @@ -358,8 +333,6 @@ def partial_update( - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- - import datetime - from merge.client import Merge from merge.resources.crm import PatchedOpportunityRequest @@ -368,26 +341,13 @@ def partial_update( api_key="YOUR_API_KEY", ) client.crm.opportunities.partial_update( - id="string", - model=PatchedOpportunityRequest( - name="Needs Integrations", - description="Needs a Unified API for Integrations!", - amount=1, - owner="0358cbc6-2040-430a-848e-aafacbadf3aa", - account="0958cbc6-6040-430a-848e-aafacbadf4ae", - stage="1968cbc6-6040-430a-848e-aafacbadf4ad", - last_activity_at=datetime.datetime.fromisoformat( - "2022-02-10 00:00:00+00:00", - ), - close_date=datetime.datetime.fromisoformat( - "2022-02-10 00:00:00+00:00", - ), - ), + id="id", + model=PatchedOpportunityRequest(), ) """ _response = self._client_wrapper.httpx_client.request( "PATCH", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"api/crm/v1/opportunities/{id}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"crm/v1/opportunities/{id}"), params=jsonable_encoder( remove_none_from_dict( { @@ -443,14 +403,12 @@ def meta_patch_retrieve(self, id: str, *, request_options: typing.Optional[Reque api_key="YOUR_API_KEY", ) client.crm.opportunities.meta_patch_retrieve( - id="string", + id="id", ) """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin( - f"{self._client_wrapper.get_base_url()}/", f"api/crm/v1/opportunities/meta/patch/{id}" - ), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"crm/v1/opportunities/meta/patch/{id}"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -491,7 +449,7 @@ def meta_post_retrieve(self, *, request_options: typing.Optional[RequestOptions] """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/crm/v1/opportunities/meta/post"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "crm/v1/opportunities/meta/post"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -552,7 +510,7 @@ def remote_field_classes_list( _response = self._client_wrapper.httpx_client.request( "GET", urllib.parse.urljoin( - f"{self._client_wrapper.get_base_url()}/", "api/crm/v1/opportunities/remote-field-classes" + f"{self._client_wrapper.get_base_url()}/", "crm/v1/opportunities/remote-field-classes" ), params=jsonable_encoder( remove_none_from_dict( @@ -649,7 +607,7 @@ async def list( - remote_id: typing.Optional[str]. The API provider's ID for the given object. - - show_enum_origins: typing.Optional[typing.Literal["status"]]. Which fields should be returned in non-normalized form. + - show_enum_origins: typing.Optional[typing.Literal["status"]]. A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) - stage_id: typing.Optional[str]. If provided, will only return opportunities with this stage. @@ -661,25 +619,16 @@ async def list( - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from merge.client import AsyncMerge - from merge.resources.crm import ( - OpportunitiesListRequestExpand, - OpportunitiesListRequestStatus, - ) client = AsyncMerge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) - await client.crm.opportunities.list( - expand=OpportunitiesListRequestExpand.ACCOUNT, - remote_fields="status", - show_enum_origins="status", - status=OpportunitiesListRequestStatus.LOST, - ) + await client.crm.opportunities.list() """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/crm/v1/opportunities"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "crm/v1/opportunities"), params=jsonable_encoder( remove_none_from_dict( { @@ -748,8 +697,6 @@ async def create( - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- - import datetime - from merge.client import AsyncMerge from merge.resources.crm import OpportunityRequest @@ -758,22 +705,12 @@ async def create( api_key="YOUR_API_KEY", ) await client.crm.opportunities.create( - model=OpportunityRequest( - name="Needs Integrations", - description="Needs a Unified API for Integrations!", - amount=1, - last_activity_at=datetime.datetime.fromisoformat( - "2022-02-10 00:00:00+00:00", - ), - close_date=datetime.datetime.fromisoformat( - "2022-02-10 00:00:00+00:00", - ), - ), + model=OpportunityRequest(), ) """ _response = await self._client_wrapper.httpx_client.request( "POST", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/crm/v1/opportunities"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "crm/v1/opportunities"), params=jsonable_encoder( remove_none_from_dict( { @@ -838,27 +775,23 @@ async def retrieve( - remote_fields: typing.Optional[typing.Literal["status"]]. Deprecated. Use show_enum_origins. - - show_enum_origins: typing.Optional[typing.Literal["status"]]. Which fields should be returned in non-normalized form. + - show_enum_origins: typing.Optional[typing.Literal["status"]]. A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from merge.client import AsyncMerge - from merge.resources.crm import OpportunitiesRetrieveRequestExpand client = AsyncMerge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) await client.crm.opportunities.retrieve( - id="string", - expand=OpportunitiesRetrieveRequestExpand.ACCOUNT, - remote_fields="status", - show_enum_origins="status", + id="id", ) """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"api/crm/v1/opportunities/{id}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"crm/v1/opportunities/{id}"), params=jsonable_encoder( remove_none_from_dict( { @@ -918,8 +851,6 @@ async def partial_update( - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- - import datetime - from merge.client import AsyncMerge from merge.resources.crm import PatchedOpportunityRequest @@ -928,26 +859,13 @@ async def partial_update( api_key="YOUR_API_KEY", ) await client.crm.opportunities.partial_update( - id="string", - model=PatchedOpportunityRequest( - name="Needs Integrations", - description="Needs a Unified API for Integrations!", - amount=1, - owner="0358cbc6-2040-430a-848e-aafacbadf3aa", - account="0958cbc6-6040-430a-848e-aafacbadf4ae", - stage="1968cbc6-6040-430a-848e-aafacbadf4ad", - last_activity_at=datetime.datetime.fromisoformat( - "2022-02-10 00:00:00+00:00", - ), - close_date=datetime.datetime.fromisoformat( - "2022-02-10 00:00:00+00:00", - ), - ), + id="id", + model=PatchedOpportunityRequest(), ) """ _response = await self._client_wrapper.httpx_client.request( "PATCH", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"api/crm/v1/opportunities/{id}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"crm/v1/opportunities/{id}"), params=jsonable_encoder( remove_none_from_dict( { @@ -1005,14 +923,12 @@ async def meta_patch_retrieve( api_key="YOUR_API_KEY", ) await client.crm.opportunities.meta_patch_retrieve( - id="string", + id="id", ) """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin( - f"{self._client_wrapper.get_base_url()}/", f"api/crm/v1/opportunities/meta/patch/{id}" - ), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"crm/v1/opportunities/meta/patch/{id}"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -1053,7 +969,7 @@ async def meta_post_retrieve(self, *, request_options: typing.Optional[RequestOp """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/crm/v1/opportunities/meta/post"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "crm/v1/opportunities/meta/post"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -1114,7 +1030,7 @@ async def remote_field_classes_list( _response = await self._client_wrapper.httpx_client.request( "GET", urllib.parse.urljoin( - f"{self._client_wrapper.get_base_url()}/", "api/crm/v1/opportunities/remote-field-classes" + f"{self._client_wrapper.get_base_url()}/", "crm/v1/opportunities/remote-field-classes" ), params=jsonable_encoder( remove_none_from_dict( diff --git a/src/merge/resources/crm/resources/passthrough/client.py b/src/merge/resources/crm/resources/passthrough/client.py index d9c495d4..456a57fd 100644 --- a/src/merge/resources/crm/resources/passthrough/client.py +++ b/src/merge/resources/crm/resources/passthrough/client.py @@ -37,11 +37,7 @@ def create( - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from merge.client import Merge - from merge.resources.crm import ( - DataPassthroughRequest, - MethodEnum, - RequestFormatEnum, - ) + from merge.resources.crm import DataPassthroughRequest, MethodEnum client = Merge( account_token="YOUR_ACCOUNT_TOKEN", @@ -51,14 +47,12 @@ def create( request=DataPassthroughRequest( method=MethodEnum.GET, path="/scooters", - data='{"company": "Lime", "model": "Gen 2.5"}', - request_format=RequestFormatEnum.JSON, ), ) """ _response = self._client_wrapper.httpx_client.request( "POST", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/crm/v1/passthrough"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "crm/v1/passthrough"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -105,11 +99,7 @@ async def create( - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from merge.client import AsyncMerge - from merge.resources.crm import ( - DataPassthroughRequest, - MethodEnum, - RequestFormatEnum, - ) + from merge.resources.crm import DataPassthroughRequest, MethodEnum client = AsyncMerge( account_token="YOUR_ACCOUNT_TOKEN", @@ -119,14 +109,12 @@ async def create( request=DataPassthroughRequest( method=MethodEnum.GET, path="/scooters", - data='{"company": "Lime", "model": "Gen 2.5"}', - request_format=RequestFormatEnum.JSON, ), ) """ _response = await self._client_wrapper.httpx_client.request( "POST", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/crm/v1/passthrough"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "crm/v1/passthrough"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), diff --git a/src/merge/resources/crm/resources/regenerate_key/client.py b/src/merge/resources/crm/resources/regenerate_key/client.py index 27da6903..1bad476e 100644 --- a/src/merge/resources/crm/resources/regenerate_key/client.py +++ b/src/merge/resources/crm/resources/regenerate_key/client.py @@ -29,7 +29,7 @@ def create(self, *, name: str, request_options: typing.Optional[RequestOptions] Exchange remote keys. Parameters: - - name: str. + - name: str. The name of the remote key - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- @@ -45,7 +45,7 @@ def create(self, *, name: str, request_options: typing.Optional[RequestOptions] """ _response = self._client_wrapper.httpx_client.request( "POST", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/crm/v1/regenerate-key"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "crm/v1/regenerate-key"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -85,7 +85,7 @@ async def create(self, *, name: str, request_options: typing.Optional[RequestOpt Exchange remote keys. Parameters: - - name: str. + - name: str. The name of the remote key - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- @@ -101,7 +101,7 @@ async def create(self, *, name: str, request_options: typing.Optional[RequestOpt """ _response = await self._client_wrapper.httpx_client.request( "POST", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/crm/v1/regenerate-key"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "crm/v1/regenerate-key"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), diff --git a/src/merge/resources/crm/resources/scopes/client.py b/src/merge/resources/crm/resources/scopes/client.py index 90878cad..dbe41da4 100644 --- a/src/merge/resources/crm/resources/scopes/client.py +++ b/src/merge/resources/crm/resources/scopes/client.py @@ -29,7 +29,7 @@ def default_scopes_retrieve( self, *, request_options: typing.Optional[RequestOptions] = None ) -> CommonModelScopeApi: """ - Get the default permissions for Merge Common Models and fields across all Linked Accounts of a given category. [Learn More](https://help.merge.dev/en/articles/8828211-common-model-and-field-scopes). + Get the default permissions for Merge Common Models and fields across all Linked Accounts of a given category. [Learn more](https://help.merge.dev/en/articles/8828211-common-model-and-field-scopes). Parameters: - request_options: typing.Optional[RequestOptions]. Request-specific configuration. @@ -44,7 +44,7 @@ def default_scopes_retrieve( """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/crm/v1/default-scopes"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "crm/v1/default-scopes"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -72,7 +72,7 @@ def linked_account_scopes_retrieve( self, *, request_options: typing.Optional[RequestOptions] = None ) -> CommonModelScopeApi: """ - Get all available permissions for Merge Common Models and fields for a single Linked Account. [Learn More](https://help.merge.dev/en/articles/8828211-common-model-and-field-scopes). + Get all available permissions for Merge Common Models and fields for a single Linked Account. [Learn more](https://help.merge.dev/en/articles/8828211-common-model-and-field-scopes). Parameters: - request_options: typing.Optional[RequestOptions]. Request-specific configuration. @@ -87,7 +87,7 @@ def linked_account_scopes_retrieve( """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/crm/v1/linked-account-scopes"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "crm/v1/linked-account-scopes"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -118,7 +118,7 @@ def linked_account_scopes_create( request_options: typing.Optional[RequestOptions] = None, ) -> CommonModelScopeApi: """ - Update permissions for any Common Model or field for a single Linked Account. Any Scopes not set in this POST request will inherit the default Scopes. [Learn More](https://help.merge.dev/en/articles/8828211-common-model-and-field-scopes) + Update permissions for any Common Model or field for a single Linked Account. Any Scopes not set in this POST request will inherit the default Scopes. [Learn more](https://help.merge.dev/en/articles/8828211-common-model-and-field-scopes) Parameters: - common_models: typing.List[IndividualCommonModelScopeDeserializerRequest]. The common models you want to update the scopes for @@ -126,18 +126,23 @@ def linked_account_scopes_create( - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from merge.client import Merge + from merge.resources.crm import IndividualCommonModelScopeDeserializerRequest client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) client.crm.scopes.linked_account_scopes_create( - common_models=[], + common_models=[ + IndividualCommonModelScopeDeserializerRequest( + model_name="model_name", + ) + ], ) """ _response = self._client_wrapper.httpx_client.request( "POST", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/crm/v1/linked-account-scopes"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "crm/v1/linked-account-scopes"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -176,7 +181,7 @@ async def default_scopes_retrieve( self, *, request_options: typing.Optional[RequestOptions] = None ) -> CommonModelScopeApi: """ - Get the default permissions for Merge Common Models and fields across all Linked Accounts of a given category. [Learn More](https://help.merge.dev/en/articles/8828211-common-model-and-field-scopes). + Get the default permissions for Merge Common Models and fields across all Linked Accounts of a given category. [Learn more](https://help.merge.dev/en/articles/8828211-common-model-and-field-scopes). Parameters: - request_options: typing.Optional[RequestOptions]. Request-specific configuration. @@ -191,7 +196,7 @@ async def default_scopes_retrieve( """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/crm/v1/default-scopes"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "crm/v1/default-scopes"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -219,7 +224,7 @@ async def linked_account_scopes_retrieve( self, *, request_options: typing.Optional[RequestOptions] = None ) -> CommonModelScopeApi: """ - Get all available permissions for Merge Common Models and fields for a single Linked Account. [Learn More](https://help.merge.dev/en/articles/8828211-common-model-and-field-scopes). + Get all available permissions for Merge Common Models and fields for a single Linked Account. [Learn more](https://help.merge.dev/en/articles/8828211-common-model-and-field-scopes). Parameters: - request_options: typing.Optional[RequestOptions]. Request-specific configuration. @@ -234,7 +239,7 @@ async def linked_account_scopes_retrieve( """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/crm/v1/linked-account-scopes"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "crm/v1/linked-account-scopes"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -265,7 +270,7 @@ async def linked_account_scopes_create( request_options: typing.Optional[RequestOptions] = None, ) -> CommonModelScopeApi: """ - Update permissions for any Common Model or field for a single Linked Account. Any Scopes not set in this POST request will inherit the default Scopes. [Learn More](https://help.merge.dev/en/articles/8828211-common-model-and-field-scopes) + Update permissions for any Common Model or field for a single Linked Account. Any Scopes not set in this POST request will inherit the default Scopes. [Learn more](https://help.merge.dev/en/articles/8828211-common-model-and-field-scopes) Parameters: - common_models: typing.List[IndividualCommonModelScopeDeserializerRequest]. The common models you want to update the scopes for @@ -273,18 +278,23 @@ async def linked_account_scopes_create( - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from merge.client import AsyncMerge + from merge.resources.crm import IndividualCommonModelScopeDeserializerRequest client = AsyncMerge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) await client.crm.scopes.linked_account_scopes_create( - common_models=[], + common_models=[ + IndividualCommonModelScopeDeserializerRequest( + model_name="model_name", + ) + ], ) """ _response = await self._client_wrapper.httpx_client.request( "POST", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/crm/v1/linked-account-scopes"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "crm/v1/linked-account-scopes"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), diff --git a/src/merge/resources/crm/resources/selective_sync/client.py b/src/merge/resources/crm/resources/selective_sync/client.py index 486f8a88..f294c71a 100644 --- a/src/merge/resources/crm/resources/selective_sync/client.py +++ b/src/merge/resources/crm/resources/selective_sync/client.py @@ -45,7 +45,7 @@ def configurations_list( """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/crm/v1/selective-sync/configurations"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "crm/v1/selective-sync/configurations"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -84,18 +84,23 @@ def configurations_update( - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from merge.client import Merge + from merge.resources.crm import LinkedAccountSelectiveSyncConfigurationRequest client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) client.crm.selective_sync.configurations_update( - sync_configurations=[], + sync_configurations=[ + LinkedAccountSelectiveSyncConfigurationRequest( + linked_account_conditions=[], + ) + ], ) """ _response = self._client_wrapper.httpx_client.request( "PUT", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/crm/v1/selective-sync/configurations"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "crm/v1/selective-sync/configurations"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -155,7 +160,7 @@ def meta_list( """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/crm/v1/selective-sync/meta"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "crm/v1/selective-sync/meta"), params=jsonable_encoder( remove_none_from_dict( { @@ -214,7 +219,7 @@ async def configurations_list( """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/crm/v1/selective-sync/configurations"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "crm/v1/selective-sync/configurations"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -253,18 +258,23 @@ async def configurations_update( - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from merge.client import AsyncMerge + from merge.resources.crm import LinkedAccountSelectiveSyncConfigurationRequest client = AsyncMerge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) await client.crm.selective_sync.configurations_update( - sync_configurations=[], + sync_configurations=[ + LinkedAccountSelectiveSyncConfigurationRequest( + linked_account_conditions=[], + ) + ], ) """ _response = await self._client_wrapper.httpx_client.request( "PUT", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/crm/v1/selective-sync/configurations"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "crm/v1/selective-sync/configurations"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -324,7 +334,7 @@ async def meta_list( """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/crm/v1/selective-sync/meta"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "crm/v1/selective-sync/meta"), params=jsonable_encoder( remove_none_from_dict( { diff --git a/src/merge/resources/crm/resources/stages/client.py b/src/merge/resources/crm/resources/stages/client.py index 5b7a9cd7..25aefdba 100644 --- a/src/merge/resources/crm/resources/stages/client.py +++ b/src/merge/resources/crm/resources/stages/client.py @@ -76,7 +76,7 @@ def list( """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/crm/v1/stages"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "crm/v1/stages"), params=jsonable_encoder( remove_none_from_dict( { @@ -145,12 +145,12 @@ def retrieve( api_key="YOUR_API_KEY", ) client.crm.stages.retrieve( - id="string", + id="id", ) """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"api/crm/v1/stages/{id}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"crm/v1/stages/{id}"), params=jsonable_encoder( remove_none_from_dict( { @@ -220,7 +220,7 @@ def remote_field_classes_list( """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/crm/v1/stages/remote-field-classes"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "crm/v1/stages/remote-field-classes"), params=jsonable_encoder( remove_none_from_dict( { @@ -313,7 +313,7 @@ async def list( """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/crm/v1/stages"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "crm/v1/stages"), params=jsonable_encoder( remove_none_from_dict( { @@ -382,12 +382,12 @@ async def retrieve( api_key="YOUR_API_KEY", ) await client.crm.stages.retrieve( - id="string", + id="id", ) """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"api/crm/v1/stages/{id}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"crm/v1/stages/{id}"), params=jsonable_encoder( remove_none_from_dict( { @@ -457,7 +457,7 @@ async def remote_field_classes_list( """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/crm/v1/stages/remote-field-classes"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "crm/v1/stages/remote-field-classes"), params=jsonable_encoder( remove_none_from_dict( { diff --git a/src/merge/resources/crm/resources/sync_status/client.py b/src/merge/resources/crm/resources/sync_status/client.py index d290801a..a79ec291 100644 --- a/src/merge/resources/crm/resources/sync_status/client.py +++ b/src/merge/resources/crm/resources/sync_status/client.py @@ -48,7 +48,7 @@ def list( """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/crm/v1/sync-status"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "crm/v1/sync-status"), params=jsonable_encoder( remove_none_from_dict( { @@ -114,7 +114,7 @@ async def list( """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/crm/v1/sync-status"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "crm/v1/sync-status"), params=jsonable_encoder( remove_none_from_dict( { diff --git a/src/merge/resources/crm/resources/tasks/client.py b/src/merge/resources/crm/resources/tasks/client.py index 33cb2366..d01769a3 100644 --- a/src/merge/resources/crm/resources/tasks/client.py +++ b/src/merge/resources/crm/resources/tasks/client.py @@ -79,19 +79,16 @@ def list( - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from merge.client import Merge - from merge.resources.crm import TasksListRequestExpand client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) - client.crm.tasks.list( - expand=TasksListRequestExpand.ACCOUNT, - ) + client.crm.tasks.list() """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/crm/v1/tasks"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "crm/v1/tasks"), params=jsonable_encoder( remove_none_from_dict( { @@ -154,8 +151,6 @@ def create( - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- - import datetime - from merge.client import Merge from merge.resources.crm import TaskRequest @@ -164,21 +159,12 @@ def create( api_key="YOUR_API_KEY", ) client.crm.tasks.create( - model=TaskRequest( - subject="Contact about Integration Strategy", - content="Follow up to see whether they need integrations", - completed_date=datetime.datetime.fromisoformat( - "2022-02-11 00:00:00+00:00", - ), - due_date=datetime.datetime.fromisoformat( - "2022-02-10 00:00:00+00:00", - ), - ), + model=TaskRequest(), ) """ _response = self._client_wrapper.httpx_client.request( "POST", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/crm/v1/tasks"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "crm/v1/tasks"), params=jsonable_encoder( remove_none_from_dict( { @@ -242,20 +228,18 @@ def retrieve( - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from merge.client import Merge - from merge.resources.crm import TasksRetrieveRequestExpand client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) client.crm.tasks.retrieve( - id="string", - expand=TasksRetrieveRequestExpand.ACCOUNT, + id="id", ) """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"api/crm/v1/tasks/{id}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"crm/v1/tasks/{id}"), params=jsonable_encoder( remove_none_from_dict( { @@ -313,8 +297,6 @@ def partial_update( - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- - import datetime - from merge.client import Merge from merge.resources.crm import PatchedTaskRequest @@ -323,25 +305,13 @@ def partial_update( api_key="YOUR_API_KEY", ) client.crm.tasks.partial_update( - id="string", - model=PatchedTaskRequest( - subject="Contact about Integration Strategy", - content="Follow up to see whether they need integrations", - owner="0358cbc6-2040-430a-848e-aafacbadf3aa", - account="3fa85f64-5717-4562-b3fc-2c963f66afa6", - opportunity="550e8400-e29b-41d4-a716-446655440000", - completed_date=datetime.datetime.fromisoformat( - "2022-02-11 00:00:00+00:00", - ), - due_date=datetime.datetime.fromisoformat( - "2022-02-10 00:00:00+00:00", - ), - ), + id="id", + model=PatchedTaskRequest(), ) """ _response = self._client_wrapper.httpx_client.request( "PATCH", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"api/crm/v1/tasks/{id}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"crm/v1/tasks/{id}"), params=jsonable_encoder( remove_none_from_dict( { @@ -397,12 +367,12 @@ def meta_patch_retrieve(self, id: str, *, request_options: typing.Optional[Reque api_key="YOUR_API_KEY", ) client.crm.tasks.meta_patch_retrieve( - id="string", + id="id", ) """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"api/crm/v1/tasks/meta/patch/{id}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"crm/v1/tasks/meta/patch/{id}"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -443,7 +413,7 @@ def meta_post_retrieve(self, *, request_options: typing.Optional[RequestOptions] """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/crm/v1/tasks/meta/post"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "crm/v1/tasks/meta/post"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -503,7 +473,7 @@ def remote_field_classes_list( """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/crm/v1/tasks/remote-field-classes"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "crm/v1/tasks/remote-field-classes"), params=jsonable_encoder( remove_none_from_dict( { @@ -590,19 +560,16 @@ async def list( - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from merge.client import AsyncMerge - from merge.resources.crm import TasksListRequestExpand client = AsyncMerge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) - await client.crm.tasks.list( - expand=TasksListRequestExpand.ACCOUNT, - ) + await client.crm.tasks.list() """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/crm/v1/tasks"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "crm/v1/tasks"), params=jsonable_encoder( remove_none_from_dict( { @@ -665,8 +632,6 @@ async def create( - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- - import datetime - from merge.client import AsyncMerge from merge.resources.crm import TaskRequest @@ -675,21 +640,12 @@ async def create( api_key="YOUR_API_KEY", ) await client.crm.tasks.create( - model=TaskRequest( - subject="Contact about Integration Strategy", - content="Follow up to see whether they need integrations", - completed_date=datetime.datetime.fromisoformat( - "2022-02-11 00:00:00+00:00", - ), - due_date=datetime.datetime.fromisoformat( - "2022-02-10 00:00:00+00:00", - ), - ), + model=TaskRequest(), ) """ _response = await self._client_wrapper.httpx_client.request( "POST", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/crm/v1/tasks"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "crm/v1/tasks"), params=jsonable_encoder( remove_none_from_dict( { @@ -753,20 +709,18 @@ async def retrieve( - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from merge.client import AsyncMerge - from merge.resources.crm import TasksRetrieveRequestExpand client = AsyncMerge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) await client.crm.tasks.retrieve( - id="string", - expand=TasksRetrieveRequestExpand.ACCOUNT, + id="id", ) """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"api/crm/v1/tasks/{id}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"crm/v1/tasks/{id}"), params=jsonable_encoder( remove_none_from_dict( { @@ -824,8 +778,6 @@ async def partial_update( - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- - import datetime - from merge.client import AsyncMerge from merge.resources.crm import PatchedTaskRequest @@ -834,25 +786,13 @@ async def partial_update( api_key="YOUR_API_KEY", ) await client.crm.tasks.partial_update( - id="string", - model=PatchedTaskRequest( - subject="Contact about Integration Strategy", - content="Follow up to see whether they need integrations", - owner="0358cbc6-2040-430a-848e-aafacbadf3aa", - account="3fa85f64-5717-4562-b3fc-2c963f66afa6", - opportunity="550e8400-e29b-41d4-a716-446655440000", - completed_date=datetime.datetime.fromisoformat( - "2022-02-11 00:00:00+00:00", - ), - due_date=datetime.datetime.fromisoformat( - "2022-02-10 00:00:00+00:00", - ), - ), + id="id", + model=PatchedTaskRequest(), ) """ _response = await self._client_wrapper.httpx_client.request( "PATCH", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"api/crm/v1/tasks/{id}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"crm/v1/tasks/{id}"), params=jsonable_encoder( remove_none_from_dict( { @@ -910,12 +850,12 @@ async def meta_patch_retrieve( api_key="YOUR_API_KEY", ) await client.crm.tasks.meta_patch_retrieve( - id="string", + id="id", ) """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"api/crm/v1/tasks/meta/patch/{id}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"crm/v1/tasks/meta/patch/{id}"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -956,7 +896,7 @@ async def meta_post_retrieve(self, *, request_options: typing.Optional[RequestOp """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/crm/v1/tasks/meta/post"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "crm/v1/tasks/meta/post"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -1016,7 +956,7 @@ async def remote_field_classes_list( """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/crm/v1/tasks/remote-field-classes"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "crm/v1/tasks/remote-field-classes"), params=jsonable_encoder( remove_none_from_dict( { diff --git a/src/merge/resources/crm/resources/users/client.py b/src/merge/resources/crm/resources/users/client.py index 3d901ae7..b0d9892b 100644 --- a/src/merge/resources/crm/resources/users/client.py +++ b/src/merge/resources/crm/resources/users/client.py @@ -80,7 +80,7 @@ def list( """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/crm/v1/users"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "crm/v1/users"), params=jsonable_encoder( remove_none_from_dict( { @@ -149,12 +149,12 @@ def retrieve( api_key="YOUR_API_KEY", ) client.crm.users.retrieve( - id="string", + id="id", ) """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"api/crm/v1/users/{id}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"crm/v1/users/{id}"), params=jsonable_encoder( remove_none_from_dict( { @@ -213,7 +213,7 @@ def ignore_create( api_key="YOUR_API_KEY", ) client.crm.users.ignore_create( - model_id="string", + model_id="model_id", request=IgnoreCommonModelRequest( reason=ReasonEnum.GENERAL_CUSTOMER_REQUEST, message="deletion request by user id 51903790-7dfe-4053-8d63-5a10cc4ffd39", @@ -222,7 +222,7 @@ def ignore_create( """ _response = self._client_wrapper.httpx_client.request( "POST", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"api/crm/v1/users/ignore/{model_id}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"crm/v1/users/ignore/{model_id}"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -288,7 +288,7 @@ def remote_field_classes_list( """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/crm/v1/users/remote-field-classes"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "crm/v1/users/remote-field-classes"), params=jsonable_encoder( remove_none_from_dict( { @@ -381,7 +381,7 @@ async def list( """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/crm/v1/users"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "crm/v1/users"), params=jsonable_encoder( remove_none_from_dict( { @@ -450,12 +450,12 @@ async def retrieve( api_key="YOUR_API_KEY", ) await client.crm.users.retrieve( - id="string", + id="id", ) """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"api/crm/v1/users/{id}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"crm/v1/users/{id}"), params=jsonable_encoder( remove_none_from_dict( { @@ -514,7 +514,7 @@ async def ignore_create( api_key="YOUR_API_KEY", ) await client.crm.users.ignore_create( - model_id="string", + model_id="model_id", request=IgnoreCommonModelRequest( reason=ReasonEnum.GENERAL_CUSTOMER_REQUEST, message="deletion request by user id 51903790-7dfe-4053-8d63-5a10cc4ffd39", @@ -523,7 +523,7 @@ async def ignore_create( """ _response = await self._client_wrapper.httpx_client.request( "POST", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"api/crm/v1/users/ignore/{model_id}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"crm/v1/users/ignore/{model_id}"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -589,7 +589,7 @@ async def remote_field_classes_list( """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/crm/v1/users/remote-field-classes"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "crm/v1/users/remote-field-classes"), params=jsonable_encoder( remove_none_from_dict( { diff --git a/src/merge/resources/crm/resources/webhook_receivers/client.py b/src/merge/resources/crm/resources/webhook_receivers/client.py index 46c86a02..01b36d9c 100644 --- a/src/merge/resources/crm/resources/webhook_receivers/client.py +++ b/src/merge/resources/crm/resources/webhook_receivers/client.py @@ -41,7 +41,7 @@ def list(self, *, request_options: typing.Optional[RequestOptions] = None) -> ty """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/crm/v1/webhook-receivers"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "crm/v1/webhook-receivers"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -92,7 +92,7 @@ def create( api_key="YOUR_API_KEY", ) client.crm.webhook_receivers.create( - event="string", + event="event", is_active=True, ) """ @@ -101,7 +101,7 @@ def create( _request["key"] = key _response = self._client_wrapper.httpx_client.request( "POST", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/crm/v1/webhook-receivers"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "crm/v1/webhook-receivers"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -153,7 +153,7 @@ async def list(self, *, request_options: typing.Optional[RequestOptions] = None) """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/crm/v1/webhook-receivers"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "crm/v1/webhook-receivers"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -204,7 +204,7 @@ async def create( api_key="YOUR_API_KEY", ) await client.crm.webhook_receivers.create( - event="string", + event="event", is_active=True, ) """ @@ -213,7 +213,7 @@ async def create( _request["key"] = key _response = await self._client_wrapper.httpx_client.request( "POST", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/crm/v1/webhook-receivers"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "crm/v1/webhook-receivers"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), diff --git a/src/merge/resources/crm/types/account.py b/src/merge/resources/crm/types/account.py index 17f82239..7901dcce 100644 --- a/src/merge/resources/crm/types/account.py +++ b/src/merge/resources/crm/types/account.py @@ -29,6 +29,12 @@ class Account(pydantic.BaseModel): TODO """ + id: typing.Optional[str] + remote_id: typing.Optional[str] = pydantic.Field(description="The third-party API ID of the matching object.") + created_at: typing.Optional[dt.datetime] + modified_at: typing.Optional[dt.datetime] = pydantic.Field( + description="This is the datetime that this object was last updated by Merge" + ) owner: typing.Optional[AccountOwner] = pydantic.Field(description="The account's owner.") name: typing.Optional[str] = pydantic.Field(description="The account's name.") description: typing.Optional[str] = pydantic.Field(description="The account's description.") @@ -47,12 +53,6 @@ class Account(pydantic.BaseModel): description="When the third party's account was created." ) remote_was_deleted: typing.Optional[bool] - id: typing.Optional[str] - remote_id: typing.Optional[str] = pydantic.Field(description="The third-party API ID of the matching object.") - created_at: typing.Optional[dt.datetime] - modified_at: typing.Optional[dt.datetime] = pydantic.Field( - description="This is the datetime that this object was last updated by Merge" - ) field_mappings: typing.Optional[typing.Dict[str, typing.Any]] remote_data: typing.Optional[typing.List[RemoteData]] remote_fields: typing.Optional[typing.List[RemoteField]] diff --git a/src/merge/resources/crm/types/account_details_and_actions.py b/src/merge/resources/crm/types/account_details_and_actions.py index fda4a3a9..8141e146 100644 --- a/src/merge/resources/crm/types/account_details_and_actions.py +++ b/src/merge/resources/crm/types/account_details_and_actions.py @@ -34,6 +34,9 @@ class AccountDetailsAndActions(pydantic.BaseModel): end_user_origin_id: typing.Optional[str] end_user_organization_name: str end_user_email_address: str + subdomain: typing.Optional[str] = pydantic.Field( + description="The tenant or domain the customer has provided access to." + ) webhook_listener_url: str is_duplicate: typing.Optional[bool] = pydantic.Field( description="Whether a Production Linked Account's credentials match another existing Production Linked Account. This field is `null` for Test Linked Accounts, incomplete Production Linked Accounts, and ignored duplicate Production Linked Account sets." diff --git a/src/merge/resources/crm/types/address.py b/src/merge/resources/crm/types/address.py index d2083965..172f3897 100644 --- a/src/merge/resources/crm/types/address.py +++ b/src/merge/resources/crm/types/address.py @@ -26,6 +26,10 @@ class Address(pydantic.BaseModel): TODO """ + created_at: typing.Optional[dt.datetime] + modified_at: typing.Optional[dt.datetime] = pydantic.Field( + description="This is the datetime that this object was last updated by Merge" + ) street_1: typing.Optional[str] = pydantic.Field(description="Line 1 of the address's street.") street_2: typing.Optional[str] = pydantic.Field(description="Line 2 of the address's street.") city: typing.Optional[str] = pydantic.Field(description="The address's city.") @@ -289,10 +293,6 @@ class Address(pydantic.BaseModel): address_type: typing.Optional[AddressAddressType] = pydantic.Field( description=("The address type.\n" "\n" "- `BILLING` - BILLING\n" "- `SHIPPING` - SHIPPING\n") ) - created_at: typing.Optional[dt.datetime] - modified_at: typing.Optional[dt.datetime] = pydantic.Field( - description="This is the datetime that this object was last updated by Merge" - ) def json(self, **kwargs: typing.Any) -> str: kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs} diff --git a/src/merge/resources/crm/types/association.py b/src/merge/resources/crm/types/association.py index 383143d9..215b4a7c 100644 --- a/src/merge/resources/crm/types/association.py +++ b/src/merge/resources/crm/types/association.py @@ -25,13 +25,13 @@ class Association(pydantic.BaseModel): TODO """ - source_object: typing.Optional[typing.Dict[str, typing.Any]] - target_object: typing.Optional[typing.Dict[str, typing.Any]] - association_type: typing.Optional[AssociationAssociationType] created_at: typing.Optional[dt.datetime] modified_at: typing.Optional[dt.datetime] = pydantic.Field( description="This is the datetime that this object was last updated by Merge" ) + source_object: typing.Optional[typing.Dict[str, typing.Any]] + target_object: typing.Optional[typing.Dict[str, typing.Any]] + association_type: typing.Optional[AssociationAssociationType] def json(self, **kwargs: typing.Any) -> str: kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs} diff --git a/src/merge/resources/crm/types/association_sub_type.py b/src/merge/resources/crm/types/association_sub_type.py index 3675273a..c098ffae 100644 --- a/src/merge/resources/crm/types/association_sub_type.py +++ b/src/merge/resources/crm/types/association_sub_type.py @@ -13,11 +13,11 @@ class AssociationSubType(pydantic.BaseModel): id: typing.Optional[str] - origin_type: typing.Optional[str] created_at: typing.Optional[dt.datetime] modified_at: typing.Optional[dt.datetime] = pydantic.Field( description="This is the datetime that this object was last updated by Merge" ) + origin_type: typing.Optional[str] def json(self, **kwargs: typing.Any) -> str: kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs} diff --git a/src/merge/resources/crm/types/association_type.py b/src/merge/resources/crm/types/association_type.py index 64c3fca7..555123b2 100644 --- a/src/merge/resources/crm/types/association_type.py +++ b/src/merge/resources/crm/types/association_type.py @@ -26,18 +26,18 @@ class AssociationType(pydantic.BaseModel): TODO """ - source_object_class: typing.Optional[typing.Dict[str, typing.Any]] - target_object_classes: typing.Optional[typing.List[AssociationSubType]] - remote_key_name: typing.Optional[str] - display_name: typing.Optional[str] - cardinality: typing.Optional[AssociationTypeCardinality] - is_required: typing.Optional[bool] id: typing.Optional[str] remote_id: typing.Optional[str] = pydantic.Field(description="The third-party API ID of the matching object.") created_at: typing.Optional[dt.datetime] modified_at: typing.Optional[dt.datetime] = pydantic.Field( description="This is the datetime that this object was last updated by Merge" ) + source_object_class: typing.Optional[typing.Dict[str, typing.Any]] + target_object_classes: typing.Optional[typing.List[AssociationSubType]] + remote_key_name: typing.Optional[str] + display_name: typing.Optional[str] + cardinality: typing.Optional[AssociationTypeCardinality] + is_required: typing.Optional[bool] def json(self, **kwargs: typing.Any) -> str: kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs} diff --git a/src/merge/resources/crm/types/audit_log_event.py b/src/merge/resources/crm/types/audit_log_event.py index 7bb2d3c6..131ad94b 100644 --- a/src/merge/resources/crm/types/audit_log_event.py +++ b/src/merge/resources/crm/types/audit_log_event.py @@ -69,6 +69,9 @@ class AuditLogEvent(pydantic.BaseModel): "- `CHANGED_LINKED_ACCOUNT_FIELD_MAPPING` - CHANGED_LINKED_ACCOUNT_FIELD_MAPPING\n" "- `DELETED_INTEGRATION_WIDE_FIELD_MAPPING` - DELETED_INTEGRATION_WIDE_FIELD_MAPPING\n" "- `DELETED_LINKED_ACCOUNT_FIELD_MAPPING` - DELETED_LINKED_ACCOUNT_FIELD_MAPPING\n" + "- `FORCED_LINKED_ACCOUNT_RESYNC` - FORCED_LINKED_ACCOUNT_RESYNC\n" + "- `MUTED_ISSUE` - MUTED_ISSUE\n" + "- `GENERATED_MAGIC_LINK` - GENERATED_MAGIC_LINK\n" ) ) event_description: str diff --git a/src/merge/resources/crm/types/condition_schema.py b/src/merge/resources/crm/types/condition_schema.py index 7ebf9534..c8aebb68 100644 --- a/src/merge/resources/crm/types/condition_schema.py +++ b/src/merge/resources/crm/types/condition_schema.py @@ -20,12 +20,8 @@ class ConditionSchema(pydantic.BaseModel): common_model: typing.Optional[str] = pydantic.Field( description="The common model for which a condition schema is defined." ) - native_name: typing.Optional[str] = pydantic.Field( - description='User-facing _native condition_ name. e.g. "Skip Manager".' - ) - field_name: typing.Optional[str] = pydantic.Field( - description='The name of the field on the common model that this condition corresponds to, if they conceptually match. e.g. "location_type".' - ) + native_name: typing.Optional[str] + field_name: typing.Optional[str] is_unique: typing.Optional[bool] = pydantic.Field( description="Whether this condition can only be applied once. If false, the condition can be AND'd together multiple times." ) diff --git a/src/merge/resources/crm/types/contact.py b/src/merge/resources/crm/types/contact.py index c8ff1c0a..ec2df5c7 100644 --- a/src/merge/resources/crm/types/contact.py +++ b/src/merge/resources/crm/types/contact.py @@ -31,6 +31,12 @@ class Contact(pydantic.BaseModel): TODO """ + id: typing.Optional[str] + remote_id: typing.Optional[str] = pydantic.Field(description="The third-party API ID of the matching object.") + created_at: typing.Optional[dt.datetime] + modified_at: typing.Optional[dt.datetime] = pydantic.Field( + description="This is the datetime that this object was last updated by Merge" + ) first_name: typing.Optional[str] = pydantic.Field(description="The contact's first name.") last_name: typing.Optional[str] = pydantic.Field(description="The contact's last name.") account: typing.Optional[ContactAccount] = pydantic.Field(description="The contact's account.") @@ -45,12 +51,6 @@ class Contact(pydantic.BaseModel): description="When the third party's contact was created." ) remote_was_deleted: typing.Optional[bool] - id: typing.Optional[str] - remote_id: typing.Optional[str] = pydantic.Field(description="The third-party API ID of the matching object.") - created_at: typing.Optional[dt.datetime] - modified_at: typing.Optional[dt.datetime] = pydantic.Field( - description="This is the datetime that this object was last updated by Merge" - ) field_mappings: typing.Optional[typing.Dict[str, typing.Any]] remote_data: typing.Optional[typing.List[RemoteData]] remote_fields: typing.Optional[typing.List[RemoteField]] diff --git a/src/merge/resources/crm/types/custom_object.py b/src/merge/resources/crm/types/custom_object.py index 50af4225..fca67478 100644 --- a/src/merge/resources/crm/types/custom_object.py +++ b/src/merge/resources/crm/types/custom_object.py @@ -25,14 +25,14 @@ class CustomObject(pydantic.BaseModel): TODO """ - object_class: typing.Optional[str] - fields: typing.Optional[typing.Dict[str, typing.Any]] - remote_id: typing.Optional[str] = pydantic.Field(description="The third-party API ID of the matching object.") id: typing.Optional[str] + remote_id: typing.Optional[str] = pydantic.Field(description="The third-party API ID of the matching object.") created_at: typing.Optional[dt.datetime] modified_at: typing.Optional[dt.datetime] = pydantic.Field( description="This is the datetime that this object was last updated by Merge" ) + object_class: typing.Optional[str] + fields: typing.Optional[typing.Dict[str, typing.Any]] remote_fields: typing.Optional[typing.List[RemoteField]] def json(self, **kwargs: typing.Any) -> str: diff --git a/src/merge/resources/crm/types/custom_object_class.py b/src/merge/resources/crm/types/custom_object_class.py index 7ad71796..053f16a2 100644 --- a/src/merge/resources/crm/types/custom_object_class.py +++ b/src/merge/resources/crm/types/custom_object_class.py @@ -25,15 +25,15 @@ class CustomObjectClass(pydantic.BaseModel): TODO """ + id: typing.Optional[str] + remote_id: typing.Optional[str] = pydantic.Field(description="The third-party API ID of the matching object.") + created_at: typing.Optional[dt.datetime] + modified_at: typing.Optional[dt.datetime] name: typing.Optional[str] description: typing.Optional[str] labels: typing.Optional[typing.Dict[str, typing.Optional[str]]] fields: typing.Optional[typing.List[RemoteFieldClassForCustomObjectClass]] association_types: typing.Optional[typing.List[typing.Dict[str, typing.Any]]] - id: typing.Optional[str] - remote_id: typing.Optional[str] = pydantic.Field(description="The third-party API ID of the matching object.") - created_at: typing.Optional[dt.datetime] - modified_at: typing.Optional[dt.datetime] def json(self, **kwargs: typing.Any) -> str: kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs} diff --git a/src/merge/resources/crm/types/data_passthrough_request.py b/src/merge/resources/crm/types/data_passthrough_request.py index 3acebedd..def5b5c2 100644 --- a/src/merge/resources/crm/types/data_passthrough_request.py +++ b/src/merge/resources/crm/types/data_passthrough_request.py @@ -28,9 +28,13 @@ class DataPassthroughRequest(pydantic.BaseModel): """ method: MethodEnum - path: str - base_url_override: typing.Optional[str] - data: typing.Optional[str] + path: str = pydantic.Field(description="The path of the request in the third party's platform.") + base_url_override: typing.Optional[str] = pydantic.Field( + description="An optional override of the third party's base url for the request." + ) + data: typing.Optional[str] = pydantic.Field( + description="The data with the request. You must include a `request_format` parameter matching the data's format" + ) multipart_form_data: typing.Optional[typing.List[MultipartFormFieldRequest]] = pydantic.Field( description="Pass an array of `MultipartFormField` objects in here instead of using the `data` param if `request_format` is set to `MULTIPART`." ) diff --git a/src/merge/resources/crm/types/email_address.py b/src/merge/resources/crm/types/email_address.py index 06b5b27c..233bdc09 100644 --- a/src/merge/resources/crm/types/email_address.py +++ b/src/merge/resources/crm/types/email_address.py @@ -24,12 +24,12 @@ class EmailAddress(pydantic.BaseModel): Fetch from the `GET Contact` endpoint and view their email addresses. """ - email_address: typing.Optional[str] = pydantic.Field(description="The email address.") - email_address_type: typing.Optional[str] = pydantic.Field(description="The email address's type.") created_at: typing.Optional[dt.datetime] modified_at: typing.Optional[dt.datetime] = pydantic.Field( description="This is the datetime that this object was last updated by Merge" ) + email_address: typing.Optional[str] = pydantic.Field(description="The email address.") + email_address_type: typing.Optional[str] = pydantic.Field(description="The email address's type.") def json(self, **kwargs: typing.Any) -> str: kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs} diff --git a/src/merge/resources/crm/types/engagement.py b/src/merge/resources/crm/types/engagement.py index ffe36730..45846fb5 100644 --- a/src/merge/resources/crm/types/engagement.py +++ b/src/merge/resources/crm/types/engagement.py @@ -31,6 +31,12 @@ class Engagement(pydantic.BaseModel): TODO """ + id: typing.Optional[str] + remote_id: typing.Optional[str] = pydantic.Field(description="The third-party API ID of the matching object.") + created_at: typing.Optional[dt.datetime] + modified_at: typing.Optional[dt.datetime] = pydantic.Field( + description="This is the datetime that this object was last updated by Merge" + ) owner: typing.Optional[EngagementOwner] = pydantic.Field(description="The engagement's owner.") content: typing.Optional[str] = pydantic.Field(description="The engagement's content.") subject: typing.Optional[str] = pydantic.Field(description="The engagement's subject.") @@ -47,12 +53,6 @@ class Engagement(pydantic.BaseModel): remote_was_deleted: typing.Optional[bool] = pydantic.Field( description="Indicates whether or not this object has been deleted in the third party platform." ) - id: typing.Optional[str] - remote_id: typing.Optional[str] = pydantic.Field(description="The third-party API ID of the matching object.") - created_at: typing.Optional[dt.datetime] - modified_at: typing.Optional[dt.datetime] = pydantic.Field( - description="This is the datetime that this object was last updated by Merge" - ) field_mappings: typing.Optional[typing.Dict[str, typing.Any]] remote_data: typing.Optional[typing.List[RemoteData]] remote_fields: typing.Optional[typing.List[RemoteField]] diff --git a/src/merge/resources/crm/types/engagement_type.py b/src/merge/resources/crm/types/engagement_type.py index d21342d4..2fb10520 100644 --- a/src/merge/resources/crm/types/engagement_type.py +++ b/src/merge/resources/crm/types/engagement_type.py @@ -26,6 +26,12 @@ class EngagementType(pydantic.BaseModel): TODO """ + id: typing.Optional[str] + remote_id: typing.Optional[str] = pydantic.Field(description="The third-party API ID of the matching object.") + created_at: typing.Optional[dt.datetime] + modified_at: typing.Optional[dt.datetime] = pydantic.Field( + description="This is the datetime that this object was last updated by Merge" + ) activity_type: typing.Optional[EngagementTypeActivityType] = pydantic.Field( description=( "The engagement type's activity type.\n" @@ -36,12 +42,6 @@ class EngagementType(pydantic.BaseModel): ) ) name: typing.Optional[str] = pydantic.Field(description="The engagement type's name.") - id: typing.Optional[str] - remote_id: typing.Optional[str] = pydantic.Field(description="The third-party API ID of the matching object.") - created_at: typing.Optional[dt.datetime] - modified_at: typing.Optional[dt.datetime] = pydantic.Field( - description="This is the datetime that this object was last updated by Merge" - ) remote_fields: typing.Optional[typing.List[RemoteField]] def json(self, **kwargs: typing.Any) -> str: diff --git a/src/merge/resources/crm/types/event_type_enum.py b/src/merge/resources/crm/types/event_type_enum.py index 5ed5b7f1..434539c7 100644 --- a/src/merge/resources/crm/types/event_type_enum.py +++ b/src/merge/resources/crm/types/event_type_enum.py @@ -39,6 +39,9 @@ class EventTypeEnum(str, enum.Enum): - `CHANGED_LINKED_ACCOUNT_FIELD_MAPPING` - CHANGED_LINKED_ACCOUNT_FIELD_MAPPING - `DELETED_INTEGRATION_WIDE_FIELD_MAPPING` - DELETED_INTEGRATION_WIDE_FIELD_MAPPING - `DELETED_LINKED_ACCOUNT_FIELD_MAPPING` - DELETED_LINKED_ACCOUNT_FIELD_MAPPING + - `FORCED_LINKED_ACCOUNT_RESYNC` - FORCED_LINKED_ACCOUNT_RESYNC + - `MUTED_ISSUE` - MUTED_ISSUE + - `GENERATED_MAGIC_LINK` - GENERATED_MAGIC_LINK """ CREATED_REMOTE_PRODUCTION_API_KEY = "CREATED_REMOTE_PRODUCTION_API_KEY" @@ -72,6 +75,9 @@ class EventTypeEnum(str, enum.Enum): CHANGED_LINKED_ACCOUNT_FIELD_MAPPING = "CHANGED_LINKED_ACCOUNT_FIELD_MAPPING" DELETED_INTEGRATION_WIDE_FIELD_MAPPING = "DELETED_INTEGRATION_WIDE_FIELD_MAPPING" DELETED_LINKED_ACCOUNT_FIELD_MAPPING = "DELETED_LINKED_ACCOUNT_FIELD_MAPPING" + FORCED_LINKED_ACCOUNT_RESYNC = "FORCED_LINKED_ACCOUNT_RESYNC" + MUTED_ISSUE = "MUTED_ISSUE" + GENERATED_MAGIC_LINK = "GENERATED_MAGIC_LINK" def visit( self, @@ -106,6 +112,9 @@ def visit( changed_linked_account_field_mapping: typing.Callable[[], T_Result], deleted_integration_wide_field_mapping: typing.Callable[[], T_Result], deleted_linked_account_field_mapping: typing.Callable[[], T_Result], + forced_linked_account_resync: typing.Callable[[], T_Result], + muted_issue: typing.Callable[[], T_Result], + generated_magic_link: typing.Callable[[], T_Result], ) -> T_Result: if self is EventTypeEnum.CREATED_REMOTE_PRODUCTION_API_KEY: return created_remote_production_api_key() @@ -169,3 +178,9 @@ def visit( return deleted_integration_wide_field_mapping() if self is EventTypeEnum.DELETED_LINKED_ACCOUNT_FIELD_MAPPING: return deleted_linked_account_field_mapping() + if self is EventTypeEnum.FORCED_LINKED_ACCOUNT_RESYNC: + return forced_linked_account_resync() + if self is EventTypeEnum.MUTED_ISSUE: + return muted_issue() + if self is EventTypeEnum.GENERATED_MAGIC_LINK: + return generated_magic_link() diff --git a/src/merge/resources/crm/types/lead.py b/src/merge/resources/crm/types/lead.py index a9a02842..cf208277 100644 --- a/src/merge/resources/crm/types/lead.py +++ b/src/merge/resources/crm/types/lead.py @@ -32,6 +32,12 @@ class Lead(pydantic.BaseModel): TODO """ + id: typing.Optional[str] + remote_id: typing.Optional[str] = pydantic.Field(description="The third-party API ID of the matching object.") + created_at: typing.Optional[dt.datetime] + modified_at: typing.Optional[dt.datetime] = pydantic.Field( + description="This is the datetime that this object was last updated by Merge" + ) owner: typing.Optional[LeadOwner] = pydantic.Field(description="The lead's owner.") lead_source: typing.Optional[str] = pydantic.Field(description="The lead's source.") title: typing.Optional[str] = pydantic.Field(description="The lead's title.") @@ -55,12 +61,6 @@ class Lead(pydantic.BaseModel): description="The account of the converted lead." ) remote_was_deleted: typing.Optional[bool] - id: typing.Optional[str] - remote_id: typing.Optional[str] = pydantic.Field(description="The third-party API ID of the matching object.") - created_at: typing.Optional[dt.datetime] - modified_at: typing.Optional[dt.datetime] = pydantic.Field( - description="This is the datetime that this object was last updated by Merge" - ) field_mappings: typing.Optional[typing.Dict[str, typing.Any]] remote_data: typing.Optional[typing.List[RemoteData]] remote_fields: typing.Optional[typing.List[RemoteField]] diff --git a/src/merge/resources/crm/types/linked_account_condition.py b/src/merge/resources/crm/types/linked_account_condition.py index 430adc00..f13ef90d 100644 --- a/src/merge/resources/crm/types/linked_account_condition.py +++ b/src/merge/resources/crm/types/linked_account_condition.py @@ -16,14 +16,10 @@ class LinkedAccountCondition(pydantic.BaseModel): description="The ID indicating which condition schema to use for a specific condition." ) common_model: typing.Optional[str] = pydantic.Field(description="The common model for a specific condition.") - native_name: typing.Optional[str] = pydantic.Field( - description='User-facing _native condition_ name. e.g. "Skip Manager".' - ) + native_name: typing.Optional[str] operator: str = pydantic.Field(description="The operator for a specific condition.") value: typing.Optional[typing.Any] - field_name: typing.Optional[str] = pydantic.Field( - description='The name of the field on the common model that this condition corresponds to, if they conceptually match. e.g. "location_type".' - ) + field_name: typing.Optional[str] def json(self, **kwargs: typing.Any) -> str: kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs} diff --git a/src/merge/resources/crm/types/linked_account_condition_request.py b/src/merge/resources/crm/types/linked_account_condition_request.py index 23ff21f1..ce36a27f 100644 --- a/src/merge/resources/crm/types/linked_account_condition_request.py +++ b/src/merge/resources/crm/types/linked_account_condition_request.py @@ -12,6 +12,7 @@ class LinkedAccountConditionRequest(pydantic.BaseModel): + id: typing.Optional[str] = pydantic.Field(description="The ID indicating which Linked Account Condition this is.") condition_schema_id: str = pydantic.Field( description="The ID indicating which condition schema to use for a specific condition." ) diff --git a/src/merge/resources/crm/types/note.py b/src/merge/resources/crm/types/note.py index 3433b8ab..8cd97d4d 100644 --- a/src/merge/resources/crm/types/note.py +++ b/src/merge/resources/crm/types/note.py @@ -30,6 +30,12 @@ class Note(pydantic.BaseModel): TODO """ + id: typing.Optional[str] + remote_id: typing.Optional[str] = pydantic.Field(description="The third-party API ID of the matching object.") + created_at: typing.Optional[dt.datetime] + modified_at: typing.Optional[dt.datetime] = pydantic.Field( + description="This is the datetime that this object was last updated by Merge" + ) owner: typing.Optional[NoteOwner] = pydantic.Field(description="The note's owner.") content: typing.Optional[str] = pydantic.Field(description="The note's content.") contact: typing.Optional[NoteContact] = pydantic.Field(description="The note's contact.") @@ -42,12 +48,6 @@ class Note(pydantic.BaseModel): description="When the third party's lead was created." ) remote_was_deleted: typing.Optional[bool] - id: typing.Optional[str] - remote_id: typing.Optional[str] = pydantic.Field(description="The third-party API ID of the matching object.") - created_at: typing.Optional[dt.datetime] - modified_at: typing.Optional[dt.datetime] = pydantic.Field( - description="This is the datetime that this object was last updated by Merge" - ) field_mappings: typing.Optional[typing.Dict[str, typing.Any]] remote_data: typing.Optional[typing.List[RemoteData]] remote_fields: typing.Optional[typing.List[RemoteField]] diff --git a/src/merge/resources/crm/types/opportunity.py b/src/merge/resources/crm/types/opportunity.py index e42b2068..2e258d65 100644 --- a/src/merge/resources/crm/types/opportunity.py +++ b/src/merge/resources/crm/types/opportunity.py @@ -30,6 +30,12 @@ class Opportunity(pydantic.BaseModel): TODO """ + id: typing.Optional[str] + remote_id: typing.Optional[str] = pydantic.Field(description="The third-party API ID of the matching object.") + created_at: typing.Optional[dt.datetime] + modified_at: typing.Optional[dt.datetime] = pydantic.Field( + description="This is the datetime that this object was last updated by Merge" + ) name: typing.Optional[str] = pydantic.Field(description="The opportunity's name.") description: typing.Optional[str] = pydantic.Field(description="The opportunity's description.") amount: typing.Optional[int] = pydantic.Field(description="The opportunity's amount.") @@ -47,12 +53,6 @@ class Opportunity(pydantic.BaseModel): description="When the third party's opportunity was created." ) remote_was_deleted: typing.Optional[bool] - id: typing.Optional[str] - remote_id: typing.Optional[str] = pydantic.Field(description="The third-party API ID of the matching object.") - created_at: typing.Optional[dt.datetime] - modified_at: typing.Optional[dt.datetime] = pydantic.Field( - description="This is the datetime that this object was last updated by Merge" - ) field_mappings: typing.Optional[typing.Dict[str, typing.Any]] remote_data: typing.Optional[typing.List[RemoteData]] remote_fields: typing.Optional[typing.List[RemoteField]] diff --git a/src/merge/resources/crm/types/phone_number.py b/src/merge/resources/crm/types/phone_number.py index 18d01ffa..3bdf4f0f 100644 --- a/src/merge/resources/crm/types/phone_number.py +++ b/src/merge/resources/crm/types/phone_number.py @@ -24,12 +24,12 @@ class PhoneNumber(pydantic.BaseModel): Fetch from the `GET Contact` endpoint and view their phone numbers. """ - phone_number: typing.Optional[str] = pydantic.Field(description="The phone number.") - phone_number_type: typing.Optional[str] = pydantic.Field(description="The phone number's type.") created_at: typing.Optional[dt.datetime] modified_at: typing.Optional[dt.datetime] = pydantic.Field( description="This is the datetime that this object was last updated by Merge" ) + phone_number: typing.Optional[str] = pydantic.Field(description="The phone number.") + phone_number_type: typing.Optional[str] = pydantic.Field(description="The phone number's type.") def json(self, **kwargs: typing.Any) -> str: kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs} diff --git a/src/merge/resources/crm/types/remote_field_class_for_custom_object_class.py b/src/merge/resources/crm/types/remote_field_class_for_custom_object_class.py index 1dadf0f4..c5de6cd7 100644 --- a/src/merge/resources/crm/types/remote_field_class_for_custom_object_class.py +++ b/src/merge/resources/crm/types/remote_field_class_for_custom_object_class.py @@ -18,6 +18,10 @@ class RemoteFieldClassForCustomObjectClass(pydantic.BaseModel): + created_at: typing.Optional[dt.datetime] + modified_at: typing.Optional[dt.datetime] = pydantic.Field( + description="This is the datetime that this object was last updated by Merge" + ) display_name: typing.Optional[str] remote_key_name: typing.Optional[str] description: typing.Optional[str] @@ -26,10 +30,6 @@ class RemoteFieldClassForCustomObjectClass(pydantic.BaseModel): field_format: typing.Optional[RemoteFieldClassForCustomObjectClassFieldFormat] field_choices: typing.Optional[typing.List[RemoteFieldClassForCustomObjectClassFieldChoicesItem]] item_schema: typing.Optional[RemoteFieldClassForCustomObjectClassItemSchema] - created_at: typing.Optional[dt.datetime] - modified_at: typing.Optional[dt.datetime] = pydantic.Field( - description="This is the datetime that this object was last updated by Merge" - ) def json(self, **kwargs: typing.Any) -> str: kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs} diff --git a/src/merge/resources/crm/types/stage.py b/src/merge/resources/crm/types/stage.py index 6550fbe3..c38782cd 100644 --- a/src/merge/resources/crm/types/stage.py +++ b/src/merge/resources/crm/types/stage.py @@ -26,16 +26,16 @@ class Stage(pydantic.BaseModel): TODO """ - name: typing.Optional[str] = pydantic.Field(description="The stage's name.") - remote_was_deleted: typing.Optional[bool] = pydantic.Field( - description="Indicates whether or not this object has been deleted in the third party platform." - ) id: typing.Optional[str] remote_id: typing.Optional[str] = pydantic.Field(description="The third-party API ID of the matching object.") created_at: typing.Optional[dt.datetime] modified_at: typing.Optional[dt.datetime] = pydantic.Field( description="This is the datetime that this object was last updated by Merge" ) + name: typing.Optional[str] = pydantic.Field(description="The stage's name.") + remote_was_deleted: typing.Optional[bool] = pydantic.Field( + description="Indicates whether or not this object has been deleted in the third party platform." + ) field_mappings: typing.Optional[typing.Dict[str, typing.Any]] remote_data: typing.Optional[typing.List[RemoteData]] remote_fields: typing.Optional[typing.List[RemoteField]] diff --git a/src/merge/resources/crm/types/task.py b/src/merge/resources/crm/types/task.py index 7af416cc..306a9b8d 100644 --- a/src/merge/resources/crm/types/task.py +++ b/src/merge/resources/crm/types/task.py @@ -30,6 +30,12 @@ class Task(pydantic.BaseModel): TODO """ + id: typing.Optional[str] + remote_id: typing.Optional[str] = pydantic.Field(description="The third-party API ID of the matching object.") + created_at: typing.Optional[dt.datetime] + modified_at: typing.Optional[dt.datetime] = pydantic.Field( + description="This is the datetime that this object was last updated by Merge" + ) subject: typing.Optional[str] = pydantic.Field(description="The task's subject.") content: typing.Optional[str] = pydantic.Field(description="The task's content.") owner: typing.Optional[TaskOwner] = pydantic.Field(description="The task's owner.") @@ -43,12 +49,6 @@ class Task(pydantic.BaseModel): remote_was_deleted: typing.Optional[bool] = pydantic.Field( description="Indicates whether or not this object has been deleted in the third party platform." ) - id: typing.Optional[str] - remote_id: typing.Optional[str] = pydantic.Field(description="The third-party API ID of the matching object.") - created_at: typing.Optional[dt.datetime] - modified_at: typing.Optional[dt.datetime] = pydantic.Field( - description="This is the datetime that this object was last updated by Merge" - ) field_mappings: typing.Optional[typing.Dict[str, typing.Any]] remote_data: typing.Optional[typing.List[RemoteData]] remote_fields: typing.Optional[typing.List[RemoteField]] diff --git a/src/merge/resources/crm/types/user.py b/src/merge/resources/crm/types/user.py index 605bce37..e2f63b08 100644 --- a/src/merge/resources/crm/types/user.py +++ b/src/merge/resources/crm/types/user.py @@ -26,18 +26,18 @@ class User(pydantic.BaseModel): TODO """ - name: typing.Optional[str] = pydantic.Field(description="The user's name.") - email: typing.Optional[str] = pydantic.Field(description="The user's email address.") - is_active: typing.Optional[bool] = pydantic.Field(description="Whether or not the user is active.") - remote_was_deleted: typing.Optional[bool] = pydantic.Field( - description="Indicates whether or not this object has been deleted in the third party platform." - ) id: typing.Optional[str] remote_id: typing.Optional[str] = pydantic.Field(description="The third-party API ID of the matching object.") created_at: typing.Optional[dt.datetime] modified_at: typing.Optional[dt.datetime] = pydantic.Field( description="This is the datetime that this object was last updated by Merge" ) + name: typing.Optional[str] = pydantic.Field(description="The user's name.") + email: typing.Optional[str] = pydantic.Field(description="The user's email address.") + is_active: typing.Optional[bool] = pydantic.Field(description="Whether or not the user is active.") + remote_was_deleted: typing.Optional[bool] = pydantic.Field( + description="Indicates whether or not this object has been deleted in the third party platform." + ) field_mappings: typing.Optional[typing.Dict[str, typing.Any]] remote_data: typing.Optional[typing.List[RemoteData]] remote_fields: typing.Optional[typing.List[RemoteField]] diff --git a/src/merge/resources/filestorage/resources/account_details/client.py b/src/merge/resources/filestorage/resources/account_details/client.py index 1f24f34a..ee42cf76 100644 --- a/src/merge/resources/filestorage/resources/account_details/client.py +++ b/src/merge/resources/filestorage/resources/account_details/client.py @@ -38,7 +38,7 @@ def retrieve(self, *, request_options: typing.Optional[RequestOptions] = None) - """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/filestorage/v1/account-details"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "filestorage/v1/account-details"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -84,7 +84,7 @@ async def retrieve(self, *, request_options: typing.Optional[RequestOptions] = N """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/filestorage/v1/account-details"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "filestorage/v1/account-details"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), diff --git a/src/merge/resources/filestorage/resources/account_token/client.py b/src/merge/resources/filestorage/resources/account_token/client.py index fcd3c079..ae81f4e9 100644 --- a/src/merge/resources/filestorage/resources/account_token/client.py +++ b/src/merge/resources/filestorage/resources/account_token/client.py @@ -37,13 +37,13 @@ def retrieve(self, public_token: str, *, request_options: typing.Optional[Reques api_key="YOUR_API_KEY", ) client.filestorage.account_token.retrieve( - public_token="string", + public_token="public_token", ) """ _response = self._client_wrapper.httpx_client.request( "GET", urllib.parse.urljoin( - f"{self._client_wrapper.get_base_url()}/", f"api/filestorage/v1/account-token/{public_token}" + f"{self._client_wrapper.get_base_url()}/", f"filestorage/v1/account-token/{public_token}" ), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None @@ -91,13 +91,13 @@ async def retrieve( api_key="YOUR_API_KEY", ) await client.filestorage.account_token.retrieve( - public_token="string", + public_token="public_token", ) """ _response = await self._client_wrapper.httpx_client.request( "GET", urllib.parse.urljoin( - f"{self._client_wrapper.get_base_url()}/", f"api/filestorage/v1/account-token/{public_token}" + f"{self._client_wrapper.get_base_url()}/", f"filestorage/v1/account-token/{public_token}" ), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None diff --git a/src/merge/resources/filestorage/resources/async_passthrough/client.py b/src/merge/resources/filestorage/resources/async_passthrough/client.py index f5a91e0d..30a00224 100644 --- a/src/merge/resources/filestorage/resources/async_passthrough/client.py +++ b/src/merge/resources/filestorage/resources/async_passthrough/client.py @@ -38,11 +38,7 @@ def create( - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from merge.client import Merge - from merge.resources.filestorage import ( - DataPassthroughRequest, - MethodEnum, - RequestFormatEnum, - ) + from merge.resources.filestorage import DataPassthroughRequest, MethodEnum client = Merge( account_token="YOUR_ACCOUNT_TOKEN", @@ -52,14 +48,12 @@ def create( request=DataPassthroughRequest( method=MethodEnum.GET, path="/scooters", - data='{"company": "Lime", "model": "Gen 2.5"}', - request_format=RequestFormatEnum.JSON, ), ) """ _response = self._client_wrapper.httpx_client.request( "POST", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/filestorage/v1/async-passthrough"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "filestorage/v1/async-passthrough"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -107,14 +101,14 @@ def retrieve( api_key="YOUR_API_KEY", ) client.filestorage.async_passthrough.retrieve( - async_passthrough_receipt_id="string", + async_passthrough_receipt_id="async_passthrough_receipt_id", ) """ _response = self._client_wrapper.httpx_client.request( "GET", urllib.parse.urljoin( f"{self._client_wrapper.get_base_url()}/", - f"api/filestorage/v1/async-passthrough/{async_passthrough_receipt_id}", + f"filestorage/v1/async-passthrough/{async_passthrough_receipt_id}", ), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None @@ -156,11 +150,7 @@ async def create( - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from merge.client import AsyncMerge - from merge.resources.filestorage import ( - DataPassthroughRequest, - MethodEnum, - RequestFormatEnum, - ) + from merge.resources.filestorage import DataPassthroughRequest, MethodEnum client = AsyncMerge( account_token="YOUR_ACCOUNT_TOKEN", @@ -170,14 +160,12 @@ async def create( request=DataPassthroughRequest( method=MethodEnum.GET, path="/scooters", - data='{"company": "Lime", "model": "Gen 2.5"}', - request_format=RequestFormatEnum.JSON, ), ) """ _response = await self._client_wrapper.httpx_client.request( "POST", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/filestorage/v1/async-passthrough"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "filestorage/v1/async-passthrough"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -225,14 +213,14 @@ async def retrieve( api_key="YOUR_API_KEY", ) await client.filestorage.async_passthrough.retrieve( - async_passthrough_receipt_id="string", + async_passthrough_receipt_id="async_passthrough_receipt_id", ) """ _response = await self._client_wrapper.httpx_client.request( "GET", urllib.parse.urljoin( f"{self._client_wrapper.get_base_url()}/", - f"api/filestorage/v1/async-passthrough/{async_passthrough_receipt_id}", + f"filestorage/v1/async-passthrough/{async_passthrough_receipt_id}", ), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None diff --git a/src/merge/resources/filestorage/resources/audit_trail/client.py b/src/merge/resources/filestorage/resources/audit_trail/client.py index a9984d7c..23658590 100644 --- a/src/merge/resources/filestorage/resources/audit_trail/client.py +++ b/src/merge/resources/filestorage/resources/audit_trail/client.py @@ -40,7 +40,7 @@ def list( - end_date: typing.Optional[str]. If included, will only include audit trail events that occurred before this time - - event_type: typing.Optional[str]. If included, will only include events with the given event type. Possible values include: `CREATED_REMOTE_PRODUCTION_API_KEY`, `DELETED_REMOTE_PRODUCTION_API_KEY`, `CREATED_TEST_API_KEY`, `DELETED_TEST_API_KEY`, `REGENERATED_PRODUCTION_API_KEY`, `INVITED_USER`, `TWO_FACTOR_AUTH_ENABLED`, `TWO_FACTOR_AUTH_DISABLED`, `DELETED_LINKED_ACCOUNT`, `CREATED_DESTINATION`, `DELETED_DESTINATION`, `CHANGED_DESTINATION`, `CHANGED_SCOPES`, `CHANGED_PERSONAL_INFORMATION`, `CHANGED_ORGANIZATION_SETTINGS`, `ENABLED_INTEGRATION`, `DISABLED_INTEGRATION`, `ENABLED_CATEGORY`, `DISABLED_CATEGORY`, `CHANGED_PASSWORD`, `RESET_PASSWORD`, `ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION`, `ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT`, `DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION`, `DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT`, `CREATED_INTEGRATION_WIDE_FIELD_MAPPING`, `CREATED_LINKED_ACCOUNT_FIELD_MAPPING`, `CHANGED_INTEGRATION_WIDE_FIELD_MAPPING`, `CHANGED_LINKED_ACCOUNT_FIELD_MAPPING`, `DELETED_INTEGRATION_WIDE_FIELD_MAPPING`, `DELETED_LINKED_ACCOUNT_FIELD_MAPPING` + - event_type: typing.Optional[str]. If included, will only include events with the given event type. Possible values include: `CREATED_REMOTE_PRODUCTION_API_KEY`, `DELETED_REMOTE_PRODUCTION_API_KEY`, `CREATED_TEST_API_KEY`, `DELETED_TEST_API_KEY`, `REGENERATED_PRODUCTION_API_KEY`, `INVITED_USER`, `TWO_FACTOR_AUTH_ENABLED`, `TWO_FACTOR_AUTH_DISABLED`, `DELETED_LINKED_ACCOUNT`, `CREATED_DESTINATION`, `DELETED_DESTINATION`, `CHANGED_DESTINATION`, `CHANGED_SCOPES`, `CHANGED_PERSONAL_INFORMATION`, `CHANGED_ORGANIZATION_SETTINGS`, `ENABLED_INTEGRATION`, `DISABLED_INTEGRATION`, `ENABLED_CATEGORY`, `DISABLED_CATEGORY`, `CHANGED_PASSWORD`, `RESET_PASSWORD`, `ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION`, `ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT`, `DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION`, `DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT`, `CREATED_INTEGRATION_WIDE_FIELD_MAPPING`, `CREATED_LINKED_ACCOUNT_FIELD_MAPPING`, `CHANGED_INTEGRATION_WIDE_FIELD_MAPPING`, `CHANGED_LINKED_ACCOUNT_FIELD_MAPPING`, `DELETED_INTEGRATION_WIDE_FIELD_MAPPING`, `DELETED_LINKED_ACCOUNT_FIELD_MAPPING`, `FORCED_LINKED_ACCOUNT_RESYNC`, `MUTED_ISSUE`, `GENERATED_MAGIC_LINK` - page_size: typing.Optional[int]. Number of results to return per page. @@ -60,7 +60,7 @@ def list( """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/filestorage/v1/audit-trail"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "filestorage/v1/audit-trail"), params=jsonable_encoder( remove_none_from_dict( { @@ -122,7 +122,7 @@ async def list( - end_date: typing.Optional[str]. If included, will only include audit trail events that occurred before this time - - event_type: typing.Optional[str]. If included, will only include events with the given event type. Possible values include: `CREATED_REMOTE_PRODUCTION_API_KEY`, `DELETED_REMOTE_PRODUCTION_API_KEY`, `CREATED_TEST_API_KEY`, `DELETED_TEST_API_KEY`, `REGENERATED_PRODUCTION_API_KEY`, `INVITED_USER`, `TWO_FACTOR_AUTH_ENABLED`, `TWO_FACTOR_AUTH_DISABLED`, `DELETED_LINKED_ACCOUNT`, `CREATED_DESTINATION`, `DELETED_DESTINATION`, `CHANGED_DESTINATION`, `CHANGED_SCOPES`, `CHANGED_PERSONAL_INFORMATION`, `CHANGED_ORGANIZATION_SETTINGS`, `ENABLED_INTEGRATION`, `DISABLED_INTEGRATION`, `ENABLED_CATEGORY`, `DISABLED_CATEGORY`, `CHANGED_PASSWORD`, `RESET_PASSWORD`, `ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION`, `ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT`, `DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION`, `DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT`, `CREATED_INTEGRATION_WIDE_FIELD_MAPPING`, `CREATED_LINKED_ACCOUNT_FIELD_MAPPING`, `CHANGED_INTEGRATION_WIDE_FIELD_MAPPING`, `CHANGED_LINKED_ACCOUNT_FIELD_MAPPING`, `DELETED_INTEGRATION_WIDE_FIELD_MAPPING`, `DELETED_LINKED_ACCOUNT_FIELD_MAPPING` + - event_type: typing.Optional[str]. If included, will only include events with the given event type. Possible values include: `CREATED_REMOTE_PRODUCTION_API_KEY`, `DELETED_REMOTE_PRODUCTION_API_KEY`, `CREATED_TEST_API_KEY`, `DELETED_TEST_API_KEY`, `REGENERATED_PRODUCTION_API_KEY`, `INVITED_USER`, `TWO_FACTOR_AUTH_ENABLED`, `TWO_FACTOR_AUTH_DISABLED`, `DELETED_LINKED_ACCOUNT`, `CREATED_DESTINATION`, `DELETED_DESTINATION`, `CHANGED_DESTINATION`, `CHANGED_SCOPES`, `CHANGED_PERSONAL_INFORMATION`, `CHANGED_ORGANIZATION_SETTINGS`, `ENABLED_INTEGRATION`, `DISABLED_INTEGRATION`, `ENABLED_CATEGORY`, `DISABLED_CATEGORY`, `CHANGED_PASSWORD`, `RESET_PASSWORD`, `ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION`, `ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT`, `DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION`, `DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT`, `CREATED_INTEGRATION_WIDE_FIELD_MAPPING`, `CREATED_LINKED_ACCOUNT_FIELD_MAPPING`, `CHANGED_INTEGRATION_WIDE_FIELD_MAPPING`, `CHANGED_LINKED_ACCOUNT_FIELD_MAPPING`, `DELETED_INTEGRATION_WIDE_FIELD_MAPPING`, `DELETED_LINKED_ACCOUNT_FIELD_MAPPING`, `FORCED_LINKED_ACCOUNT_RESYNC`, `MUTED_ISSUE`, `GENERATED_MAGIC_LINK` - page_size: typing.Optional[int]. Number of results to return per page. @@ -142,7 +142,7 @@ async def list( """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/filestorage/v1/audit-trail"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "filestorage/v1/audit-trail"), params=jsonable_encoder( remove_none_from_dict( { diff --git a/src/merge/resources/filestorage/resources/available_actions/client.py b/src/merge/resources/filestorage/resources/available_actions/client.py index 6b1bbdec..84840039 100644 --- a/src/merge/resources/filestorage/resources/available_actions/client.py +++ b/src/merge/resources/filestorage/resources/available_actions/client.py @@ -38,7 +38,7 @@ def retrieve(self, *, request_options: typing.Optional[RequestOptions] = None) - """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/filestorage/v1/available-actions"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "filestorage/v1/available-actions"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -84,7 +84,7 @@ async def retrieve(self, *, request_options: typing.Optional[RequestOptions] = N """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/filestorage/v1/available-actions"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "filestorage/v1/available-actions"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), diff --git a/src/merge/resources/filestorage/resources/delete_account/client.py b/src/merge/resources/filestorage/resources/delete_account/client.py index cd21ca7c..01b42e5a 100644 --- a/src/merge/resources/filestorage/resources/delete_account/client.py +++ b/src/merge/resources/filestorage/resources/delete_account/client.py @@ -32,7 +32,7 @@ def delete(self, *, request_options: typing.Optional[RequestOptions] = None) -> """ _response = self._client_wrapper.httpx_client.request( "POST", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/filestorage/v1/delete-account"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "filestorage/v1/delete-account"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -81,7 +81,7 @@ async def delete(self, *, request_options: typing.Optional[RequestOptions] = Non """ _response = await self._client_wrapper.httpx_client.request( "POST", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/filestorage/v1/delete-account"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "filestorage/v1/delete-account"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), diff --git a/src/merge/resources/filestorage/resources/drives/client.py b/src/merge/resources/filestorage/resources/drives/client.py index 4d66900b..1d3cfbe6 100644 --- a/src/merge/resources/filestorage/resources/drives/client.py +++ b/src/merge/resources/filestorage/resources/drives/client.py @@ -75,7 +75,7 @@ def list( """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/filestorage/v1/drives"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "filestorage/v1/drives"), params=jsonable_encoder( remove_none_from_dict( { @@ -141,12 +141,12 @@ def retrieve( api_key="YOUR_API_KEY", ) client.filestorage.drives.retrieve( - id="string", + id="id", ) """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"api/filestorage/v1/drives/{id}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"filestorage/v1/drives/{id}"), params=jsonable_encoder( remove_none_from_dict( { @@ -235,7 +235,7 @@ async def list( """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/filestorage/v1/drives"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "filestorage/v1/drives"), params=jsonable_encoder( remove_none_from_dict( { @@ -301,12 +301,12 @@ async def retrieve( api_key="YOUR_API_KEY", ) await client.filestorage.drives.retrieve( - id="string", + id="id", ) """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"api/filestorage/v1/drives/{id}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"filestorage/v1/drives/{id}"), params=jsonable_encoder( remove_none_from_dict( { diff --git a/src/merge/resources/filestorage/resources/field_mapping/client.py b/src/merge/resources/filestorage/resources/field_mapping/client.py index 2db22093..db066821 100644 --- a/src/merge/resources/filestorage/resources/field_mapping/client.py +++ b/src/merge/resources/filestorage/resources/field_mapping/client.py @@ -46,7 +46,7 @@ def field_mappings_retrieve( """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/filestorage/v1/field-mappings"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "filestorage/v1/field-mappings"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -116,7 +116,7 @@ def field_mappings_create( """ _response = self._client_wrapper.httpx_client.request( "POST", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/filestorage/v1/field-mappings"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "filestorage/v1/field-mappings"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -182,13 +182,13 @@ def field_mappings_destroy( api_key="YOUR_API_KEY", ) client.filestorage.field_mapping.field_mappings_destroy( - field_mapping_id="string", + field_mapping_id="field_mapping_id", ) """ _response = self._client_wrapper.httpx_client.request( "DELETE", urllib.parse.urljoin( - f"{self._client_wrapper.get_base_url()}/", f"api/filestorage/v1/field-mappings/{field_mapping_id}" + f"{self._client_wrapper.get_base_url()}/", f"filestorage/v1/field-mappings/{field_mapping_id}" ), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None @@ -243,7 +243,7 @@ def field_mappings_partial_update( api_key="YOUR_API_KEY", ) client.filestorage.field_mapping.field_mappings_partial_update( - field_mapping_id="string", + field_mapping_id="field_mapping_id", remote_method="GET", remote_url_path="/example-url-path", ) @@ -258,7 +258,7 @@ def field_mappings_partial_update( _response = self._client_wrapper.httpx_client.request( "PATCH", urllib.parse.urljoin( - f"{self._client_wrapper.get_base_url()}/", f"api/filestorage/v1/field-mappings/{field_mapping_id}" + f"{self._client_wrapper.get_base_url()}/", f"filestorage/v1/field-mappings/{field_mapping_id}" ), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None @@ -316,7 +316,7 @@ def remote_fields_retrieve( """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/filestorage/v1/remote-fields"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "filestorage/v1/remote-fields"), params=jsonable_encoder( remove_none_from_dict( { @@ -369,7 +369,7 @@ def target_fields_retrieve( """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/filestorage/v1/target-fields"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "filestorage/v1/target-fields"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -417,7 +417,7 @@ async def field_mappings_retrieve( """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/filestorage/v1/field-mappings"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "filestorage/v1/field-mappings"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -487,7 +487,7 @@ async def field_mappings_create( """ _response = await self._client_wrapper.httpx_client.request( "POST", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/filestorage/v1/field-mappings"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "filestorage/v1/field-mappings"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -553,13 +553,13 @@ async def field_mappings_destroy( api_key="YOUR_API_KEY", ) await client.filestorage.field_mapping.field_mappings_destroy( - field_mapping_id="string", + field_mapping_id="field_mapping_id", ) """ _response = await self._client_wrapper.httpx_client.request( "DELETE", urllib.parse.urljoin( - f"{self._client_wrapper.get_base_url()}/", f"api/filestorage/v1/field-mappings/{field_mapping_id}" + f"{self._client_wrapper.get_base_url()}/", f"filestorage/v1/field-mappings/{field_mapping_id}" ), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None @@ -614,7 +614,7 @@ async def field_mappings_partial_update( api_key="YOUR_API_KEY", ) await client.filestorage.field_mapping.field_mappings_partial_update( - field_mapping_id="string", + field_mapping_id="field_mapping_id", remote_method="GET", remote_url_path="/example-url-path", ) @@ -629,7 +629,7 @@ async def field_mappings_partial_update( _response = await self._client_wrapper.httpx_client.request( "PATCH", urllib.parse.urljoin( - f"{self._client_wrapper.get_base_url()}/", f"api/filestorage/v1/field-mappings/{field_mapping_id}" + f"{self._client_wrapper.get_base_url()}/", f"filestorage/v1/field-mappings/{field_mapping_id}" ), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None @@ -687,7 +687,7 @@ async def remote_fields_retrieve( """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/filestorage/v1/remote-fields"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "filestorage/v1/remote-fields"), params=jsonable_encoder( remove_none_from_dict( { @@ -740,7 +740,7 @@ async def target_fields_retrieve( """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/filestorage/v1/target-fields"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "filestorage/v1/target-fields"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), diff --git a/src/merge/resources/filestorage/resources/files/client.py b/src/merge/resources/filestorage/resources/files/client.py index 2b621130..378538ba 100644 --- a/src/merge/resources/filestorage/resources/files/client.py +++ b/src/merge/resources/filestorage/resources/files/client.py @@ -43,6 +43,7 @@ def list( folder_id: typing.Optional[str] = None, include_deleted_data: typing.Optional[bool] = None, include_remote_data: typing.Optional[bool] = None, + mime_type: typing.Optional[str] = None, modified_after: typing.Optional[dt.datetime] = None, modified_before: typing.Optional[dt.datetime] = None, name: typing.Optional[str] = None, @@ -70,6 +71,8 @@ def list( - include_remote_data: typing.Optional[bool]. Whether to include the original data Merge fetched from the third-party to produce these models. + - mime_type: typing.Optional[str]. If provided, will only return files with these mime_types. Multiple values can be separated by commas. + - modified_after: typing.Optional[dt.datetime]. If provided, only objects synced by Merge after this date time will be returned. - modified_before: typing.Optional[dt.datetime]. If provided, only objects synced by Merge before this date time will be returned. @@ -83,19 +86,16 @@ def list( - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from merge.client import Merge - from merge.resources.filestorage import FilesListRequestExpand client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) - client.filestorage.files.list( - expand=FilesListRequestExpand.DRIVE, - ) + client.filestorage.files.list() """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/filestorage/v1/files"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "filestorage/v1/files"), params=jsonable_encoder( remove_none_from_dict( { @@ -107,6 +107,7 @@ def list( "folder_id": folder_id, "include_deleted_data": include_deleted_data, "include_remote_data": include_remote_data, + "mime_type": mime_type, "modified_after": serialize_datetime(modified_after) if modified_after is not None else None, "modified_before": serialize_datetime(modified_before) if modified_before is not None else None, "name": name, @@ -168,19 +169,12 @@ def create( api_key="YOUR_API_KEY", ) client.filestorage.files.create( - model=FileRequest( - name="omg_common_model_scope.docx", - file_url="https://drive.com/1234", - file_thumbnail_url="https://drive.com/1234/thumbnail.png", - size=1, - mime_type="application/vnd.openxmlformats-officedocument.wordprocessingml.document", - description="This file is OP", - ), + model=FileRequest(), ) """ _response = self._client_wrapper.httpx_client.request( "POST", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/filestorage/v1/files"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "filestorage/v1/files"), params=jsonable_encoder( remove_none_from_dict( { @@ -241,20 +235,18 @@ def retrieve( - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from merge.client import Merge - from merge.resources.filestorage import FilesRetrieveRequestExpand client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) client.filestorage.files.retrieve( - id="string", - expand=FilesRetrieveRequestExpand.DRIVE, + id="id", ) """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"api/filestorage/v1/files/{id}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"filestorage/v1/files/{id}"), params=jsonable_encoder( remove_none_from_dict( { @@ -307,7 +299,7 @@ def download_retrieve( """ with self._client_wrapper.httpx_client.stream( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"api/filestorage/v1/files/{id}/download"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"filestorage/v1/files/{id}/download"), params=jsonable_encoder( remove_none_from_dict( { @@ -360,7 +352,7 @@ def meta_post_retrieve(self, *, request_options: typing.Optional[RequestOptions] """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/filestorage/v1/files/meta/post"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "filestorage/v1/files/meta/post"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -400,6 +392,7 @@ async def list( folder_id: typing.Optional[str] = None, include_deleted_data: typing.Optional[bool] = None, include_remote_data: typing.Optional[bool] = None, + mime_type: typing.Optional[str] = None, modified_after: typing.Optional[dt.datetime] = None, modified_before: typing.Optional[dt.datetime] = None, name: typing.Optional[str] = None, @@ -427,6 +420,8 @@ async def list( - include_remote_data: typing.Optional[bool]. Whether to include the original data Merge fetched from the third-party to produce these models. + - mime_type: typing.Optional[str]. If provided, will only return files with these mime_types. Multiple values can be separated by commas. + - modified_after: typing.Optional[dt.datetime]. If provided, only objects synced by Merge after this date time will be returned. - modified_before: typing.Optional[dt.datetime]. If provided, only objects synced by Merge before this date time will be returned. @@ -440,19 +435,16 @@ async def list( - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from merge.client import AsyncMerge - from merge.resources.filestorage import FilesListRequestExpand client = AsyncMerge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) - await client.filestorage.files.list( - expand=FilesListRequestExpand.DRIVE, - ) + await client.filestorage.files.list() """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/filestorage/v1/files"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "filestorage/v1/files"), params=jsonable_encoder( remove_none_from_dict( { @@ -464,6 +456,7 @@ async def list( "folder_id": folder_id, "include_deleted_data": include_deleted_data, "include_remote_data": include_remote_data, + "mime_type": mime_type, "modified_after": serialize_datetime(modified_after) if modified_after is not None else None, "modified_before": serialize_datetime(modified_before) if modified_before is not None else None, "name": name, @@ -525,19 +518,12 @@ async def create( api_key="YOUR_API_KEY", ) await client.filestorage.files.create( - model=FileRequest( - name="omg_common_model_scope.docx", - file_url="https://drive.com/1234", - file_thumbnail_url="https://drive.com/1234/thumbnail.png", - size=1, - mime_type="application/vnd.openxmlformats-officedocument.wordprocessingml.document", - description="This file is OP", - ), + model=FileRequest(), ) """ _response = await self._client_wrapper.httpx_client.request( "POST", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/filestorage/v1/files"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "filestorage/v1/files"), params=jsonable_encoder( remove_none_from_dict( { @@ -598,20 +584,18 @@ async def retrieve( - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from merge.client import AsyncMerge - from merge.resources.filestorage import FilesRetrieveRequestExpand client = AsyncMerge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) await client.filestorage.files.retrieve( - id="string", - expand=FilesRetrieveRequestExpand.DRIVE, + id="id", ) """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"api/filestorage/v1/files/{id}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"filestorage/v1/files/{id}"), params=jsonable_encoder( remove_none_from_dict( { @@ -664,7 +648,7 @@ async def download_retrieve( """ async with self._client_wrapper.httpx_client.stream( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"api/filestorage/v1/files/{id}/download"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"filestorage/v1/files/{id}/download"), params=jsonable_encoder( remove_none_from_dict( { @@ -717,7 +701,7 @@ async def meta_post_retrieve(self, *, request_options: typing.Optional[RequestOp """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/filestorage/v1/files/meta/post"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "filestorage/v1/files/meta/post"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), diff --git a/src/merge/resources/filestorage/resources/folders/client.py b/src/merge/resources/filestorage/resources/folders/client.py index 59319bcf..be61df97 100644 --- a/src/merge/resources/filestorage/resources/folders/client.py +++ b/src/merge/resources/filestorage/resources/folders/client.py @@ -83,19 +83,16 @@ def list( - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from merge.client import Merge - from merge.resources.filestorage import FoldersListRequestExpand client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) - client.filestorage.folders.list( - expand=FoldersListRequestExpand.DRIVE, - ) + client.filestorage.folders.list() """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/filestorage/v1/folders"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "filestorage/v1/folders"), params=jsonable_encoder( remove_none_from_dict( { @@ -168,17 +165,12 @@ def create( api_key="YOUR_API_KEY", ) client.filestorage.folders.create( - model=FolderRequest( - name="Platform", - folder_url="https://drive.com/1234", - size=1, - description="This is a wild folder.", - ), + model=FolderRequest(), ) """ _response = self._client_wrapper.httpx_client.request( "POST", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/filestorage/v1/folders"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "filestorage/v1/folders"), params=jsonable_encoder( remove_none_from_dict( { @@ -239,20 +231,18 @@ def retrieve( - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from merge.client import Merge - from merge.resources.filestorage import FoldersRetrieveRequestExpand client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) client.filestorage.folders.retrieve( - id="string", - expand=FoldersRetrieveRequestExpand.DRIVE, + id="id", ) """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"api/filestorage/v1/folders/{id}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"filestorage/v1/folders/{id}"), params=jsonable_encoder( remove_none_from_dict( { @@ -303,7 +293,7 @@ def meta_post_retrieve(self, *, request_options: typing.Optional[RequestOptions] """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/filestorage/v1/folders/meta/post"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "filestorage/v1/folders/meta/post"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -383,19 +373,16 @@ async def list( - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from merge.client import AsyncMerge - from merge.resources.filestorage import FoldersListRequestExpand client = AsyncMerge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) - await client.filestorage.folders.list( - expand=FoldersListRequestExpand.DRIVE, - ) + await client.filestorage.folders.list() """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/filestorage/v1/folders"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "filestorage/v1/folders"), params=jsonable_encoder( remove_none_from_dict( { @@ -468,17 +455,12 @@ async def create( api_key="YOUR_API_KEY", ) await client.filestorage.folders.create( - model=FolderRequest( - name="Platform", - folder_url="https://drive.com/1234", - size=1, - description="This is a wild folder.", - ), + model=FolderRequest(), ) """ _response = await self._client_wrapper.httpx_client.request( "POST", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/filestorage/v1/folders"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "filestorage/v1/folders"), params=jsonable_encoder( remove_none_from_dict( { @@ -539,20 +521,18 @@ async def retrieve( - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from merge.client import AsyncMerge - from merge.resources.filestorage import FoldersRetrieveRequestExpand client = AsyncMerge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) await client.filestorage.folders.retrieve( - id="string", - expand=FoldersRetrieveRequestExpand.DRIVE, + id="id", ) """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"api/filestorage/v1/folders/{id}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"filestorage/v1/folders/{id}"), params=jsonable_encoder( remove_none_from_dict( { @@ -603,7 +583,7 @@ async def meta_post_retrieve(self, *, request_options: typing.Optional[RequestOp """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/filestorage/v1/folders/meta/post"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "filestorage/v1/folders/meta/post"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), diff --git a/src/merge/resources/filestorage/resources/force_resync/client.py b/src/merge/resources/filestorage/resources/force_resync/client.py index 495877b0..5aee3fe2 100644 --- a/src/merge/resources/filestorage/resources/force_resync/client.py +++ b/src/merge/resources/filestorage/resources/force_resync/client.py @@ -40,7 +40,7 @@ def sync_status_resync_create( """ _response = self._client_wrapper.httpx_client.request( "POST", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/filestorage/v1/sync-status/resync"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "filestorage/v1/sync-status/resync"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -91,7 +91,7 @@ async def sync_status_resync_create( """ _response = await self._client_wrapper.httpx_client.request( "POST", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/filestorage/v1/sync-status/resync"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "filestorage/v1/sync-status/resync"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), diff --git a/src/merge/resources/filestorage/resources/generate_key/client.py b/src/merge/resources/filestorage/resources/generate_key/client.py index aa67a09b..68313827 100644 --- a/src/merge/resources/filestorage/resources/generate_key/client.py +++ b/src/merge/resources/filestorage/resources/generate_key/client.py @@ -29,7 +29,7 @@ def create(self, *, name: str, request_options: typing.Optional[RequestOptions] Create a remote key. Parameters: - - name: str. + - name: str. The name of the remote key - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- @@ -45,7 +45,7 @@ def create(self, *, name: str, request_options: typing.Optional[RequestOptions] """ _response = self._client_wrapper.httpx_client.request( "POST", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/filestorage/v1/generate-key"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "filestorage/v1/generate-key"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -85,7 +85,7 @@ async def create(self, *, name: str, request_options: typing.Optional[RequestOpt Create a remote key. Parameters: - - name: str. + - name: str. The name of the remote key - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- @@ -101,7 +101,7 @@ async def create(self, *, name: str, request_options: typing.Optional[RequestOpt """ _response = await self._client_wrapper.httpx_client.request( "POST", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/filestorage/v1/generate-key"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "filestorage/v1/generate-key"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), diff --git a/src/merge/resources/filestorage/resources/groups/client.py b/src/merge/resources/filestorage/resources/groups/client.py index dc08e96b..cfc04753 100644 --- a/src/merge/resources/filestorage/resources/groups/client.py +++ b/src/merge/resources/filestorage/resources/groups/client.py @@ -72,7 +72,7 @@ def list( """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/filestorage/v1/groups"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "filestorage/v1/groups"), params=jsonable_encoder( remove_none_from_dict( { @@ -137,12 +137,12 @@ def retrieve( api_key="YOUR_API_KEY", ) client.filestorage.groups.retrieve( - id="string", + id="id", ) """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"api/filestorage/v1/groups/{id}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"filestorage/v1/groups/{id}"), params=jsonable_encoder( remove_none_from_dict( { @@ -228,7 +228,7 @@ async def list( """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/filestorage/v1/groups"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "filestorage/v1/groups"), params=jsonable_encoder( remove_none_from_dict( { @@ -293,12 +293,12 @@ async def retrieve( api_key="YOUR_API_KEY", ) await client.filestorage.groups.retrieve( - id="string", + id="id", ) """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"api/filestorage/v1/groups/{id}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"filestorage/v1/groups/{id}"), params=jsonable_encoder( remove_none_from_dict( { diff --git a/src/merge/resources/filestorage/resources/issues/client.py b/src/merge/resources/filestorage/resources/issues/client.py index 5cb35fda..9d89fb54 100644 --- a/src/merge/resources/filestorage/resources/issues/client.py +++ b/src/merge/resources/filestorage/resources/issues/client.py @@ -78,19 +78,16 @@ def list( - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from merge.client import Merge - from merge.resources.filestorage import IssuesListRequestStatus client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) - client.filestorage.issues.list( - status=IssuesListRequestStatus.ONGOING, - ) + client.filestorage.issues.list() """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/filestorage/v1/issues"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "filestorage/v1/issues"), params=jsonable_encoder( remove_none_from_dict( { @@ -159,12 +156,12 @@ def retrieve(self, id: str, *, request_options: typing.Optional[RequestOptions] api_key="YOUR_API_KEY", ) client.filestorage.issues.retrieve( - id="string", + id="id", ) """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"api/filestorage/v1/issues/{id}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"filestorage/v1/issues/{id}"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -246,19 +243,16 @@ async def list( - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from merge.client import AsyncMerge - from merge.resources.filestorage import IssuesListRequestStatus client = AsyncMerge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) - await client.filestorage.issues.list( - status=IssuesListRequestStatus.ONGOING, - ) + await client.filestorage.issues.list() """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/filestorage/v1/issues"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "filestorage/v1/issues"), params=jsonable_encoder( remove_none_from_dict( { @@ -327,12 +321,12 @@ async def retrieve(self, id: str, *, request_options: typing.Optional[RequestOpt api_key="YOUR_API_KEY", ) await client.filestorage.issues.retrieve( - id="string", + id="id", ) """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"api/filestorage/v1/issues/{id}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"filestorage/v1/issues/{id}"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), diff --git a/src/merge/resources/filestorage/resources/link_token/client.py b/src/merge/resources/filestorage/resources/link_token/client.py index 93b7ac89..41e0210c 100644 --- a/src/merge/resources/filestorage/resources/link_token/client.py +++ b/src/merge/resources/filestorage/resources/link_token/client.py @@ -41,6 +41,7 @@ def create( category_common_model_scopes: typing.Optional[ typing.Dict[str, typing.Optional[typing.List[IndividualCommonModelScopeDeserializerRequest]]] ] = OMIT, + language: typing.Optional[str] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> LinkToken: """ @@ -65,9 +66,12 @@ def create( - category_common_model_scopes: typing.Optional[typing.Dict[str, typing.Optional[typing.List[IndividualCommonModelScopeDeserializerRequest]]]]. When creating a Link Token, you can set permissions for Common Models that will apply to the account that is going to be linked. Any model or field not specified in link token payload will default to existing settings. + - language: typing.Optional[str]. The language code for the language to localize Merge Link to. + - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from merge.client import Merge + from merge.resources.filestorage import CategoriesEnum client = Merge( account_token="YOUR_ACCOUNT_TOKEN", @@ -77,8 +81,7 @@ def create( end_user_email_address="example@gmail.com", end_user_organization_name="Test Organization", end_user_origin_id="12345", - categories=[], - integration="bamboohr", + categories=[CategoriesEnum.HRIS], ) """ _request: typing.Dict[str, typing.Any] = { @@ -97,9 +100,11 @@ def create( _request["common_models"] = common_models if category_common_model_scopes is not OMIT: _request["category_common_model_scopes"] = category_common_model_scopes + if language is not OMIT: + _request["language"] = language _response = self._client_wrapper.httpx_client.request( "POST", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/filestorage/v1/link-token"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "filestorage/v1/link-token"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -148,6 +153,7 @@ async def create( category_common_model_scopes: typing.Optional[ typing.Dict[str, typing.Optional[typing.List[IndividualCommonModelScopeDeserializerRequest]]] ] = OMIT, + language: typing.Optional[str] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> LinkToken: """ @@ -172,9 +178,12 @@ async def create( - category_common_model_scopes: typing.Optional[typing.Dict[str, typing.Optional[typing.List[IndividualCommonModelScopeDeserializerRequest]]]]. When creating a Link Token, you can set permissions for Common Models that will apply to the account that is going to be linked. Any model or field not specified in link token payload will default to existing settings. + - language: typing.Optional[str]. The language code for the language to localize Merge Link to. + - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from merge.client import AsyncMerge + from merge.resources.filestorage import CategoriesEnum client = AsyncMerge( account_token="YOUR_ACCOUNT_TOKEN", @@ -184,8 +193,7 @@ async def create( end_user_email_address="example@gmail.com", end_user_organization_name="Test Organization", end_user_origin_id="12345", - categories=[], - integration="bamboohr", + categories=[CategoriesEnum.HRIS], ) """ _request: typing.Dict[str, typing.Any] = { @@ -204,9 +212,11 @@ async def create( _request["common_models"] = common_models if category_common_model_scopes is not OMIT: _request["category_common_model_scopes"] = category_common_model_scopes + if language is not OMIT: + _request["language"] = language _response = await self._client_wrapper.httpx_client.request( "POST", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/filestorage/v1/link-token"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "filestorage/v1/link-token"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), diff --git a/src/merge/resources/filestorage/resources/linked_accounts/client.py b/src/merge/resources/filestorage/resources/linked_accounts/client.py index 465cd771..76eb270b 100644 --- a/src/merge/resources/filestorage/resources/linked_accounts/client.py +++ b/src/merge/resources/filestorage/resources/linked_accounts/client.py @@ -80,19 +80,16 @@ def list( - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from merge.client import Merge - from merge.resources.filestorage import LinkedAccountsListRequestCategory client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) - client.filestorage.linked_accounts.list( - category=LinkedAccountsListRequestCategory.ACCOUNTING, - ) + client.filestorage.linked_accounts.list() """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/filestorage/v1/linked-accounts"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "filestorage/v1/linked-accounts"), params=jsonable_encoder( remove_none_from_dict( { @@ -200,19 +197,16 @@ async def list( - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from merge.client import AsyncMerge - from merge.resources.filestorage import LinkedAccountsListRequestCategory client = AsyncMerge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) - await client.filestorage.linked_accounts.list( - category=LinkedAccountsListRequestCategory.ACCOUNTING, - ) + await client.filestorage.linked_accounts.list() """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/filestorage/v1/linked-accounts"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "filestorage/v1/linked-accounts"), params=jsonable_encoder( remove_none_from_dict( { diff --git a/src/merge/resources/filestorage/resources/passthrough/client.py b/src/merge/resources/filestorage/resources/passthrough/client.py index ec4202d4..9f89e866 100644 --- a/src/merge/resources/filestorage/resources/passthrough/client.py +++ b/src/merge/resources/filestorage/resources/passthrough/client.py @@ -37,11 +37,7 @@ def create( - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from merge.client import Merge - from merge.resources.filestorage import ( - DataPassthroughRequest, - MethodEnum, - RequestFormatEnum, - ) + from merge.resources.filestorage import DataPassthroughRequest, MethodEnum client = Merge( account_token="YOUR_ACCOUNT_TOKEN", @@ -51,14 +47,12 @@ def create( request=DataPassthroughRequest( method=MethodEnum.GET, path="/scooters", - data='{"company": "Lime", "model": "Gen 2.5"}', - request_format=RequestFormatEnum.JSON, ), ) """ _response = self._client_wrapper.httpx_client.request( "POST", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/filestorage/v1/passthrough"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "filestorage/v1/passthrough"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -105,11 +99,7 @@ async def create( - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from merge.client import AsyncMerge - from merge.resources.filestorage import ( - DataPassthroughRequest, - MethodEnum, - RequestFormatEnum, - ) + from merge.resources.filestorage import DataPassthroughRequest, MethodEnum client = AsyncMerge( account_token="YOUR_ACCOUNT_TOKEN", @@ -119,14 +109,12 @@ async def create( request=DataPassthroughRequest( method=MethodEnum.GET, path="/scooters", - data='{"company": "Lime", "model": "Gen 2.5"}', - request_format=RequestFormatEnum.JSON, ), ) """ _response = await self._client_wrapper.httpx_client.request( "POST", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/filestorage/v1/passthrough"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "filestorage/v1/passthrough"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), diff --git a/src/merge/resources/filestorage/resources/regenerate_key/client.py b/src/merge/resources/filestorage/resources/regenerate_key/client.py index c7684f08..eb8364e8 100644 --- a/src/merge/resources/filestorage/resources/regenerate_key/client.py +++ b/src/merge/resources/filestorage/resources/regenerate_key/client.py @@ -29,7 +29,7 @@ def create(self, *, name: str, request_options: typing.Optional[RequestOptions] Exchange remote keys. Parameters: - - name: str. + - name: str. The name of the remote key - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- @@ -45,7 +45,7 @@ def create(self, *, name: str, request_options: typing.Optional[RequestOptions] """ _response = self._client_wrapper.httpx_client.request( "POST", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/filestorage/v1/regenerate-key"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "filestorage/v1/regenerate-key"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -85,7 +85,7 @@ async def create(self, *, name: str, request_options: typing.Optional[RequestOpt Exchange remote keys. Parameters: - - name: str. + - name: str. The name of the remote key - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- @@ -101,7 +101,7 @@ async def create(self, *, name: str, request_options: typing.Optional[RequestOpt """ _response = await self._client_wrapper.httpx_client.request( "POST", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/filestorage/v1/regenerate-key"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "filestorage/v1/regenerate-key"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), diff --git a/src/merge/resources/filestorage/resources/scopes/client.py b/src/merge/resources/filestorage/resources/scopes/client.py index ffcd5408..0d0812e3 100644 --- a/src/merge/resources/filestorage/resources/scopes/client.py +++ b/src/merge/resources/filestorage/resources/scopes/client.py @@ -29,7 +29,7 @@ def default_scopes_retrieve( self, *, request_options: typing.Optional[RequestOptions] = None ) -> CommonModelScopeApi: """ - Get the default permissions for Merge Common Models and fields across all Linked Accounts of a given category. [Learn More](https://help.merge.dev/en/articles/8828211-common-model-and-field-scopes). + Get the default permissions for Merge Common Models and fields across all Linked Accounts of a given category. [Learn more](https://help.merge.dev/en/articles/8828211-common-model-and-field-scopes). Parameters: - request_options: typing.Optional[RequestOptions]. Request-specific configuration. @@ -44,7 +44,7 @@ def default_scopes_retrieve( """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/filestorage/v1/default-scopes"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "filestorage/v1/default-scopes"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -72,7 +72,7 @@ def linked_account_scopes_retrieve( self, *, request_options: typing.Optional[RequestOptions] = None ) -> CommonModelScopeApi: """ - Get all available permissions for Merge Common Models and fields for a single Linked Account. [Learn More](https://help.merge.dev/en/articles/8828211-common-model-and-field-scopes). + Get all available permissions for Merge Common Models and fields for a single Linked Account. [Learn more](https://help.merge.dev/en/articles/8828211-common-model-and-field-scopes). Parameters: - request_options: typing.Optional[RequestOptions]. Request-specific configuration. @@ -87,7 +87,7 @@ def linked_account_scopes_retrieve( """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/filestorage/v1/linked-account-scopes"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "filestorage/v1/linked-account-scopes"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -118,7 +118,7 @@ def linked_account_scopes_create( request_options: typing.Optional[RequestOptions] = None, ) -> CommonModelScopeApi: """ - Update permissions for any Common Model or field for a single Linked Account. Any Scopes not set in this POST request will inherit the default Scopes. [Learn More](https://help.merge.dev/en/articles/8828211-common-model-and-field-scopes) + Update permissions for any Common Model or field for a single Linked Account. Any Scopes not set in this POST request will inherit the default Scopes. [Learn more](https://help.merge.dev/en/articles/8828211-common-model-and-field-scopes) Parameters: - common_models: typing.List[IndividualCommonModelScopeDeserializerRequest]. The common models you want to update the scopes for @@ -126,18 +126,25 @@ def linked_account_scopes_create( - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from merge.client import Merge + from merge.resources.filestorage import ( + IndividualCommonModelScopeDeserializerRequest, + ) client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) client.filestorage.scopes.linked_account_scopes_create( - common_models=[], + common_models=[ + IndividualCommonModelScopeDeserializerRequest( + model_name="model_name", + ) + ], ) """ _response = self._client_wrapper.httpx_client.request( "POST", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/filestorage/v1/linked-account-scopes"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "filestorage/v1/linked-account-scopes"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -176,7 +183,7 @@ async def default_scopes_retrieve( self, *, request_options: typing.Optional[RequestOptions] = None ) -> CommonModelScopeApi: """ - Get the default permissions for Merge Common Models and fields across all Linked Accounts of a given category. [Learn More](https://help.merge.dev/en/articles/8828211-common-model-and-field-scopes). + Get the default permissions for Merge Common Models and fields across all Linked Accounts of a given category. [Learn more](https://help.merge.dev/en/articles/8828211-common-model-and-field-scopes). Parameters: - request_options: typing.Optional[RequestOptions]. Request-specific configuration. @@ -191,7 +198,7 @@ async def default_scopes_retrieve( """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/filestorage/v1/default-scopes"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "filestorage/v1/default-scopes"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -219,7 +226,7 @@ async def linked_account_scopes_retrieve( self, *, request_options: typing.Optional[RequestOptions] = None ) -> CommonModelScopeApi: """ - Get all available permissions for Merge Common Models and fields for a single Linked Account. [Learn More](https://help.merge.dev/en/articles/8828211-common-model-and-field-scopes). + Get all available permissions for Merge Common Models and fields for a single Linked Account. [Learn more](https://help.merge.dev/en/articles/8828211-common-model-and-field-scopes). Parameters: - request_options: typing.Optional[RequestOptions]. Request-specific configuration. @@ -234,7 +241,7 @@ async def linked_account_scopes_retrieve( """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/filestorage/v1/linked-account-scopes"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "filestorage/v1/linked-account-scopes"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -265,7 +272,7 @@ async def linked_account_scopes_create( request_options: typing.Optional[RequestOptions] = None, ) -> CommonModelScopeApi: """ - Update permissions for any Common Model or field for a single Linked Account. Any Scopes not set in this POST request will inherit the default Scopes. [Learn More](https://help.merge.dev/en/articles/8828211-common-model-and-field-scopes) + Update permissions for any Common Model or field for a single Linked Account. Any Scopes not set in this POST request will inherit the default Scopes. [Learn more](https://help.merge.dev/en/articles/8828211-common-model-and-field-scopes) Parameters: - common_models: typing.List[IndividualCommonModelScopeDeserializerRequest]. The common models you want to update the scopes for @@ -273,18 +280,25 @@ async def linked_account_scopes_create( - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from merge.client import AsyncMerge + from merge.resources.filestorage import ( + IndividualCommonModelScopeDeserializerRequest, + ) client = AsyncMerge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) await client.filestorage.scopes.linked_account_scopes_create( - common_models=[], + common_models=[ + IndividualCommonModelScopeDeserializerRequest( + model_name="model_name", + ) + ], ) """ _response = await self._client_wrapper.httpx_client.request( "POST", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/filestorage/v1/linked-account-scopes"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "filestorage/v1/linked-account-scopes"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), diff --git a/src/merge/resources/filestorage/resources/selective_sync/client.py b/src/merge/resources/filestorage/resources/selective_sync/client.py index 2838d1dd..985a37a9 100644 --- a/src/merge/resources/filestorage/resources/selective_sync/client.py +++ b/src/merge/resources/filestorage/resources/selective_sync/client.py @@ -46,7 +46,7 @@ def configurations_list( _response = self._client_wrapper.httpx_client.request( "GET", urllib.parse.urljoin( - f"{self._client_wrapper.get_base_url()}/", "api/filestorage/v1/selective-sync/configurations" + f"{self._client_wrapper.get_base_url()}/", "filestorage/v1/selective-sync/configurations" ), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None @@ -86,19 +86,26 @@ def configurations_update( - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from merge.client import Merge + from merge.resources.filestorage import ( + LinkedAccountSelectiveSyncConfigurationRequest, + ) client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) client.filestorage.selective_sync.configurations_update( - sync_configurations=[], + sync_configurations=[ + LinkedAccountSelectiveSyncConfigurationRequest( + linked_account_conditions=[], + ) + ], ) """ _response = self._client_wrapper.httpx_client.request( "PUT", urllib.parse.urljoin( - f"{self._client_wrapper.get_base_url()}/", "api/filestorage/v1/selective-sync/configurations" + f"{self._client_wrapper.get_base_url()}/", "filestorage/v1/selective-sync/configurations" ), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None @@ -159,7 +166,7 @@ def meta_list( """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/filestorage/v1/selective-sync/meta"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "filestorage/v1/selective-sync/meta"), params=jsonable_encoder( remove_none_from_dict( { @@ -219,7 +226,7 @@ async def configurations_list( _response = await self._client_wrapper.httpx_client.request( "GET", urllib.parse.urljoin( - f"{self._client_wrapper.get_base_url()}/", "api/filestorage/v1/selective-sync/configurations" + f"{self._client_wrapper.get_base_url()}/", "filestorage/v1/selective-sync/configurations" ), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None @@ -259,19 +266,26 @@ async def configurations_update( - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from merge.client import AsyncMerge + from merge.resources.filestorage import ( + LinkedAccountSelectiveSyncConfigurationRequest, + ) client = AsyncMerge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) await client.filestorage.selective_sync.configurations_update( - sync_configurations=[], + sync_configurations=[ + LinkedAccountSelectiveSyncConfigurationRequest( + linked_account_conditions=[], + ) + ], ) """ _response = await self._client_wrapper.httpx_client.request( "PUT", urllib.parse.urljoin( - f"{self._client_wrapper.get_base_url()}/", "api/filestorage/v1/selective-sync/configurations" + f"{self._client_wrapper.get_base_url()}/", "filestorage/v1/selective-sync/configurations" ), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None @@ -332,7 +346,7 @@ async def meta_list( """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/filestorage/v1/selective-sync/meta"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "filestorage/v1/selective-sync/meta"), params=jsonable_encoder( remove_none_from_dict( { diff --git a/src/merge/resources/filestorage/resources/sync_status/client.py b/src/merge/resources/filestorage/resources/sync_status/client.py index 2e12514b..70cfc8a5 100644 --- a/src/merge/resources/filestorage/resources/sync_status/client.py +++ b/src/merge/resources/filestorage/resources/sync_status/client.py @@ -48,7 +48,7 @@ def list( """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/filestorage/v1/sync-status"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "filestorage/v1/sync-status"), params=jsonable_encoder( remove_none_from_dict( { @@ -114,7 +114,7 @@ async def list( """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/filestorage/v1/sync-status"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "filestorage/v1/sync-status"), params=jsonable_encoder( remove_none_from_dict( { diff --git a/src/merge/resources/filestorage/resources/users/client.py b/src/merge/resources/filestorage/resources/users/client.py index 30721120..a477194c 100644 --- a/src/merge/resources/filestorage/resources/users/client.py +++ b/src/merge/resources/filestorage/resources/users/client.py @@ -75,7 +75,7 @@ def list( """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/filestorage/v1/users"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "filestorage/v1/users"), params=jsonable_encoder( remove_none_from_dict( { @@ -141,12 +141,12 @@ def retrieve( api_key="YOUR_API_KEY", ) client.filestorage.users.retrieve( - id="string", + id="id", ) """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"api/filestorage/v1/users/{id}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"filestorage/v1/users/{id}"), params=jsonable_encoder( remove_none_from_dict( { @@ -235,7 +235,7 @@ async def list( """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/filestorage/v1/users"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "filestorage/v1/users"), params=jsonable_encoder( remove_none_from_dict( { @@ -301,12 +301,12 @@ async def retrieve( api_key="YOUR_API_KEY", ) await client.filestorage.users.retrieve( - id="string", + id="id", ) """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"api/filestorage/v1/users/{id}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"filestorage/v1/users/{id}"), params=jsonable_encoder( remove_none_from_dict( { diff --git a/src/merge/resources/filestorage/resources/webhook_receivers/client.py b/src/merge/resources/filestorage/resources/webhook_receivers/client.py index b3dffc44..0781c871 100644 --- a/src/merge/resources/filestorage/resources/webhook_receivers/client.py +++ b/src/merge/resources/filestorage/resources/webhook_receivers/client.py @@ -41,7 +41,7 @@ def list(self, *, request_options: typing.Optional[RequestOptions] = None) -> ty """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/filestorage/v1/webhook-receivers"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "filestorage/v1/webhook-receivers"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -92,7 +92,7 @@ def create( api_key="YOUR_API_KEY", ) client.filestorage.webhook_receivers.create( - event="string", + event="event", is_active=True, ) """ @@ -101,7 +101,7 @@ def create( _request["key"] = key _response = self._client_wrapper.httpx_client.request( "POST", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/filestorage/v1/webhook-receivers"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "filestorage/v1/webhook-receivers"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -153,7 +153,7 @@ async def list(self, *, request_options: typing.Optional[RequestOptions] = None) """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/filestorage/v1/webhook-receivers"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "filestorage/v1/webhook-receivers"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -204,7 +204,7 @@ async def create( api_key="YOUR_API_KEY", ) await client.filestorage.webhook_receivers.create( - event="string", + event="event", is_active=True, ) """ @@ -213,7 +213,7 @@ async def create( _request["key"] = key _response = await self._client_wrapper.httpx_client.request( "POST", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/filestorage/v1/webhook-receivers"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "filestorage/v1/webhook-receivers"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), diff --git a/src/merge/resources/filestorage/types/account_details_and_actions.py b/src/merge/resources/filestorage/types/account_details_and_actions.py index fda4a3a9..8141e146 100644 --- a/src/merge/resources/filestorage/types/account_details_and_actions.py +++ b/src/merge/resources/filestorage/types/account_details_and_actions.py @@ -34,6 +34,9 @@ class AccountDetailsAndActions(pydantic.BaseModel): end_user_origin_id: typing.Optional[str] end_user_organization_name: str end_user_email_address: str + subdomain: typing.Optional[str] = pydantic.Field( + description="The tenant or domain the customer has provided access to." + ) webhook_listener_url: str is_duplicate: typing.Optional[bool] = pydantic.Field( description="Whether a Production Linked Account's credentials match another existing Production Linked Account. This field is `null` for Test Linked Accounts, incomplete Production Linked Accounts, and ignored duplicate Production Linked Account sets." diff --git a/src/merge/resources/filestorage/types/audit_log_event.py b/src/merge/resources/filestorage/types/audit_log_event.py index 7bb2d3c6..131ad94b 100644 --- a/src/merge/resources/filestorage/types/audit_log_event.py +++ b/src/merge/resources/filestorage/types/audit_log_event.py @@ -69,6 +69,9 @@ class AuditLogEvent(pydantic.BaseModel): "- `CHANGED_LINKED_ACCOUNT_FIELD_MAPPING` - CHANGED_LINKED_ACCOUNT_FIELD_MAPPING\n" "- `DELETED_INTEGRATION_WIDE_FIELD_MAPPING` - DELETED_INTEGRATION_WIDE_FIELD_MAPPING\n" "- `DELETED_LINKED_ACCOUNT_FIELD_MAPPING` - DELETED_LINKED_ACCOUNT_FIELD_MAPPING\n" + "- `FORCED_LINKED_ACCOUNT_RESYNC` - FORCED_LINKED_ACCOUNT_RESYNC\n" + "- `MUTED_ISSUE` - MUTED_ISSUE\n" + "- `GENERATED_MAGIC_LINK` - GENERATED_MAGIC_LINK\n" ) ) event_description: str diff --git a/src/merge/resources/filestorage/types/condition_schema.py b/src/merge/resources/filestorage/types/condition_schema.py index 7ebf9534..c8aebb68 100644 --- a/src/merge/resources/filestorage/types/condition_schema.py +++ b/src/merge/resources/filestorage/types/condition_schema.py @@ -20,12 +20,8 @@ class ConditionSchema(pydantic.BaseModel): common_model: typing.Optional[str] = pydantic.Field( description="The common model for which a condition schema is defined." ) - native_name: typing.Optional[str] = pydantic.Field( - description='User-facing _native condition_ name. e.g. "Skip Manager".' - ) - field_name: typing.Optional[str] = pydantic.Field( - description='The name of the field on the common model that this condition corresponds to, if they conceptually match. e.g. "location_type".' - ) + native_name: typing.Optional[str] + field_name: typing.Optional[str] is_unique: typing.Optional[bool] = pydantic.Field( description="Whether this condition can only be applied once. If false, the condition can be AND'd together multiple times." ) diff --git a/src/merge/resources/filestorage/types/data_passthrough_request.py b/src/merge/resources/filestorage/types/data_passthrough_request.py index 3acebedd..def5b5c2 100644 --- a/src/merge/resources/filestorage/types/data_passthrough_request.py +++ b/src/merge/resources/filestorage/types/data_passthrough_request.py @@ -28,9 +28,13 @@ class DataPassthroughRequest(pydantic.BaseModel): """ method: MethodEnum - path: str - base_url_override: typing.Optional[str] - data: typing.Optional[str] + path: str = pydantic.Field(description="The path of the request in the third party's platform.") + base_url_override: typing.Optional[str] = pydantic.Field( + description="An optional override of the third party's base url for the request." + ) + data: typing.Optional[str] = pydantic.Field( + description="The data with the request. You must include a `request_format` parameter matching the data's format" + ) multipart_form_data: typing.Optional[typing.List[MultipartFormFieldRequest]] = pydantic.Field( description="Pass an array of `MultipartFormField` objects in here instead of using the `data` param if `request_format` is set to `MULTIPART`." ) diff --git a/src/merge/resources/filestorage/types/drive.py b/src/merge/resources/filestorage/types/drive.py index 7bd4df66..4f33eadb 100644 --- a/src/merge/resources/filestorage/types/drive.py +++ b/src/merge/resources/filestorage/types/drive.py @@ -26,6 +26,10 @@ class Drive(pydantic.BaseModel): id: typing.Optional[str] remote_id: typing.Optional[str] = pydantic.Field(description="The third-party API ID of the matching object.") + created_at: typing.Optional[dt.datetime] + modified_at: typing.Optional[dt.datetime] = pydantic.Field( + description="This is the datetime that this object was last updated by Merge" + ) name: typing.Optional[str] = pydantic.Field(description="The drive's name.") remote_created_at: typing.Optional[dt.datetime] = pydantic.Field( description="When the third party's drive was created." @@ -34,10 +38,6 @@ class Drive(pydantic.BaseModel): remote_was_deleted: typing.Optional[bool] = pydantic.Field( description="Indicates whether or not this object has been deleted in the third party platform." ) - created_at: typing.Optional[dt.datetime] - modified_at: typing.Optional[dt.datetime] = pydantic.Field( - description="This is the datetime that this object was last updated by Merge" - ) field_mappings: typing.Optional[typing.Dict[str, typing.Any]] remote_data: typing.Optional[typing.List[typing.Optional[typing.Dict[str, typing.Any]]]] diff --git a/src/merge/resources/filestorage/types/event_type_enum.py b/src/merge/resources/filestorage/types/event_type_enum.py index 5ed5b7f1..434539c7 100644 --- a/src/merge/resources/filestorage/types/event_type_enum.py +++ b/src/merge/resources/filestorage/types/event_type_enum.py @@ -39,6 +39,9 @@ class EventTypeEnum(str, enum.Enum): - `CHANGED_LINKED_ACCOUNT_FIELD_MAPPING` - CHANGED_LINKED_ACCOUNT_FIELD_MAPPING - `DELETED_INTEGRATION_WIDE_FIELD_MAPPING` - DELETED_INTEGRATION_WIDE_FIELD_MAPPING - `DELETED_LINKED_ACCOUNT_FIELD_MAPPING` - DELETED_LINKED_ACCOUNT_FIELD_MAPPING + - `FORCED_LINKED_ACCOUNT_RESYNC` - FORCED_LINKED_ACCOUNT_RESYNC + - `MUTED_ISSUE` - MUTED_ISSUE + - `GENERATED_MAGIC_LINK` - GENERATED_MAGIC_LINK """ CREATED_REMOTE_PRODUCTION_API_KEY = "CREATED_REMOTE_PRODUCTION_API_KEY" @@ -72,6 +75,9 @@ class EventTypeEnum(str, enum.Enum): CHANGED_LINKED_ACCOUNT_FIELD_MAPPING = "CHANGED_LINKED_ACCOUNT_FIELD_MAPPING" DELETED_INTEGRATION_WIDE_FIELD_MAPPING = "DELETED_INTEGRATION_WIDE_FIELD_MAPPING" DELETED_LINKED_ACCOUNT_FIELD_MAPPING = "DELETED_LINKED_ACCOUNT_FIELD_MAPPING" + FORCED_LINKED_ACCOUNT_RESYNC = "FORCED_LINKED_ACCOUNT_RESYNC" + MUTED_ISSUE = "MUTED_ISSUE" + GENERATED_MAGIC_LINK = "GENERATED_MAGIC_LINK" def visit( self, @@ -106,6 +112,9 @@ def visit( changed_linked_account_field_mapping: typing.Callable[[], T_Result], deleted_integration_wide_field_mapping: typing.Callable[[], T_Result], deleted_linked_account_field_mapping: typing.Callable[[], T_Result], + forced_linked_account_resync: typing.Callable[[], T_Result], + muted_issue: typing.Callable[[], T_Result], + generated_magic_link: typing.Callable[[], T_Result], ) -> T_Result: if self is EventTypeEnum.CREATED_REMOTE_PRODUCTION_API_KEY: return created_remote_production_api_key() @@ -169,3 +178,9 @@ def visit( return deleted_integration_wide_field_mapping() if self is EventTypeEnum.DELETED_LINKED_ACCOUNT_FIELD_MAPPING: return deleted_linked_account_field_mapping() + if self is EventTypeEnum.FORCED_LINKED_ACCOUNT_RESYNC: + return forced_linked_account_resync() + if self is EventTypeEnum.MUTED_ISSUE: + return muted_issue() + if self is EventTypeEnum.GENERATED_MAGIC_LINK: + return generated_magic_link() diff --git a/src/merge/resources/filestorage/types/file.py b/src/merge/resources/filestorage/types/file.py index cf5cd262..9be5d11d 100644 --- a/src/merge/resources/filestorage/types/file.py +++ b/src/merge/resources/filestorage/types/file.py @@ -29,6 +29,10 @@ class File(pydantic.BaseModel): id: typing.Optional[str] remote_id: typing.Optional[str] = pydantic.Field(description="The third-party API ID of the matching object.") + created_at: typing.Optional[dt.datetime] + modified_at: typing.Optional[dt.datetime] = pydantic.Field( + description="This is the datetime that this object was last updated by Merge" + ) name: typing.Optional[str] = pydantic.Field(description="The file's name.") file_url: typing.Optional[str] = pydantic.Field(description="The URL to access the file.") file_thumbnail_url: typing.Optional[str] = pydantic.Field( @@ -51,10 +55,6 @@ class File(pydantic.BaseModel): remote_was_deleted: typing.Optional[bool] = pydantic.Field( description="Indicates whether or not this object has been deleted in the third party platform." ) - created_at: typing.Optional[dt.datetime] - modified_at: typing.Optional[dt.datetime] = pydantic.Field( - description="This is the datetime that this object was last updated by Merge" - ) field_mappings: typing.Optional[typing.Dict[str, typing.Any]] remote_data: typing.Optional[typing.List[typing.Optional[typing.Dict[str, typing.Any]]]] diff --git a/src/merge/resources/filestorage/types/folder.py b/src/merge/resources/filestorage/types/folder.py index a4eeca45..4f89d155 100644 --- a/src/merge/resources/filestorage/types/folder.py +++ b/src/merge/resources/filestorage/types/folder.py @@ -30,6 +30,10 @@ class Folder(pydantic.BaseModel): id: typing.Optional[str] remote_id: typing.Optional[str] = pydantic.Field(description="The third-party API ID of the matching object.") + created_at: typing.Optional[dt.datetime] + modified_at: typing.Optional[dt.datetime] = pydantic.Field( + description="This is the datetime that this object was last updated by Merge" + ) name: typing.Optional[str] = pydantic.Field(description="The folder's name.") folder_url: typing.Optional[str] = pydantic.Field(description="The URL to access the folder.") size: typing.Optional[int] = pydantic.Field(description="The folder's size, in bytes.") @@ -50,10 +54,6 @@ class Folder(pydantic.BaseModel): remote_was_deleted: typing.Optional[bool] = pydantic.Field( description="Indicates whether or not this object has been deleted in the third party platform." ) - created_at: typing.Optional[dt.datetime] - modified_at: typing.Optional[dt.datetime] = pydantic.Field( - description="This is the datetime that this object was last updated by Merge" - ) field_mappings: typing.Optional[typing.Dict[str, typing.Any]] remote_data: typing.Optional[typing.List[typing.Optional[typing.Dict[str, typing.Any]]]] diff --git a/src/merge/resources/filestorage/types/group.py b/src/merge/resources/filestorage/types/group.py index be0a96bb..6e1fc9da 100644 --- a/src/merge/resources/filestorage/types/group.py +++ b/src/merge/resources/filestorage/types/group.py @@ -26,6 +26,10 @@ class Group(pydantic.BaseModel): id: typing.Optional[str] remote_id: typing.Optional[str] = pydantic.Field(description="The third-party API ID of the matching object.") + created_at: typing.Optional[dt.datetime] + modified_at: typing.Optional[dt.datetime] = pydantic.Field( + description="This is the datetime that this object was last updated by Merge" + ) name: typing.Optional[str] = pydantic.Field(description="The group's name.") users: typing.List[str] = pydantic.Field( description="The users that belong in the group. If null, this typically means it's either a domain or the third-party platform does not surface this information." @@ -33,10 +37,6 @@ class Group(pydantic.BaseModel): remote_was_deleted: typing.Optional[bool] = pydantic.Field( description="Indicates whether or not this object has been deleted in the third party platform." ) - created_at: typing.Optional[dt.datetime] - modified_at: typing.Optional[dt.datetime] = pydantic.Field( - description="This is the datetime that this object was last updated by Merge" - ) field_mappings: typing.Optional[typing.Dict[str, typing.Any]] remote_data: typing.Optional[typing.List[typing.Optional[typing.Dict[str, typing.Any]]]] diff --git a/src/merge/resources/filestorage/types/linked_account_condition.py b/src/merge/resources/filestorage/types/linked_account_condition.py index 430adc00..f13ef90d 100644 --- a/src/merge/resources/filestorage/types/linked_account_condition.py +++ b/src/merge/resources/filestorage/types/linked_account_condition.py @@ -16,14 +16,10 @@ class LinkedAccountCondition(pydantic.BaseModel): description="The ID indicating which condition schema to use for a specific condition." ) common_model: typing.Optional[str] = pydantic.Field(description="The common model for a specific condition.") - native_name: typing.Optional[str] = pydantic.Field( - description='User-facing _native condition_ name. e.g. "Skip Manager".' - ) + native_name: typing.Optional[str] operator: str = pydantic.Field(description="The operator for a specific condition.") value: typing.Optional[typing.Any] - field_name: typing.Optional[str] = pydantic.Field( - description='The name of the field on the common model that this condition corresponds to, if they conceptually match. e.g. "location_type".' - ) + field_name: typing.Optional[str] def json(self, **kwargs: typing.Any) -> str: kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs} diff --git a/src/merge/resources/filestorage/types/linked_account_condition_request.py b/src/merge/resources/filestorage/types/linked_account_condition_request.py index 23ff21f1..ce36a27f 100644 --- a/src/merge/resources/filestorage/types/linked_account_condition_request.py +++ b/src/merge/resources/filestorage/types/linked_account_condition_request.py @@ -12,6 +12,7 @@ class LinkedAccountConditionRequest(pydantic.BaseModel): + id: typing.Optional[str] = pydantic.Field(description="The ID indicating which Linked Account Condition this is.") condition_schema_id: str = pydantic.Field( description="The ID indicating which condition schema to use for a specific condition." ) diff --git a/src/merge/resources/filestorage/types/permission.py b/src/merge/resources/filestorage/types/permission.py index 9c5c1fdf..02b41fe7 100644 --- a/src/merge/resources/filestorage/types/permission.py +++ b/src/merge/resources/filestorage/types/permission.py @@ -30,6 +30,10 @@ class Permission(pydantic.BaseModel): id: typing.Optional[str] remote_id: typing.Optional[str] = pydantic.Field(description="The third-party API ID of the matching object.") + created_at: typing.Optional[dt.datetime] + modified_at: typing.Optional[dt.datetime] = pydantic.Field( + description="This is the datetime that this object was last updated by Merge" + ) user: typing.Optional[PermissionUser] = pydantic.Field(description="The user that is granted this permission.") group: typing.Optional[PermissionGroup] = pydantic.Field(description="The group that is granted this permission.") type: typing.Optional[PermissionType] = pydantic.Field( @@ -45,10 +49,6 @@ class Permission(pydantic.BaseModel): roles: typing.Optional[typing.List[typing.Optional[PermissionRolesItem]]] = pydantic.Field( description="The permissions that the user or group has for the File or Folder. It is possible for a user or group to have multiple roles, such as viewing & uploading. Possible values include: `READ`, `WRITE`, `OWNER`. In cases where there is no clear mapping, the original value passed through will be returned." ) - created_at: typing.Optional[dt.datetime] - modified_at: typing.Optional[dt.datetime] = pydantic.Field( - description="This is the datetime that this object was last updated by Merge" - ) def json(self, **kwargs: typing.Any) -> str: kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs} diff --git a/src/merge/resources/filestorage/types/user.py b/src/merge/resources/filestorage/types/user.py index fcdd213e..0147f0fd 100644 --- a/src/merge/resources/filestorage/types/user.py +++ b/src/merge/resources/filestorage/types/user.py @@ -26,6 +26,10 @@ class User(pydantic.BaseModel): id: typing.Optional[str] remote_id: typing.Optional[str] = pydantic.Field(description="The third-party API ID of the matching object.") + created_at: typing.Optional[dt.datetime] + modified_at: typing.Optional[dt.datetime] = pydantic.Field( + description="This is the datetime that this object was last updated by Merge" + ) name: typing.Optional[str] = pydantic.Field(description="The user's name.") email_address: typing.Optional[str] = pydantic.Field( description="The user's email address. This is typically used to identify a user across linked accounts." @@ -34,10 +38,6 @@ class User(pydantic.BaseModel): remote_was_deleted: typing.Optional[bool] = pydantic.Field( description="Indicates whether or not this object has been deleted in the third party platform." ) - created_at: typing.Optional[dt.datetime] - modified_at: typing.Optional[dt.datetime] = pydantic.Field( - description="This is the datetime that this object was last updated by Merge" - ) field_mappings: typing.Optional[typing.Dict[str, typing.Any]] remote_data: typing.Optional[typing.List[typing.Optional[typing.Dict[str, typing.Any]]]] diff --git a/src/merge/resources/hris/resources/account_details/client.py b/src/merge/resources/hris/resources/account_details/client.py index b1b450bd..f8b90cfb 100644 --- a/src/merge/resources/hris/resources/account_details/client.py +++ b/src/merge/resources/hris/resources/account_details/client.py @@ -38,7 +38,7 @@ def retrieve(self, *, request_options: typing.Optional[RequestOptions] = None) - """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/hris/v1/account-details"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "hris/v1/account-details"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -84,7 +84,7 @@ async def retrieve(self, *, request_options: typing.Optional[RequestOptions] = N """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/hris/v1/account-details"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "hris/v1/account-details"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), diff --git a/src/merge/resources/hris/resources/account_token/client.py b/src/merge/resources/hris/resources/account_token/client.py index 43a81517..6dc4e364 100644 --- a/src/merge/resources/hris/resources/account_token/client.py +++ b/src/merge/resources/hris/resources/account_token/client.py @@ -37,14 +37,12 @@ def retrieve(self, public_token: str, *, request_options: typing.Optional[Reques api_key="YOUR_API_KEY", ) client.hris.account_token.retrieve( - public_token="string", + public_token="public_token", ) """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin( - f"{self._client_wrapper.get_base_url()}/", f"api/hris/v1/account-token/{public_token}" - ), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"hris/v1/account-token/{public_token}"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -91,14 +89,12 @@ async def retrieve( api_key="YOUR_API_KEY", ) await client.hris.account_token.retrieve( - public_token="string", + public_token="public_token", ) """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin( - f"{self._client_wrapper.get_base_url()}/", f"api/hris/v1/account-token/{public_token}" - ), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"hris/v1/account-token/{public_token}"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), diff --git a/src/merge/resources/hris/resources/async_passthrough/client.py b/src/merge/resources/hris/resources/async_passthrough/client.py index 04b97ea1..cbdfbb9c 100644 --- a/src/merge/resources/hris/resources/async_passthrough/client.py +++ b/src/merge/resources/hris/resources/async_passthrough/client.py @@ -38,11 +38,7 @@ def create( - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from merge.client import Merge - from merge.resources.hris import ( - DataPassthroughRequest, - MethodEnum, - RequestFormatEnum, - ) + from merge.resources.hris import DataPassthroughRequest, MethodEnum client = Merge( account_token="YOUR_ACCOUNT_TOKEN", @@ -52,14 +48,12 @@ def create( request=DataPassthroughRequest( method=MethodEnum.GET, path="/scooters", - data='{"company": "Lime", "model": "Gen 2.5"}', - request_format=RequestFormatEnum.JSON, ), ) """ _response = self._client_wrapper.httpx_client.request( "POST", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/hris/v1/async-passthrough"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "hris/v1/async-passthrough"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -107,14 +101,13 @@ def retrieve( api_key="YOUR_API_KEY", ) client.hris.async_passthrough.retrieve( - async_passthrough_receipt_id="string", + async_passthrough_receipt_id="async_passthrough_receipt_id", ) """ _response = self._client_wrapper.httpx_client.request( "GET", urllib.parse.urljoin( - f"{self._client_wrapper.get_base_url()}/", - f"api/hris/v1/async-passthrough/{async_passthrough_receipt_id}", + f"{self._client_wrapper.get_base_url()}/", f"hris/v1/async-passthrough/{async_passthrough_receipt_id}" ), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None @@ -156,11 +149,7 @@ async def create( - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from merge.client import AsyncMerge - from merge.resources.hris import ( - DataPassthroughRequest, - MethodEnum, - RequestFormatEnum, - ) + from merge.resources.hris import DataPassthroughRequest, MethodEnum client = AsyncMerge( account_token="YOUR_ACCOUNT_TOKEN", @@ -170,14 +159,12 @@ async def create( request=DataPassthroughRequest( method=MethodEnum.GET, path="/scooters", - data='{"company": "Lime", "model": "Gen 2.5"}', - request_format=RequestFormatEnum.JSON, ), ) """ _response = await self._client_wrapper.httpx_client.request( "POST", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/hris/v1/async-passthrough"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "hris/v1/async-passthrough"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -225,14 +212,13 @@ async def retrieve( api_key="YOUR_API_KEY", ) await client.hris.async_passthrough.retrieve( - async_passthrough_receipt_id="string", + async_passthrough_receipt_id="async_passthrough_receipt_id", ) """ _response = await self._client_wrapper.httpx_client.request( "GET", urllib.parse.urljoin( - f"{self._client_wrapper.get_base_url()}/", - f"api/hris/v1/async-passthrough/{async_passthrough_receipt_id}", + f"{self._client_wrapper.get_base_url()}/", f"hris/v1/async-passthrough/{async_passthrough_receipt_id}" ), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None diff --git a/src/merge/resources/hris/resources/audit_trail/client.py b/src/merge/resources/hris/resources/audit_trail/client.py index a045043d..e7cefade 100644 --- a/src/merge/resources/hris/resources/audit_trail/client.py +++ b/src/merge/resources/hris/resources/audit_trail/client.py @@ -40,7 +40,7 @@ def list( - end_date: typing.Optional[str]. If included, will only include audit trail events that occurred before this time - - event_type: typing.Optional[str]. If included, will only include events with the given event type. Possible values include: `CREATED_REMOTE_PRODUCTION_API_KEY`, `DELETED_REMOTE_PRODUCTION_API_KEY`, `CREATED_TEST_API_KEY`, `DELETED_TEST_API_KEY`, `REGENERATED_PRODUCTION_API_KEY`, `INVITED_USER`, `TWO_FACTOR_AUTH_ENABLED`, `TWO_FACTOR_AUTH_DISABLED`, `DELETED_LINKED_ACCOUNT`, `CREATED_DESTINATION`, `DELETED_DESTINATION`, `CHANGED_DESTINATION`, `CHANGED_SCOPES`, `CHANGED_PERSONAL_INFORMATION`, `CHANGED_ORGANIZATION_SETTINGS`, `ENABLED_INTEGRATION`, `DISABLED_INTEGRATION`, `ENABLED_CATEGORY`, `DISABLED_CATEGORY`, `CHANGED_PASSWORD`, `RESET_PASSWORD`, `ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION`, `ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT`, `DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION`, `DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT`, `CREATED_INTEGRATION_WIDE_FIELD_MAPPING`, `CREATED_LINKED_ACCOUNT_FIELD_MAPPING`, `CHANGED_INTEGRATION_WIDE_FIELD_MAPPING`, `CHANGED_LINKED_ACCOUNT_FIELD_MAPPING`, `DELETED_INTEGRATION_WIDE_FIELD_MAPPING`, `DELETED_LINKED_ACCOUNT_FIELD_MAPPING` + - event_type: typing.Optional[str]. If included, will only include events with the given event type. Possible values include: `CREATED_REMOTE_PRODUCTION_API_KEY`, `DELETED_REMOTE_PRODUCTION_API_KEY`, `CREATED_TEST_API_KEY`, `DELETED_TEST_API_KEY`, `REGENERATED_PRODUCTION_API_KEY`, `INVITED_USER`, `TWO_FACTOR_AUTH_ENABLED`, `TWO_FACTOR_AUTH_DISABLED`, `DELETED_LINKED_ACCOUNT`, `CREATED_DESTINATION`, `DELETED_DESTINATION`, `CHANGED_DESTINATION`, `CHANGED_SCOPES`, `CHANGED_PERSONAL_INFORMATION`, `CHANGED_ORGANIZATION_SETTINGS`, `ENABLED_INTEGRATION`, `DISABLED_INTEGRATION`, `ENABLED_CATEGORY`, `DISABLED_CATEGORY`, `CHANGED_PASSWORD`, `RESET_PASSWORD`, `ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION`, `ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT`, `DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION`, `DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT`, `CREATED_INTEGRATION_WIDE_FIELD_MAPPING`, `CREATED_LINKED_ACCOUNT_FIELD_MAPPING`, `CHANGED_INTEGRATION_WIDE_FIELD_MAPPING`, `CHANGED_LINKED_ACCOUNT_FIELD_MAPPING`, `DELETED_INTEGRATION_WIDE_FIELD_MAPPING`, `DELETED_LINKED_ACCOUNT_FIELD_MAPPING`, `FORCED_LINKED_ACCOUNT_RESYNC`, `MUTED_ISSUE`, `GENERATED_MAGIC_LINK` - page_size: typing.Optional[int]. Number of results to return per page. @@ -60,7 +60,7 @@ def list( """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/hris/v1/audit-trail"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "hris/v1/audit-trail"), params=jsonable_encoder( remove_none_from_dict( { @@ -122,7 +122,7 @@ async def list( - end_date: typing.Optional[str]. If included, will only include audit trail events that occurred before this time - - event_type: typing.Optional[str]. If included, will only include events with the given event type. Possible values include: `CREATED_REMOTE_PRODUCTION_API_KEY`, `DELETED_REMOTE_PRODUCTION_API_KEY`, `CREATED_TEST_API_KEY`, `DELETED_TEST_API_KEY`, `REGENERATED_PRODUCTION_API_KEY`, `INVITED_USER`, `TWO_FACTOR_AUTH_ENABLED`, `TWO_FACTOR_AUTH_DISABLED`, `DELETED_LINKED_ACCOUNT`, `CREATED_DESTINATION`, `DELETED_DESTINATION`, `CHANGED_DESTINATION`, `CHANGED_SCOPES`, `CHANGED_PERSONAL_INFORMATION`, `CHANGED_ORGANIZATION_SETTINGS`, `ENABLED_INTEGRATION`, `DISABLED_INTEGRATION`, `ENABLED_CATEGORY`, `DISABLED_CATEGORY`, `CHANGED_PASSWORD`, `RESET_PASSWORD`, `ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION`, `ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT`, `DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION`, `DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT`, `CREATED_INTEGRATION_WIDE_FIELD_MAPPING`, `CREATED_LINKED_ACCOUNT_FIELD_MAPPING`, `CHANGED_INTEGRATION_WIDE_FIELD_MAPPING`, `CHANGED_LINKED_ACCOUNT_FIELD_MAPPING`, `DELETED_INTEGRATION_WIDE_FIELD_MAPPING`, `DELETED_LINKED_ACCOUNT_FIELD_MAPPING` + - event_type: typing.Optional[str]. If included, will only include events with the given event type. Possible values include: `CREATED_REMOTE_PRODUCTION_API_KEY`, `DELETED_REMOTE_PRODUCTION_API_KEY`, `CREATED_TEST_API_KEY`, `DELETED_TEST_API_KEY`, `REGENERATED_PRODUCTION_API_KEY`, `INVITED_USER`, `TWO_FACTOR_AUTH_ENABLED`, `TWO_FACTOR_AUTH_DISABLED`, `DELETED_LINKED_ACCOUNT`, `CREATED_DESTINATION`, `DELETED_DESTINATION`, `CHANGED_DESTINATION`, `CHANGED_SCOPES`, `CHANGED_PERSONAL_INFORMATION`, `CHANGED_ORGANIZATION_SETTINGS`, `ENABLED_INTEGRATION`, `DISABLED_INTEGRATION`, `ENABLED_CATEGORY`, `DISABLED_CATEGORY`, `CHANGED_PASSWORD`, `RESET_PASSWORD`, `ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION`, `ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT`, `DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION`, `DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT`, `CREATED_INTEGRATION_WIDE_FIELD_MAPPING`, `CREATED_LINKED_ACCOUNT_FIELD_MAPPING`, `CHANGED_INTEGRATION_WIDE_FIELD_MAPPING`, `CHANGED_LINKED_ACCOUNT_FIELD_MAPPING`, `DELETED_INTEGRATION_WIDE_FIELD_MAPPING`, `DELETED_LINKED_ACCOUNT_FIELD_MAPPING`, `FORCED_LINKED_ACCOUNT_RESYNC`, `MUTED_ISSUE`, `GENERATED_MAGIC_LINK` - page_size: typing.Optional[int]. Number of results to return per page. @@ -142,7 +142,7 @@ async def list( """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/hris/v1/audit-trail"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "hris/v1/audit-trail"), params=jsonable_encoder( remove_none_from_dict( { diff --git a/src/merge/resources/hris/resources/available_actions/client.py b/src/merge/resources/hris/resources/available_actions/client.py index 609faa4c..396693b9 100644 --- a/src/merge/resources/hris/resources/available_actions/client.py +++ b/src/merge/resources/hris/resources/available_actions/client.py @@ -38,7 +38,7 @@ def retrieve(self, *, request_options: typing.Optional[RequestOptions] = None) - """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/hris/v1/available-actions"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "hris/v1/available-actions"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -84,7 +84,7 @@ async def retrieve(self, *, request_options: typing.Optional[RequestOptions] = N """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/hris/v1/available-actions"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "hris/v1/available-actions"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), diff --git a/src/merge/resources/hris/resources/bank_info/client.py b/src/merge/resources/hris/resources/bank_info/client.py index 1e4f1e80..4dd95b63 100644 --- a/src/merge/resources/hris/resources/bank_info/client.py +++ b/src/merge/resources/hris/resources/bank_info/client.py @@ -83,31 +83,21 @@ def list( - remote_id: typing.Optional[str]. The API provider's ID for the given object. - - show_enum_origins: typing.Optional[typing.Literal["account_type"]]. Which fields should be returned in non-normalized form. + - show_enum_origins: typing.Optional[typing.Literal["account_type"]]. A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from merge.client import Merge - from merge.resources.hris import ( - BankInfoListRequestAccountType, - BankInfoListRequestOrderBy, - ) client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) - client.hris.bank_info.list( - account_type=BankInfoListRequestAccountType.CHECKING, - expand="employee", - order_by=BankInfoListRequestOrderBy.REMOTE_CREATED_AT, - remote_fields="account_type", - show_enum_origins="account_type", - ) + client.hris.bank_info.list() """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/hris/v1/bank-info"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "hris/v1/bank-info"), params=jsonable_encoder( remove_none_from_dict( { @@ -177,7 +167,7 @@ def retrieve( - remote_fields: typing.Optional[typing.Literal["account_type"]]. Deprecated. Use show_enum_origins. - - show_enum_origins: typing.Optional[typing.Literal["account_type"]]. Which fields should be returned in non-normalized form. + - show_enum_origins: typing.Optional[typing.Literal["account_type"]]. A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- @@ -188,15 +178,12 @@ def retrieve( api_key="YOUR_API_KEY", ) client.hris.bank_info.retrieve( - id="string", - expand="employee", - remote_fields="account_type", - show_enum_origins="account_type", + id="id", ) """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"api/hris/v1/bank-info/{id}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"hris/v1/bank-info/{id}"), params=jsonable_encoder( remove_none_from_dict( { @@ -294,31 +281,21 @@ async def list( - remote_id: typing.Optional[str]. The API provider's ID for the given object. - - show_enum_origins: typing.Optional[typing.Literal["account_type"]]. Which fields should be returned in non-normalized form. + - show_enum_origins: typing.Optional[typing.Literal["account_type"]]. A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from merge.client import AsyncMerge - from merge.resources.hris import ( - BankInfoListRequestAccountType, - BankInfoListRequestOrderBy, - ) client = AsyncMerge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) - await client.hris.bank_info.list( - account_type=BankInfoListRequestAccountType.CHECKING, - expand="employee", - order_by=BankInfoListRequestOrderBy.REMOTE_CREATED_AT, - remote_fields="account_type", - show_enum_origins="account_type", - ) + await client.hris.bank_info.list() """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/hris/v1/bank-info"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "hris/v1/bank-info"), params=jsonable_encoder( remove_none_from_dict( { @@ -388,7 +365,7 @@ async def retrieve( - remote_fields: typing.Optional[typing.Literal["account_type"]]. Deprecated. Use show_enum_origins. - - show_enum_origins: typing.Optional[typing.Literal["account_type"]]. Which fields should be returned in non-normalized form. + - show_enum_origins: typing.Optional[typing.Literal["account_type"]]. A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- @@ -399,15 +376,12 @@ async def retrieve( api_key="YOUR_API_KEY", ) await client.hris.bank_info.retrieve( - id="string", - expand="employee", - remote_fields="account_type", - show_enum_origins="account_type", + id="id", ) """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"api/hris/v1/bank-info/{id}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"hris/v1/bank-info/{id}"), params=jsonable_encoder( remove_none_from_dict( { diff --git a/src/merge/resources/hris/resources/benefits/client.py b/src/merge/resources/hris/resources/benefits/client.py index 149d1de9..c7eab670 100644 --- a/src/merge/resources/hris/resources/benefits/client.py +++ b/src/merge/resources/hris/resources/benefits/client.py @@ -74,13 +74,11 @@ def list( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) - client.hris.benefits.list( - expand="employee", - ) + client.hris.benefits.list() """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/hris/v1/benefits"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "hris/v1/benefits"), params=jsonable_encoder( remove_none_from_dict( { @@ -150,13 +148,12 @@ def retrieve( api_key="YOUR_API_KEY", ) client.hris.benefits.retrieve( - id="string", - expand="employee", + id="id", ) """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"api/hris/v1/benefits/{id}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"hris/v1/benefits/{id}"), params=jsonable_encoder( remove_none_from_dict( { @@ -245,13 +242,11 @@ async def list( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) - await client.hris.benefits.list( - expand="employee", - ) + await client.hris.benefits.list() """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/hris/v1/benefits"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "hris/v1/benefits"), params=jsonable_encoder( remove_none_from_dict( { @@ -321,13 +316,12 @@ async def retrieve( api_key="YOUR_API_KEY", ) await client.hris.benefits.retrieve( - id="string", - expand="employee", + id="id", ) """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"api/hris/v1/benefits/{id}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"hris/v1/benefits/{id}"), params=jsonable_encoder( remove_none_from_dict( { diff --git a/src/merge/resources/hris/resources/companies/client.py b/src/merge/resources/hris/resources/companies/client.py index 30e64c33..921a757b 100644 --- a/src/merge/resources/hris/resources/companies/client.py +++ b/src/merge/resources/hris/resources/companies/client.py @@ -72,7 +72,7 @@ def list( """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/hris/v1/companies"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "hris/v1/companies"), params=jsonable_encoder( remove_none_from_dict( { @@ -137,12 +137,12 @@ def retrieve( api_key="YOUR_API_KEY", ) client.hris.companies.retrieve( - id="string", + id="id", ) """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"api/hris/v1/companies/{id}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"hris/v1/companies/{id}"), params=jsonable_encoder( remove_none_from_dict( { @@ -228,7 +228,7 @@ async def list( """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/hris/v1/companies"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "hris/v1/companies"), params=jsonable_encoder( remove_none_from_dict( { @@ -293,12 +293,12 @@ async def retrieve( api_key="YOUR_API_KEY", ) await client.hris.companies.retrieve( - id="string", + id="id", ) """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"api/hris/v1/companies/{id}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"hris/v1/companies/{id}"), params=jsonable_encoder( remove_none_from_dict( { diff --git a/src/merge/resources/hris/resources/delete_account/client.py b/src/merge/resources/hris/resources/delete_account/client.py index f2d2c3d3..d16a2832 100644 --- a/src/merge/resources/hris/resources/delete_account/client.py +++ b/src/merge/resources/hris/resources/delete_account/client.py @@ -32,7 +32,7 @@ def delete(self, *, request_options: typing.Optional[RequestOptions] = None) -> """ _response = self._client_wrapper.httpx_client.request( "POST", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/hris/v1/delete-account"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "hris/v1/delete-account"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -81,7 +81,7 @@ async def delete(self, *, request_options: typing.Optional[RequestOptions] = Non """ _response = await self._client_wrapper.httpx_client.request( "POST", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/hris/v1/delete-account"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "hris/v1/delete-account"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), diff --git a/src/merge/resources/hris/resources/dependents/client.py b/src/merge/resources/hris/resources/dependents/client.py index 114868fb..05ffb8ba 100644 --- a/src/merge/resources/hris/resources/dependents/client.py +++ b/src/merge/resources/hris/resources/dependents/client.py @@ -75,7 +75,7 @@ def list( """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/hris/v1/dependents"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "hris/v1/dependents"), params=jsonable_encoder( remove_none_from_dict( { @@ -144,12 +144,12 @@ def retrieve( api_key="YOUR_API_KEY", ) client.hris.dependents.retrieve( - id="string", + id="id", ) """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"api/hris/v1/dependents/{id}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"hris/v1/dependents/{id}"), params=jsonable_encoder( remove_none_from_dict( { @@ -239,7 +239,7 @@ async def list( """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/hris/v1/dependents"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "hris/v1/dependents"), params=jsonable_encoder( remove_none_from_dict( { @@ -308,12 +308,12 @@ async def retrieve( api_key="YOUR_API_KEY", ) await client.hris.dependents.retrieve( - id="string", + id="id", ) """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"api/hris/v1/dependents/{id}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"hris/v1/dependents/{id}"), params=jsonable_encoder( remove_none_from_dict( { diff --git a/src/merge/resources/hris/resources/employee_payroll_runs/client.py b/src/merge/resources/hris/resources/employee_payroll_runs/client.py index ee03512b..8cfe46e0 100644 --- a/src/merge/resources/hris/resources/employee_payroll_runs/client.py +++ b/src/merge/resources/hris/resources/employee_payroll_runs/client.py @@ -86,19 +86,16 @@ def list( - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from merge.client import Merge - from merge.resources.hris import EmployeePayrollRunsListRequestExpand client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) - client.hris.employee_payroll_runs.list( - expand=EmployeePayrollRunsListRequestExpand.EMPLOYEE, - ) + client.hris.employee_payroll_runs.list() """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/hris/v1/employee-payroll-runs"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "hris/v1/employee-payroll-runs"), params=jsonable_encoder( remove_none_from_dict( { @@ -167,20 +164,18 @@ def retrieve( - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from merge.client import Merge - from merge.resources.hris import EmployeePayrollRunsRetrieveRequestExpand client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) client.hris.employee_payroll_runs.retrieve( - id="string", - expand=EmployeePayrollRunsRetrieveRequestExpand.EMPLOYEE, + id="id", ) """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"api/hris/v1/employee-payroll-runs/{id}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"hris/v1/employee-payroll-runs/{id}"), params=jsonable_encoder( remove_none_from_dict( { @@ -279,19 +274,16 @@ async def list( - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from merge.client import AsyncMerge - from merge.resources.hris import EmployeePayrollRunsListRequestExpand client = AsyncMerge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) - await client.hris.employee_payroll_runs.list( - expand=EmployeePayrollRunsListRequestExpand.EMPLOYEE, - ) + await client.hris.employee_payroll_runs.list() """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/hris/v1/employee-payroll-runs"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "hris/v1/employee-payroll-runs"), params=jsonable_encoder( remove_none_from_dict( { @@ -360,20 +352,18 @@ async def retrieve( - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from merge.client import AsyncMerge - from merge.resources.hris import EmployeePayrollRunsRetrieveRequestExpand client = AsyncMerge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) await client.hris.employee_payroll_runs.retrieve( - id="string", - expand=EmployeePayrollRunsRetrieveRequestExpand.EMPLOYEE, + id="id", ) """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"api/hris/v1/employee-payroll-runs/{id}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"hris/v1/employee-payroll-runs/{id}"), params=jsonable_encoder( remove_none_from_dict( { diff --git a/src/merge/resources/hris/resources/employees/client.py b/src/merge/resources/hris/resources/employees/client.py index fb8a6dfd..41ee85ce 100644 --- a/src/merge/resources/hris/resources/employees/client.py +++ b/src/merge/resources/hris/resources/employees/client.py @@ -130,7 +130,7 @@ def list( - remote_id: typing.Optional[str]. The API provider's ID for the given object. - - show_enum_origins: typing.Optional[EmployeesListRequestShowEnumOrigins]. Which fields should be returned in non-normalized form. + - show_enum_origins: typing.Optional[EmployeesListRequestShowEnumOrigins]. A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) - started_after: typing.Optional[dt.datetime]. If provided, will only return employees that started after this datetime. @@ -149,27 +149,16 @@ def list( - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from merge.client import Merge - from merge.resources.hris import ( - EmployeesListRequestEmploymentStatus, - EmployeesListRequestExpand, - EmployeesListRequestRemoteFields, - EmployeesListRequestShowEnumOrigins, - ) client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) - client.hris.employees.list( - employment_status=EmployeesListRequestEmploymentStatus.ACTIVE, - expand=EmployeesListRequestExpand.COMPANY, - remote_fields=EmployeesListRequestRemoteFields.EMPLOYMENT_STATUS, - show_enum_origins=EmployeesListRequestShowEnumOrigins.EMPLOYMENT_STATUS, - ) + client.hris.employees.list() """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/hris/v1/employees"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "hris/v1/employees"), params=jsonable_encoder( remove_none_from_dict( { @@ -257,8 +246,6 @@ def create( - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- - import datetime - from merge.client import Merge from merge.resources.hris import EmployeeRequest @@ -267,36 +254,12 @@ def create( api_key="YOUR_API_KEY", ) client.hris.employees.create( - model=EmployeeRequest( - employee_number="2", - first_name="Greg", - last_name="Hirsch", - preferred_name="Greg the egg", - display_full_name="Cousin Greg Hirsch", - username="cousingreg", - work_email="greg@merge.dev", - personal_email="greg@gmail.com", - mobile_phone_number="+1234567890", - ssn="1234567890", - date_of_birth=datetime.datetime.fromisoformat( - "1990-11-10 00:00:00+00:00", - ), - hire_date=datetime.datetime.fromisoformat( - "2020-10-10 00:00:00+00:00", - ), - start_date=datetime.datetime.fromisoformat( - "2020-10-11 00:00:00+00:00", - ), - termination_date=datetime.datetime.fromisoformat( - "2021-10-12 00:00:00+00:00", - ), - avatar="http://alturl.com/h2h8m", - ), + model=EmployeeRequest(), ) """ _response = self._client_wrapper.httpx_client.request( "POST", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/hris/v1/employees"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "hris/v1/employees"), params=jsonable_encoder( remove_none_from_dict( { @@ -361,31 +324,23 @@ def retrieve( - remote_fields: typing.Optional[EmployeesRetrieveRequestRemoteFields]. Deprecated. Use show_enum_origins. - - show_enum_origins: typing.Optional[EmployeesRetrieveRequestShowEnumOrigins]. Which fields should be returned in non-normalized form. + - show_enum_origins: typing.Optional[EmployeesRetrieveRequestShowEnumOrigins]. A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from merge.client import Merge - from merge.resources.hris import ( - EmployeesRetrieveRequestExpand, - EmployeesRetrieveRequestRemoteFields, - EmployeesRetrieveRequestShowEnumOrigins, - ) client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) client.hris.employees.retrieve( - id="string", - expand=EmployeesRetrieveRequestExpand.COMPANY, - remote_fields=EmployeesRetrieveRequestRemoteFields.EMPLOYMENT_STATUS, - show_enum_origins=EmployeesRetrieveRequestShowEnumOrigins.EMPLOYMENT_STATUS, + id="id", ) """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"api/hris/v1/employees/{id}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"hris/v1/employees/{id}"), params=jsonable_encoder( remove_none_from_dict( { @@ -449,7 +404,7 @@ def ignore_create( api_key="YOUR_API_KEY", ) client.hris.employees.ignore_create( - model_id="string", + model_id="model_id", message="deletion request by user id 51903790-7dfe-4053-8d63-5a10cc4ffd39", ) """ @@ -458,7 +413,7 @@ def ignore_create( _request["message"] = message _response = self._client_wrapper.httpx_client.request( "POST", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"api/hris/v1/employees/ignore/{model_id}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"hris/v1/employees/ignore/{model_id}"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -505,7 +460,7 @@ def meta_post_retrieve(self, *, request_options: typing.Optional[RequestOptions] """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/hris/v1/employees/meta/post"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "hris/v1/employees/meta/post"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -626,7 +581,7 @@ async def list( - remote_id: typing.Optional[str]. The API provider's ID for the given object. - - show_enum_origins: typing.Optional[EmployeesListRequestShowEnumOrigins]. Which fields should be returned in non-normalized form. + - show_enum_origins: typing.Optional[EmployeesListRequestShowEnumOrigins]. A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) - started_after: typing.Optional[dt.datetime]. If provided, will only return employees that started after this datetime. @@ -645,27 +600,16 @@ async def list( - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from merge.client import AsyncMerge - from merge.resources.hris import ( - EmployeesListRequestEmploymentStatus, - EmployeesListRequestExpand, - EmployeesListRequestRemoteFields, - EmployeesListRequestShowEnumOrigins, - ) client = AsyncMerge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) - await client.hris.employees.list( - employment_status=EmployeesListRequestEmploymentStatus.ACTIVE, - expand=EmployeesListRequestExpand.COMPANY, - remote_fields=EmployeesListRequestRemoteFields.EMPLOYMENT_STATUS, - show_enum_origins=EmployeesListRequestShowEnumOrigins.EMPLOYMENT_STATUS, - ) + await client.hris.employees.list() """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/hris/v1/employees"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "hris/v1/employees"), params=jsonable_encoder( remove_none_from_dict( { @@ -753,8 +697,6 @@ async def create( - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- - import datetime - from merge.client import AsyncMerge from merge.resources.hris import EmployeeRequest @@ -763,36 +705,12 @@ async def create( api_key="YOUR_API_KEY", ) await client.hris.employees.create( - model=EmployeeRequest( - employee_number="2", - first_name="Greg", - last_name="Hirsch", - preferred_name="Greg the egg", - display_full_name="Cousin Greg Hirsch", - username="cousingreg", - work_email="greg@merge.dev", - personal_email="greg@gmail.com", - mobile_phone_number="+1234567890", - ssn="1234567890", - date_of_birth=datetime.datetime.fromisoformat( - "1990-11-10 00:00:00+00:00", - ), - hire_date=datetime.datetime.fromisoformat( - "2020-10-10 00:00:00+00:00", - ), - start_date=datetime.datetime.fromisoformat( - "2020-10-11 00:00:00+00:00", - ), - termination_date=datetime.datetime.fromisoformat( - "2021-10-12 00:00:00+00:00", - ), - avatar="http://alturl.com/h2h8m", - ), + model=EmployeeRequest(), ) """ _response = await self._client_wrapper.httpx_client.request( "POST", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/hris/v1/employees"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "hris/v1/employees"), params=jsonable_encoder( remove_none_from_dict( { @@ -857,31 +775,23 @@ async def retrieve( - remote_fields: typing.Optional[EmployeesRetrieveRequestRemoteFields]. Deprecated. Use show_enum_origins. - - show_enum_origins: typing.Optional[EmployeesRetrieveRequestShowEnumOrigins]. Which fields should be returned in non-normalized form. + - show_enum_origins: typing.Optional[EmployeesRetrieveRequestShowEnumOrigins]. A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from merge.client import AsyncMerge - from merge.resources.hris import ( - EmployeesRetrieveRequestExpand, - EmployeesRetrieveRequestRemoteFields, - EmployeesRetrieveRequestShowEnumOrigins, - ) client = AsyncMerge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) await client.hris.employees.retrieve( - id="string", - expand=EmployeesRetrieveRequestExpand.COMPANY, - remote_fields=EmployeesRetrieveRequestRemoteFields.EMPLOYMENT_STATUS, - show_enum_origins=EmployeesRetrieveRequestShowEnumOrigins.EMPLOYMENT_STATUS, + id="id", ) """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"api/hris/v1/employees/{id}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"hris/v1/employees/{id}"), params=jsonable_encoder( remove_none_from_dict( { @@ -945,7 +855,7 @@ async def ignore_create( api_key="YOUR_API_KEY", ) await client.hris.employees.ignore_create( - model_id="string", + model_id="model_id", message="deletion request by user id 51903790-7dfe-4053-8d63-5a10cc4ffd39", ) """ @@ -954,7 +864,7 @@ async def ignore_create( _request["message"] = message _response = await self._client_wrapper.httpx_client.request( "POST", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"api/hris/v1/employees/ignore/{model_id}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"hris/v1/employees/ignore/{model_id}"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -1001,7 +911,7 @@ async def meta_post_retrieve(self, *, request_options: typing.Optional[RequestOp """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/hris/v1/employees/meta/post"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "hris/v1/employees/meta/post"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), diff --git a/src/merge/resources/hris/resources/employer_benefits/client.py b/src/merge/resources/hris/resources/employer_benefits/client.py index f9795ee9..060bd433 100644 --- a/src/merge/resources/hris/resources/employer_benefits/client.py +++ b/src/merge/resources/hris/resources/employer_benefits/client.py @@ -72,7 +72,7 @@ def list( """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/hris/v1/employer-benefits"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "hris/v1/employer-benefits"), params=jsonable_encoder( remove_none_from_dict( { @@ -137,12 +137,12 @@ def retrieve( api_key="YOUR_API_KEY", ) client.hris.employer_benefits.retrieve( - id="string", + id="id", ) """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"api/hris/v1/employer-benefits/{id}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"hris/v1/employer-benefits/{id}"), params=jsonable_encoder( remove_none_from_dict( { @@ -228,7 +228,7 @@ async def list( """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/hris/v1/employer-benefits"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "hris/v1/employer-benefits"), params=jsonable_encoder( remove_none_from_dict( { @@ -293,12 +293,12 @@ async def retrieve( api_key="YOUR_API_KEY", ) await client.hris.employer_benefits.retrieve( - id="string", + id="id", ) """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"api/hris/v1/employer-benefits/{id}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"hris/v1/employer-benefits/{id}"), params=jsonable_encoder( remove_none_from_dict( { diff --git a/src/merge/resources/hris/resources/employments/client.py b/src/merge/resources/hris/resources/employments/client.py index fd1bce56..0ec9a484 100644 --- a/src/merge/resources/hris/resources/employments/client.py +++ b/src/merge/resources/hris/resources/employments/client.py @@ -80,32 +80,21 @@ def list( - remote_id: typing.Optional[str]. The API provider's ID for the given object. - - show_enum_origins: typing.Optional[EmploymentsListRequestShowEnumOrigins]. Which fields should be returned in non-normalized form. + - show_enum_origins: typing.Optional[EmploymentsListRequestShowEnumOrigins]. A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from merge.client import Merge - from merge.resources.hris import ( - EmploymentsListRequestExpand, - EmploymentsListRequestOrderBy, - EmploymentsListRequestRemoteFields, - EmploymentsListRequestShowEnumOrigins, - ) client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) - client.hris.employments.list( - expand=EmploymentsListRequestExpand.EMPLOYEE, - order_by=EmploymentsListRequestOrderBy.EFFECTIVE_DATE, - remote_fields=EmploymentsListRequestRemoteFields.EMPLOYMENT_TYPE, - show_enum_origins=EmploymentsListRequestShowEnumOrigins.EMPLOYMENT_TYPE, - ) + client.hris.employments.list() """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/hris/v1/employments"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "hris/v1/employments"), params=jsonable_encoder( remove_none_from_dict( { @@ -173,31 +162,23 @@ def retrieve( - remote_fields: typing.Optional[EmploymentsRetrieveRequestRemoteFields]. Deprecated. Use show_enum_origins. - - show_enum_origins: typing.Optional[EmploymentsRetrieveRequestShowEnumOrigins]. Which fields should be returned in non-normalized form. + - show_enum_origins: typing.Optional[EmploymentsRetrieveRequestShowEnumOrigins]. A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from merge.client import Merge - from merge.resources.hris import ( - EmploymentsRetrieveRequestExpand, - EmploymentsRetrieveRequestRemoteFields, - EmploymentsRetrieveRequestShowEnumOrigins, - ) client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) client.hris.employments.retrieve( - id="string", - expand=EmploymentsRetrieveRequestExpand.EMPLOYEE, - remote_fields=EmploymentsRetrieveRequestRemoteFields.EMPLOYMENT_TYPE, - show_enum_origins=EmploymentsRetrieveRequestShowEnumOrigins.EMPLOYMENT_TYPE, + id="id", ) """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"api/hris/v1/employments/{id}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"hris/v1/employments/{id}"), params=jsonable_encoder( remove_none_from_dict( { @@ -287,32 +268,21 @@ async def list( - remote_id: typing.Optional[str]. The API provider's ID for the given object. - - show_enum_origins: typing.Optional[EmploymentsListRequestShowEnumOrigins]. Which fields should be returned in non-normalized form. + - show_enum_origins: typing.Optional[EmploymentsListRequestShowEnumOrigins]. A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from merge.client import AsyncMerge - from merge.resources.hris import ( - EmploymentsListRequestExpand, - EmploymentsListRequestOrderBy, - EmploymentsListRequestRemoteFields, - EmploymentsListRequestShowEnumOrigins, - ) client = AsyncMerge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) - await client.hris.employments.list( - expand=EmploymentsListRequestExpand.EMPLOYEE, - order_by=EmploymentsListRequestOrderBy.EFFECTIVE_DATE, - remote_fields=EmploymentsListRequestRemoteFields.EMPLOYMENT_TYPE, - show_enum_origins=EmploymentsListRequestShowEnumOrigins.EMPLOYMENT_TYPE, - ) + await client.hris.employments.list() """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/hris/v1/employments"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "hris/v1/employments"), params=jsonable_encoder( remove_none_from_dict( { @@ -380,31 +350,23 @@ async def retrieve( - remote_fields: typing.Optional[EmploymentsRetrieveRequestRemoteFields]. Deprecated. Use show_enum_origins. - - show_enum_origins: typing.Optional[EmploymentsRetrieveRequestShowEnumOrigins]. Which fields should be returned in non-normalized form. + - show_enum_origins: typing.Optional[EmploymentsRetrieveRequestShowEnumOrigins]. A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from merge.client import AsyncMerge - from merge.resources.hris import ( - EmploymentsRetrieveRequestExpand, - EmploymentsRetrieveRequestRemoteFields, - EmploymentsRetrieveRequestShowEnumOrigins, - ) client = AsyncMerge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) await client.hris.employments.retrieve( - id="string", - expand=EmploymentsRetrieveRequestExpand.EMPLOYEE, - remote_fields=EmploymentsRetrieveRequestRemoteFields.EMPLOYMENT_TYPE, - show_enum_origins=EmploymentsRetrieveRequestShowEnumOrigins.EMPLOYMENT_TYPE, + id="id", ) """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"api/hris/v1/employments/{id}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"hris/v1/employments/{id}"), params=jsonable_encoder( remove_none_from_dict( { diff --git a/src/merge/resources/hris/resources/field_mapping/client.py b/src/merge/resources/hris/resources/field_mapping/client.py index 0b5f81a9..44e4d51b 100644 --- a/src/merge/resources/hris/resources/field_mapping/client.py +++ b/src/merge/resources/hris/resources/field_mapping/client.py @@ -46,7 +46,7 @@ def field_mappings_retrieve( """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/hris/v1/field-mappings"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "hris/v1/field-mappings"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -116,7 +116,7 @@ def field_mappings_create( """ _response = self._client_wrapper.httpx_client.request( "POST", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/hris/v1/field-mappings"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "hris/v1/field-mappings"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -182,13 +182,13 @@ def field_mappings_destroy( api_key="YOUR_API_KEY", ) client.hris.field_mapping.field_mappings_destroy( - field_mapping_id="string", + field_mapping_id="field_mapping_id", ) """ _response = self._client_wrapper.httpx_client.request( "DELETE", urllib.parse.urljoin( - f"{self._client_wrapper.get_base_url()}/", f"api/hris/v1/field-mappings/{field_mapping_id}" + f"{self._client_wrapper.get_base_url()}/", f"hris/v1/field-mappings/{field_mapping_id}" ), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None @@ -243,7 +243,7 @@ def field_mappings_partial_update( api_key="YOUR_API_KEY", ) client.hris.field_mapping.field_mappings_partial_update( - field_mapping_id="string", + field_mapping_id="field_mapping_id", remote_method="GET", remote_url_path="/example-url-path", ) @@ -258,7 +258,7 @@ def field_mappings_partial_update( _response = self._client_wrapper.httpx_client.request( "PATCH", urllib.parse.urljoin( - f"{self._client_wrapper.get_base_url()}/", f"api/hris/v1/field-mappings/{field_mapping_id}" + f"{self._client_wrapper.get_base_url()}/", f"hris/v1/field-mappings/{field_mapping_id}" ), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None @@ -316,7 +316,7 @@ def remote_fields_retrieve( """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/hris/v1/remote-fields"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "hris/v1/remote-fields"), params=jsonable_encoder( remove_none_from_dict( { @@ -369,7 +369,7 @@ def target_fields_retrieve( """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/hris/v1/target-fields"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "hris/v1/target-fields"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -417,7 +417,7 @@ async def field_mappings_retrieve( """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/hris/v1/field-mappings"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "hris/v1/field-mappings"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -487,7 +487,7 @@ async def field_mappings_create( """ _response = await self._client_wrapper.httpx_client.request( "POST", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/hris/v1/field-mappings"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "hris/v1/field-mappings"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -553,13 +553,13 @@ async def field_mappings_destroy( api_key="YOUR_API_KEY", ) await client.hris.field_mapping.field_mappings_destroy( - field_mapping_id="string", + field_mapping_id="field_mapping_id", ) """ _response = await self._client_wrapper.httpx_client.request( "DELETE", urllib.parse.urljoin( - f"{self._client_wrapper.get_base_url()}/", f"api/hris/v1/field-mappings/{field_mapping_id}" + f"{self._client_wrapper.get_base_url()}/", f"hris/v1/field-mappings/{field_mapping_id}" ), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None @@ -614,7 +614,7 @@ async def field_mappings_partial_update( api_key="YOUR_API_KEY", ) await client.hris.field_mapping.field_mappings_partial_update( - field_mapping_id="string", + field_mapping_id="field_mapping_id", remote_method="GET", remote_url_path="/example-url-path", ) @@ -629,7 +629,7 @@ async def field_mappings_partial_update( _response = await self._client_wrapper.httpx_client.request( "PATCH", urllib.parse.urljoin( - f"{self._client_wrapper.get_base_url()}/", f"api/hris/v1/field-mappings/{field_mapping_id}" + f"{self._client_wrapper.get_base_url()}/", f"hris/v1/field-mappings/{field_mapping_id}" ), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None @@ -687,7 +687,7 @@ async def remote_fields_retrieve( """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/hris/v1/remote-fields"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "hris/v1/remote-fields"), params=jsonable_encoder( remove_none_from_dict( { @@ -740,7 +740,7 @@ async def target_fields_retrieve( """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/hris/v1/target-fields"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "hris/v1/target-fields"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), diff --git a/src/merge/resources/hris/resources/force_resync/client.py b/src/merge/resources/hris/resources/force_resync/client.py index 3eb3c248..b1173324 100644 --- a/src/merge/resources/hris/resources/force_resync/client.py +++ b/src/merge/resources/hris/resources/force_resync/client.py @@ -40,7 +40,7 @@ def sync_status_resync_create( """ _response = self._client_wrapper.httpx_client.request( "POST", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/hris/v1/sync-status/resync"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "hris/v1/sync-status/resync"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -91,7 +91,7 @@ async def sync_status_resync_create( """ _response = await self._client_wrapper.httpx_client.request( "POST", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/hris/v1/sync-status/resync"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "hris/v1/sync-status/resync"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), diff --git a/src/merge/resources/hris/resources/generate_key/client.py b/src/merge/resources/hris/resources/generate_key/client.py index 854a0017..fd0b31d2 100644 --- a/src/merge/resources/hris/resources/generate_key/client.py +++ b/src/merge/resources/hris/resources/generate_key/client.py @@ -29,7 +29,7 @@ def create(self, *, name: str, request_options: typing.Optional[RequestOptions] Create a remote key. Parameters: - - name: str. + - name: str. The name of the remote key - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- @@ -45,7 +45,7 @@ def create(self, *, name: str, request_options: typing.Optional[RequestOptions] """ _response = self._client_wrapper.httpx_client.request( "POST", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/hris/v1/generate-key"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "hris/v1/generate-key"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -85,7 +85,7 @@ async def create(self, *, name: str, request_options: typing.Optional[RequestOpt Create a remote key. Parameters: - - name: str. + - name: str. The name of the remote key - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- @@ -101,7 +101,7 @@ async def create(self, *, name: str, request_options: typing.Optional[RequestOpt """ _response = await self._client_wrapper.httpx_client.request( "POST", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/hris/v1/generate-key"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "hris/v1/generate-key"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), diff --git a/src/merge/resources/hris/resources/groups/client.py b/src/merge/resources/hris/resources/groups/client.py index 96597c32..fee04bd2 100644 --- a/src/merge/resources/hris/resources/groups/client.py +++ b/src/merge/resources/hris/resources/groups/client.py @@ -34,6 +34,7 @@ def list( include_remote_data: typing.Optional[bool] = None, modified_after: typing.Optional[dt.datetime] = None, modified_before: typing.Optional[dt.datetime] = None, + names: typing.Optional[str] = None, page_size: typing.Optional[int] = None, remote_fields: typing.Optional[typing.Literal["type"]] = None, remote_id: typing.Optional[str] = None, @@ -59,13 +60,15 @@ def list( - modified_before: typing.Optional[dt.datetime]. If provided, only objects synced by Merge before this date time will be returned. + - names: typing.Optional[str]. If provided, will only return groups with these names. Multiple values can be separated by commas. + - page_size: typing.Optional[int]. Number of results to return per page. - remote_fields: typing.Optional[typing.Literal["type"]]. Deprecated. Use show_enum_origins. - remote_id: typing.Optional[str]. The API provider's ID for the given object. - - show_enum_origins: typing.Optional[typing.Literal["type"]]. Which fields should be returned in non-normalized form. + - show_enum_origins: typing.Optional[typing.Literal["type"]]. A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) - types: typing.Optional[str]. If provided, will only return groups of these types. Multiple values can be separated by commas. @@ -77,14 +80,11 @@ def list( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) - client.hris.groups.list( - remote_fields="type", - show_enum_origins="type", - ) + client.hris.groups.list() """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/hris/v1/groups"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "hris/v1/groups"), params=jsonable_encoder( remove_none_from_dict( { @@ -95,6 +95,7 @@ def list( "include_remote_data": include_remote_data, "modified_after": serialize_datetime(modified_after) if modified_after is not None else None, "modified_before": serialize_datetime(modified_before) if modified_before is not None else None, + "names": names, "page_size": page_size, "remote_fields": remote_fields, "remote_id": remote_id, @@ -147,7 +148,7 @@ def retrieve( - remote_fields: typing.Optional[typing.Literal["type"]]. Deprecated. Use show_enum_origins. - - show_enum_origins: typing.Optional[typing.Literal["type"]]. Which fields should be returned in non-normalized form. + - show_enum_origins: typing.Optional[typing.Literal["type"]]. A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- @@ -158,14 +159,12 @@ def retrieve( api_key="YOUR_API_KEY", ) client.hris.groups.retrieve( - id="string", - remote_fields="type", - show_enum_origins="type", + id="id", ) """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"api/hris/v1/groups/{id}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"hris/v1/groups/{id}"), params=jsonable_encoder( remove_none_from_dict( { @@ -215,6 +214,7 @@ async def list( include_remote_data: typing.Optional[bool] = None, modified_after: typing.Optional[dt.datetime] = None, modified_before: typing.Optional[dt.datetime] = None, + names: typing.Optional[str] = None, page_size: typing.Optional[int] = None, remote_fields: typing.Optional[typing.Literal["type"]] = None, remote_id: typing.Optional[str] = None, @@ -240,13 +240,15 @@ async def list( - modified_before: typing.Optional[dt.datetime]. If provided, only objects synced by Merge before this date time will be returned. + - names: typing.Optional[str]. If provided, will only return groups with these names. Multiple values can be separated by commas. + - page_size: typing.Optional[int]. Number of results to return per page. - remote_fields: typing.Optional[typing.Literal["type"]]. Deprecated. Use show_enum_origins. - remote_id: typing.Optional[str]. The API provider's ID for the given object. - - show_enum_origins: typing.Optional[typing.Literal["type"]]. Which fields should be returned in non-normalized form. + - show_enum_origins: typing.Optional[typing.Literal["type"]]. A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) - types: typing.Optional[str]. If provided, will only return groups of these types. Multiple values can be separated by commas. @@ -258,14 +260,11 @@ async def list( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) - await client.hris.groups.list( - remote_fields="type", - show_enum_origins="type", - ) + await client.hris.groups.list() """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/hris/v1/groups"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "hris/v1/groups"), params=jsonable_encoder( remove_none_from_dict( { @@ -276,6 +275,7 @@ async def list( "include_remote_data": include_remote_data, "modified_after": serialize_datetime(modified_after) if modified_after is not None else None, "modified_before": serialize_datetime(modified_before) if modified_before is not None else None, + "names": names, "page_size": page_size, "remote_fields": remote_fields, "remote_id": remote_id, @@ -328,7 +328,7 @@ async def retrieve( - remote_fields: typing.Optional[typing.Literal["type"]]. Deprecated. Use show_enum_origins. - - show_enum_origins: typing.Optional[typing.Literal["type"]]. Which fields should be returned in non-normalized form. + - show_enum_origins: typing.Optional[typing.Literal["type"]]. A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- @@ -339,14 +339,12 @@ async def retrieve( api_key="YOUR_API_KEY", ) await client.hris.groups.retrieve( - id="string", - remote_fields="type", - show_enum_origins="type", + id="id", ) """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"api/hris/v1/groups/{id}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"hris/v1/groups/{id}"), params=jsonable_encoder( remove_none_from_dict( { diff --git a/src/merge/resources/hris/resources/issues/client.py b/src/merge/resources/hris/resources/issues/client.py index 046fbdac..851d3be1 100644 --- a/src/merge/resources/hris/resources/issues/client.py +++ b/src/merge/resources/hris/resources/issues/client.py @@ -78,19 +78,16 @@ def list( - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from merge.client import Merge - from merge.resources.hris import IssuesListRequestStatus client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) - client.hris.issues.list( - status=IssuesListRequestStatus.ONGOING, - ) + client.hris.issues.list() """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/hris/v1/issues"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "hris/v1/issues"), params=jsonable_encoder( remove_none_from_dict( { @@ -159,12 +156,12 @@ def retrieve(self, id: str, *, request_options: typing.Optional[RequestOptions] api_key="YOUR_API_KEY", ) client.hris.issues.retrieve( - id="string", + id="id", ) """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"api/hris/v1/issues/{id}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"hris/v1/issues/{id}"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -246,19 +243,16 @@ async def list( - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from merge.client import AsyncMerge - from merge.resources.hris import IssuesListRequestStatus client = AsyncMerge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) - await client.hris.issues.list( - status=IssuesListRequestStatus.ONGOING, - ) + await client.hris.issues.list() """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/hris/v1/issues"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "hris/v1/issues"), params=jsonable_encoder( remove_none_from_dict( { @@ -327,12 +321,12 @@ async def retrieve(self, id: str, *, request_options: typing.Optional[RequestOpt api_key="YOUR_API_KEY", ) await client.hris.issues.retrieve( - id="string", + id="id", ) """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"api/hris/v1/issues/{id}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"hris/v1/issues/{id}"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), diff --git a/src/merge/resources/hris/resources/link_token/client.py b/src/merge/resources/hris/resources/link_token/client.py index 2a99f535..53917632 100644 --- a/src/merge/resources/hris/resources/link_token/client.py +++ b/src/merge/resources/hris/resources/link_token/client.py @@ -41,6 +41,7 @@ def create( category_common_model_scopes: typing.Optional[ typing.Dict[str, typing.Optional[typing.List[IndividualCommonModelScopeDeserializerRequest]]] ] = OMIT, + language: typing.Optional[str] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> LinkToken: """ @@ -65,9 +66,12 @@ def create( - category_common_model_scopes: typing.Optional[typing.Dict[str, typing.Optional[typing.List[IndividualCommonModelScopeDeserializerRequest]]]]. When creating a Link Token, you can set permissions for Common Models that will apply to the account that is going to be linked. Any model or field not specified in link token payload will default to existing settings. + - language: typing.Optional[str]. The language code for the language to localize Merge Link to. + - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from merge.client import Merge + from merge.resources.hris import CategoriesEnum client = Merge( account_token="YOUR_ACCOUNT_TOKEN", @@ -77,8 +81,7 @@ def create( end_user_email_address="example@gmail.com", end_user_organization_name="Test Organization", end_user_origin_id="12345", - categories=[], - integration="bamboohr", + categories=[CategoriesEnum.HRIS], ) """ _request: typing.Dict[str, typing.Any] = { @@ -97,9 +100,11 @@ def create( _request["common_models"] = common_models if category_common_model_scopes is not OMIT: _request["category_common_model_scopes"] = category_common_model_scopes + if language is not OMIT: + _request["language"] = language _response = self._client_wrapper.httpx_client.request( "POST", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/hris/v1/link-token"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "hris/v1/link-token"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -148,6 +153,7 @@ async def create( category_common_model_scopes: typing.Optional[ typing.Dict[str, typing.Optional[typing.List[IndividualCommonModelScopeDeserializerRequest]]] ] = OMIT, + language: typing.Optional[str] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> LinkToken: """ @@ -172,9 +178,12 @@ async def create( - category_common_model_scopes: typing.Optional[typing.Dict[str, typing.Optional[typing.List[IndividualCommonModelScopeDeserializerRequest]]]]. When creating a Link Token, you can set permissions for Common Models that will apply to the account that is going to be linked. Any model or field not specified in link token payload will default to existing settings. + - language: typing.Optional[str]. The language code for the language to localize Merge Link to. + - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from merge.client import AsyncMerge + from merge.resources.hris import CategoriesEnum client = AsyncMerge( account_token="YOUR_ACCOUNT_TOKEN", @@ -184,8 +193,7 @@ async def create( end_user_email_address="example@gmail.com", end_user_organization_name="Test Organization", end_user_origin_id="12345", - categories=[], - integration="bamboohr", + categories=[CategoriesEnum.HRIS], ) """ _request: typing.Dict[str, typing.Any] = { @@ -204,9 +212,11 @@ async def create( _request["common_models"] = common_models if category_common_model_scopes is not OMIT: _request["category_common_model_scopes"] = category_common_model_scopes + if language is not OMIT: + _request["language"] = language _response = await self._client_wrapper.httpx_client.request( "POST", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/hris/v1/link-token"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "hris/v1/link-token"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), diff --git a/src/merge/resources/hris/resources/linked_accounts/client.py b/src/merge/resources/hris/resources/linked_accounts/client.py index 50073260..fd6e1037 100644 --- a/src/merge/resources/hris/resources/linked_accounts/client.py +++ b/src/merge/resources/hris/resources/linked_accounts/client.py @@ -80,19 +80,16 @@ def list( - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from merge.client import Merge - from merge.resources.hris import LinkedAccountsListRequestCategory client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) - client.hris.linked_accounts.list( - category=LinkedAccountsListRequestCategory.ACCOUNTING, - ) + client.hris.linked_accounts.list() """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/hris/v1/linked-accounts"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "hris/v1/linked-accounts"), params=jsonable_encoder( remove_none_from_dict( { @@ -200,19 +197,16 @@ async def list( - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from merge.client import AsyncMerge - from merge.resources.hris import LinkedAccountsListRequestCategory client = AsyncMerge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) - await client.hris.linked_accounts.list( - category=LinkedAccountsListRequestCategory.ACCOUNTING, - ) + await client.hris.linked_accounts.list() """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/hris/v1/linked-accounts"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "hris/v1/linked-accounts"), params=jsonable_encoder( remove_none_from_dict( { diff --git a/src/merge/resources/hris/resources/locations/client.py b/src/merge/resources/hris/resources/locations/client.py index 80163848..ba707e33 100644 --- a/src/merge/resources/hris/resources/locations/client.py +++ b/src/merge/resources/hris/resources/locations/client.py @@ -70,26 +70,21 @@ def list( - remote_id: typing.Optional[str]. The API provider's ID for the given object. - - show_enum_origins: typing.Optional[typing.Literal["location_type"]]. Which fields should be returned in non-normalized form. + - show_enum_origins: typing.Optional[typing.Literal["location_type"]]. A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from merge.client import Merge - from merge.resources.hris import LocationsListRequestLocationType client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) - client.hris.locations.list( - location_type=LocationsListRequestLocationType.HOME, - remote_fields="location_type", - show_enum_origins="location_type", - ) + client.hris.locations.list() """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/hris/v1/locations"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "hris/v1/locations"), params=jsonable_encoder( remove_none_from_dict( { @@ -152,7 +147,7 @@ def retrieve( - remote_fields: typing.Optional[typing.Literal["location_type"]]. Deprecated. Use show_enum_origins. - - show_enum_origins: typing.Optional[typing.Literal["location_type"]]. Which fields should be returned in non-normalized form. + - show_enum_origins: typing.Optional[typing.Literal["location_type"]]. A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- @@ -163,14 +158,12 @@ def retrieve( api_key="YOUR_API_KEY", ) client.hris.locations.retrieve( - id="string", - remote_fields="location_type", - show_enum_origins="location_type", + id="id", ) """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"api/hris/v1/locations/{id}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"hris/v1/locations/{id}"), params=jsonable_encoder( remove_none_from_dict( { @@ -255,26 +248,21 @@ async def list( - remote_id: typing.Optional[str]. The API provider's ID for the given object. - - show_enum_origins: typing.Optional[typing.Literal["location_type"]]. Which fields should be returned in non-normalized form. + - show_enum_origins: typing.Optional[typing.Literal["location_type"]]. A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from merge.client import AsyncMerge - from merge.resources.hris import LocationsListRequestLocationType client = AsyncMerge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) - await client.hris.locations.list( - location_type=LocationsListRequestLocationType.HOME, - remote_fields="location_type", - show_enum_origins="location_type", - ) + await client.hris.locations.list() """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/hris/v1/locations"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "hris/v1/locations"), params=jsonable_encoder( remove_none_from_dict( { @@ -337,7 +325,7 @@ async def retrieve( - remote_fields: typing.Optional[typing.Literal["location_type"]]. Deprecated. Use show_enum_origins. - - show_enum_origins: typing.Optional[typing.Literal["location_type"]]. Which fields should be returned in non-normalized form. + - show_enum_origins: typing.Optional[typing.Literal["location_type"]]. A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- @@ -348,14 +336,12 @@ async def retrieve( api_key="YOUR_API_KEY", ) await client.hris.locations.retrieve( - id="string", - remote_fields="location_type", - show_enum_origins="location_type", + id="id", ) """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"api/hris/v1/locations/{id}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"hris/v1/locations/{id}"), params=jsonable_encoder( remove_none_from_dict( { diff --git a/src/merge/resources/hris/resources/passthrough/client.py b/src/merge/resources/hris/resources/passthrough/client.py index 83fe2d20..0457a928 100644 --- a/src/merge/resources/hris/resources/passthrough/client.py +++ b/src/merge/resources/hris/resources/passthrough/client.py @@ -37,11 +37,7 @@ def create( - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from merge.client import Merge - from merge.resources.hris import ( - DataPassthroughRequest, - MethodEnum, - RequestFormatEnum, - ) + from merge.resources.hris import DataPassthroughRequest, MethodEnum client = Merge( account_token="YOUR_ACCOUNT_TOKEN", @@ -51,14 +47,12 @@ def create( request=DataPassthroughRequest( method=MethodEnum.GET, path="/scooters", - data='{"company": "Lime", "model": "Gen 2.5"}', - request_format=RequestFormatEnum.JSON, ), ) """ _response = self._client_wrapper.httpx_client.request( "POST", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/hris/v1/passthrough"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "hris/v1/passthrough"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -105,11 +99,7 @@ async def create( - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from merge.client import AsyncMerge - from merge.resources.hris import ( - DataPassthroughRequest, - MethodEnum, - RequestFormatEnum, - ) + from merge.resources.hris import DataPassthroughRequest, MethodEnum client = AsyncMerge( account_token="YOUR_ACCOUNT_TOKEN", @@ -119,14 +109,12 @@ async def create( request=DataPassthroughRequest( method=MethodEnum.GET, path="/scooters", - data='{"company": "Lime", "model": "Gen 2.5"}', - request_format=RequestFormatEnum.JSON, ), ) """ _response = await self._client_wrapper.httpx_client.request( "POST", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/hris/v1/passthrough"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "hris/v1/passthrough"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), diff --git a/src/merge/resources/hris/resources/pay_groups/client.py b/src/merge/resources/hris/resources/pay_groups/client.py index 6e5fd07c..41d02f83 100644 --- a/src/merge/resources/hris/resources/pay_groups/client.py +++ b/src/merge/resources/hris/resources/pay_groups/client.py @@ -72,7 +72,7 @@ def list( """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/hris/v1/pay-groups"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "hris/v1/pay-groups"), params=jsonable_encoder( remove_none_from_dict( { @@ -137,12 +137,12 @@ def retrieve( api_key="YOUR_API_KEY", ) client.hris.pay_groups.retrieve( - id="string", + id="id", ) """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"api/hris/v1/pay-groups/{id}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"hris/v1/pay-groups/{id}"), params=jsonable_encoder( remove_none_from_dict( { @@ -228,7 +228,7 @@ async def list( """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/hris/v1/pay-groups"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "hris/v1/pay-groups"), params=jsonable_encoder( remove_none_from_dict( { @@ -293,12 +293,12 @@ async def retrieve( api_key="YOUR_API_KEY", ) await client.hris.pay_groups.retrieve( - id="string", + id="id", ) """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"api/hris/v1/pay-groups/{id}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"hris/v1/pay-groups/{id}"), params=jsonable_encoder( remove_none_from_dict( { diff --git a/src/merge/resources/hris/resources/payroll_runs/client.py b/src/merge/resources/hris/resources/payroll_runs/client.py index fb2ed0e4..32734c7a 100644 --- a/src/merge/resources/hris/resources/payroll_runs/client.py +++ b/src/merge/resources/hris/resources/payroll_runs/client.py @@ -85,7 +85,7 @@ def list( - `CORRECTION` - CORRECTION - `TERMINATION` - TERMINATION - `SIGN_ON_BONUS` - SIGN_ON_BONUS - - show_enum_origins: typing.Optional[PayrollRunsListRequestShowEnumOrigins]. Which fields should be returned in non-normalized form. + - show_enum_origins: typing.Optional[PayrollRunsListRequestShowEnumOrigins]. A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) - started_after: typing.Optional[dt.datetime]. If provided, will only return payroll runs started after this datetime. @@ -94,25 +94,16 @@ def list( - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from merge.client import Merge - from merge.resources.hris import ( - PayrollRunsListRequestRemoteFields, - PayrollRunsListRequestRunType, - PayrollRunsListRequestShowEnumOrigins, - ) client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) - client.hris.payroll_runs.list( - remote_fields=PayrollRunsListRequestRemoteFields.RUN_STATE, - run_type=PayrollRunsListRequestRunType.CORRECTION, - show_enum_origins=PayrollRunsListRequestShowEnumOrigins.RUN_STATE, - ) + client.hris.payroll_runs.list() """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/hris/v1/payroll-runs"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "hris/v1/payroll-runs"), params=jsonable_encoder( remove_none_from_dict( { @@ -179,29 +170,23 @@ def retrieve( - remote_fields: typing.Optional[PayrollRunsRetrieveRequestRemoteFields]. Deprecated. Use show_enum_origins. - - show_enum_origins: typing.Optional[PayrollRunsRetrieveRequestShowEnumOrigins]. Which fields should be returned in non-normalized form. + - show_enum_origins: typing.Optional[PayrollRunsRetrieveRequestShowEnumOrigins]. A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from merge.client import Merge - from merge.resources.hris import ( - PayrollRunsRetrieveRequestRemoteFields, - PayrollRunsRetrieveRequestShowEnumOrigins, - ) client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) client.hris.payroll_runs.retrieve( - id="string", - remote_fields=PayrollRunsRetrieveRequestRemoteFields.RUN_STATE, - show_enum_origins=PayrollRunsRetrieveRequestShowEnumOrigins.RUN_STATE, + id="id", ) """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"api/hris/v1/payroll-runs/{id}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"hris/v1/payroll-runs/{id}"), params=jsonable_encoder( remove_none_from_dict( { @@ -297,7 +282,7 @@ async def list( - `CORRECTION` - CORRECTION - `TERMINATION` - TERMINATION - `SIGN_ON_BONUS` - SIGN_ON_BONUS - - show_enum_origins: typing.Optional[PayrollRunsListRequestShowEnumOrigins]. Which fields should be returned in non-normalized form. + - show_enum_origins: typing.Optional[PayrollRunsListRequestShowEnumOrigins]. A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) - started_after: typing.Optional[dt.datetime]. If provided, will only return payroll runs started after this datetime. @@ -306,25 +291,16 @@ async def list( - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from merge.client import AsyncMerge - from merge.resources.hris import ( - PayrollRunsListRequestRemoteFields, - PayrollRunsListRequestRunType, - PayrollRunsListRequestShowEnumOrigins, - ) client = AsyncMerge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) - await client.hris.payroll_runs.list( - remote_fields=PayrollRunsListRequestRemoteFields.RUN_STATE, - run_type=PayrollRunsListRequestRunType.CORRECTION, - show_enum_origins=PayrollRunsListRequestShowEnumOrigins.RUN_STATE, - ) + await client.hris.payroll_runs.list() """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/hris/v1/payroll-runs"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "hris/v1/payroll-runs"), params=jsonable_encoder( remove_none_from_dict( { @@ -391,29 +367,23 @@ async def retrieve( - remote_fields: typing.Optional[PayrollRunsRetrieveRequestRemoteFields]. Deprecated. Use show_enum_origins. - - show_enum_origins: typing.Optional[PayrollRunsRetrieveRequestShowEnumOrigins]. Which fields should be returned in non-normalized form. + - show_enum_origins: typing.Optional[PayrollRunsRetrieveRequestShowEnumOrigins]. A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from merge.client import AsyncMerge - from merge.resources.hris import ( - PayrollRunsRetrieveRequestRemoteFields, - PayrollRunsRetrieveRequestShowEnumOrigins, - ) client = AsyncMerge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) await client.hris.payroll_runs.retrieve( - id="string", - remote_fields=PayrollRunsRetrieveRequestRemoteFields.RUN_STATE, - show_enum_origins=PayrollRunsRetrieveRequestShowEnumOrigins.RUN_STATE, + id="id", ) """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"api/hris/v1/payroll-runs/{id}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"hris/v1/payroll-runs/{id}"), params=jsonable_encoder( remove_none_from_dict( { diff --git a/src/merge/resources/hris/resources/regenerate_key/client.py b/src/merge/resources/hris/resources/regenerate_key/client.py index ab603401..713e5fb3 100644 --- a/src/merge/resources/hris/resources/regenerate_key/client.py +++ b/src/merge/resources/hris/resources/regenerate_key/client.py @@ -29,7 +29,7 @@ def create(self, *, name: str, request_options: typing.Optional[RequestOptions] Exchange remote keys. Parameters: - - name: str. + - name: str. The name of the remote key - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- @@ -45,7 +45,7 @@ def create(self, *, name: str, request_options: typing.Optional[RequestOptions] """ _response = self._client_wrapper.httpx_client.request( "POST", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/hris/v1/regenerate-key"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "hris/v1/regenerate-key"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -85,7 +85,7 @@ async def create(self, *, name: str, request_options: typing.Optional[RequestOpt Exchange remote keys. Parameters: - - name: str. + - name: str. The name of the remote key - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- @@ -101,7 +101,7 @@ async def create(self, *, name: str, request_options: typing.Optional[RequestOpt """ _response = await self._client_wrapper.httpx_client.request( "POST", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/hris/v1/regenerate-key"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "hris/v1/regenerate-key"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), diff --git a/src/merge/resources/hris/resources/scopes/client.py b/src/merge/resources/hris/resources/scopes/client.py index bbd9033d..3a9acc2a 100644 --- a/src/merge/resources/hris/resources/scopes/client.py +++ b/src/merge/resources/hris/resources/scopes/client.py @@ -29,7 +29,7 @@ def default_scopes_retrieve( self, *, request_options: typing.Optional[RequestOptions] = None ) -> CommonModelScopeApi: """ - Get the default permissions for Merge Common Models and fields across all Linked Accounts of a given category. [Learn More](https://help.merge.dev/en/articles/8828211-common-model-and-field-scopes). + Get the default permissions for Merge Common Models and fields across all Linked Accounts of a given category. [Learn more](https://help.merge.dev/en/articles/8828211-common-model-and-field-scopes). Parameters: - request_options: typing.Optional[RequestOptions]. Request-specific configuration. @@ -44,7 +44,7 @@ def default_scopes_retrieve( """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/hris/v1/default-scopes"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "hris/v1/default-scopes"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -72,7 +72,7 @@ def linked_account_scopes_retrieve( self, *, request_options: typing.Optional[RequestOptions] = None ) -> CommonModelScopeApi: """ - Get all available permissions for Merge Common Models and fields for a single Linked Account. [Learn More](https://help.merge.dev/en/articles/8828211-common-model-and-field-scopes). + Get all available permissions for Merge Common Models and fields for a single Linked Account. [Learn more](https://help.merge.dev/en/articles/8828211-common-model-and-field-scopes). Parameters: - request_options: typing.Optional[RequestOptions]. Request-specific configuration. @@ -87,7 +87,7 @@ def linked_account_scopes_retrieve( """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/hris/v1/linked-account-scopes"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "hris/v1/linked-account-scopes"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -118,7 +118,7 @@ def linked_account_scopes_create( request_options: typing.Optional[RequestOptions] = None, ) -> CommonModelScopeApi: """ - Update permissions for any Common Model or field for a single Linked Account. Any Scopes not set in this POST request will inherit the default Scopes. [Learn More](https://help.merge.dev/en/articles/8828211-common-model-and-field-scopes) + Update permissions for any Common Model or field for a single Linked Account. Any Scopes not set in this POST request will inherit the default Scopes. [Learn more](https://help.merge.dev/en/articles/8828211-common-model-and-field-scopes) Parameters: - common_models: typing.List[IndividualCommonModelScopeDeserializerRequest]. The common models you want to update the scopes for @@ -126,18 +126,23 @@ def linked_account_scopes_create( - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from merge.client import Merge + from merge.resources.hris import IndividualCommonModelScopeDeserializerRequest client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) client.hris.scopes.linked_account_scopes_create( - common_models=[], + common_models=[ + IndividualCommonModelScopeDeserializerRequest( + model_name="model_name", + ) + ], ) """ _response = self._client_wrapper.httpx_client.request( "POST", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/hris/v1/linked-account-scopes"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "hris/v1/linked-account-scopes"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -176,7 +181,7 @@ async def default_scopes_retrieve( self, *, request_options: typing.Optional[RequestOptions] = None ) -> CommonModelScopeApi: """ - Get the default permissions for Merge Common Models and fields across all Linked Accounts of a given category. [Learn More](https://help.merge.dev/en/articles/8828211-common-model-and-field-scopes). + Get the default permissions for Merge Common Models and fields across all Linked Accounts of a given category. [Learn more](https://help.merge.dev/en/articles/8828211-common-model-and-field-scopes). Parameters: - request_options: typing.Optional[RequestOptions]. Request-specific configuration. @@ -191,7 +196,7 @@ async def default_scopes_retrieve( """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/hris/v1/default-scopes"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "hris/v1/default-scopes"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -219,7 +224,7 @@ async def linked_account_scopes_retrieve( self, *, request_options: typing.Optional[RequestOptions] = None ) -> CommonModelScopeApi: """ - Get all available permissions for Merge Common Models and fields for a single Linked Account. [Learn More](https://help.merge.dev/en/articles/8828211-common-model-and-field-scopes). + Get all available permissions for Merge Common Models and fields for a single Linked Account. [Learn more](https://help.merge.dev/en/articles/8828211-common-model-and-field-scopes). Parameters: - request_options: typing.Optional[RequestOptions]. Request-specific configuration. @@ -234,7 +239,7 @@ async def linked_account_scopes_retrieve( """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/hris/v1/linked-account-scopes"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "hris/v1/linked-account-scopes"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -265,7 +270,7 @@ async def linked_account_scopes_create( request_options: typing.Optional[RequestOptions] = None, ) -> CommonModelScopeApi: """ - Update permissions for any Common Model or field for a single Linked Account. Any Scopes not set in this POST request will inherit the default Scopes. [Learn More](https://help.merge.dev/en/articles/8828211-common-model-and-field-scopes) + Update permissions for any Common Model or field for a single Linked Account. Any Scopes not set in this POST request will inherit the default Scopes. [Learn more](https://help.merge.dev/en/articles/8828211-common-model-and-field-scopes) Parameters: - common_models: typing.List[IndividualCommonModelScopeDeserializerRequest]. The common models you want to update the scopes for @@ -273,18 +278,23 @@ async def linked_account_scopes_create( - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from merge.client import AsyncMerge + from merge.resources.hris import IndividualCommonModelScopeDeserializerRequest client = AsyncMerge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) await client.hris.scopes.linked_account_scopes_create( - common_models=[], + common_models=[ + IndividualCommonModelScopeDeserializerRequest( + model_name="model_name", + ) + ], ) """ _response = await self._client_wrapper.httpx_client.request( "POST", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/hris/v1/linked-account-scopes"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "hris/v1/linked-account-scopes"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), diff --git a/src/merge/resources/hris/resources/selective_sync/client.py b/src/merge/resources/hris/resources/selective_sync/client.py index a7b1dd36..44ef4f7b 100644 --- a/src/merge/resources/hris/resources/selective_sync/client.py +++ b/src/merge/resources/hris/resources/selective_sync/client.py @@ -45,9 +45,7 @@ def configurations_list( """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin( - f"{self._client_wrapper.get_base_url()}/", "api/hris/v1/selective-sync/configurations" - ), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "hris/v1/selective-sync/configurations"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -86,20 +84,23 @@ def configurations_update( - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from merge.client import Merge + from merge.resources.hris import LinkedAccountSelectiveSyncConfigurationRequest client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) client.hris.selective_sync.configurations_update( - sync_configurations=[], + sync_configurations=[ + LinkedAccountSelectiveSyncConfigurationRequest( + linked_account_conditions=[], + ) + ], ) """ _response = self._client_wrapper.httpx_client.request( "PUT", - urllib.parse.urljoin( - f"{self._client_wrapper.get_base_url()}/", "api/hris/v1/selective-sync/configurations" - ), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "hris/v1/selective-sync/configurations"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -159,7 +160,7 @@ def meta_list( """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/hris/v1/selective-sync/meta"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "hris/v1/selective-sync/meta"), params=jsonable_encoder( remove_none_from_dict( { @@ -218,9 +219,7 @@ async def configurations_list( """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin( - f"{self._client_wrapper.get_base_url()}/", "api/hris/v1/selective-sync/configurations" - ), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "hris/v1/selective-sync/configurations"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -259,20 +258,23 @@ async def configurations_update( - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from merge.client import AsyncMerge + from merge.resources.hris import LinkedAccountSelectiveSyncConfigurationRequest client = AsyncMerge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) await client.hris.selective_sync.configurations_update( - sync_configurations=[], + sync_configurations=[ + LinkedAccountSelectiveSyncConfigurationRequest( + linked_account_conditions=[], + ) + ], ) """ _response = await self._client_wrapper.httpx_client.request( "PUT", - urllib.parse.urljoin( - f"{self._client_wrapper.get_base_url()}/", "api/hris/v1/selective-sync/configurations" - ), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "hris/v1/selective-sync/configurations"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -332,7 +334,7 @@ async def meta_list( """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/hris/v1/selective-sync/meta"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "hris/v1/selective-sync/meta"), params=jsonable_encoder( remove_none_from_dict( { diff --git a/src/merge/resources/hris/resources/sync_status/client.py b/src/merge/resources/hris/resources/sync_status/client.py index 4163e98a..cf9f70e3 100644 --- a/src/merge/resources/hris/resources/sync_status/client.py +++ b/src/merge/resources/hris/resources/sync_status/client.py @@ -48,7 +48,7 @@ def list( """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/hris/v1/sync-status"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "hris/v1/sync-status"), params=jsonable_encoder( remove_none_from_dict( { @@ -114,7 +114,7 @@ async def list( """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/hris/v1/sync-status"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "hris/v1/sync-status"), params=jsonable_encoder( remove_none_from_dict( { diff --git a/src/merge/resources/hris/resources/teams/client.py b/src/merge/resources/hris/resources/teams/client.py index cd67093b..858e63d2 100644 --- a/src/merge/resources/hris/resources/teams/client.py +++ b/src/merge/resources/hris/resources/teams/client.py @@ -74,13 +74,11 @@ def list( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) - client.hris.teams.list( - expand="parent_team", - ) + client.hris.teams.list() """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/hris/v1/teams"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "hris/v1/teams"), params=jsonable_encoder( remove_none_from_dict( { @@ -150,13 +148,12 @@ def retrieve( api_key="YOUR_API_KEY", ) client.hris.teams.retrieve( - id="string", - expand="parent_team", + id="id", ) """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"api/hris/v1/teams/{id}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"hris/v1/teams/{id}"), params=jsonable_encoder( remove_none_from_dict( { @@ -245,13 +242,11 @@ async def list( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) - await client.hris.teams.list( - expand="parent_team", - ) + await client.hris.teams.list() """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/hris/v1/teams"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "hris/v1/teams"), params=jsonable_encoder( remove_none_from_dict( { @@ -321,13 +316,12 @@ async def retrieve( api_key="YOUR_API_KEY", ) await client.hris.teams.retrieve( - id="string", - expand="parent_team", + id="id", ) """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"api/hris/v1/teams/{id}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"hris/v1/teams/{id}"), params=jsonable_encoder( remove_none_from_dict( { diff --git a/src/merge/resources/hris/resources/time_off/client.py b/src/merge/resources/hris/resources/time_off/client.py index 48f34da5..d4df3c25 100644 --- a/src/merge/resources/hris/resources/time_off/client.py +++ b/src/merge/resources/hris/resources/time_off/client.py @@ -105,7 +105,7 @@ def list( - `JURY_DUTY` - JURY_DUTY - `VOLUNTEER` - VOLUNTEER - `BEREAVEMENT` - BEREAVEMENT - - show_enum_origins: typing.Optional[TimeOffListRequestShowEnumOrigins]. Which fields should be returned in non-normalized form. + - show_enum_origins: typing.Optional[TimeOffListRequestShowEnumOrigins]. A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) - started_after: typing.Optional[dt.datetime]. If provided, will only return time-offs that started after this datetime. @@ -121,29 +121,16 @@ def list( - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from merge.client import Merge - from merge.resources.hris import ( - TimeOffListRequestExpand, - TimeOffListRequestRemoteFields, - TimeOffListRequestRequestType, - TimeOffListRequestShowEnumOrigins, - TimeOffListRequestStatus, - ) client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) - client.hris.time_off.list( - expand=TimeOffListRequestExpand.APPROVER, - remote_fields=TimeOffListRequestRemoteFields.REQUEST_TYPE, - request_type=TimeOffListRequestRequestType.BEREAVEMENT, - show_enum_origins=TimeOffListRequestShowEnumOrigins.REQUEST_TYPE, - status=TimeOffListRequestStatus.APPROVED, - ) + client.hris.time_off.list() """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/hris/v1/time-off"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "hris/v1/time-off"), params=jsonable_encoder( remove_none_from_dict( { @@ -215,8 +202,6 @@ def create( - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- - import datetime - from merge.client import Merge from merge.resources.hris import TimeOffRequest @@ -225,21 +210,12 @@ def create( api_key="YOUR_API_KEY", ) client.hris.time_off.create( - model=TimeOffRequest( - employee_note="Moving into the new apartment Kendall Roy gave me!", - amount=3.0, - start_time=datetime.datetime.fromisoformat( - "2020-11-10 00:00:00+00:00", - ), - end_time=datetime.datetime.fromisoformat( - "2020-11-17 00:00:00+00:00", - ), - ), + model=TimeOffRequest(), ) """ _response = self._client_wrapper.httpx_client.request( "POST", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/hris/v1/time-off"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "hris/v1/time-off"), params=jsonable_encoder( remove_none_from_dict( { @@ -301,31 +277,23 @@ def retrieve( - remote_fields: typing.Optional[TimeOffRetrieveRequestRemoteFields]. Deprecated. Use show_enum_origins. - - show_enum_origins: typing.Optional[TimeOffRetrieveRequestShowEnumOrigins]. Which fields should be returned in non-normalized form. + - show_enum_origins: typing.Optional[TimeOffRetrieveRequestShowEnumOrigins]. A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from merge.client import Merge - from merge.resources.hris import ( - TimeOffRetrieveRequestExpand, - TimeOffRetrieveRequestRemoteFields, - TimeOffRetrieveRequestShowEnumOrigins, - ) client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) client.hris.time_off.retrieve( - id="string", - expand=TimeOffRetrieveRequestExpand.APPROVER, - remote_fields=TimeOffRetrieveRequestRemoteFields.REQUEST_TYPE, - show_enum_origins=TimeOffRetrieveRequestShowEnumOrigins.REQUEST_TYPE, + id="id", ) """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"api/hris/v1/time-off/{id}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"hris/v1/time-off/{id}"), params=jsonable_encoder( remove_none_from_dict( { @@ -378,7 +346,7 @@ def meta_post_retrieve(self, *, request_options: typing.Optional[RequestOptions] """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/hris/v1/time-off/meta/post"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "hris/v1/time-off/meta/post"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -474,7 +442,7 @@ async def list( - `JURY_DUTY` - JURY_DUTY - `VOLUNTEER` - VOLUNTEER - `BEREAVEMENT` - BEREAVEMENT - - show_enum_origins: typing.Optional[TimeOffListRequestShowEnumOrigins]. Which fields should be returned in non-normalized form. + - show_enum_origins: typing.Optional[TimeOffListRequestShowEnumOrigins]. A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) - started_after: typing.Optional[dt.datetime]. If provided, will only return time-offs that started after this datetime. @@ -490,29 +458,16 @@ async def list( - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from merge.client import AsyncMerge - from merge.resources.hris import ( - TimeOffListRequestExpand, - TimeOffListRequestRemoteFields, - TimeOffListRequestRequestType, - TimeOffListRequestShowEnumOrigins, - TimeOffListRequestStatus, - ) client = AsyncMerge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) - await client.hris.time_off.list( - expand=TimeOffListRequestExpand.APPROVER, - remote_fields=TimeOffListRequestRemoteFields.REQUEST_TYPE, - request_type=TimeOffListRequestRequestType.BEREAVEMENT, - show_enum_origins=TimeOffListRequestShowEnumOrigins.REQUEST_TYPE, - status=TimeOffListRequestStatus.APPROVED, - ) + await client.hris.time_off.list() """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/hris/v1/time-off"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "hris/v1/time-off"), params=jsonable_encoder( remove_none_from_dict( { @@ -584,8 +539,6 @@ async def create( - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- - import datetime - from merge.client import AsyncMerge from merge.resources.hris import TimeOffRequest @@ -594,21 +547,12 @@ async def create( api_key="YOUR_API_KEY", ) await client.hris.time_off.create( - model=TimeOffRequest( - employee_note="Moving into the new apartment Kendall Roy gave me!", - amount=3.0, - start_time=datetime.datetime.fromisoformat( - "2020-11-10 00:00:00+00:00", - ), - end_time=datetime.datetime.fromisoformat( - "2020-11-17 00:00:00+00:00", - ), - ), + model=TimeOffRequest(), ) """ _response = await self._client_wrapper.httpx_client.request( "POST", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/hris/v1/time-off"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "hris/v1/time-off"), params=jsonable_encoder( remove_none_from_dict( { @@ -670,31 +614,23 @@ async def retrieve( - remote_fields: typing.Optional[TimeOffRetrieveRequestRemoteFields]. Deprecated. Use show_enum_origins. - - show_enum_origins: typing.Optional[TimeOffRetrieveRequestShowEnumOrigins]. Which fields should be returned in non-normalized form. + - show_enum_origins: typing.Optional[TimeOffRetrieveRequestShowEnumOrigins]. A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from merge.client import AsyncMerge - from merge.resources.hris import ( - TimeOffRetrieveRequestExpand, - TimeOffRetrieveRequestRemoteFields, - TimeOffRetrieveRequestShowEnumOrigins, - ) client = AsyncMerge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) await client.hris.time_off.retrieve( - id="string", - expand=TimeOffRetrieveRequestExpand.APPROVER, - remote_fields=TimeOffRetrieveRequestRemoteFields.REQUEST_TYPE, - show_enum_origins=TimeOffRetrieveRequestShowEnumOrigins.REQUEST_TYPE, + id="id", ) """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"api/hris/v1/time-off/{id}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"hris/v1/time-off/{id}"), params=jsonable_encoder( remove_none_from_dict( { @@ -747,7 +683,7 @@ async def meta_post_retrieve(self, *, request_options: typing.Optional[RequestOp """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/hris/v1/time-off/meta/post"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "hris/v1/time-off/meta/post"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), diff --git a/src/merge/resources/hris/resources/time_off_balances/client.py b/src/merge/resources/hris/resources/time_off_balances/client.py index 4b2152aa..cfbf08cf 100644 --- a/src/merge/resources/hris/resources/time_off_balances/client.py +++ b/src/merge/resources/hris/resources/time_off_balances/client.py @@ -80,27 +80,21 @@ def list( - remote_id: typing.Optional[str]. The API provider's ID for the given object. - - show_enum_origins: typing.Optional[typing.Literal["policy_type"]]. Which fields should be returned in non-normalized form. + - show_enum_origins: typing.Optional[typing.Literal["policy_type"]]. A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from merge.client import Merge - from merge.resources.hris import TimeOffBalancesListRequestPolicyType client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) - client.hris.time_off_balances.list( - expand="employee", - policy_type=TimeOffBalancesListRequestPolicyType.BEREAVEMENT, - remote_fields="policy_type", - show_enum_origins="policy_type", - ) + client.hris.time_off_balances.list() """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/hris/v1/time-off-balances"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "hris/v1/time-off-balances"), params=jsonable_encoder( remove_none_from_dict( { @@ -168,7 +162,7 @@ def retrieve( - remote_fields: typing.Optional[typing.Literal["policy_type"]]. Deprecated. Use show_enum_origins. - - show_enum_origins: typing.Optional[typing.Literal["policy_type"]]. Which fields should be returned in non-normalized form. + - show_enum_origins: typing.Optional[typing.Literal["policy_type"]]. A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- @@ -179,15 +173,12 @@ def retrieve( api_key="YOUR_API_KEY", ) client.hris.time_off_balances.retrieve( - id="string", - expand="employee", - remote_fields="policy_type", - show_enum_origins="policy_type", + id="id", ) """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"api/hris/v1/time-off-balances/{id}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"hris/v1/time-off-balances/{id}"), params=jsonable_encoder( remove_none_from_dict( { @@ -283,27 +274,21 @@ async def list( - remote_id: typing.Optional[str]. The API provider's ID for the given object. - - show_enum_origins: typing.Optional[typing.Literal["policy_type"]]. Which fields should be returned in non-normalized form. + - show_enum_origins: typing.Optional[typing.Literal["policy_type"]]. A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from merge.client import AsyncMerge - from merge.resources.hris import TimeOffBalancesListRequestPolicyType client = AsyncMerge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) - await client.hris.time_off_balances.list( - expand="employee", - policy_type=TimeOffBalancesListRequestPolicyType.BEREAVEMENT, - remote_fields="policy_type", - show_enum_origins="policy_type", - ) + await client.hris.time_off_balances.list() """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/hris/v1/time-off-balances"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "hris/v1/time-off-balances"), params=jsonable_encoder( remove_none_from_dict( { @@ -371,7 +356,7 @@ async def retrieve( - remote_fields: typing.Optional[typing.Literal["policy_type"]]. Deprecated. Use show_enum_origins. - - show_enum_origins: typing.Optional[typing.Literal["policy_type"]]. Which fields should be returned in non-normalized form. + - show_enum_origins: typing.Optional[typing.Literal["policy_type"]]. A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- @@ -382,15 +367,12 @@ async def retrieve( api_key="YOUR_API_KEY", ) await client.hris.time_off_balances.retrieve( - id="string", - expand="employee", - remote_fields="policy_type", - show_enum_origins="policy_type", + id="id", ) """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"api/hris/v1/time-off-balances/{id}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"hris/v1/time-off-balances/{id}"), params=jsonable_encoder( remove_none_from_dict( { diff --git a/src/merge/resources/hris/resources/timesheet_entries/client.py b/src/merge/resources/hris/resources/timesheet_entries/client.py index 8fe2a3b5..e1d5a746 100644 --- a/src/merge/resources/hris/resources/timesheet_entries/client.py +++ b/src/merge/resources/hris/resources/timesheet_entries/client.py @@ -88,19 +88,16 @@ def list( - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from merge.client import Merge - from merge.resources.hris import TimesheetEntriesListRequestOrderBy client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) - client.hris.timesheet_entries.list( - order_by=TimesheetEntriesListRequestOrderBy.START_TIME, - ) + client.hris.timesheet_entries.list() """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/hris/v1/timesheet-entries"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "hris/v1/timesheet-entries"), params=jsonable_encoder( remove_none_from_dict( { @@ -167,8 +164,6 @@ def create( - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- - import datetime - from merge.client import Merge from merge.resources.hris import TimesheetEntryRequest @@ -177,21 +172,12 @@ def create( api_key="YOUR_API_KEY", ) client.hris.timesheet_entries.create( - model=TimesheetEntryRequest( - employee="d2f972d0-2526-434b-9409-4c3b468e08f0", - hours_worked=10.0, - start_time=datetime.datetime.fromisoformat( - "2020-11-10 00:00:00+00:00", - ), - end_time=datetime.datetime.fromisoformat( - "2020-11-10 00:10:00+00:00", - ), - ), + model=TimesheetEntryRequest(), ) """ _response = self._client_wrapper.httpx_client.request( "POST", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/hris/v1/timesheet-entries"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "hris/v1/timesheet-entries"), params=jsonable_encoder( remove_none_from_dict( { @@ -255,12 +241,12 @@ def retrieve( api_key="YOUR_API_KEY", ) client.hris.timesheet_entries.retrieve( - id="string", + id="id", ) """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"api/hris/v1/timesheet-entries/{id}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"hris/v1/timesheet-entries/{id}"), params=jsonable_encoder( remove_none_from_dict( { @@ -310,7 +296,7 @@ def meta_post_retrieve(self, *, request_options: typing.Optional[RequestOptions] """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/hris/v1/timesheet-entries/meta/post"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "hris/v1/timesheet-entries/meta/post"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -396,19 +382,16 @@ async def list( - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from merge.client import AsyncMerge - from merge.resources.hris import TimesheetEntriesListRequestOrderBy client = AsyncMerge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) - await client.hris.timesheet_entries.list( - order_by=TimesheetEntriesListRequestOrderBy.START_TIME, - ) + await client.hris.timesheet_entries.list() """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/hris/v1/timesheet-entries"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "hris/v1/timesheet-entries"), params=jsonable_encoder( remove_none_from_dict( { @@ -475,8 +458,6 @@ async def create( - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- - import datetime - from merge.client import AsyncMerge from merge.resources.hris import TimesheetEntryRequest @@ -485,21 +466,12 @@ async def create( api_key="YOUR_API_KEY", ) await client.hris.timesheet_entries.create( - model=TimesheetEntryRequest( - employee="d2f972d0-2526-434b-9409-4c3b468e08f0", - hours_worked=10.0, - start_time=datetime.datetime.fromisoformat( - "2020-11-10 00:00:00+00:00", - ), - end_time=datetime.datetime.fromisoformat( - "2020-11-10 00:10:00+00:00", - ), - ), + model=TimesheetEntryRequest(), ) """ _response = await self._client_wrapper.httpx_client.request( "POST", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/hris/v1/timesheet-entries"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "hris/v1/timesheet-entries"), params=jsonable_encoder( remove_none_from_dict( { @@ -563,12 +535,12 @@ async def retrieve( api_key="YOUR_API_KEY", ) await client.hris.timesheet_entries.retrieve( - id="string", + id="id", ) """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"api/hris/v1/timesheet-entries/{id}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"hris/v1/timesheet-entries/{id}"), params=jsonable_encoder( remove_none_from_dict( { @@ -618,7 +590,7 @@ async def meta_post_retrieve(self, *, request_options: typing.Optional[RequestOp """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/hris/v1/timesheet-entries/meta/post"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "hris/v1/timesheet-entries/meta/post"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), diff --git a/src/merge/resources/hris/resources/webhook_receivers/client.py b/src/merge/resources/hris/resources/webhook_receivers/client.py index d2544011..9684e639 100644 --- a/src/merge/resources/hris/resources/webhook_receivers/client.py +++ b/src/merge/resources/hris/resources/webhook_receivers/client.py @@ -41,7 +41,7 @@ def list(self, *, request_options: typing.Optional[RequestOptions] = None) -> ty """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/hris/v1/webhook-receivers"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "hris/v1/webhook-receivers"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -92,7 +92,7 @@ def create( api_key="YOUR_API_KEY", ) client.hris.webhook_receivers.create( - event="string", + event="event", is_active=True, ) """ @@ -101,7 +101,7 @@ def create( _request["key"] = key _response = self._client_wrapper.httpx_client.request( "POST", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/hris/v1/webhook-receivers"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "hris/v1/webhook-receivers"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -153,7 +153,7 @@ async def list(self, *, request_options: typing.Optional[RequestOptions] = None) """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/hris/v1/webhook-receivers"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "hris/v1/webhook-receivers"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -204,7 +204,7 @@ async def create( api_key="YOUR_API_KEY", ) await client.hris.webhook_receivers.create( - event="string", + event="event", is_active=True, ) """ @@ -213,7 +213,7 @@ async def create( _request["key"] = key _response = await self._client_wrapper.httpx_client.request( "POST", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/hris/v1/webhook-receivers"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "hris/v1/webhook-receivers"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), diff --git a/src/merge/resources/hris/types/account_details_and_actions.py b/src/merge/resources/hris/types/account_details_and_actions.py index fda4a3a9..8141e146 100644 --- a/src/merge/resources/hris/types/account_details_and_actions.py +++ b/src/merge/resources/hris/types/account_details_and_actions.py @@ -34,6 +34,9 @@ class AccountDetailsAndActions(pydantic.BaseModel): end_user_origin_id: typing.Optional[str] end_user_organization_name: str end_user_email_address: str + subdomain: typing.Optional[str] = pydantic.Field( + description="The tenant or domain the customer has provided access to." + ) webhook_listener_url: str is_duplicate: typing.Optional[bool] = pydantic.Field( description="Whether a Production Linked Account's credentials match another existing Production Linked Account. This field is `null` for Test Linked Accounts, incomplete Production Linked Accounts, and ignored duplicate Production Linked Account sets." diff --git a/src/merge/resources/hris/types/audit_log_event.py b/src/merge/resources/hris/types/audit_log_event.py index 7bb2d3c6..131ad94b 100644 --- a/src/merge/resources/hris/types/audit_log_event.py +++ b/src/merge/resources/hris/types/audit_log_event.py @@ -69,6 +69,9 @@ class AuditLogEvent(pydantic.BaseModel): "- `CHANGED_LINKED_ACCOUNT_FIELD_MAPPING` - CHANGED_LINKED_ACCOUNT_FIELD_MAPPING\n" "- `DELETED_INTEGRATION_WIDE_FIELD_MAPPING` - DELETED_INTEGRATION_WIDE_FIELD_MAPPING\n" "- `DELETED_LINKED_ACCOUNT_FIELD_MAPPING` - DELETED_LINKED_ACCOUNT_FIELD_MAPPING\n" + "- `FORCED_LINKED_ACCOUNT_RESYNC` - FORCED_LINKED_ACCOUNT_RESYNC\n" + "- `MUTED_ISSUE` - MUTED_ISSUE\n" + "- `GENERATED_MAGIC_LINK` - GENERATED_MAGIC_LINK\n" ) ) event_description: str diff --git a/src/merge/resources/hris/types/bank_info.py b/src/merge/resources/hris/types/bank_info.py index 5d00c6ab..331d9d36 100644 --- a/src/merge/resources/hris/types/bank_info.py +++ b/src/merge/resources/hris/types/bank_info.py @@ -29,6 +29,10 @@ class BankInfo(pydantic.BaseModel): id: typing.Optional[str] remote_id: typing.Optional[str] = pydantic.Field(description="The third-party API ID of the matching object.") + created_at: typing.Optional[dt.datetime] + modified_at: typing.Optional[dt.datetime] = pydantic.Field( + description="This is the datetime that this object was last updated by Merge" + ) employee: typing.Optional[BankInfoEmployee] = pydantic.Field(description="The employee with this bank account.") account_number: typing.Optional[str] = pydantic.Field(description="The account number.") routing_number: typing.Optional[str] = pydantic.Field(description="The routing number.") @@ -42,10 +46,6 @@ class BankInfo(pydantic.BaseModel): remote_was_deleted: typing.Optional[bool] = pydantic.Field( description="Indicates whether or not this object has been deleted in the third party platform." ) - created_at: typing.Optional[dt.datetime] - modified_at: typing.Optional[dt.datetime] = pydantic.Field( - description="This is the datetime that this object was last updated by Merge" - ) field_mappings: typing.Optional[typing.Dict[str, typing.Any]] remote_data: typing.Optional[typing.List[RemoteData]] diff --git a/src/merge/resources/hris/types/benefit.py b/src/merge/resources/hris/types/benefit.py index 9612e7b8..18d2d031 100644 --- a/src/merge/resources/hris/types/benefit.py +++ b/src/merge/resources/hris/types/benefit.py @@ -28,6 +28,10 @@ class Benefit(pydantic.BaseModel): id: typing.Optional[str] remote_id: typing.Optional[str] = pydantic.Field(description="The third-party API ID of the matching object.") + created_at: typing.Optional[dt.datetime] + modified_at: typing.Optional[dt.datetime] = pydantic.Field( + description="This is the datetime that this object was last updated by Merge" + ) employee: typing.Optional[BenefitEmployee] = pydantic.Field(description="The employee on the plan.") provider_name: typing.Optional[str] = pydantic.Field(description="The name of the benefit provider.") benefit_plan_type: typing.Optional[str] = pydantic.Field(description="The type of benefit plan") @@ -41,10 +45,6 @@ class Benefit(pydantic.BaseModel): employer_benefit: typing.Optional[str] = pydantic.Field( description="The employer benefit plan the employee is enrolled in." ) - created_at: typing.Optional[dt.datetime] - modified_at: typing.Optional[dt.datetime] = pydantic.Field( - description="This is the datetime that this object was last updated by Merge" - ) field_mappings: typing.Optional[typing.Dict[str, typing.Any]] remote_data: typing.Optional[typing.List[RemoteData]] diff --git a/src/merge/resources/hris/types/company.py b/src/merge/resources/hris/types/company.py index 0d0c60b8..c12455ff 100644 --- a/src/merge/resources/hris/types/company.py +++ b/src/merge/resources/hris/types/company.py @@ -27,6 +27,10 @@ class Company(pydantic.BaseModel): id: typing.Optional[str] remote_id: typing.Optional[str] = pydantic.Field(description="The third-party API ID of the matching object.") + created_at: typing.Optional[dt.datetime] + modified_at: typing.Optional[dt.datetime] = pydantic.Field( + description="This is the datetime that this object was last updated by Merge" + ) legal_name: typing.Optional[str] = pydantic.Field(description="The company's legal name.") display_name: typing.Optional[str] = pydantic.Field(description="The company's display name.") eins: typing.Optional[typing.List[typing.Optional[str]]] = pydantic.Field( @@ -35,10 +39,6 @@ class Company(pydantic.BaseModel): remote_was_deleted: typing.Optional[bool] = pydantic.Field( description="Indicates whether or not this object has been deleted in the third party platform." ) - created_at: typing.Optional[dt.datetime] - modified_at: typing.Optional[dt.datetime] = pydantic.Field( - description="This is the datetime that this object was last updated by Merge" - ) field_mappings: typing.Optional[typing.Dict[str, typing.Any]] remote_data: typing.Optional[typing.List[RemoteData]] diff --git a/src/merge/resources/hris/types/condition_schema.py b/src/merge/resources/hris/types/condition_schema.py index 7ebf9534..c8aebb68 100644 --- a/src/merge/resources/hris/types/condition_schema.py +++ b/src/merge/resources/hris/types/condition_schema.py @@ -20,12 +20,8 @@ class ConditionSchema(pydantic.BaseModel): common_model: typing.Optional[str] = pydantic.Field( description="The common model for which a condition schema is defined." ) - native_name: typing.Optional[str] = pydantic.Field( - description='User-facing _native condition_ name. e.g. "Skip Manager".' - ) - field_name: typing.Optional[str] = pydantic.Field( - description='The name of the field on the common model that this condition corresponds to, if they conceptually match. e.g. "location_type".' - ) + native_name: typing.Optional[str] + field_name: typing.Optional[str] is_unique: typing.Optional[bool] = pydantic.Field( description="Whether this condition can only be applied once. If false, the condition can be AND'd together multiple times." ) diff --git a/src/merge/resources/hris/types/data_passthrough_request.py b/src/merge/resources/hris/types/data_passthrough_request.py index 3acebedd..def5b5c2 100644 --- a/src/merge/resources/hris/types/data_passthrough_request.py +++ b/src/merge/resources/hris/types/data_passthrough_request.py @@ -28,9 +28,13 @@ class DataPassthroughRequest(pydantic.BaseModel): """ method: MethodEnum - path: str - base_url_override: typing.Optional[str] - data: typing.Optional[str] + path: str = pydantic.Field(description="The path of the request in the third party's platform.") + base_url_override: typing.Optional[str] = pydantic.Field( + description="An optional override of the third party's base url for the request." + ) + data: typing.Optional[str] = pydantic.Field( + description="The data with the request. You must include a `request_format` parameter matching the data's format" + ) multipart_form_data: typing.Optional[typing.List[MultipartFormFieldRequest]] = pydantic.Field( description="Pass an array of `MultipartFormField` objects in here instead of using the `data` param if `request_format` is set to `MULTIPART`." ) diff --git a/src/merge/resources/hris/types/deduction.py b/src/merge/resources/hris/types/deduction.py index c54e0d27..cfb7700e 100644 --- a/src/merge/resources/hris/types/deduction.py +++ b/src/merge/resources/hris/types/deduction.py @@ -27,6 +27,10 @@ class Deduction(pydantic.BaseModel): id: typing.Optional[str] remote_id: typing.Optional[str] = pydantic.Field(description="The third-party API ID of the matching object.") + created_at: typing.Optional[dt.datetime] + modified_at: typing.Optional[dt.datetime] = pydantic.Field( + description="This is the datetime that this object was last updated by Merge" + ) employee_payroll_run: typing.Optional[str] name: typing.Optional[str] = pydantic.Field(description="The deduction's name.") employee_deduction: typing.Optional[float] = pydantic.Field( @@ -38,10 +42,6 @@ class Deduction(pydantic.BaseModel): remote_was_deleted: typing.Optional[bool] = pydantic.Field( description="Indicates whether or not this object has been deleted in the third party platform." ) - created_at: typing.Optional[dt.datetime] - modified_at: typing.Optional[dt.datetime] = pydantic.Field( - description="This is the datetime that this object was last updated by Merge" - ) field_mappings: typing.Optional[typing.Dict[str, typing.Any]] remote_data: typing.Optional[typing.List[RemoteData]] diff --git a/src/merge/resources/hris/types/dependent.py b/src/merge/resources/hris/types/dependent.py index d01829f5..78b7ce65 100644 --- a/src/merge/resources/hris/types/dependent.py +++ b/src/merge/resources/hris/types/dependent.py @@ -29,6 +29,10 @@ class Dependent(pydantic.BaseModel): id: typing.Optional[str] remote_id: typing.Optional[str] = pydantic.Field(description="The third-party API ID of the matching object.") + created_at: typing.Optional[dt.datetime] + modified_at: typing.Optional[dt.datetime] = pydantic.Field( + description="This is the datetime that this object was last updated by Merge" + ) first_name: typing.Optional[str] = pydantic.Field(description="The dependents's first name.") middle_name: typing.Optional[str] = pydantic.Field(description="The dependents's middle name.") last_name: typing.Optional[str] = pydantic.Field(description="The dependents's last name.") @@ -61,10 +65,6 @@ class Dependent(pydantic.BaseModel): remote_was_deleted: typing.Optional[bool] = pydantic.Field( description="Indicates whether or not this object has been deleted in the third party platform." ) - created_at: typing.Optional[dt.datetime] - modified_at: typing.Optional[dt.datetime] = pydantic.Field( - description="This is the datetime that this object was last updated by Merge" - ) field_mappings: typing.Optional[typing.Dict[str, typing.Any]] remote_data: typing.Optional[typing.List[RemoteData]] diff --git a/src/merge/resources/hris/types/earning.py b/src/merge/resources/hris/types/earning.py index 9d21337c..de0c4f33 100644 --- a/src/merge/resources/hris/types/earning.py +++ b/src/merge/resources/hris/types/earning.py @@ -28,6 +28,10 @@ class Earning(pydantic.BaseModel): id: typing.Optional[str] remote_id: typing.Optional[str] = pydantic.Field(description="The third-party API ID of the matching object.") + created_at: typing.Optional[dt.datetime] + modified_at: typing.Optional[dt.datetime] = pydantic.Field( + description="This is the datetime that this object was last updated by Merge" + ) employee_payroll_run: typing.Optional[str] amount: typing.Optional[float] = pydantic.Field(description="The amount earned.") type: typing.Optional[EarningType] = pydantic.Field( @@ -43,10 +47,6 @@ class Earning(pydantic.BaseModel): remote_was_deleted: typing.Optional[bool] = pydantic.Field( description="Indicates whether or not this object has been deleted in the third party platform." ) - created_at: typing.Optional[dt.datetime] - modified_at: typing.Optional[dt.datetime] = pydantic.Field( - description="This is the datetime that this object was last updated by Merge" - ) field_mappings: typing.Optional[typing.Dict[str, typing.Any]] remote_data: typing.Optional[typing.List[RemoteData]] diff --git a/src/merge/resources/hris/types/employee.py b/src/merge/resources/hris/types/employee.py index d22a0c2a..43559cf3 100644 --- a/src/merge/resources/hris/types/employee.py +++ b/src/merge/resources/hris/types/employee.py @@ -39,6 +39,10 @@ class Employee(pydantic.BaseModel): id: typing.Optional[str] remote_id: typing.Optional[str] = pydantic.Field(description="The third-party API ID of the matching object.") + created_at: typing.Optional[dt.datetime] + modified_at: typing.Optional[dt.datetime] = pydantic.Field( + description="This is the datetime that this object was last updated by Merge" + ) employee_number: typing.Optional[str] = pydantic.Field( description="The employee's number that appears in the third-party integration's UI." ) @@ -126,10 +130,6 @@ class Employee(pydantic.BaseModel): description="Custom fields configured for a given model." ) remote_was_deleted: typing.Optional[bool] - created_at: typing.Optional[dt.datetime] - modified_at: typing.Optional[dt.datetime] = pydantic.Field( - description="This is the datetime that this object was last updated by Merge" - ) field_mappings: typing.Optional[typing.Dict[str, typing.Any]] remote_data: typing.Optional[typing.List[RemoteData]] diff --git a/src/merge/resources/hris/types/employee_payroll_run.py b/src/merge/resources/hris/types/employee_payroll_run.py index 7a136007..af88e707 100644 --- a/src/merge/resources/hris/types/employee_payroll_run.py +++ b/src/merge/resources/hris/types/employee_payroll_run.py @@ -32,6 +32,10 @@ class EmployeePayrollRun(pydantic.BaseModel): id: typing.Optional[str] remote_id: typing.Optional[str] = pydantic.Field(description="The third-party API ID of the matching object.") + created_at: typing.Optional[dt.datetime] + modified_at: typing.Optional[dt.datetime] = pydantic.Field( + description="This is the datetime that this object was last updated by Merge" + ) employee: typing.Optional[EmployeePayrollRunEmployee] = pydantic.Field( description="The employee whose payroll is being run." ) @@ -53,10 +57,6 @@ class EmployeePayrollRun(pydantic.BaseModel): remote_was_deleted: typing.Optional[bool] = pydantic.Field( description="Indicates whether or not this object has been deleted in the third party platform." ) - created_at: typing.Optional[dt.datetime] - modified_at: typing.Optional[dt.datetime] = pydantic.Field( - description="This is the datetime that this object was last updated by Merge" - ) field_mappings: typing.Optional[typing.Dict[str, typing.Any]] remote_data: typing.Optional[typing.List[RemoteData]] diff --git a/src/merge/resources/hris/types/employer_benefit.py b/src/merge/resources/hris/types/employer_benefit.py index 77ec412a..e82bac4f 100644 --- a/src/merge/resources/hris/types/employer_benefit.py +++ b/src/merge/resources/hris/types/employer_benefit.py @@ -27,6 +27,10 @@ class EmployerBenefit(pydantic.BaseModel): id: typing.Optional[str] remote_id: typing.Optional[str] = pydantic.Field(description="The third-party API ID of the matching object.") + created_at: typing.Optional[dt.datetime] + modified_at: typing.Optional[dt.datetime] = pydantic.Field( + description="This is the datetime that this object was last updated by Merge" + ) benefit_plan_type: typing.Optional[EmployerBenefitBenefitPlanType] = pydantic.Field( description=( "The type of benefit plan.\n" @@ -46,10 +50,6 @@ class EmployerBenefit(pydantic.BaseModel): remote_was_deleted: typing.Optional[bool] = pydantic.Field( description="Indicates whether or not this object has been deleted in the third party platform." ) - created_at: typing.Optional[dt.datetime] - modified_at: typing.Optional[dt.datetime] = pydantic.Field( - description="This is the datetime that this object was last updated by Merge" - ) field_mappings: typing.Optional[typing.Dict[str, typing.Any]] remote_data: typing.Optional[typing.List[typing.Optional[typing.Dict[str, typing.Any]]]] diff --git a/src/merge/resources/hris/types/employment.py b/src/merge/resources/hris/types/employment.py index 8a2ddd48..cd92fe9f 100644 --- a/src/merge/resources/hris/types/employment.py +++ b/src/merge/resources/hris/types/employment.py @@ -37,6 +37,10 @@ class Employment(pydantic.BaseModel): id: typing.Optional[str] remote_id: typing.Optional[str] = pydantic.Field(description="The third-party API ID of the matching object.") + created_at: typing.Optional[dt.datetime] + modified_at: typing.Optional[dt.datetime] = pydantic.Field( + description="This is the datetime that this object was last updated by Merge" + ) employee: typing.Optional[EmploymentEmployee] = pydantic.Field(description="The employee holding this position.") job_title: typing.Optional[str] = pydantic.Field(description="The position's title.") pay_rate: typing.Optional[float] = pydantic.Field(description="The position's pay rate in dollars.") @@ -408,10 +412,6 @@ class Employment(pydantic.BaseModel): remote_was_deleted: typing.Optional[bool] = pydantic.Field( description="Indicates whether or not this object has been deleted in the third party platform." ) - created_at: typing.Optional[dt.datetime] - modified_at: typing.Optional[dt.datetime] = pydantic.Field( - description="This is the datetime that this object was last updated by Merge" - ) field_mappings: typing.Optional[typing.Dict[str, typing.Any]] remote_data: typing.Optional[typing.List[RemoteData]] diff --git a/src/merge/resources/hris/types/event_type_enum.py b/src/merge/resources/hris/types/event_type_enum.py index 5ed5b7f1..434539c7 100644 --- a/src/merge/resources/hris/types/event_type_enum.py +++ b/src/merge/resources/hris/types/event_type_enum.py @@ -39,6 +39,9 @@ class EventTypeEnum(str, enum.Enum): - `CHANGED_LINKED_ACCOUNT_FIELD_MAPPING` - CHANGED_LINKED_ACCOUNT_FIELD_MAPPING - `DELETED_INTEGRATION_WIDE_FIELD_MAPPING` - DELETED_INTEGRATION_WIDE_FIELD_MAPPING - `DELETED_LINKED_ACCOUNT_FIELD_MAPPING` - DELETED_LINKED_ACCOUNT_FIELD_MAPPING + - `FORCED_LINKED_ACCOUNT_RESYNC` - FORCED_LINKED_ACCOUNT_RESYNC + - `MUTED_ISSUE` - MUTED_ISSUE + - `GENERATED_MAGIC_LINK` - GENERATED_MAGIC_LINK """ CREATED_REMOTE_PRODUCTION_API_KEY = "CREATED_REMOTE_PRODUCTION_API_KEY" @@ -72,6 +75,9 @@ class EventTypeEnum(str, enum.Enum): CHANGED_LINKED_ACCOUNT_FIELD_MAPPING = "CHANGED_LINKED_ACCOUNT_FIELD_MAPPING" DELETED_INTEGRATION_WIDE_FIELD_MAPPING = "DELETED_INTEGRATION_WIDE_FIELD_MAPPING" DELETED_LINKED_ACCOUNT_FIELD_MAPPING = "DELETED_LINKED_ACCOUNT_FIELD_MAPPING" + FORCED_LINKED_ACCOUNT_RESYNC = "FORCED_LINKED_ACCOUNT_RESYNC" + MUTED_ISSUE = "MUTED_ISSUE" + GENERATED_MAGIC_LINK = "GENERATED_MAGIC_LINK" def visit( self, @@ -106,6 +112,9 @@ def visit( changed_linked_account_field_mapping: typing.Callable[[], T_Result], deleted_integration_wide_field_mapping: typing.Callable[[], T_Result], deleted_linked_account_field_mapping: typing.Callable[[], T_Result], + forced_linked_account_resync: typing.Callable[[], T_Result], + muted_issue: typing.Callable[[], T_Result], + generated_magic_link: typing.Callable[[], T_Result], ) -> T_Result: if self is EventTypeEnum.CREATED_REMOTE_PRODUCTION_API_KEY: return created_remote_production_api_key() @@ -169,3 +178,9 @@ def visit( return deleted_integration_wide_field_mapping() if self is EventTypeEnum.DELETED_LINKED_ACCOUNT_FIELD_MAPPING: return deleted_linked_account_field_mapping() + if self is EventTypeEnum.FORCED_LINKED_ACCOUNT_RESYNC: + return forced_linked_account_resync() + if self is EventTypeEnum.MUTED_ISSUE: + return muted_issue() + if self is EventTypeEnum.GENERATED_MAGIC_LINK: + return generated_magic_link() diff --git a/src/merge/resources/hris/types/external_target_field_api_response.py b/src/merge/resources/hris/types/external_target_field_api_response.py index 1e99f0ba..25ba02e6 100644 --- a/src/merge/resources/hris/types/external_target_field_api_response.py +++ b/src/merge/resources/hris/types/external_target_field_api_response.py @@ -30,6 +30,7 @@ class ExternalTargetFieldApiResponse(pydantic.BaseModel): pay_group: typing.Optional[typing.List[ExternalTargetFieldApi]] = pydantic.Field(alias="PayGroup") group: typing.Optional[typing.List[ExternalTargetFieldApi]] = pydantic.Field(alias="Group") dependent: typing.Optional[typing.List[ExternalTargetFieldApi]] = pydantic.Field(alias="Dependent") + timesheet_entry: typing.Optional[typing.List[ExternalTargetFieldApi]] = pydantic.Field(alias="TimesheetEntry") def json(self, **kwargs: typing.Any) -> str: kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs} diff --git a/src/merge/resources/hris/types/field_mapping_api_instance_response.py b/src/merge/resources/hris/types/field_mapping_api_instance_response.py index ca8d88a6..568ea12d 100644 --- a/src/merge/resources/hris/types/field_mapping_api_instance_response.py +++ b/src/merge/resources/hris/types/field_mapping_api_instance_response.py @@ -30,6 +30,7 @@ class FieldMappingApiInstanceResponse(pydantic.BaseModel): pay_group: typing.Optional[typing.List[FieldMappingApiInstance]] = pydantic.Field(alias="PayGroup") group: typing.Optional[typing.List[FieldMappingApiInstance]] = pydantic.Field(alias="Group") dependent: typing.Optional[typing.List[FieldMappingApiInstance]] = pydantic.Field(alias="Dependent") + timesheet_entry: typing.Optional[typing.List[FieldMappingApiInstance]] = pydantic.Field(alias="TimesheetEntry") def json(self, **kwargs: typing.Any) -> str: kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs} diff --git a/src/merge/resources/hris/types/group.py b/src/merge/resources/hris/types/group.py index 258d1a3c..aaeecad5 100644 --- a/src/merge/resources/hris/types/group.py +++ b/src/merge/resources/hris/types/group.py @@ -28,11 +28,15 @@ class Group(pydantic.BaseModel): id: typing.Optional[str] remote_id: typing.Optional[str] = pydantic.Field(description="The third-party API ID of the matching object.") + created_at: typing.Optional[dt.datetime] + modified_at: typing.Optional[dt.datetime] = pydantic.Field( + description="This is the datetime that this object was last updated by Merge" + ) parent_group: typing.Optional[str] = pydantic.Field(description="The parent group for this group.") name: typing.Optional[str] = pydantic.Field(description="The group name.") type: typing.Optional[GroupType] = pydantic.Field( description=( - "The group type\n" + "The Group type returned directly from the third-party.\n" "\n" "- `TEAM` - TEAM\n" "- `DEPARTMENT` - DEPARTMENT\n" @@ -44,10 +48,6 @@ class Group(pydantic.BaseModel): remote_was_deleted: typing.Optional[bool] = pydantic.Field( description="Indicates whether or not this object has been deleted in the third party platform." ) - created_at: typing.Optional[dt.datetime] - modified_at: typing.Optional[dt.datetime] = pydantic.Field( - description="This is the datetime that this object was last updated by Merge" - ) field_mappings: typing.Optional[typing.Dict[str, typing.Any]] remote_data: typing.Optional[typing.List[RemoteData]] diff --git a/src/merge/resources/hris/types/linked_account_condition.py b/src/merge/resources/hris/types/linked_account_condition.py index 430adc00..f13ef90d 100644 --- a/src/merge/resources/hris/types/linked_account_condition.py +++ b/src/merge/resources/hris/types/linked_account_condition.py @@ -16,14 +16,10 @@ class LinkedAccountCondition(pydantic.BaseModel): description="The ID indicating which condition schema to use for a specific condition." ) common_model: typing.Optional[str] = pydantic.Field(description="The common model for a specific condition.") - native_name: typing.Optional[str] = pydantic.Field( - description='User-facing _native condition_ name. e.g. "Skip Manager".' - ) + native_name: typing.Optional[str] operator: str = pydantic.Field(description="The operator for a specific condition.") value: typing.Optional[typing.Any] - field_name: typing.Optional[str] = pydantic.Field( - description='The name of the field on the common model that this condition corresponds to, if they conceptually match. e.g. "location_type".' - ) + field_name: typing.Optional[str] def json(self, **kwargs: typing.Any) -> str: kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs} diff --git a/src/merge/resources/hris/types/linked_account_condition_request.py b/src/merge/resources/hris/types/linked_account_condition_request.py index 23ff21f1..ce36a27f 100644 --- a/src/merge/resources/hris/types/linked_account_condition_request.py +++ b/src/merge/resources/hris/types/linked_account_condition_request.py @@ -12,6 +12,7 @@ class LinkedAccountConditionRequest(pydantic.BaseModel): + id: typing.Optional[str] = pydantic.Field(description="The ID indicating which Linked Account Condition this is.") condition_schema_id: str = pydantic.Field( description="The ID indicating which condition schema to use for a specific condition." ) diff --git a/src/merge/resources/hris/types/location.py b/src/merge/resources/hris/types/location.py index 863b01ba..e0137dc6 100644 --- a/src/merge/resources/hris/types/location.py +++ b/src/merge/resources/hris/types/location.py @@ -29,6 +29,10 @@ class Location(pydantic.BaseModel): id: typing.Optional[str] remote_id: typing.Optional[str] = pydantic.Field(description="The third-party API ID of the matching object.") + created_at: typing.Optional[dt.datetime] + modified_at: typing.Optional[dt.datetime] = pydantic.Field( + description="This is the datetime that this object was last updated by Merge" + ) name: typing.Optional[str] = pydantic.Field(description="The location's name.") phone_number: typing.Optional[str] = pydantic.Field(description="The location's phone number.") street_1: typing.Optional[str] = pydantic.Field(description="Line 1 of the location's street address.") @@ -299,10 +303,6 @@ class Location(pydantic.BaseModel): remote_was_deleted: typing.Optional[bool] = pydantic.Field( description="Indicates whether or not this object has been deleted in the third party platform." ) - created_at: typing.Optional[dt.datetime] - modified_at: typing.Optional[dt.datetime] = pydantic.Field( - description="This is the datetime that this object was last updated by Merge" - ) field_mappings: typing.Optional[typing.Dict[str, typing.Any]] remote_data: typing.Optional[typing.List[RemoteData]] diff --git a/src/merge/resources/hris/types/pay_group.py b/src/merge/resources/hris/types/pay_group.py index eb361c03..17e591d6 100644 --- a/src/merge/resources/hris/types/pay_group.py +++ b/src/merge/resources/hris/types/pay_group.py @@ -27,14 +27,14 @@ class PayGroup(pydantic.BaseModel): id: typing.Optional[str] remote_id: typing.Optional[str] = pydantic.Field(description="The third-party API ID of the matching object.") - pay_group_name: typing.Optional[str] = pydantic.Field(description="The pay group name.") - remote_was_deleted: typing.Optional[bool] = pydantic.Field( - description="Indicates whether or not this object has been deleted in the third party platform." - ) created_at: typing.Optional[dt.datetime] modified_at: typing.Optional[dt.datetime] = pydantic.Field( description="This is the datetime that this object was last updated by Merge" ) + pay_group_name: typing.Optional[str] = pydantic.Field(description="The pay group name.") + remote_was_deleted: typing.Optional[bool] = pydantic.Field( + description="Indicates whether or not this object has been deleted in the third party platform." + ) field_mappings: typing.Optional[typing.Dict[str, typing.Any]] remote_data: typing.Optional[typing.List[RemoteData]] diff --git a/src/merge/resources/hris/types/payroll_run.py b/src/merge/resources/hris/types/payroll_run.py index 520d5339..9034186a 100644 --- a/src/merge/resources/hris/types/payroll_run.py +++ b/src/merge/resources/hris/types/payroll_run.py @@ -29,6 +29,10 @@ class PayrollRun(pydantic.BaseModel): id: typing.Optional[str] remote_id: typing.Optional[str] = pydantic.Field(description="The third-party API ID of the matching object.") + created_at: typing.Optional[dt.datetime] + modified_at: typing.Optional[dt.datetime] = pydantic.Field( + description="This is the datetime that this object was last updated by Merge" + ) run_state: typing.Optional[PayrollRunRunState] = pydantic.Field( description=( "The state of the payroll run\n" @@ -59,10 +63,6 @@ class PayrollRun(pydantic.BaseModel): remote_was_deleted: typing.Optional[bool] = pydantic.Field( description="Indicates whether or not this object has been deleted in the third party platform." ) - created_at: typing.Optional[dt.datetime] - modified_at: typing.Optional[dt.datetime] = pydantic.Field( - description="This is the datetime that this object was last updated by Merge" - ) field_mappings: typing.Optional[typing.Dict[str, typing.Any]] remote_data: typing.Optional[typing.List[RemoteData]] diff --git a/src/merge/resources/hris/types/remote_field_api_response.py b/src/merge/resources/hris/types/remote_field_api_response.py index 9248a714..c3913991 100644 --- a/src/merge/resources/hris/types/remote_field_api_response.py +++ b/src/merge/resources/hris/types/remote_field_api_response.py @@ -28,6 +28,7 @@ class RemoteFieldApiResponse(pydantic.BaseModel): pay_group: typing.Optional[typing.List[RemoteFieldApi]] = pydantic.Field(alias="PayGroup") group: typing.Optional[typing.List[RemoteFieldApi]] = pydantic.Field(alias="Group") dependent: typing.Optional[typing.List[RemoteFieldApi]] = pydantic.Field(alias="Dependent") + timesheet_entry: typing.Optional[typing.List[RemoteFieldApi]] = pydantic.Field(alias="TimesheetEntry") def json(self, **kwargs: typing.Any) -> str: kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs} diff --git a/src/merge/resources/hris/types/tax.py b/src/merge/resources/hris/types/tax.py index 6f68d433..3757a289 100644 --- a/src/merge/resources/hris/types/tax.py +++ b/src/merge/resources/hris/types/tax.py @@ -27,6 +27,10 @@ class Tax(pydantic.BaseModel): id: typing.Optional[str] remote_id: typing.Optional[str] = pydantic.Field(description="The third-party API ID of the matching object.") + created_at: typing.Optional[dt.datetime] + modified_at: typing.Optional[dt.datetime] = pydantic.Field( + description="This is the datetime that this object was last updated by Merge" + ) employee_payroll_run: typing.Optional[str] name: typing.Optional[str] = pydantic.Field(description="The tax's name.") amount: typing.Optional[float] = pydantic.Field(description="The tax amount.") @@ -36,10 +40,6 @@ class Tax(pydantic.BaseModel): remote_was_deleted: typing.Optional[bool] = pydantic.Field( description="Indicates whether or not this object has been deleted in the third party platform." ) - created_at: typing.Optional[dt.datetime] - modified_at: typing.Optional[dt.datetime] = pydantic.Field( - description="This is the datetime that this object was last updated by Merge" - ) field_mappings: typing.Optional[typing.Dict[str, typing.Any]] remote_data: typing.Optional[typing.List[RemoteData]] diff --git a/src/merge/resources/hris/types/team.py b/src/merge/resources/hris/types/team.py index dac30a00..f22c34ee 100644 --- a/src/merge/resources/hris/types/team.py +++ b/src/merge/resources/hris/types/team.py @@ -29,15 +29,15 @@ class Team(pydantic.BaseModel): id: typing.Optional[str] remote_id: typing.Optional[str] = pydantic.Field(description="The third-party API ID of the matching object.") + created_at: typing.Optional[dt.datetime] + modified_at: typing.Optional[dt.datetime] = pydantic.Field( + description="This is the datetime that this object was last updated by Merge" + ) name: typing.Optional[str] = pydantic.Field(description="The team's name.") parent_team: typing.Optional[TeamParentTeam] = pydantic.Field(description="The team's parent team.") remote_was_deleted: typing.Optional[bool] = pydantic.Field( description="Indicates whether or not this object has been deleted in the third party platform." ) - created_at: typing.Optional[dt.datetime] - modified_at: typing.Optional[dt.datetime] = pydantic.Field( - description="This is the datetime that this object was last updated by Merge" - ) field_mappings: typing.Optional[typing.Dict[str, typing.Any]] remote_data: typing.Optional[typing.List[RemoteData]] diff --git a/src/merge/resources/hris/types/time_off.py b/src/merge/resources/hris/types/time_off.py index e8ea3fb5..6c7d2bb6 100644 --- a/src/merge/resources/hris/types/time_off.py +++ b/src/merge/resources/hris/types/time_off.py @@ -32,6 +32,10 @@ class TimeOff(pydantic.BaseModel): id: typing.Optional[str] remote_id: typing.Optional[str] = pydantic.Field(description="The third-party API ID of the matching object.") + created_at: typing.Optional[dt.datetime] + modified_at: typing.Optional[dt.datetime] = pydantic.Field( + description="This is the datetime that this object was last updated by Merge" + ) employee: typing.Optional[TimeOffEmployee] = pydantic.Field(description="The employee requesting time off.") approver: typing.Optional[TimeOffApprover] = pydantic.Field( description="The Merge ID of the employee with the ability to approve the time off request." @@ -78,10 +82,6 @@ class TimeOff(pydantic.BaseModel): description="The day and time of the end of the time requested off." ) remote_was_deleted: typing.Optional[bool] - created_at: typing.Optional[dt.datetime] - modified_at: typing.Optional[dt.datetime] = pydantic.Field( - description="This is the datetime that this object was last updated by Merge" - ) field_mappings: typing.Optional[typing.Dict[str, typing.Any]] remote_data: typing.Optional[typing.List[RemoteData]] diff --git a/src/merge/resources/hris/types/time_off_balance.py b/src/merge/resources/hris/types/time_off_balance.py index 221089eb..a3ed0b46 100644 --- a/src/merge/resources/hris/types/time_off_balance.py +++ b/src/merge/resources/hris/types/time_off_balance.py @@ -29,6 +29,10 @@ class TimeOffBalance(pydantic.BaseModel): id: typing.Optional[str] remote_id: typing.Optional[str] = pydantic.Field(description="The third-party API ID of the matching object.") + created_at: typing.Optional[dt.datetime] + modified_at: typing.Optional[dt.datetime] = pydantic.Field( + description="This is the datetime that this object was last updated by Merge" + ) employee: typing.Optional[TimeOffBalanceEmployee] = pydantic.Field( description="The employee the balance belongs to." ) @@ -51,10 +55,6 @@ class TimeOffBalance(pydantic.BaseModel): remote_was_deleted: typing.Optional[bool] = pydantic.Field( description="Indicates whether or not this object has been deleted in the third party platform." ) - created_at: typing.Optional[dt.datetime] - modified_at: typing.Optional[dt.datetime] = pydantic.Field( - description="This is the datetime that this object was last updated by Merge" - ) field_mappings: typing.Optional[typing.Dict[str, typing.Any]] remote_data: typing.Optional[typing.List[RemoteData]] diff --git a/src/merge/resources/hris/types/timesheet_entry.py b/src/merge/resources/hris/types/timesheet_entry.py index 0fe5eaa8..231353d2 100644 --- a/src/merge/resources/hris/types/timesheet_entry.py +++ b/src/merge/resources/hris/types/timesheet_entry.py @@ -26,16 +26,21 @@ class TimesheetEntry(pydantic.BaseModel): id: typing.Optional[str] remote_id: typing.Optional[str] = pydantic.Field(description="The third-party API ID of the matching object.") + created_at: typing.Optional[dt.datetime] + modified_at: typing.Optional[dt.datetime] = pydantic.Field( + description="This is the datetime that this object was last updated by Merge" + ) employee: typing.Optional[str] = pydantic.Field(description="The employee the timesheet entry is for.") hours_worked: typing.Optional[float] = pydantic.Field(description="The number of hours logged by the employee.") start_time: typing.Optional[dt.datetime] = pydantic.Field( description="The time at which the employee started work." ) end_time: typing.Optional[dt.datetime] = pydantic.Field(description="The time at which the employee ended work.") - created_at: typing.Optional[dt.datetime] - modified_at: typing.Optional[dt.datetime] = pydantic.Field( - description="This is the datetime that this object was last updated by Merge" + remote_was_deleted: typing.Optional[bool] = pydantic.Field( + description="Indicates whether or not this object has been deleted in the third party platform." ) + field_mappings: typing.Optional[typing.Dict[str, typing.Any]] + remote_data: typing.Optional[typing.List[typing.Optional[typing.Dict[str, typing.Any]]]] def json(self, **kwargs: typing.Any) -> str: kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs} diff --git a/src/merge/resources/ticketing/resources/account_details/client.py b/src/merge/resources/ticketing/resources/account_details/client.py index dd3bee8b..94689e8d 100644 --- a/src/merge/resources/ticketing/resources/account_details/client.py +++ b/src/merge/resources/ticketing/resources/account_details/client.py @@ -38,7 +38,7 @@ def retrieve(self, *, request_options: typing.Optional[RequestOptions] = None) - """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/ticketing/v1/account-details"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "ticketing/v1/account-details"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -84,7 +84,7 @@ async def retrieve(self, *, request_options: typing.Optional[RequestOptions] = N """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/ticketing/v1/account-details"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "ticketing/v1/account-details"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), diff --git a/src/merge/resources/ticketing/resources/account_token/client.py b/src/merge/resources/ticketing/resources/account_token/client.py index 2dcd65dd..27b29615 100644 --- a/src/merge/resources/ticketing/resources/account_token/client.py +++ b/src/merge/resources/ticketing/resources/account_token/client.py @@ -37,13 +37,13 @@ def retrieve(self, public_token: str, *, request_options: typing.Optional[Reques api_key="YOUR_API_KEY", ) client.ticketing.account_token.retrieve( - public_token="string", + public_token="public_token", ) """ _response = self._client_wrapper.httpx_client.request( "GET", urllib.parse.urljoin( - f"{self._client_wrapper.get_base_url()}/", f"api/ticketing/v1/account-token/{public_token}" + f"{self._client_wrapper.get_base_url()}/", f"ticketing/v1/account-token/{public_token}" ), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None @@ -91,13 +91,13 @@ async def retrieve( api_key="YOUR_API_KEY", ) await client.ticketing.account_token.retrieve( - public_token="string", + public_token="public_token", ) """ _response = await self._client_wrapper.httpx_client.request( "GET", urllib.parse.urljoin( - f"{self._client_wrapper.get_base_url()}/", f"api/ticketing/v1/account-token/{public_token}" + f"{self._client_wrapper.get_base_url()}/", f"ticketing/v1/account-token/{public_token}" ), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None diff --git a/src/merge/resources/ticketing/resources/accounts/client.py b/src/merge/resources/ticketing/resources/accounts/client.py index 7af09429..385ad02e 100644 --- a/src/merge/resources/ticketing/resources/accounts/client.py +++ b/src/merge/resources/ticketing/resources/accounts/client.py @@ -72,7 +72,7 @@ def list( """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/ticketing/v1/accounts"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "ticketing/v1/accounts"), params=jsonable_encoder( remove_none_from_dict( { @@ -137,12 +137,12 @@ def retrieve( api_key="YOUR_API_KEY", ) client.ticketing.accounts.retrieve( - id="string", + id="id", ) """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"api/ticketing/v1/accounts/{id}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"ticketing/v1/accounts/{id}"), params=jsonable_encoder( remove_none_from_dict( { @@ -228,7 +228,7 @@ async def list( """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/ticketing/v1/accounts"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "ticketing/v1/accounts"), params=jsonable_encoder( remove_none_from_dict( { @@ -293,12 +293,12 @@ async def retrieve( api_key="YOUR_API_KEY", ) await client.ticketing.accounts.retrieve( - id="string", + id="id", ) """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"api/ticketing/v1/accounts/{id}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"ticketing/v1/accounts/{id}"), params=jsonable_encoder( remove_none_from_dict( { diff --git a/src/merge/resources/ticketing/resources/async_passthrough/client.py b/src/merge/resources/ticketing/resources/async_passthrough/client.py index ff79f10a..5bed7b7f 100644 --- a/src/merge/resources/ticketing/resources/async_passthrough/client.py +++ b/src/merge/resources/ticketing/resources/async_passthrough/client.py @@ -38,11 +38,7 @@ def create( - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from merge.client import Merge - from merge.resources.ticketing import ( - DataPassthroughRequest, - MethodEnum, - RequestFormatEnum, - ) + from merge.resources.ticketing import DataPassthroughRequest, MethodEnum client = Merge( account_token="YOUR_ACCOUNT_TOKEN", @@ -52,14 +48,12 @@ def create( request=DataPassthroughRequest( method=MethodEnum.GET, path="/scooters", - data='{"company": "Lime", "model": "Gen 2.5"}', - request_format=RequestFormatEnum.JSON, ), ) """ _response = self._client_wrapper.httpx_client.request( "POST", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/ticketing/v1/async-passthrough"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "ticketing/v1/async-passthrough"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -107,14 +101,14 @@ def retrieve( api_key="YOUR_API_KEY", ) client.ticketing.async_passthrough.retrieve( - async_passthrough_receipt_id="string", + async_passthrough_receipt_id="async_passthrough_receipt_id", ) """ _response = self._client_wrapper.httpx_client.request( "GET", urllib.parse.urljoin( f"{self._client_wrapper.get_base_url()}/", - f"api/ticketing/v1/async-passthrough/{async_passthrough_receipt_id}", + f"ticketing/v1/async-passthrough/{async_passthrough_receipt_id}", ), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None @@ -156,11 +150,7 @@ async def create( - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from merge.client import AsyncMerge - from merge.resources.ticketing import ( - DataPassthroughRequest, - MethodEnum, - RequestFormatEnum, - ) + from merge.resources.ticketing import DataPassthroughRequest, MethodEnum client = AsyncMerge( account_token="YOUR_ACCOUNT_TOKEN", @@ -170,14 +160,12 @@ async def create( request=DataPassthroughRequest( method=MethodEnum.GET, path="/scooters", - data='{"company": "Lime", "model": "Gen 2.5"}', - request_format=RequestFormatEnum.JSON, ), ) """ _response = await self._client_wrapper.httpx_client.request( "POST", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/ticketing/v1/async-passthrough"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "ticketing/v1/async-passthrough"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -225,14 +213,14 @@ async def retrieve( api_key="YOUR_API_KEY", ) await client.ticketing.async_passthrough.retrieve( - async_passthrough_receipt_id="string", + async_passthrough_receipt_id="async_passthrough_receipt_id", ) """ _response = await self._client_wrapper.httpx_client.request( "GET", urllib.parse.urljoin( f"{self._client_wrapper.get_base_url()}/", - f"api/ticketing/v1/async-passthrough/{async_passthrough_receipt_id}", + f"ticketing/v1/async-passthrough/{async_passthrough_receipt_id}", ), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None diff --git a/src/merge/resources/ticketing/resources/attachments/client.py b/src/merge/resources/ticketing/resources/attachments/client.py index 5c315633..03b1e6a9 100644 --- a/src/merge/resources/ticketing/resources/attachments/client.py +++ b/src/merge/resources/ticketing/resources/attachments/client.py @@ -83,13 +83,11 @@ def list( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) - client.ticketing.attachments.list( - expand="ticket", - ) + client.ticketing.attachments.list() """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/ticketing/v1/attachments"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "ticketing/v1/attachments"), params=jsonable_encoder( remove_none_from_dict( { @@ -163,17 +161,12 @@ def create( api_key="YOUR_API_KEY", ) client.ticketing.attachments.create( - model=AttachmentRequest( - file_name="Screenshot.png", - file_url="http://alturl.com/p749b", - content_type="jpeg", - uploaded_by="28b54125-287f-494d-965e-3c5b330c9a68", - ), + model=AttachmentRequest(), ) """ _response = self._client_wrapper.httpx_client.request( "POST", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/ticketing/v1/attachments"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "ticketing/v1/attachments"), params=jsonable_encoder( remove_none_from_dict( { @@ -240,13 +233,12 @@ def retrieve( api_key="YOUR_API_KEY", ) client.ticketing.attachments.retrieve( - id="string", - expand="ticket", + id="id", ) """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"api/ticketing/v1/attachments/{id}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"ticketing/v1/attachments/{id}"), params=jsonable_encoder( remove_none_from_dict( { @@ -299,9 +291,7 @@ def download_retrieve( """ with self._client_wrapper.httpx_client.stream( "GET", - urllib.parse.urljoin( - f"{self._client_wrapper.get_base_url()}/", f"api/ticketing/v1/attachments/{id}/download" - ), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"ticketing/v1/attachments/{id}/download"), params=jsonable_encoder( remove_none_from_dict( { @@ -354,7 +344,7 @@ def meta_post_retrieve(self, *, request_options: typing.Optional[RequestOptions] """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/ticketing/v1/attachments/meta/post"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "ticketing/v1/attachments/meta/post"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -436,13 +426,11 @@ async def list( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) - await client.ticketing.attachments.list( - expand="ticket", - ) + await client.ticketing.attachments.list() """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/ticketing/v1/attachments"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "ticketing/v1/attachments"), params=jsonable_encoder( remove_none_from_dict( { @@ -516,17 +504,12 @@ async def create( api_key="YOUR_API_KEY", ) await client.ticketing.attachments.create( - model=AttachmentRequest( - file_name="Screenshot.png", - file_url="http://alturl.com/p749b", - content_type="jpeg", - uploaded_by="28b54125-287f-494d-965e-3c5b330c9a68", - ), + model=AttachmentRequest(), ) """ _response = await self._client_wrapper.httpx_client.request( "POST", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/ticketing/v1/attachments"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "ticketing/v1/attachments"), params=jsonable_encoder( remove_none_from_dict( { @@ -593,13 +576,12 @@ async def retrieve( api_key="YOUR_API_KEY", ) await client.ticketing.attachments.retrieve( - id="string", - expand="ticket", + id="id", ) """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"api/ticketing/v1/attachments/{id}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"ticketing/v1/attachments/{id}"), params=jsonable_encoder( remove_none_from_dict( { @@ -652,9 +634,7 @@ async def download_retrieve( """ async with self._client_wrapper.httpx_client.stream( "GET", - urllib.parse.urljoin( - f"{self._client_wrapper.get_base_url()}/", f"api/ticketing/v1/attachments/{id}/download" - ), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"ticketing/v1/attachments/{id}/download"), params=jsonable_encoder( remove_none_from_dict( { @@ -707,7 +687,7 @@ async def meta_post_retrieve(self, *, request_options: typing.Optional[RequestOp """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/ticketing/v1/attachments/meta/post"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "ticketing/v1/attachments/meta/post"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), diff --git a/src/merge/resources/ticketing/resources/audit_trail/client.py b/src/merge/resources/ticketing/resources/audit_trail/client.py index d3d7b209..c3853cb8 100644 --- a/src/merge/resources/ticketing/resources/audit_trail/client.py +++ b/src/merge/resources/ticketing/resources/audit_trail/client.py @@ -40,7 +40,7 @@ def list( - end_date: typing.Optional[str]. If included, will only include audit trail events that occurred before this time - - event_type: typing.Optional[str]. If included, will only include events with the given event type. Possible values include: `CREATED_REMOTE_PRODUCTION_API_KEY`, `DELETED_REMOTE_PRODUCTION_API_KEY`, `CREATED_TEST_API_KEY`, `DELETED_TEST_API_KEY`, `REGENERATED_PRODUCTION_API_KEY`, `INVITED_USER`, `TWO_FACTOR_AUTH_ENABLED`, `TWO_FACTOR_AUTH_DISABLED`, `DELETED_LINKED_ACCOUNT`, `CREATED_DESTINATION`, `DELETED_DESTINATION`, `CHANGED_DESTINATION`, `CHANGED_SCOPES`, `CHANGED_PERSONAL_INFORMATION`, `CHANGED_ORGANIZATION_SETTINGS`, `ENABLED_INTEGRATION`, `DISABLED_INTEGRATION`, `ENABLED_CATEGORY`, `DISABLED_CATEGORY`, `CHANGED_PASSWORD`, `RESET_PASSWORD`, `ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION`, `ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT`, `DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION`, `DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT`, `CREATED_INTEGRATION_WIDE_FIELD_MAPPING`, `CREATED_LINKED_ACCOUNT_FIELD_MAPPING`, `CHANGED_INTEGRATION_WIDE_FIELD_MAPPING`, `CHANGED_LINKED_ACCOUNT_FIELD_MAPPING`, `DELETED_INTEGRATION_WIDE_FIELD_MAPPING`, `DELETED_LINKED_ACCOUNT_FIELD_MAPPING` + - event_type: typing.Optional[str]. If included, will only include events with the given event type. Possible values include: `CREATED_REMOTE_PRODUCTION_API_KEY`, `DELETED_REMOTE_PRODUCTION_API_KEY`, `CREATED_TEST_API_KEY`, `DELETED_TEST_API_KEY`, `REGENERATED_PRODUCTION_API_KEY`, `INVITED_USER`, `TWO_FACTOR_AUTH_ENABLED`, `TWO_FACTOR_AUTH_DISABLED`, `DELETED_LINKED_ACCOUNT`, `CREATED_DESTINATION`, `DELETED_DESTINATION`, `CHANGED_DESTINATION`, `CHANGED_SCOPES`, `CHANGED_PERSONAL_INFORMATION`, `CHANGED_ORGANIZATION_SETTINGS`, `ENABLED_INTEGRATION`, `DISABLED_INTEGRATION`, `ENABLED_CATEGORY`, `DISABLED_CATEGORY`, `CHANGED_PASSWORD`, `RESET_PASSWORD`, `ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION`, `ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT`, `DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION`, `DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT`, `CREATED_INTEGRATION_WIDE_FIELD_MAPPING`, `CREATED_LINKED_ACCOUNT_FIELD_MAPPING`, `CHANGED_INTEGRATION_WIDE_FIELD_MAPPING`, `CHANGED_LINKED_ACCOUNT_FIELD_MAPPING`, `DELETED_INTEGRATION_WIDE_FIELD_MAPPING`, `DELETED_LINKED_ACCOUNT_FIELD_MAPPING`, `FORCED_LINKED_ACCOUNT_RESYNC`, `MUTED_ISSUE`, `GENERATED_MAGIC_LINK` - page_size: typing.Optional[int]. Number of results to return per page. @@ -60,7 +60,7 @@ def list( """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/ticketing/v1/audit-trail"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "ticketing/v1/audit-trail"), params=jsonable_encoder( remove_none_from_dict( { @@ -122,7 +122,7 @@ async def list( - end_date: typing.Optional[str]. If included, will only include audit trail events that occurred before this time - - event_type: typing.Optional[str]. If included, will only include events with the given event type. Possible values include: `CREATED_REMOTE_PRODUCTION_API_KEY`, `DELETED_REMOTE_PRODUCTION_API_KEY`, `CREATED_TEST_API_KEY`, `DELETED_TEST_API_KEY`, `REGENERATED_PRODUCTION_API_KEY`, `INVITED_USER`, `TWO_FACTOR_AUTH_ENABLED`, `TWO_FACTOR_AUTH_DISABLED`, `DELETED_LINKED_ACCOUNT`, `CREATED_DESTINATION`, `DELETED_DESTINATION`, `CHANGED_DESTINATION`, `CHANGED_SCOPES`, `CHANGED_PERSONAL_INFORMATION`, `CHANGED_ORGANIZATION_SETTINGS`, `ENABLED_INTEGRATION`, `DISABLED_INTEGRATION`, `ENABLED_CATEGORY`, `DISABLED_CATEGORY`, `CHANGED_PASSWORD`, `RESET_PASSWORD`, `ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION`, `ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT`, `DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION`, `DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT`, `CREATED_INTEGRATION_WIDE_FIELD_MAPPING`, `CREATED_LINKED_ACCOUNT_FIELD_MAPPING`, `CHANGED_INTEGRATION_WIDE_FIELD_MAPPING`, `CHANGED_LINKED_ACCOUNT_FIELD_MAPPING`, `DELETED_INTEGRATION_WIDE_FIELD_MAPPING`, `DELETED_LINKED_ACCOUNT_FIELD_MAPPING` + - event_type: typing.Optional[str]. If included, will only include events with the given event type. Possible values include: `CREATED_REMOTE_PRODUCTION_API_KEY`, `DELETED_REMOTE_PRODUCTION_API_KEY`, `CREATED_TEST_API_KEY`, `DELETED_TEST_API_KEY`, `REGENERATED_PRODUCTION_API_KEY`, `INVITED_USER`, `TWO_FACTOR_AUTH_ENABLED`, `TWO_FACTOR_AUTH_DISABLED`, `DELETED_LINKED_ACCOUNT`, `CREATED_DESTINATION`, `DELETED_DESTINATION`, `CHANGED_DESTINATION`, `CHANGED_SCOPES`, `CHANGED_PERSONAL_INFORMATION`, `CHANGED_ORGANIZATION_SETTINGS`, `ENABLED_INTEGRATION`, `DISABLED_INTEGRATION`, `ENABLED_CATEGORY`, `DISABLED_CATEGORY`, `CHANGED_PASSWORD`, `RESET_PASSWORD`, `ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION`, `ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT`, `DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION`, `DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT`, `CREATED_INTEGRATION_WIDE_FIELD_MAPPING`, `CREATED_LINKED_ACCOUNT_FIELD_MAPPING`, `CHANGED_INTEGRATION_WIDE_FIELD_MAPPING`, `CHANGED_LINKED_ACCOUNT_FIELD_MAPPING`, `DELETED_INTEGRATION_WIDE_FIELD_MAPPING`, `DELETED_LINKED_ACCOUNT_FIELD_MAPPING`, `FORCED_LINKED_ACCOUNT_RESYNC`, `MUTED_ISSUE`, `GENERATED_MAGIC_LINK` - page_size: typing.Optional[int]. Number of results to return per page. @@ -142,7 +142,7 @@ async def list( """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/ticketing/v1/audit-trail"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "ticketing/v1/audit-trail"), params=jsonable_encoder( remove_none_from_dict( { diff --git a/src/merge/resources/ticketing/resources/available_actions/client.py b/src/merge/resources/ticketing/resources/available_actions/client.py index 6f4df41f..458d4466 100644 --- a/src/merge/resources/ticketing/resources/available_actions/client.py +++ b/src/merge/resources/ticketing/resources/available_actions/client.py @@ -38,7 +38,7 @@ def retrieve(self, *, request_options: typing.Optional[RequestOptions] = None) - """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/ticketing/v1/available-actions"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "ticketing/v1/available-actions"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -84,7 +84,7 @@ async def retrieve(self, *, request_options: typing.Optional[RequestOptions] = N """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/ticketing/v1/available-actions"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "ticketing/v1/available-actions"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), diff --git a/src/merge/resources/ticketing/resources/collections/client.py b/src/merge/resources/ticketing/resources/collections/client.py index dab5fdb2..b73f6222 100644 --- a/src/merge/resources/ticketing/resources/collections/client.py +++ b/src/merge/resources/ticketing/resources/collections/client.py @@ -75,7 +75,7 @@ def list( - remote_id: typing.Optional[str]. The API provider's ID for the given object. - - show_enum_origins: typing.Optional[typing.Literal["collection_type"]]. Which fields should be returned in non-normalized form. + - show_enum_origins: typing.Optional[typing.Literal["collection_type"]]. A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- @@ -85,15 +85,11 @@ def list( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) - client.ticketing.collections.list( - expand="parent_collection", - remote_fields="collection_type", - show_enum_origins="collection_type", - ) + client.ticketing.collections.list() """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/ticketing/v1/collections"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "ticketing/v1/collections"), params=jsonable_encoder( remove_none_from_dict( { @@ -161,7 +157,7 @@ def retrieve( - remote_fields: typing.Optional[typing.Literal["collection_type"]]. Deprecated. Use show_enum_origins. - - show_enum_origins: typing.Optional[typing.Literal["collection_type"]]. Which fields should be returned in non-normalized form. + - show_enum_origins: typing.Optional[typing.Literal["collection_type"]]. A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- @@ -172,15 +168,12 @@ def retrieve( api_key="YOUR_API_KEY", ) client.ticketing.collections.retrieve( - id="string", - expand="parent_collection", - remote_fields="collection_type", - show_enum_origins="collection_type", + id="id", ) """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"api/ticketing/v1/collections/{id}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"ticketing/v1/collections/{id}"), params=jsonable_encoder( remove_none_from_dict( { @@ -246,21 +239,19 @@ def users_list( - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from merge.client import Merge - from merge.resources.ticketing import CollectionsUsersListRequestExpand client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) client.ticketing.collections.users_list( - parent_id="string", - expand=CollectionsUsersListRequestExpand.ROLES, + parent_id="parent_id", ) """ _response = self._client_wrapper.httpx_client.request( "GET", urllib.parse.urljoin( - f"{self._client_wrapper.get_base_url()}/", f"api/ticketing/v1/collections/{parent_id}/users" + f"{self._client_wrapper.get_base_url()}/", f"ticketing/v1/collections/{parent_id}/users" ), params=jsonable_encoder( remove_none_from_dict( @@ -352,7 +343,7 @@ async def list( - remote_id: typing.Optional[str]. The API provider's ID for the given object. - - show_enum_origins: typing.Optional[typing.Literal["collection_type"]]. Which fields should be returned in non-normalized form. + - show_enum_origins: typing.Optional[typing.Literal["collection_type"]]. A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- @@ -362,15 +353,11 @@ async def list( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) - await client.ticketing.collections.list( - expand="parent_collection", - remote_fields="collection_type", - show_enum_origins="collection_type", - ) + await client.ticketing.collections.list() """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/ticketing/v1/collections"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "ticketing/v1/collections"), params=jsonable_encoder( remove_none_from_dict( { @@ -438,7 +425,7 @@ async def retrieve( - remote_fields: typing.Optional[typing.Literal["collection_type"]]. Deprecated. Use show_enum_origins. - - show_enum_origins: typing.Optional[typing.Literal["collection_type"]]. Which fields should be returned in non-normalized form. + - show_enum_origins: typing.Optional[typing.Literal["collection_type"]]. A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- @@ -449,15 +436,12 @@ async def retrieve( api_key="YOUR_API_KEY", ) await client.ticketing.collections.retrieve( - id="string", - expand="parent_collection", - remote_fields="collection_type", - show_enum_origins="collection_type", + id="id", ) """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"api/ticketing/v1/collections/{id}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"ticketing/v1/collections/{id}"), params=jsonable_encoder( remove_none_from_dict( { @@ -523,21 +507,19 @@ async def users_list( - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from merge.client import AsyncMerge - from merge.resources.ticketing import CollectionsUsersListRequestExpand client = AsyncMerge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) await client.ticketing.collections.users_list( - parent_id="string", - expand=CollectionsUsersListRequestExpand.ROLES, + parent_id="parent_id", ) """ _response = await self._client_wrapper.httpx_client.request( "GET", urllib.parse.urljoin( - f"{self._client_wrapper.get_base_url()}/", f"api/ticketing/v1/collections/{parent_id}/users" + f"{self._client_wrapper.get_base_url()}/", f"ticketing/v1/collections/{parent_id}/users" ), params=jsonable_encoder( remove_none_from_dict( diff --git a/src/merge/resources/ticketing/resources/comments/client.py b/src/merge/resources/ticketing/resources/comments/client.py index 7729a94c..eaae067f 100644 --- a/src/merge/resources/ticketing/resources/comments/client.py +++ b/src/merge/resources/ticketing/resources/comments/client.py @@ -80,19 +80,16 @@ def list( - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from merge.client import Merge - from merge.resources.ticketing import CommentsListRequestExpand client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) - client.ticketing.comments.list( - expand=CommentsListRequestExpand.CONTACT, - ) + client.ticketing.comments.list() """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/ticketing/v1/comments"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "ticketing/v1/comments"), params=jsonable_encoder( remove_none_from_dict( { @@ -166,15 +163,12 @@ def create( api_key="YOUR_API_KEY", ) client.ticketing.comments.create( - model=CommentRequest( - body="When will these integrations be done? You all should use Merge.", - html_body="When will these integrations be done? You all should use Merge.", - ), + model=CommentRequest(), ) """ _response = self._client_wrapper.httpx_client.request( "POST", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/ticketing/v1/comments"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "ticketing/v1/comments"), params=jsonable_encoder( remove_none_from_dict( { @@ -235,20 +229,18 @@ def retrieve( - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from merge.client import Merge - from merge.resources.ticketing import CommentsRetrieveRequestExpand client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) client.ticketing.comments.retrieve( - id="string", - expand=CommentsRetrieveRequestExpand.CONTACT, + id="id", ) """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"api/ticketing/v1/comments/{id}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"ticketing/v1/comments/{id}"), params=jsonable_encoder( remove_none_from_dict( { @@ -299,7 +291,7 @@ def meta_post_retrieve(self, *, request_options: typing.Optional[RequestOptions] """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/ticketing/v1/comments/meta/post"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "ticketing/v1/comments/meta/post"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -376,19 +368,16 @@ async def list( - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from merge.client import AsyncMerge - from merge.resources.ticketing import CommentsListRequestExpand client = AsyncMerge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) - await client.ticketing.comments.list( - expand=CommentsListRequestExpand.CONTACT, - ) + await client.ticketing.comments.list() """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/ticketing/v1/comments"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "ticketing/v1/comments"), params=jsonable_encoder( remove_none_from_dict( { @@ -462,15 +451,12 @@ async def create( api_key="YOUR_API_KEY", ) await client.ticketing.comments.create( - model=CommentRequest( - body="When will these integrations be done? You all should use Merge.", - html_body="When will these integrations be done? You all should use Merge.", - ), + model=CommentRequest(), ) """ _response = await self._client_wrapper.httpx_client.request( "POST", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/ticketing/v1/comments"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "ticketing/v1/comments"), params=jsonable_encoder( remove_none_from_dict( { @@ -531,20 +517,18 @@ async def retrieve( - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from merge.client import AsyncMerge - from merge.resources.ticketing import CommentsRetrieveRequestExpand client = AsyncMerge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) await client.ticketing.comments.retrieve( - id="string", - expand=CommentsRetrieveRequestExpand.CONTACT, + id="id", ) """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"api/ticketing/v1/comments/{id}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"ticketing/v1/comments/{id}"), params=jsonable_encoder( remove_none_from_dict( { @@ -595,7 +579,7 @@ async def meta_post_retrieve(self, *, request_options: typing.Optional[RequestOp """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/ticketing/v1/comments/meta/post"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "ticketing/v1/comments/meta/post"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), diff --git a/src/merge/resources/ticketing/resources/contacts/client.py b/src/merge/resources/ticketing/resources/contacts/client.py index 35f3a003..e36d2be9 100644 --- a/src/merge/resources/ticketing/resources/contacts/client.py +++ b/src/merge/resources/ticketing/resources/contacts/client.py @@ -71,13 +71,11 @@ def list( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) - client.ticketing.contacts.list( - expand="account", - ) + client.ticketing.contacts.list() """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/ticketing/v1/contacts"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "ticketing/v1/contacts"), params=jsonable_encoder( remove_none_from_dict( { @@ -146,13 +144,12 @@ def retrieve( api_key="YOUR_API_KEY", ) client.ticketing.contacts.retrieve( - id="string", - expand="account", + id="id", ) """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"api/ticketing/v1/contacts/{id}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"ticketing/v1/contacts/{id}"), params=jsonable_encoder( remove_none_from_dict( { @@ -238,13 +235,11 @@ async def list( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) - await client.ticketing.contacts.list( - expand="account", - ) + await client.ticketing.contacts.list() """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/ticketing/v1/contacts"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "ticketing/v1/contacts"), params=jsonable_encoder( remove_none_from_dict( { @@ -313,13 +308,12 @@ async def retrieve( api_key="YOUR_API_KEY", ) await client.ticketing.contacts.retrieve( - id="string", - expand="account", + id="id", ) """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"api/ticketing/v1/contacts/{id}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"ticketing/v1/contacts/{id}"), params=jsonable_encoder( remove_none_from_dict( { diff --git a/src/merge/resources/ticketing/resources/delete_account/client.py b/src/merge/resources/ticketing/resources/delete_account/client.py index 4307c2db..178b11c7 100644 --- a/src/merge/resources/ticketing/resources/delete_account/client.py +++ b/src/merge/resources/ticketing/resources/delete_account/client.py @@ -32,7 +32,7 @@ def delete(self, *, request_options: typing.Optional[RequestOptions] = None) -> """ _response = self._client_wrapper.httpx_client.request( "POST", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/ticketing/v1/delete-account"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "ticketing/v1/delete-account"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -81,7 +81,7 @@ async def delete(self, *, request_options: typing.Optional[RequestOptions] = Non """ _response = await self._client_wrapper.httpx_client.request( "POST", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/ticketing/v1/delete-account"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "ticketing/v1/delete-account"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), diff --git a/src/merge/resources/ticketing/resources/field_mapping/client.py b/src/merge/resources/ticketing/resources/field_mapping/client.py index 596896e1..de743172 100644 --- a/src/merge/resources/ticketing/resources/field_mapping/client.py +++ b/src/merge/resources/ticketing/resources/field_mapping/client.py @@ -46,7 +46,7 @@ def field_mappings_retrieve( """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/ticketing/v1/field-mappings"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "ticketing/v1/field-mappings"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -116,7 +116,7 @@ def field_mappings_create( """ _response = self._client_wrapper.httpx_client.request( "POST", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/ticketing/v1/field-mappings"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "ticketing/v1/field-mappings"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -182,13 +182,13 @@ def field_mappings_destroy( api_key="YOUR_API_KEY", ) client.ticketing.field_mapping.field_mappings_destroy( - field_mapping_id="string", + field_mapping_id="field_mapping_id", ) """ _response = self._client_wrapper.httpx_client.request( "DELETE", urllib.parse.urljoin( - f"{self._client_wrapper.get_base_url()}/", f"api/ticketing/v1/field-mappings/{field_mapping_id}" + f"{self._client_wrapper.get_base_url()}/", f"ticketing/v1/field-mappings/{field_mapping_id}" ), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None @@ -243,7 +243,7 @@ def field_mappings_partial_update( api_key="YOUR_API_KEY", ) client.ticketing.field_mapping.field_mappings_partial_update( - field_mapping_id="string", + field_mapping_id="field_mapping_id", remote_method="GET", remote_url_path="/example-url-path", ) @@ -258,7 +258,7 @@ def field_mappings_partial_update( _response = self._client_wrapper.httpx_client.request( "PATCH", urllib.parse.urljoin( - f"{self._client_wrapper.get_base_url()}/", f"api/ticketing/v1/field-mappings/{field_mapping_id}" + f"{self._client_wrapper.get_base_url()}/", f"ticketing/v1/field-mappings/{field_mapping_id}" ), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None @@ -316,7 +316,7 @@ def remote_fields_retrieve( """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/ticketing/v1/remote-fields"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "ticketing/v1/remote-fields"), params=jsonable_encoder( remove_none_from_dict( { @@ -369,7 +369,7 @@ def target_fields_retrieve( """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/ticketing/v1/target-fields"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "ticketing/v1/target-fields"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -417,7 +417,7 @@ async def field_mappings_retrieve( """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/ticketing/v1/field-mappings"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "ticketing/v1/field-mappings"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -487,7 +487,7 @@ async def field_mappings_create( """ _response = await self._client_wrapper.httpx_client.request( "POST", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/ticketing/v1/field-mappings"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "ticketing/v1/field-mappings"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -553,13 +553,13 @@ async def field_mappings_destroy( api_key="YOUR_API_KEY", ) await client.ticketing.field_mapping.field_mappings_destroy( - field_mapping_id="string", + field_mapping_id="field_mapping_id", ) """ _response = await self._client_wrapper.httpx_client.request( "DELETE", urllib.parse.urljoin( - f"{self._client_wrapper.get_base_url()}/", f"api/ticketing/v1/field-mappings/{field_mapping_id}" + f"{self._client_wrapper.get_base_url()}/", f"ticketing/v1/field-mappings/{field_mapping_id}" ), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None @@ -614,7 +614,7 @@ async def field_mappings_partial_update( api_key="YOUR_API_KEY", ) await client.ticketing.field_mapping.field_mappings_partial_update( - field_mapping_id="string", + field_mapping_id="field_mapping_id", remote_method="GET", remote_url_path="/example-url-path", ) @@ -629,7 +629,7 @@ async def field_mappings_partial_update( _response = await self._client_wrapper.httpx_client.request( "PATCH", urllib.parse.urljoin( - f"{self._client_wrapper.get_base_url()}/", f"api/ticketing/v1/field-mappings/{field_mapping_id}" + f"{self._client_wrapper.get_base_url()}/", f"ticketing/v1/field-mappings/{field_mapping_id}" ), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None @@ -687,7 +687,7 @@ async def remote_fields_retrieve( """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/ticketing/v1/remote-fields"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "ticketing/v1/remote-fields"), params=jsonable_encoder( remove_none_from_dict( { @@ -740,7 +740,7 @@ async def target_fields_retrieve( """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/ticketing/v1/target-fields"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "ticketing/v1/target-fields"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), diff --git a/src/merge/resources/ticketing/resources/force_resync/client.py b/src/merge/resources/ticketing/resources/force_resync/client.py index 47730b7d..f3fbe90a 100644 --- a/src/merge/resources/ticketing/resources/force_resync/client.py +++ b/src/merge/resources/ticketing/resources/force_resync/client.py @@ -40,7 +40,7 @@ def sync_status_resync_create( """ _response = self._client_wrapper.httpx_client.request( "POST", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/ticketing/v1/sync-status/resync"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "ticketing/v1/sync-status/resync"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -91,7 +91,7 @@ async def sync_status_resync_create( """ _response = await self._client_wrapper.httpx_client.request( "POST", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/ticketing/v1/sync-status/resync"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "ticketing/v1/sync-status/resync"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), diff --git a/src/merge/resources/ticketing/resources/generate_key/client.py b/src/merge/resources/ticketing/resources/generate_key/client.py index 66855acc..de32671e 100644 --- a/src/merge/resources/ticketing/resources/generate_key/client.py +++ b/src/merge/resources/ticketing/resources/generate_key/client.py @@ -29,7 +29,7 @@ def create(self, *, name: str, request_options: typing.Optional[RequestOptions] Create a remote key. Parameters: - - name: str. + - name: str. The name of the remote key - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- @@ -45,7 +45,7 @@ def create(self, *, name: str, request_options: typing.Optional[RequestOptions] """ _response = self._client_wrapper.httpx_client.request( "POST", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/ticketing/v1/generate-key"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "ticketing/v1/generate-key"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -85,7 +85,7 @@ async def create(self, *, name: str, request_options: typing.Optional[RequestOpt Create a remote key. Parameters: - - name: str. + - name: str. The name of the remote key - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- @@ -101,7 +101,7 @@ async def create(self, *, name: str, request_options: typing.Optional[RequestOpt """ _response = await self._client_wrapper.httpx_client.request( "POST", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/ticketing/v1/generate-key"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "ticketing/v1/generate-key"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), diff --git a/src/merge/resources/ticketing/resources/issues/client.py b/src/merge/resources/ticketing/resources/issues/client.py index 31a59316..009f844f 100644 --- a/src/merge/resources/ticketing/resources/issues/client.py +++ b/src/merge/resources/ticketing/resources/issues/client.py @@ -78,19 +78,16 @@ def list( - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from merge.client import Merge - from merge.resources.ticketing import IssuesListRequestStatus client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) - client.ticketing.issues.list( - status=IssuesListRequestStatus.ONGOING, - ) + client.ticketing.issues.list() """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/ticketing/v1/issues"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "ticketing/v1/issues"), params=jsonable_encoder( remove_none_from_dict( { @@ -159,12 +156,12 @@ def retrieve(self, id: str, *, request_options: typing.Optional[RequestOptions] api_key="YOUR_API_KEY", ) client.ticketing.issues.retrieve( - id="string", + id="id", ) """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"api/ticketing/v1/issues/{id}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"ticketing/v1/issues/{id}"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -246,19 +243,16 @@ async def list( - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from merge.client import AsyncMerge - from merge.resources.ticketing import IssuesListRequestStatus client = AsyncMerge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) - await client.ticketing.issues.list( - status=IssuesListRequestStatus.ONGOING, - ) + await client.ticketing.issues.list() """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/ticketing/v1/issues"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "ticketing/v1/issues"), params=jsonable_encoder( remove_none_from_dict( { @@ -327,12 +321,12 @@ async def retrieve(self, id: str, *, request_options: typing.Optional[RequestOpt api_key="YOUR_API_KEY", ) await client.ticketing.issues.retrieve( - id="string", + id="id", ) """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"api/ticketing/v1/issues/{id}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"ticketing/v1/issues/{id}"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), diff --git a/src/merge/resources/ticketing/resources/link_token/client.py b/src/merge/resources/ticketing/resources/link_token/client.py index a17f9233..c63caa20 100644 --- a/src/merge/resources/ticketing/resources/link_token/client.py +++ b/src/merge/resources/ticketing/resources/link_token/client.py @@ -41,6 +41,7 @@ def create( category_common_model_scopes: typing.Optional[ typing.Dict[str, typing.Optional[typing.List[IndividualCommonModelScopeDeserializerRequest]]] ] = OMIT, + language: typing.Optional[str] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> LinkToken: """ @@ -65,9 +66,12 @@ def create( - category_common_model_scopes: typing.Optional[typing.Dict[str, typing.Optional[typing.List[IndividualCommonModelScopeDeserializerRequest]]]]. When creating a Link Token, you can set permissions for Common Models that will apply to the account that is going to be linked. Any model or field not specified in link token payload will default to existing settings. + - language: typing.Optional[str]. The language code for the language to localize Merge Link to. + - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from merge.client import Merge + from merge.resources.ticketing import CategoriesEnum client = Merge( account_token="YOUR_ACCOUNT_TOKEN", @@ -77,8 +81,7 @@ def create( end_user_email_address="example@gmail.com", end_user_organization_name="Test Organization", end_user_origin_id="12345", - categories=[], - integration="bamboohr", + categories=[CategoriesEnum.HRIS], ) """ _request: typing.Dict[str, typing.Any] = { @@ -97,9 +100,11 @@ def create( _request["common_models"] = common_models if category_common_model_scopes is not OMIT: _request["category_common_model_scopes"] = category_common_model_scopes + if language is not OMIT: + _request["language"] = language _response = self._client_wrapper.httpx_client.request( "POST", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/ticketing/v1/link-token"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "ticketing/v1/link-token"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -148,6 +153,7 @@ async def create( category_common_model_scopes: typing.Optional[ typing.Dict[str, typing.Optional[typing.List[IndividualCommonModelScopeDeserializerRequest]]] ] = OMIT, + language: typing.Optional[str] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> LinkToken: """ @@ -172,9 +178,12 @@ async def create( - category_common_model_scopes: typing.Optional[typing.Dict[str, typing.Optional[typing.List[IndividualCommonModelScopeDeserializerRequest]]]]. When creating a Link Token, you can set permissions for Common Models that will apply to the account that is going to be linked. Any model or field not specified in link token payload will default to existing settings. + - language: typing.Optional[str]. The language code for the language to localize Merge Link to. + - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from merge.client import AsyncMerge + from merge.resources.ticketing import CategoriesEnum client = AsyncMerge( account_token="YOUR_ACCOUNT_TOKEN", @@ -184,8 +193,7 @@ async def create( end_user_email_address="example@gmail.com", end_user_organization_name="Test Organization", end_user_origin_id="12345", - categories=[], - integration="bamboohr", + categories=[CategoriesEnum.HRIS], ) """ _request: typing.Dict[str, typing.Any] = { @@ -204,9 +212,11 @@ async def create( _request["common_models"] = common_models if category_common_model_scopes is not OMIT: _request["category_common_model_scopes"] = category_common_model_scopes + if language is not OMIT: + _request["language"] = language _response = await self._client_wrapper.httpx_client.request( "POST", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/ticketing/v1/link-token"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "ticketing/v1/link-token"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), diff --git a/src/merge/resources/ticketing/resources/linked_accounts/client.py b/src/merge/resources/ticketing/resources/linked_accounts/client.py index cf626e9b..ad0a3d96 100644 --- a/src/merge/resources/ticketing/resources/linked_accounts/client.py +++ b/src/merge/resources/ticketing/resources/linked_accounts/client.py @@ -80,19 +80,16 @@ def list( - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from merge.client import Merge - from merge.resources.ticketing import LinkedAccountsListRequestCategory client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) - client.ticketing.linked_accounts.list( - category=LinkedAccountsListRequestCategory.ACCOUNTING, - ) + client.ticketing.linked_accounts.list() """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/ticketing/v1/linked-accounts"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "ticketing/v1/linked-accounts"), params=jsonable_encoder( remove_none_from_dict( { @@ -200,19 +197,16 @@ async def list( - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from merge.client import AsyncMerge - from merge.resources.ticketing import LinkedAccountsListRequestCategory client = AsyncMerge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) - await client.ticketing.linked_accounts.list( - category=LinkedAccountsListRequestCategory.ACCOUNTING, - ) + await client.ticketing.linked_accounts.list() """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/ticketing/v1/linked-accounts"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "ticketing/v1/linked-accounts"), params=jsonable_encoder( remove_none_from_dict( { diff --git a/src/merge/resources/ticketing/resources/passthrough/client.py b/src/merge/resources/ticketing/resources/passthrough/client.py index 355485c6..51d10d20 100644 --- a/src/merge/resources/ticketing/resources/passthrough/client.py +++ b/src/merge/resources/ticketing/resources/passthrough/client.py @@ -37,11 +37,7 @@ def create( - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from merge.client import Merge - from merge.resources.ticketing import ( - DataPassthroughRequest, - MethodEnum, - RequestFormatEnum, - ) + from merge.resources.ticketing import DataPassthroughRequest, MethodEnum client = Merge( account_token="YOUR_ACCOUNT_TOKEN", @@ -51,14 +47,12 @@ def create( request=DataPassthroughRequest( method=MethodEnum.GET, path="/scooters", - data='{"company": "Lime", "model": "Gen 2.5"}', - request_format=RequestFormatEnum.JSON, ), ) """ _response = self._client_wrapper.httpx_client.request( "POST", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/ticketing/v1/passthrough"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "ticketing/v1/passthrough"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -105,11 +99,7 @@ async def create( - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from merge.client import AsyncMerge - from merge.resources.ticketing import ( - DataPassthroughRequest, - MethodEnum, - RequestFormatEnum, - ) + from merge.resources.ticketing import DataPassthroughRequest, MethodEnum client = AsyncMerge( account_token="YOUR_ACCOUNT_TOKEN", @@ -119,14 +109,12 @@ async def create( request=DataPassthroughRequest( method=MethodEnum.GET, path="/scooters", - data='{"company": "Lime", "model": "Gen 2.5"}', - request_format=RequestFormatEnum.JSON, ), ) """ _response = await self._client_wrapper.httpx_client.request( "POST", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/ticketing/v1/passthrough"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "ticketing/v1/passthrough"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), diff --git a/src/merge/resources/ticketing/resources/projects/client.py b/src/merge/resources/ticketing/resources/projects/client.py index 5739bf77..a8f4dc81 100644 --- a/src/merge/resources/ticketing/resources/projects/client.py +++ b/src/merge/resources/ticketing/resources/projects/client.py @@ -74,7 +74,7 @@ def list( """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/ticketing/v1/projects"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "ticketing/v1/projects"), params=jsonable_encoder( remove_none_from_dict( { @@ -139,12 +139,12 @@ def retrieve( api_key="YOUR_API_KEY", ) client.ticketing.projects.retrieve( - id="string", + id="id", ) """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"api/ticketing/v1/projects/{id}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"ticketing/v1/projects/{id}"), params=jsonable_encoder( remove_none_from_dict( { @@ -207,22 +207,18 @@ def users_list( - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from merge.client import Merge - from merge.resources.ticketing import ProjectsUsersListRequestExpand client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) client.ticketing.projects.users_list( - parent_id="string", - expand=ProjectsUsersListRequestExpand.ROLES, + parent_id="parent_id", ) """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin( - f"{self._client_wrapper.get_base_url()}/", f"api/ticketing/v1/projects/{parent_id}/users" - ), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"ticketing/v1/projects/{parent_id}/users"), params=jsonable_encoder( remove_none_from_dict( { @@ -312,7 +308,7 @@ async def list( """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/ticketing/v1/projects"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "ticketing/v1/projects"), params=jsonable_encoder( remove_none_from_dict( { @@ -377,12 +373,12 @@ async def retrieve( api_key="YOUR_API_KEY", ) await client.ticketing.projects.retrieve( - id="string", + id="id", ) """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"api/ticketing/v1/projects/{id}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"ticketing/v1/projects/{id}"), params=jsonable_encoder( remove_none_from_dict( { @@ -445,22 +441,18 @@ async def users_list( - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from merge.client import AsyncMerge - from merge.resources.ticketing import ProjectsUsersListRequestExpand client = AsyncMerge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) await client.ticketing.projects.users_list( - parent_id="string", - expand=ProjectsUsersListRequestExpand.ROLES, + parent_id="parent_id", ) """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin( - f"{self._client_wrapper.get_base_url()}/", f"api/ticketing/v1/projects/{parent_id}/users" - ), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"ticketing/v1/projects/{parent_id}/users"), params=jsonable_encoder( remove_none_from_dict( { diff --git a/src/merge/resources/ticketing/resources/regenerate_key/client.py b/src/merge/resources/ticketing/resources/regenerate_key/client.py index 7287cfa9..974c355f 100644 --- a/src/merge/resources/ticketing/resources/regenerate_key/client.py +++ b/src/merge/resources/ticketing/resources/regenerate_key/client.py @@ -29,7 +29,7 @@ def create(self, *, name: str, request_options: typing.Optional[RequestOptions] Exchange remote keys. Parameters: - - name: str. + - name: str. The name of the remote key - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- @@ -45,7 +45,7 @@ def create(self, *, name: str, request_options: typing.Optional[RequestOptions] """ _response = self._client_wrapper.httpx_client.request( "POST", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/ticketing/v1/regenerate-key"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "ticketing/v1/regenerate-key"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -85,7 +85,7 @@ async def create(self, *, name: str, request_options: typing.Optional[RequestOpt Exchange remote keys. Parameters: - - name: str. + - name: str. The name of the remote key - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- @@ -101,7 +101,7 @@ async def create(self, *, name: str, request_options: typing.Optional[RequestOpt """ _response = await self._client_wrapper.httpx_client.request( "POST", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/ticketing/v1/regenerate-key"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "ticketing/v1/regenerate-key"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), diff --git a/src/merge/resources/ticketing/resources/roles/client.py b/src/merge/resources/ticketing/resources/roles/client.py index 8b36ceb9..56e85b56 100644 --- a/src/merge/resources/ticketing/resources/roles/client.py +++ b/src/merge/resources/ticketing/resources/roles/client.py @@ -72,7 +72,7 @@ def list( """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/ticketing/v1/roles"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "ticketing/v1/roles"), params=jsonable_encoder( remove_none_from_dict( { @@ -137,12 +137,12 @@ def retrieve( api_key="YOUR_API_KEY", ) client.ticketing.roles.retrieve( - id="string", + id="id", ) """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"api/ticketing/v1/roles/{id}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"ticketing/v1/roles/{id}"), params=jsonable_encoder( remove_none_from_dict( { @@ -228,7 +228,7 @@ async def list( """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/ticketing/v1/roles"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "ticketing/v1/roles"), params=jsonable_encoder( remove_none_from_dict( { @@ -293,12 +293,12 @@ async def retrieve( api_key="YOUR_API_KEY", ) await client.ticketing.roles.retrieve( - id="string", + id="id", ) """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"api/ticketing/v1/roles/{id}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"ticketing/v1/roles/{id}"), params=jsonable_encoder( remove_none_from_dict( { diff --git a/src/merge/resources/ticketing/resources/scopes/client.py b/src/merge/resources/ticketing/resources/scopes/client.py index 27edaa5d..28652240 100644 --- a/src/merge/resources/ticketing/resources/scopes/client.py +++ b/src/merge/resources/ticketing/resources/scopes/client.py @@ -29,7 +29,7 @@ def default_scopes_retrieve( self, *, request_options: typing.Optional[RequestOptions] = None ) -> CommonModelScopeApi: """ - Get the default permissions for Merge Common Models and fields across all Linked Accounts of a given category. [Learn More](https://help.merge.dev/en/articles/8828211-common-model-and-field-scopes). + Get the default permissions for Merge Common Models and fields across all Linked Accounts of a given category. [Learn more](https://help.merge.dev/en/articles/8828211-common-model-and-field-scopes). Parameters: - request_options: typing.Optional[RequestOptions]. Request-specific configuration. @@ -44,7 +44,7 @@ def default_scopes_retrieve( """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/ticketing/v1/default-scopes"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "ticketing/v1/default-scopes"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -72,7 +72,7 @@ def linked_account_scopes_retrieve( self, *, request_options: typing.Optional[RequestOptions] = None ) -> CommonModelScopeApi: """ - Get all available permissions for Merge Common Models and fields for a single Linked Account. [Learn More](https://help.merge.dev/en/articles/8828211-common-model-and-field-scopes). + Get all available permissions for Merge Common Models and fields for a single Linked Account. [Learn more](https://help.merge.dev/en/articles/8828211-common-model-and-field-scopes). Parameters: - request_options: typing.Optional[RequestOptions]. Request-specific configuration. @@ -87,7 +87,7 @@ def linked_account_scopes_retrieve( """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/ticketing/v1/linked-account-scopes"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "ticketing/v1/linked-account-scopes"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -118,7 +118,7 @@ def linked_account_scopes_create( request_options: typing.Optional[RequestOptions] = None, ) -> CommonModelScopeApi: """ - Update permissions for any Common Model or field for a single Linked Account. Any Scopes not set in this POST request will inherit the default Scopes. [Learn More](https://help.merge.dev/en/articles/8828211-common-model-and-field-scopes) + Update permissions for any Common Model or field for a single Linked Account. Any Scopes not set in this POST request will inherit the default Scopes. [Learn more](https://help.merge.dev/en/articles/8828211-common-model-and-field-scopes) Parameters: - common_models: typing.List[IndividualCommonModelScopeDeserializerRequest]. The common models you want to update the scopes for @@ -126,18 +126,25 @@ def linked_account_scopes_create( - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from merge.client import Merge + from merge.resources.ticketing import ( + IndividualCommonModelScopeDeserializerRequest, + ) client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) client.ticketing.scopes.linked_account_scopes_create( - common_models=[], + common_models=[ + IndividualCommonModelScopeDeserializerRequest( + model_name="model_name", + ) + ], ) """ _response = self._client_wrapper.httpx_client.request( "POST", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/ticketing/v1/linked-account-scopes"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "ticketing/v1/linked-account-scopes"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -176,7 +183,7 @@ async def default_scopes_retrieve( self, *, request_options: typing.Optional[RequestOptions] = None ) -> CommonModelScopeApi: """ - Get the default permissions for Merge Common Models and fields across all Linked Accounts of a given category. [Learn More](https://help.merge.dev/en/articles/8828211-common-model-and-field-scopes). + Get the default permissions for Merge Common Models and fields across all Linked Accounts of a given category. [Learn more](https://help.merge.dev/en/articles/8828211-common-model-and-field-scopes). Parameters: - request_options: typing.Optional[RequestOptions]. Request-specific configuration. @@ -191,7 +198,7 @@ async def default_scopes_retrieve( """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/ticketing/v1/default-scopes"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "ticketing/v1/default-scopes"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -219,7 +226,7 @@ async def linked_account_scopes_retrieve( self, *, request_options: typing.Optional[RequestOptions] = None ) -> CommonModelScopeApi: """ - Get all available permissions for Merge Common Models and fields for a single Linked Account. [Learn More](https://help.merge.dev/en/articles/8828211-common-model-and-field-scopes). + Get all available permissions for Merge Common Models and fields for a single Linked Account. [Learn more](https://help.merge.dev/en/articles/8828211-common-model-and-field-scopes). Parameters: - request_options: typing.Optional[RequestOptions]. Request-specific configuration. @@ -234,7 +241,7 @@ async def linked_account_scopes_retrieve( """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/ticketing/v1/linked-account-scopes"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "ticketing/v1/linked-account-scopes"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -265,7 +272,7 @@ async def linked_account_scopes_create( request_options: typing.Optional[RequestOptions] = None, ) -> CommonModelScopeApi: """ - Update permissions for any Common Model or field for a single Linked Account. Any Scopes not set in this POST request will inherit the default Scopes. [Learn More](https://help.merge.dev/en/articles/8828211-common-model-and-field-scopes) + Update permissions for any Common Model or field for a single Linked Account. Any Scopes not set in this POST request will inherit the default Scopes. [Learn more](https://help.merge.dev/en/articles/8828211-common-model-and-field-scopes) Parameters: - common_models: typing.List[IndividualCommonModelScopeDeserializerRequest]. The common models you want to update the scopes for @@ -273,18 +280,25 @@ async def linked_account_scopes_create( - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from merge.client import AsyncMerge + from merge.resources.ticketing import ( + IndividualCommonModelScopeDeserializerRequest, + ) client = AsyncMerge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) await client.ticketing.scopes.linked_account_scopes_create( - common_models=[], + common_models=[ + IndividualCommonModelScopeDeserializerRequest( + model_name="model_name", + ) + ], ) """ _response = await self._client_wrapper.httpx_client.request( "POST", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/ticketing/v1/linked-account-scopes"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "ticketing/v1/linked-account-scopes"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), diff --git a/src/merge/resources/ticketing/resources/selective_sync/client.py b/src/merge/resources/ticketing/resources/selective_sync/client.py index b314fb3c..8d23bf55 100644 --- a/src/merge/resources/ticketing/resources/selective_sync/client.py +++ b/src/merge/resources/ticketing/resources/selective_sync/client.py @@ -46,7 +46,7 @@ def configurations_list( _response = self._client_wrapper.httpx_client.request( "GET", urllib.parse.urljoin( - f"{self._client_wrapper.get_base_url()}/", "api/ticketing/v1/selective-sync/configurations" + f"{self._client_wrapper.get_base_url()}/", "ticketing/v1/selective-sync/configurations" ), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None @@ -86,19 +86,26 @@ def configurations_update( - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from merge.client import Merge + from merge.resources.ticketing import ( + LinkedAccountSelectiveSyncConfigurationRequest, + ) client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) client.ticketing.selective_sync.configurations_update( - sync_configurations=[], + sync_configurations=[ + LinkedAccountSelectiveSyncConfigurationRequest( + linked_account_conditions=[], + ) + ], ) """ _response = self._client_wrapper.httpx_client.request( "PUT", urllib.parse.urljoin( - f"{self._client_wrapper.get_base_url()}/", "api/ticketing/v1/selective-sync/configurations" + f"{self._client_wrapper.get_base_url()}/", "ticketing/v1/selective-sync/configurations" ), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None @@ -159,7 +166,7 @@ def meta_list( """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/ticketing/v1/selective-sync/meta"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "ticketing/v1/selective-sync/meta"), params=jsonable_encoder( remove_none_from_dict( { @@ -219,7 +226,7 @@ async def configurations_list( _response = await self._client_wrapper.httpx_client.request( "GET", urllib.parse.urljoin( - f"{self._client_wrapper.get_base_url()}/", "api/ticketing/v1/selective-sync/configurations" + f"{self._client_wrapper.get_base_url()}/", "ticketing/v1/selective-sync/configurations" ), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None @@ -259,19 +266,26 @@ async def configurations_update( - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from merge.client import AsyncMerge + from merge.resources.ticketing import ( + LinkedAccountSelectiveSyncConfigurationRequest, + ) client = AsyncMerge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) await client.ticketing.selective_sync.configurations_update( - sync_configurations=[], + sync_configurations=[ + LinkedAccountSelectiveSyncConfigurationRequest( + linked_account_conditions=[], + ) + ], ) """ _response = await self._client_wrapper.httpx_client.request( "PUT", urllib.parse.urljoin( - f"{self._client_wrapper.get_base_url()}/", "api/ticketing/v1/selective-sync/configurations" + f"{self._client_wrapper.get_base_url()}/", "ticketing/v1/selective-sync/configurations" ), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None @@ -332,7 +346,7 @@ async def meta_list( """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/ticketing/v1/selective-sync/meta"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "ticketing/v1/selective-sync/meta"), params=jsonable_encoder( remove_none_from_dict( { diff --git a/src/merge/resources/ticketing/resources/sync_status/client.py b/src/merge/resources/ticketing/resources/sync_status/client.py index 4c7352ce..8442cc65 100644 --- a/src/merge/resources/ticketing/resources/sync_status/client.py +++ b/src/merge/resources/ticketing/resources/sync_status/client.py @@ -48,7 +48,7 @@ def list( """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/ticketing/v1/sync-status"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "ticketing/v1/sync-status"), params=jsonable_encoder( remove_none_from_dict( { @@ -114,7 +114,7 @@ async def list( """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/ticketing/v1/sync-status"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "ticketing/v1/sync-status"), params=jsonable_encoder( remove_none_from_dict( { diff --git a/src/merge/resources/ticketing/resources/tags/client.py b/src/merge/resources/ticketing/resources/tags/client.py index c9a975d7..e38ded4b 100644 --- a/src/merge/resources/ticketing/resources/tags/client.py +++ b/src/merge/resources/ticketing/resources/tags/client.py @@ -72,7 +72,7 @@ def list( """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/ticketing/v1/tags"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "ticketing/v1/tags"), params=jsonable_encoder( remove_none_from_dict( { @@ -137,12 +137,12 @@ def retrieve( api_key="YOUR_API_KEY", ) client.ticketing.tags.retrieve( - id="string", + id="id", ) """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"api/ticketing/v1/tags/{id}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"ticketing/v1/tags/{id}"), params=jsonable_encoder( remove_none_from_dict( { @@ -228,7 +228,7 @@ async def list( """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/ticketing/v1/tags"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "ticketing/v1/tags"), params=jsonable_encoder( remove_none_from_dict( { @@ -293,12 +293,12 @@ async def retrieve( api_key="YOUR_API_KEY", ) await client.ticketing.tags.retrieve( - id="string", + id="id", ) """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"api/ticketing/v1/tags/{id}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"ticketing/v1/tags/{id}"), params=jsonable_encoder( remove_none_from_dict( { diff --git a/src/merge/resources/ticketing/resources/teams/client.py b/src/merge/resources/ticketing/resources/teams/client.py index a14ee732..349ed89d 100644 --- a/src/merge/resources/ticketing/resources/teams/client.py +++ b/src/merge/resources/ticketing/resources/teams/client.py @@ -72,7 +72,7 @@ def list( """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/ticketing/v1/teams"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "ticketing/v1/teams"), params=jsonable_encoder( remove_none_from_dict( { @@ -137,12 +137,12 @@ def retrieve( api_key="YOUR_API_KEY", ) client.ticketing.teams.retrieve( - id="string", + id="id", ) """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"api/ticketing/v1/teams/{id}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"ticketing/v1/teams/{id}"), params=jsonable_encoder( remove_none_from_dict( { @@ -228,7 +228,7 @@ async def list( """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/ticketing/v1/teams"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "ticketing/v1/teams"), params=jsonable_encoder( remove_none_from_dict( { @@ -293,12 +293,12 @@ async def retrieve( api_key="YOUR_API_KEY", ) await client.ticketing.teams.retrieve( - id="string", + id="id", ) """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"api/ticketing/v1/teams/{id}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"ticketing/v1/teams/{id}"), params=jsonable_encoder( remove_none_from_dict( { diff --git a/src/merge/resources/ticketing/resources/tickets/client.py b/src/merge/resources/ticketing/resources/tickets/client.py index 22dfa1f5..f48e0a09 100644 --- a/src/merge/resources/ticketing/resources/tickets/client.py +++ b/src/merge/resources/ticketing/resources/tickets/client.py @@ -65,7 +65,6 @@ def list( page_size: typing.Optional[int] = None, parent_ticket_id: typing.Optional[str] = None, priority: typing.Optional[TicketsListRequestPriority] = None, - project_id: typing.Optional[str] = None, remote_created_after: typing.Optional[dt.datetime] = None, remote_created_before: typing.Optional[dt.datetime] = None, remote_fields: typing.Optional[TicketsListRequestRemoteFields] = None, @@ -126,8 +125,6 @@ def list( - `HIGH` - HIGH - `NORMAL` - NORMAL - `LOW` - LOW - - project_id: typing.Optional[str]. If provided, will only return tickets for this project. - - remote_created_after: typing.Optional[dt.datetime]. If provided, will only return tickets created in the third party platform after this datetime. - remote_created_before: typing.Optional[dt.datetime]. If provided, will only return tickets created in the third party platform before this datetime. @@ -140,7 +137,7 @@ def list( - remote_updated_before: typing.Optional[dt.datetime]. If provided, will only return tickets updated in the third party platform before this datetime. - - show_enum_origins: typing.Optional[TicketsListRequestShowEnumOrigins]. Which fields should be returned in non-normalized form. + - show_enum_origins: typing.Optional[TicketsListRequestShowEnumOrigins]. A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) - status: typing.Optional[TicketsListRequestStatus]. If provided, will only return tickets of this status. @@ -155,29 +152,16 @@ def list( - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from merge.client import Merge - from merge.resources.ticketing import ( - TicketsListRequestExpand, - TicketsListRequestPriority, - TicketsListRequestRemoteFields, - TicketsListRequestShowEnumOrigins, - TicketsListRequestStatus, - ) client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) - client.ticketing.tickets.list( - expand=TicketsListRequestExpand.ACCOUNT, - priority=TicketsListRequestPriority.HIGH, - remote_fields=TicketsListRequestRemoteFields.PRIORITY, - show_enum_origins=TicketsListRequestShowEnumOrigins.PRIORITY, - status=TicketsListRequestStatus.CLOSED, - ) + client.ticketing.tickets.list() """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/ticketing/v1/tickets"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "ticketing/v1/tickets"), params=jsonable_encoder( remove_none_from_dict( { @@ -203,7 +187,6 @@ def list( "page_size": page_size, "parent_ticket_id": parent_ticket_id, "priority": priority, - "project_id": project_id, "remote_created_after": serialize_datetime(remote_created_after) if remote_created_after is not None else None, @@ -270,8 +253,6 @@ def create( - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- - import datetime - from merge.client import Merge from merge.resources.ticketing import TicketRequest @@ -280,23 +261,12 @@ def create( api_key="YOUR_API_KEY", ) client.ticketing.tickets.create( - model=TicketRequest( - name="Please add more integrations", - due_date=datetime.datetime.fromisoformat( - "2022-10-11 00:00:00+00:00", - ), - description="Can you please add more integrations? It'll make syncing data much easier!", - ticket_type="incident", - completed_at=datetime.datetime.fromisoformat( - "2021-12-09 00:00:00+00:00", - ), - ticket_url="https://thirdpartysoftware.com/project/3/issue/1", - ), + model=TicketRequest(), ) """ _response = self._client_wrapper.httpx_client.request( "POST", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/ticketing/v1/tickets"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "ticketing/v1/tickets"), params=jsonable_encoder( remove_none_from_dict( { @@ -361,31 +331,23 @@ def retrieve( - remote_fields: typing.Optional[TicketsRetrieveRequestRemoteFields]. Deprecated. Use show_enum_origins. - - show_enum_origins: typing.Optional[TicketsRetrieveRequestShowEnumOrigins]. Which fields should be returned in non-normalized form. + - show_enum_origins: typing.Optional[TicketsRetrieveRequestShowEnumOrigins]. A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from merge.client import Merge - from merge.resources.ticketing import ( - TicketsRetrieveRequestExpand, - TicketsRetrieveRequestRemoteFields, - TicketsRetrieveRequestShowEnumOrigins, - ) client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) client.ticketing.tickets.retrieve( - id="string", - expand=TicketsRetrieveRequestExpand.ACCOUNT, - remote_fields=TicketsRetrieveRequestRemoteFields.PRIORITY, - show_enum_origins=TicketsRetrieveRequestShowEnumOrigins.PRIORITY, + id="id", ) """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"api/ticketing/v1/tickets/{id}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"ticketing/v1/tickets/{id}"), params=jsonable_encoder( remove_none_from_dict( { @@ -445,8 +407,6 @@ def partial_update( - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- - import datetime - from merge.client import Merge from merge.resources.ticketing import PatchedTicketRequest @@ -455,27 +415,13 @@ def partial_update( api_key="YOUR_API_KEY", ) client.ticketing.tickets.partial_update( - id="string", - model=PatchedTicketRequest( - name="Please add more integrations", - due_date=datetime.datetime.fromisoformat( - "2022-10-11 00:00:00+00:00", - ), - description="Can you please add more integrations? It'll make syncing data much easier!", - ticket_type="incident", - account="0958cbc6-6040-430a-848e-aafacbadf4ae", - contact="65c345ba-6870-4974-87ba-dd31509c367a", - parent_ticket="75b33d04-30d2-4f3e-be45-27838bc94342", - completed_at=datetime.datetime.fromisoformat( - "2021-12-09 00:00:00+00:00", - ), - ticket_url="https://thirdpartysoftware.com/project/3/issue/1", - ), + id="id", + model=PatchedTicketRequest(), ) """ _response = self._client_wrapper.httpx_client.request( "PATCH", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"api/ticketing/v1/tickets/{id}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"ticketing/v1/tickets/{id}"), params=jsonable_encoder( remove_none_from_dict( { @@ -545,21 +491,19 @@ def collaborators_list( - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from merge.client import Merge - from merge.resources.ticketing import TicketsCollaboratorsListRequestExpand client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) client.ticketing.tickets.collaborators_list( - parent_id="string", - expand=TicketsCollaboratorsListRequestExpand.ROLES, + parent_id="parent_id", ) """ _response = self._client_wrapper.httpx_client.request( "GET", urllib.parse.urljoin( - f"{self._client_wrapper.get_base_url()}/", f"api/ticketing/v1/tickets/{parent_id}/collaborators" + f"{self._client_wrapper.get_base_url()}/", f"ticketing/v1/tickets/{parent_id}/collaborators" ), params=jsonable_encoder( remove_none_from_dict( @@ -613,14 +557,12 @@ def meta_patch_retrieve(self, id: str, *, request_options: typing.Optional[Reque api_key="YOUR_API_KEY", ) client.ticketing.tickets.meta_patch_retrieve( - id="string", + id="id", ) """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin( - f"{self._client_wrapper.get_base_url()}/", f"api/ticketing/v1/tickets/meta/patch/{id}" - ), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"ticketing/v1/tickets/meta/patch/{id}"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -661,7 +603,7 @@ def meta_post_retrieve(self, *, request_options: typing.Optional[RequestOptions] """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/ticketing/v1/tickets/meta/post"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "ticketing/v1/tickets/meta/post"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -719,7 +661,7 @@ def remote_field_classes_list( _response = self._client_wrapper.httpx_client.request( "GET", urllib.parse.urljoin( - f"{self._client_wrapper.get_base_url()}/", "api/ticketing/v1/tickets/remote-field-classes" + f"{self._client_wrapper.get_base_url()}/", "ticketing/v1/tickets/remote-field-classes" ), params=jsonable_encoder( remove_none_from_dict( @@ -784,7 +726,6 @@ async def list( page_size: typing.Optional[int] = None, parent_ticket_id: typing.Optional[str] = None, priority: typing.Optional[TicketsListRequestPriority] = None, - project_id: typing.Optional[str] = None, remote_created_after: typing.Optional[dt.datetime] = None, remote_created_before: typing.Optional[dt.datetime] = None, remote_fields: typing.Optional[TicketsListRequestRemoteFields] = None, @@ -845,8 +786,6 @@ async def list( - `HIGH` - HIGH - `NORMAL` - NORMAL - `LOW` - LOW - - project_id: typing.Optional[str]. If provided, will only return tickets for this project. - - remote_created_after: typing.Optional[dt.datetime]. If provided, will only return tickets created in the third party platform after this datetime. - remote_created_before: typing.Optional[dt.datetime]. If provided, will only return tickets created in the third party platform before this datetime. @@ -859,7 +798,7 @@ async def list( - remote_updated_before: typing.Optional[dt.datetime]. If provided, will only return tickets updated in the third party platform before this datetime. - - show_enum_origins: typing.Optional[TicketsListRequestShowEnumOrigins]. Which fields should be returned in non-normalized form. + - show_enum_origins: typing.Optional[TicketsListRequestShowEnumOrigins]. A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) - status: typing.Optional[TicketsListRequestStatus]. If provided, will only return tickets of this status. @@ -874,29 +813,16 @@ async def list( - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from merge.client import AsyncMerge - from merge.resources.ticketing import ( - TicketsListRequestExpand, - TicketsListRequestPriority, - TicketsListRequestRemoteFields, - TicketsListRequestShowEnumOrigins, - TicketsListRequestStatus, - ) client = AsyncMerge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) - await client.ticketing.tickets.list( - expand=TicketsListRequestExpand.ACCOUNT, - priority=TicketsListRequestPriority.HIGH, - remote_fields=TicketsListRequestRemoteFields.PRIORITY, - show_enum_origins=TicketsListRequestShowEnumOrigins.PRIORITY, - status=TicketsListRequestStatus.CLOSED, - ) + await client.ticketing.tickets.list() """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/ticketing/v1/tickets"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "ticketing/v1/tickets"), params=jsonable_encoder( remove_none_from_dict( { @@ -922,7 +848,6 @@ async def list( "page_size": page_size, "parent_ticket_id": parent_ticket_id, "priority": priority, - "project_id": project_id, "remote_created_after": serialize_datetime(remote_created_after) if remote_created_after is not None else None, @@ -989,8 +914,6 @@ async def create( - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- - import datetime - from merge.client import AsyncMerge from merge.resources.ticketing import TicketRequest @@ -999,23 +922,12 @@ async def create( api_key="YOUR_API_KEY", ) await client.ticketing.tickets.create( - model=TicketRequest( - name="Please add more integrations", - due_date=datetime.datetime.fromisoformat( - "2022-10-11 00:00:00+00:00", - ), - description="Can you please add more integrations? It'll make syncing data much easier!", - ticket_type="incident", - completed_at=datetime.datetime.fromisoformat( - "2021-12-09 00:00:00+00:00", - ), - ticket_url="https://thirdpartysoftware.com/project/3/issue/1", - ), + model=TicketRequest(), ) """ _response = await self._client_wrapper.httpx_client.request( "POST", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/ticketing/v1/tickets"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "ticketing/v1/tickets"), params=jsonable_encoder( remove_none_from_dict( { @@ -1080,31 +992,23 @@ async def retrieve( - remote_fields: typing.Optional[TicketsRetrieveRequestRemoteFields]. Deprecated. Use show_enum_origins. - - show_enum_origins: typing.Optional[TicketsRetrieveRequestShowEnumOrigins]. Which fields should be returned in non-normalized form. + - show_enum_origins: typing.Optional[TicketsRetrieveRequestShowEnumOrigins]. A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter) - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from merge.client import AsyncMerge - from merge.resources.ticketing import ( - TicketsRetrieveRequestExpand, - TicketsRetrieveRequestRemoteFields, - TicketsRetrieveRequestShowEnumOrigins, - ) client = AsyncMerge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) await client.ticketing.tickets.retrieve( - id="string", - expand=TicketsRetrieveRequestExpand.ACCOUNT, - remote_fields=TicketsRetrieveRequestRemoteFields.PRIORITY, - show_enum_origins=TicketsRetrieveRequestShowEnumOrigins.PRIORITY, + id="id", ) """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"api/ticketing/v1/tickets/{id}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"ticketing/v1/tickets/{id}"), params=jsonable_encoder( remove_none_from_dict( { @@ -1164,8 +1068,6 @@ async def partial_update( - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- - import datetime - from merge.client import AsyncMerge from merge.resources.ticketing import PatchedTicketRequest @@ -1174,27 +1076,13 @@ async def partial_update( api_key="YOUR_API_KEY", ) await client.ticketing.tickets.partial_update( - id="string", - model=PatchedTicketRequest( - name="Please add more integrations", - due_date=datetime.datetime.fromisoformat( - "2022-10-11 00:00:00+00:00", - ), - description="Can you please add more integrations? It'll make syncing data much easier!", - ticket_type="incident", - account="0958cbc6-6040-430a-848e-aafacbadf4ae", - contact="65c345ba-6870-4974-87ba-dd31509c367a", - parent_ticket="75b33d04-30d2-4f3e-be45-27838bc94342", - completed_at=datetime.datetime.fromisoformat( - "2021-12-09 00:00:00+00:00", - ), - ticket_url="https://thirdpartysoftware.com/project/3/issue/1", - ), + id="id", + model=PatchedTicketRequest(), ) """ _response = await self._client_wrapper.httpx_client.request( "PATCH", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"api/ticketing/v1/tickets/{id}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"ticketing/v1/tickets/{id}"), params=jsonable_encoder( remove_none_from_dict( { @@ -1264,21 +1152,19 @@ async def collaborators_list( - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from merge.client import AsyncMerge - from merge.resources.ticketing import TicketsCollaboratorsListRequestExpand client = AsyncMerge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) await client.ticketing.tickets.collaborators_list( - parent_id="string", - expand=TicketsCollaboratorsListRequestExpand.ROLES, + parent_id="parent_id", ) """ _response = await self._client_wrapper.httpx_client.request( "GET", urllib.parse.urljoin( - f"{self._client_wrapper.get_base_url()}/", f"api/ticketing/v1/tickets/{parent_id}/collaborators" + f"{self._client_wrapper.get_base_url()}/", f"ticketing/v1/tickets/{parent_id}/collaborators" ), params=jsonable_encoder( remove_none_from_dict( @@ -1334,14 +1220,12 @@ async def meta_patch_retrieve( api_key="YOUR_API_KEY", ) await client.ticketing.tickets.meta_patch_retrieve( - id="string", + id="id", ) """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin( - f"{self._client_wrapper.get_base_url()}/", f"api/ticketing/v1/tickets/meta/patch/{id}" - ), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"ticketing/v1/tickets/meta/patch/{id}"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -1382,7 +1266,7 @@ async def meta_post_retrieve(self, *, request_options: typing.Optional[RequestOp """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/ticketing/v1/tickets/meta/post"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "ticketing/v1/tickets/meta/post"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -1440,7 +1324,7 @@ async def remote_field_classes_list( _response = await self._client_wrapper.httpx_client.request( "GET", urllib.parse.urljoin( - f"{self._client_wrapper.get_base_url()}/", "api/ticketing/v1/tickets/remote-field-classes" + f"{self._client_wrapper.get_base_url()}/", "ticketing/v1/tickets/remote-field-classes" ), params=jsonable_encoder( remove_none_from_dict( diff --git a/src/merge/resources/ticketing/resources/users/client.py b/src/merge/resources/ticketing/resources/users/client.py index 8f2d02a3..dd727686 100644 --- a/src/merge/resources/ticketing/resources/users/client.py +++ b/src/merge/resources/ticketing/resources/users/client.py @@ -71,19 +71,16 @@ def list( - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from merge.client import Merge - from merge.resources.ticketing import UsersListRequestExpand client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) - client.ticketing.users.list( - expand=UsersListRequestExpand.ROLES, - ) + client.ticketing.users.list() """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/ticketing/v1/users"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "ticketing/v1/users"), params=jsonable_encoder( remove_none_from_dict( { @@ -147,20 +144,18 @@ def retrieve( - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from merge.client import Merge - from merge.resources.ticketing import UsersRetrieveRequestExpand client = Merge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) client.ticketing.users.retrieve( - id="string", - expand=UsersRetrieveRequestExpand.ROLES, + id="id", ) """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"api/ticketing/v1/users/{id}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"ticketing/v1/users/{id}"), params=jsonable_encoder( remove_none_from_dict( { @@ -244,19 +239,16 @@ async def list( - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from merge.client import AsyncMerge - from merge.resources.ticketing import UsersListRequestExpand client = AsyncMerge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) - await client.ticketing.users.list( - expand=UsersListRequestExpand.ROLES, - ) + await client.ticketing.users.list() """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/ticketing/v1/users"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "ticketing/v1/users"), params=jsonable_encoder( remove_none_from_dict( { @@ -320,20 +312,18 @@ async def retrieve( - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from merge.client import AsyncMerge - from merge.resources.ticketing import UsersRetrieveRequestExpand client = AsyncMerge( account_token="YOUR_ACCOUNT_TOKEN", api_key="YOUR_API_KEY", ) await client.ticketing.users.retrieve( - id="string", - expand=UsersRetrieveRequestExpand.ROLES, + id="id", ) """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"api/ticketing/v1/users/{id}"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"ticketing/v1/users/{id}"), params=jsonable_encoder( remove_none_from_dict( { diff --git a/src/merge/resources/ticketing/resources/webhook_receivers/client.py b/src/merge/resources/ticketing/resources/webhook_receivers/client.py index d80343bd..06aacfbd 100644 --- a/src/merge/resources/ticketing/resources/webhook_receivers/client.py +++ b/src/merge/resources/ticketing/resources/webhook_receivers/client.py @@ -41,7 +41,7 @@ def list(self, *, request_options: typing.Optional[RequestOptions] = None) -> ty """ _response = self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/ticketing/v1/webhook-receivers"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "ticketing/v1/webhook-receivers"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -92,7 +92,7 @@ def create( api_key="YOUR_API_KEY", ) client.ticketing.webhook_receivers.create( - event="string", + event="event", is_active=True, ) """ @@ -101,7 +101,7 @@ def create( _request["key"] = key _response = self._client_wrapper.httpx_client.request( "POST", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/ticketing/v1/webhook-receivers"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "ticketing/v1/webhook-receivers"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -153,7 +153,7 @@ async def list(self, *, request_options: typing.Optional[RequestOptions] = None) """ _response = await self._client_wrapper.httpx_client.request( "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/ticketing/v1/webhook-receivers"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "ticketing/v1/webhook-receivers"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), @@ -204,7 +204,7 @@ async def create( api_key="YOUR_API_KEY", ) await client.ticketing.webhook_receivers.create( - event="string", + event="event", is_active=True, ) """ @@ -213,7 +213,7 @@ async def create( _request["key"] = key _response = await self._client_wrapper.httpx_client.request( "POST", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/ticketing/v1/webhook-receivers"), + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "ticketing/v1/webhook-receivers"), params=jsonable_encoder( request_options.get("additional_query_parameters") if request_options is not None else None ), diff --git a/src/merge/resources/ticketing/types/account.py b/src/merge/resources/ticketing/types/account.py index 44ed349c..c5fc0fdb 100644 --- a/src/merge/resources/ticketing/types/account.py +++ b/src/merge/resources/ticketing/types/account.py @@ -29,6 +29,10 @@ class Account(pydantic.BaseModel): id: typing.Optional[str] remote_id: typing.Optional[str] = pydantic.Field(description="The third-party API ID of the matching object.") + created_at: typing.Optional[dt.datetime] + modified_at: typing.Optional[dt.datetime] = pydantic.Field( + description="This is the datetime that this object was last updated by Merge" + ) name: typing.Optional[str] = pydantic.Field(description="The account's name.") domains: typing.Optional[typing.List[typing.Optional[str]]] = pydantic.Field( description="The account's domain names." @@ -36,10 +40,6 @@ class Account(pydantic.BaseModel): remote_was_deleted: typing.Optional[bool] = pydantic.Field( description="Indicates whether or not this object has been deleted in the third party platform." ) - created_at: typing.Optional[dt.datetime] - modified_at: typing.Optional[dt.datetime] = pydantic.Field( - description="This is the datetime that this object was last updated by Merge" - ) field_mappings: typing.Optional[typing.Dict[str, typing.Any]] remote_data: typing.Optional[typing.List[RemoteData]] diff --git a/src/merge/resources/ticketing/types/account_details_and_actions.py b/src/merge/resources/ticketing/types/account_details_and_actions.py index fda4a3a9..8141e146 100644 --- a/src/merge/resources/ticketing/types/account_details_and_actions.py +++ b/src/merge/resources/ticketing/types/account_details_and_actions.py @@ -34,6 +34,9 @@ class AccountDetailsAndActions(pydantic.BaseModel): end_user_origin_id: typing.Optional[str] end_user_organization_name: str end_user_email_address: str + subdomain: typing.Optional[str] = pydantic.Field( + description="The tenant or domain the customer has provided access to." + ) webhook_listener_url: str is_duplicate: typing.Optional[bool] = pydantic.Field( description="Whether a Production Linked Account's credentials match another existing Production Linked Account. This field is `null` for Test Linked Accounts, incomplete Production Linked Accounts, and ignored duplicate Production Linked Account sets." diff --git a/src/merge/resources/ticketing/types/attachment.py b/src/merge/resources/ticketing/types/attachment.py index d54ab47d..4d6db302 100644 --- a/src/merge/resources/ticketing/types/attachment.py +++ b/src/merge/resources/ticketing/types/attachment.py @@ -29,6 +29,10 @@ class Attachment(pydantic.BaseModel): id: typing.Optional[str] remote_id: typing.Optional[str] = pydantic.Field(description="The third-party API ID of the matching object.") + created_at: typing.Optional[dt.datetime] + modified_at: typing.Optional[dt.datetime] = pydantic.Field( + description="This is the datetime that this object was last updated by Merge" + ) file_name: typing.Optional[str] = pydantic.Field( description="The attachment's name. It is required to include the file extension in the attachment's name." ) @@ -42,10 +46,6 @@ class Attachment(pydantic.BaseModel): description="When the third party's attachment was created." ) remote_was_deleted: typing.Optional[bool] - created_at: typing.Optional[dt.datetime] - modified_at: typing.Optional[dt.datetime] = pydantic.Field( - description="This is the datetime that this object was last updated by Merge" - ) field_mappings: typing.Optional[typing.Dict[str, typing.Any]] remote_data: typing.Optional[typing.List[RemoteData]] diff --git a/src/merge/resources/ticketing/types/audit_log_event.py b/src/merge/resources/ticketing/types/audit_log_event.py index 7bb2d3c6..131ad94b 100644 --- a/src/merge/resources/ticketing/types/audit_log_event.py +++ b/src/merge/resources/ticketing/types/audit_log_event.py @@ -69,6 +69,9 @@ class AuditLogEvent(pydantic.BaseModel): "- `CHANGED_LINKED_ACCOUNT_FIELD_MAPPING` - CHANGED_LINKED_ACCOUNT_FIELD_MAPPING\n" "- `DELETED_INTEGRATION_WIDE_FIELD_MAPPING` - DELETED_INTEGRATION_WIDE_FIELD_MAPPING\n" "- `DELETED_LINKED_ACCOUNT_FIELD_MAPPING` - DELETED_LINKED_ACCOUNT_FIELD_MAPPING\n" + "- `FORCED_LINKED_ACCOUNT_RESYNC` - FORCED_LINKED_ACCOUNT_RESYNC\n" + "- `MUTED_ISSUE` - MUTED_ISSUE\n" + "- `GENERATED_MAGIC_LINK` - GENERATED_MAGIC_LINK\n" ) ) event_description: str diff --git a/src/merge/resources/ticketing/types/collection.py b/src/merge/resources/ticketing/types/collection.py index a28a8454..2ec1531a 100644 --- a/src/merge/resources/ticketing/types/collection.py +++ b/src/merge/resources/ticketing/types/collection.py @@ -32,6 +32,10 @@ class Collection(pydantic.BaseModel): id: typing.Optional[str] remote_id: typing.Optional[str] = pydantic.Field(description="The third-party API ID of the matching object.") + created_at: typing.Optional[dt.datetime] + modified_at: typing.Optional[dt.datetime] = pydantic.Field( + description="This is the datetime that this object was last updated by Merge" + ) name: typing.Optional[str] = pydantic.Field(description="The collection's name.") description: typing.Optional[str] = pydantic.Field(description="The collection's description.") collection_type: typing.Optional[CollectionCollectionType] = pydantic.Field( @@ -52,10 +56,6 @@ class Collection(pydantic.BaseModel): "- `PUBLIC` - PUBLIC\n" ) ) - created_at: typing.Optional[dt.datetime] - modified_at: typing.Optional[dt.datetime] = pydantic.Field( - description="This is the datetime that this object was last updated by Merge" - ) field_mappings: typing.Optional[typing.Dict[str, typing.Any]] remote_data: typing.Optional[typing.List[RemoteData]] diff --git a/src/merge/resources/ticketing/types/comment.py b/src/merge/resources/ticketing/types/comment.py index d1779bd8..e061ab9c 100644 --- a/src/merge/resources/ticketing/types/comment.py +++ b/src/merge/resources/ticketing/types/comment.py @@ -30,6 +30,10 @@ class Comment(pydantic.BaseModel): id: typing.Optional[str] remote_id: typing.Optional[str] = pydantic.Field(description="The third-party API ID of the matching object.") + created_at: typing.Optional[dt.datetime] + modified_at: typing.Optional[dt.datetime] = pydantic.Field( + description="This is the datetime that this object was last updated by Merge" + ) user: typing.Optional[CommentUser] = pydantic.Field( description="The author of the Comment, if the author is a User." ) @@ -44,10 +48,6 @@ class Comment(pydantic.BaseModel): description="When the third party's comment was created." ) remote_was_deleted: typing.Optional[bool] - created_at: typing.Optional[dt.datetime] - modified_at: typing.Optional[dt.datetime] = pydantic.Field( - description="This is the datetime that this object was last updated by Merge" - ) field_mappings: typing.Optional[typing.Dict[str, typing.Any]] remote_data: typing.Optional[typing.List[RemoteData]] diff --git a/src/merge/resources/ticketing/types/condition_schema.py b/src/merge/resources/ticketing/types/condition_schema.py index 7ebf9534..c8aebb68 100644 --- a/src/merge/resources/ticketing/types/condition_schema.py +++ b/src/merge/resources/ticketing/types/condition_schema.py @@ -20,12 +20,8 @@ class ConditionSchema(pydantic.BaseModel): common_model: typing.Optional[str] = pydantic.Field( description="The common model for which a condition schema is defined." ) - native_name: typing.Optional[str] = pydantic.Field( - description='User-facing _native condition_ name. e.g. "Skip Manager".' - ) - field_name: typing.Optional[str] = pydantic.Field( - description='The name of the field on the common model that this condition corresponds to, if they conceptually match. e.g. "location_type".' - ) + native_name: typing.Optional[str] + field_name: typing.Optional[str] is_unique: typing.Optional[bool] = pydantic.Field( description="Whether this condition can only be applied once. If false, the condition can be AND'd together multiple times." ) diff --git a/src/merge/resources/ticketing/types/contact.py b/src/merge/resources/ticketing/types/contact.py index b0c6e586..694c3028 100644 --- a/src/merge/resources/ticketing/types/contact.py +++ b/src/merge/resources/ticketing/types/contact.py @@ -28,6 +28,10 @@ class Contact(pydantic.BaseModel): id: typing.Optional[str] remote_id: typing.Optional[str] = pydantic.Field(description="The third-party API ID of the matching object.") + created_at: typing.Optional[dt.datetime] + modified_at: typing.Optional[dt.datetime] = pydantic.Field( + description="This is the datetime that this object was last updated by Merge" + ) name: typing.Optional[str] = pydantic.Field(description="The contact's name.") email_address: typing.Optional[str] = pydantic.Field(description="The contact's email address.") phone_number: typing.Optional[str] = pydantic.Field(description="The contact's phone number.") @@ -36,10 +40,6 @@ class Contact(pydantic.BaseModel): remote_was_deleted: typing.Optional[bool] = pydantic.Field( description="Indicates whether or not this object has been deleted in the third party platform." ) - created_at: typing.Optional[dt.datetime] - modified_at: typing.Optional[dt.datetime] = pydantic.Field( - description="This is the datetime that this object was last updated by Merge" - ) field_mappings: typing.Optional[typing.Dict[str, typing.Any]] remote_data: typing.Optional[typing.List[RemoteData]] diff --git a/src/merge/resources/ticketing/types/data_passthrough_request.py b/src/merge/resources/ticketing/types/data_passthrough_request.py index 3acebedd..def5b5c2 100644 --- a/src/merge/resources/ticketing/types/data_passthrough_request.py +++ b/src/merge/resources/ticketing/types/data_passthrough_request.py @@ -28,9 +28,13 @@ class DataPassthroughRequest(pydantic.BaseModel): """ method: MethodEnum - path: str - base_url_override: typing.Optional[str] - data: typing.Optional[str] + path: str = pydantic.Field(description="The path of the request in the third party's platform.") + base_url_override: typing.Optional[str] = pydantic.Field( + description="An optional override of the third party's base url for the request." + ) + data: typing.Optional[str] = pydantic.Field( + description="The data with the request. You must include a `request_format` parameter matching the data's format" + ) multipart_form_data: typing.Optional[typing.List[MultipartFormFieldRequest]] = pydantic.Field( description="Pass an array of `MultipartFormField` objects in here instead of using the `data` param if `request_format` is set to `MULTIPART`." ) diff --git a/src/merge/resources/ticketing/types/event_type_enum.py b/src/merge/resources/ticketing/types/event_type_enum.py index 5ed5b7f1..434539c7 100644 --- a/src/merge/resources/ticketing/types/event_type_enum.py +++ b/src/merge/resources/ticketing/types/event_type_enum.py @@ -39,6 +39,9 @@ class EventTypeEnum(str, enum.Enum): - `CHANGED_LINKED_ACCOUNT_FIELD_MAPPING` - CHANGED_LINKED_ACCOUNT_FIELD_MAPPING - `DELETED_INTEGRATION_WIDE_FIELD_MAPPING` - DELETED_INTEGRATION_WIDE_FIELD_MAPPING - `DELETED_LINKED_ACCOUNT_FIELD_MAPPING` - DELETED_LINKED_ACCOUNT_FIELD_MAPPING + - `FORCED_LINKED_ACCOUNT_RESYNC` - FORCED_LINKED_ACCOUNT_RESYNC + - `MUTED_ISSUE` - MUTED_ISSUE + - `GENERATED_MAGIC_LINK` - GENERATED_MAGIC_LINK """ CREATED_REMOTE_PRODUCTION_API_KEY = "CREATED_REMOTE_PRODUCTION_API_KEY" @@ -72,6 +75,9 @@ class EventTypeEnum(str, enum.Enum): CHANGED_LINKED_ACCOUNT_FIELD_MAPPING = "CHANGED_LINKED_ACCOUNT_FIELD_MAPPING" DELETED_INTEGRATION_WIDE_FIELD_MAPPING = "DELETED_INTEGRATION_WIDE_FIELD_MAPPING" DELETED_LINKED_ACCOUNT_FIELD_MAPPING = "DELETED_LINKED_ACCOUNT_FIELD_MAPPING" + FORCED_LINKED_ACCOUNT_RESYNC = "FORCED_LINKED_ACCOUNT_RESYNC" + MUTED_ISSUE = "MUTED_ISSUE" + GENERATED_MAGIC_LINK = "GENERATED_MAGIC_LINK" def visit( self, @@ -106,6 +112,9 @@ def visit( changed_linked_account_field_mapping: typing.Callable[[], T_Result], deleted_integration_wide_field_mapping: typing.Callable[[], T_Result], deleted_linked_account_field_mapping: typing.Callable[[], T_Result], + forced_linked_account_resync: typing.Callable[[], T_Result], + muted_issue: typing.Callable[[], T_Result], + generated_magic_link: typing.Callable[[], T_Result], ) -> T_Result: if self is EventTypeEnum.CREATED_REMOTE_PRODUCTION_API_KEY: return created_remote_production_api_key() @@ -169,3 +178,9 @@ def visit( return deleted_integration_wide_field_mapping() if self is EventTypeEnum.DELETED_LINKED_ACCOUNT_FIELD_MAPPING: return deleted_linked_account_field_mapping() + if self is EventTypeEnum.FORCED_LINKED_ACCOUNT_RESYNC: + return forced_linked_account_resync() + if self is EventTypeEnum.MUTED_ISSUE: + return muted_issue() + if self is EventTypeEnum.GENERATED_MAGIC_LINK: + return generated_magic_link() diff --git a/src/merge/resources/ticketing/types/linked_account_condition.py b/src/merge/resources/ticketing/types/linked_account_condition.py index 430adc00..f13ef90d 100644 --- a/src/merge/resources/ticketing/types/linked_account_condition.py +++ b/src/merge/resources/ticketing/types/linked_account_condition.py @@ -16,14 +16,10 @@ class LinkedAccountCondition(pydantic.BaseModel): description="The ID indicating which condition schema to use for a specific condition." ) common_model: typing.Optional[str] = pydantic.Field(description="The common model for a specific condition.") - native_name: typing.Optional[str] = pydantic.Field( - description='User-facing _native condition_ name. e.g. "Skip Manager".' - ) + native_name: typing.Optional[str] operator: str = pydantic.Field(description="The operator for a specific condition.") value: typing.Optional[typing.Any] - field_name: typing.Optional[str] = pydantic.Field( - description='The name of the field on the common model that this condition corresponds to, if they conceptually match. e.g. "location_type".' - ) + field_name: typing.Optional[str] def json(self, **kwargs: typing.Any) -> str: kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs} diff --git a/src/merge/resources/ticketing/types/linked_account_condition_request.py b/src/merge/resources/ticketing/types/linked_account_condition_request.py index 23ff21f1..ce36a27f 100644 --- a/src/merge/resources/ticketing/types/linked_account_condition_request.py +++ b/src/merge/resources/ticketing/types/linked_account_condition_request.py @@ -12,6 +12,7 @@ class LinkedAccountConditionRequest(pydantic.BaseModel): + id: typing.Optional[str] = pydantic.Field(description="The ID indicating which Linked Account Condition this is.") condition_schema_id: str = pydantic.Field( description="The ID indicating which condition schema to use for a specific condition." ) diff --git a/src/merge/resources/ticketing/types/patched_ticket_request.py b/src/merge/resources/ticketing/types/patched_ticket_request.py index 67342bc8..25fa8650 100644 --- a/src/merge/resources/ticketing/types/patched_ticket_request.py +++ b/src/merge/resources/ticketing/types/patched_ticket_request.py @@ -45,7 +45,9 @@ class PatchedTicketRequest(pydantic.BaseModel): description="The ticket’s description. HTML version of description is mapped if supported by the third-party platform." ) collections: typing.Optional[typing.List[typing.Optional[str]]] - ticket_type: typing.Optional[str] = pydantic.Field(description="The ticket's type.") + ticket_type: typing.Optional[str] = pydantic.Field( + description="The sub category of the ticket within the 3rd party system. Examples include incident, task, subtask or to-do." + ) account: typing.Optional[str] = pydantic.Field(description="The account associated with the ticket.") contact: typing.Optional[str] = pydantic.Field(description="The contact associated with the ticket.") parent_ticket: typing.Optional[str] = pydantic.Field(description="The ticket's parent ticket.") diff --git a/src/merge/resources/ticketing/types/project.py b/src/merge/resources/ticketing/types/project.py index 25e3b672..09e97c40 100644 --- a/src/merge/resources/ticketing/types/project.py +++ b/src/merge/resources/ticketing/types/project.py @@ -27,15 +27,15 @@ class Project(pydantic.BaseModel): id: typing.Optional[str] remote_id: typing.Optional[str] = pydantic.Field(description="The third-party API ID of the matching object.") + created_at: typing.Optional[dt.datetime] + modified_at: typing.Optional[dt.datetime] = pydantic.Field( + description="This is the datetime that this object was last updated by Merge" + ) name: typing.Optional[str] = pydantic.Field(description="The project's name.") description: typing.Optional[str] = pydantic.Field(description="The project's description.") remote_was_deleted: typing.Optional[bool] = pydantic.Field( description="Indicates whether or not this object has been deleted in the third party platform." ) - created_at: typing.Optional[dt.datetime] - modified_at: typing.Optional[dt.datetime] = pydantic.Field( - description="This is the datetime that this object was last updated by Merge" - ) field_mappings: typing.Optional[typing.Dict[str, typing.Any]] remote_data: typing.Optional[typing.List[RemoteData]] diff --git a/src/merge/resources/ticketing/types/role.py b/src/merge/resources/ticketing/types/role.py index 0166a1d5..18ce52c5 100644 --- a/src/merge/resources/ticketing/types/role.py +++ b/src/merge/resources/ticketing/types/role.py @@ -29,6 +29,10 @@ class Role(pydantic.BaseModel): id: typing.Optional[str] remote_id: typing.Optional[str] = pydantic.Field(description="The third-party API ID of the matching object.") + created_at: typing.Optional[dt.datetime] + modified_at: typing.Optional[dt.datetime] = pydantic.Field( + description="This is the datetime that this object was last updated by Merge" + ) name: typing.Optional[str] = pydantic.Field(description="The name of the Role.") ticket_actions: typing.Optional[typing.List[typing.Optional[RoleTicketActionsItem]]] = pydantic.Field( description="The set of actions that a User with this Role can perform. Possible enum values include: `VIEW`, `CREATE`, `EDIT`, `DELETE`, `CLOSE`, and `ASSIGN`." @@ -45,10 +49,6 @@ class Role(pydantic.BaseModel): remote_was_deleted: typing.Optional[bool] = pydantic.Field( description="Indicates whether or not this object has been deleted in the third party platform." ) - created_at: typing.Optional[dt.datetime] - modified_at: typing.Optional[dt.datetime] = pydantic.Field( - description="This is the datetime that this object was last updated by Merge" - ) field_mappings: typing.Optional[typing.Dict[str, typing.Any]] remote_data: typing.Optional[typing.List[RemoteData]] diff --git a/src/merge/resources/ticketing/types/tag.py b/src/merge/resources/ticketing/types/tag.py index 211cde5c..6c2b8d7f 100644 --- a/src/merge/resources/ticketing/types/tag.py +++ b/src/merge/resources/ticketing/types/tag.py @@ -26,14 +26,14 @@ class Tag(pydantic.BaseModel): """ remote_id: typing.Optional[str] = pydantic.Field(description="The third-party API ID of the matching object.") - name: typing.Optional[str] = pydantic.Field(description="The tag's name.") - remote_was_deleted: typing.Optional[bool] = pydantic.Field( - description="Indicates whether or not this object has been deleted in the third party platform." - ) created_at: typing.Optional[dt.datetime] modified_at: typing.Optional[dt.datetime] = pydantic.Field( description="This is the datetime that this object was last updated by Merge" ) + name: typing.Optional[str] = pydantic.Field(description="The tag's name.") + remote_was_deleted: typing.Optional[bool] = pydantic.Field( + description="Indicates whether or not this object has been deleted in the third party platform." + ) field_mappings: typing.Optional[typing.Dict[str, typing.Any]] remote_data: typing.Optional[typing.List[RemoteData]] diff --git a/src/merge/resources/ticketing/types/team.py b/src/merge/resources/ticketing/types/team.py index 1e27d70e..dab5ab04 100644 --- a/src/merge/resources/ticketing/types/team.py +++ b/src/merge/resources/ticketing/types/team.py @@ -27,15 +27,15 @@ class Team(pydantic.BaseModel): id: typing.Optional[str] remote_id: typing.Optional[str] = pydantic.Field(description="The third-party API ID of the matching object.") + created_at: typing.Optional[dt.datetime] + modified_at: typing.Optional[dt.datetime] = pydantic.Field( + description="This is the datetime that this object was last updated by Merge" + ) name: typing.Optional[str] = pydantic.Field(description="The team's name.") description: typing.Optional[str] = pydantic.Field(description="The team's description.") remote_was_deleted: typing.Optional[bool] = pydantic.Field( description="Indicates whether or not this object has been deleted in the third party platform." ) - created_at: typing.Optional[dt.datetime] - modified_at: typing.Optional[dt.datetime] = pydantic.Field( - description="This is the datetime that this object was last updated by Merge" - ) field_mappings: typing.Optional[typing.Dict[str, typing.Any]] remote_data: typing.Optional[typing.List[RemoteData]] diff --git a/src/merge/resources/ticketing/types/ticket.py b/src/merge/resources/ticketing/types/ticket.py index 856dd29a..94f84926 100644 --- a/src/merge/resources/ticketing/types/ticket.py +++ b/src/merge/resources/ticketing/types/ticket.py @@ -37,6 +37,10 @@ class Ticket(pydantic.BaseModel): id: typing.Optional[str] remote_id: typing.Optional[str] = pydantic.Field(description="The third-party API ID of the matching object.") + created_at: typing.Optional[dt.datetime] + modified_at: typing.Optional[dt.datetime] = pydantic.Field( + description="This is the datetime that this object was last updated by Merge" + ) name: typing.Optional[str] = pydantic.Field(description="The ticket's name.") assignees: typing.Optional[typing.List[typing.Optional[TicketAssigneesItem]]] creator: typing.Optional[TicketCreator] = pydantic.Field(description="The user who created this ticket.") @@ -55,7 +59,9 @@ class Ticket(pydantic.BaseModel): description="The ticket’s description. HTML version of description is mapped if supported by the third-party platform." ) collections: typing.Optional[typing.List[typing.Optional[TicketCollectionsItem]]] - ticket_type: typing.Optional[str] = pydantic.Field(description="The ticket's type.") + ticket_type: typing.Optional[str] = pydantic.Field( + description="The sub category of the ticket within the 3rd party system. Examples include incident, task, subtask or to-do." + ) account: typing.Optional[TicketAccount] = pydantic.Field(description="The account associated with the ticket.") contact: typing.Optional[TicketContact] = pydantic.Field(description="The contact associated with the ticket.") parent_ticket: typing.Optional[TicketParentTicket] = pydantic.Field(description="The ticket's parent ticket.") @@ -80,10 +86,6 @@ class Ticket(pydantic.BaseModel): "- `LOW` - LOW\n" ) ) - created_at: typing.Optional[dt.datetime] - modified_at: typing.Optional[dt.datetime] = pydantic.Field( - description="This is the datetime that this object was last updated by Merge" - ) field_mappings: typing.Optional[typing.Dict[str, typing.Any]] remote_data: typing.Optional[typing.List[RemoteData]] remote_fields: typing.Optional[typing.List[RemoteField]] diff --git a/src/merge/resources/ticketing/types/ticket_request.py b/src/merge/resources/ticketing/types/ticket_request.py index 5d3d9d95..ec7b4d82 100644 --- a/src/merge/resources/ticketing/types/ticket_request.py +++ b/src/merge/resources/ticketing/types/ticket_request.py @@ -52,7 +52,9 @@ class TicketRequest(pydantic.BaseModel): description="The ticket’s description. HTML version of description is mapped if supported by the third-party platform." ) collections: typing.Optional[typing.List[typing.Optional[TicketRequestCollectionsItem]]] - ticket_type: typing.Optional[str] = pydantic.Field(description="The ticket's type.") + ticket_type: typing.Optional[str] = pydantic.Field( + description="The sub category of the ticket within the 3rd party system. Examples include incident, task, subtask or to-do." + ) account: typing.Optional[TicketRequestAccount] = pydantic.Field( description="The account associated with the ticket." ) diff --git a/src/merge/resources/ticketing/types/user.py b/src/merge/resources/ticketing/types/user.py index 366706a6..bef3b895 100644 --- a/src/merge/resources/ticketing/types/user.py +++ b/src/merge/resources/ticketing/types/user.py @@ -29,6 +29,10 @@ class User(pydantic.BaseModel): id: typing.Optional[str] remote_id: typing.Optional[str] = pydantic.Field(description="The third-party API ID of the matching object.") + created_at: typing.Optional[dt.datetime] + modified_at: typing.Optional[dt.datetime] = pydantic.Field( + description="This is the datetime that this object was last updated by Merge" + ) name: typing.Optional[str] = pydantic.Field(description="The user's name.") email_address: typing.Optional[str] = pydantic.Field(description="The user's email address.") is_active: typing.Optional[bool] = pydantic.Field(description="Whether or not the user is active.") @@ -38,10 +42,6 @@ class User(pydantic.BaseModel): remote_was_deleted: typing.Optional[bool] = pydantic.Field( description="Indicates whether or not this object has been deleted in the third party platform." ) - created_at: typing.Optional[dt.datetime] - modified_at: typing.Optional[dt.datetime] = pydantic.Field( - description="This is the datetime that this object was last updated by Merge" - ) field_mappings: typing.Optional[typing.Dict[str, typing.Any]] remote_data: typing.Optional[typing.List[RemoteData]]